Skip to content

Commit

Permalink
Merge pull request #47 from t-ohtsuka89/main
Browse files Browse the repository at this point in the history
Feature 'variantProcessor' Option Description
  • Loading branch information
andrewn617 authored Sep 1, 2024
2 parents ff35cb4 + 28acbd4 commit f0fad38
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
4 changes: 4 additions & 0 deletions features/activestorage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Installs libvips, ffmpeg and poppler-utils which are required to use Active Stor

## Options

| Options Id | Description | Type | Default Value |
|-----|-----|-----|-----|
| variantProcessor | The image processing library to use with Active Storage | string | vips |

## Customizations

### VS Code Extensions
Expand Down
15 changes: 13 additions & 2 deletions features/activestorage/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
{
"id": "activestorage",
"version": "1.0.1",
"version": "1.1.0",
"name": "Active Storage",
"description": "Installs utilities needed for Rails Active Storage"
"description": "Installs utilities needed for Rails Active Storage",
"options": {
"variantProcessor": {
"type": "string",
"proposals": [
"vips",
"mini_magick"
],
"default": "vips",
"description": "The image processing library to use with Active Storage"
}
}
}
8 changes: 7 additions & 1 deletion features/activestorage/install.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
#!/bin/sh
set -e

if [ "$VARIANTPROCESSOR" = "mini_magick"]; then
IMAGE_PROCESSOR="imagemagick"
else
IMAGE_PROCESSOR="libvips"
fi

apt-get update -qq && \
apt-get install --no-install-recommends -y \
libvips \
$IMAGE_PROCESSOR \
ffmpeg \
poppler-utils

Expand Down

0 comments on commit f0fad38

Please sign in to comment.