rails-metro 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7984159d5d4815a8dd34c8e801453a681891477cd7462dc9ca2bc17a7afac16e
4
- data.tar.gz: 76fb628dbd3ffb5ba2c903ce1939255529ba3e6b09b3fac2e8d518002d783f20
3
+ metadata.gz: 84b44dd4a5dbe6e0e67f533e55e8e94a6613fe1075bb7e3a7359c6d6d883f8be
4
+ data.tar.gz: 606865cb7520167ac819128949997de9de9768119e38340d69852c0bb61182f6
5
5
  SHA512:
6
- metadata.gz: af5c65587ee121c14352822e51500702c8eb6fb6573b8a07c9c6fe2124ec7cbe958a1b49f461037fcd379206c8ae8a995d1392cbd40b2a31fd523d40bc95dedf
7
- data.tar.gz: 43d8d9d05da67ee9bed0fdad6c42d47d58cf7e9802c3034758c3a0dfcae77d9c7e44c4a8c75828ed8858dc832426c4f84e00627f9c2596ac736e350854dca243
6
+ metadata.gz: a96b1dad92b57c8230a57a2fdbfdbfd847cfb2fe2512eb5d286aa32e75fd39fac76e58cb808d76c85bd45b26207df72595567e4f659af4e74240c3af2555c4dc
7
+ data.tar.gz: 6cbe3467d654073cfa19f33b59ba14b35eb16b646af2e379e91ebfa54828c8bf294ad5dd65484c608c7afcaedb240ec588d53cd783bd99583c1f613810c6190d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.0] - 2026-03-31
4
+
5
+ ### Added
6
+ - **`image_processing` pack** — ActiveStorage image variants via libvips (`image_processing` + `ruby-vips`)
7
+ - **`gcs_storage` pack** — Google Cloud Storage backend for ActiveStorage
8
+ - **`azure_storage` pack** — Azure Blob Storage backend for ActiveStorage
9
+ - **`shrine` pack** — Shrine file attachment library, alternative to ActiveStorage (conflicts with `carrierwave`)
10
+ - **`carrierwave` pack** — CarrierWave file upload library (conflicts with `shrine`)
11
+ - **`sentry` pack** — renamed from `error_tracking` to match the actual gem installed
12
+
13
+ ### Changed
14
+ - Removed unnecessary conflicts between error tracking packs (`sentry`, `honeybadger`, `rollbar`) — all can coexist
15
+ - Removed unnecessary conflicts between search packs (`search`, `elasticsearch`, `meilisearch`) — all can coexist
16
+ - Storage backend packs (`s3_storage`, `r2_storage`, `gcs_storage`, `azure_storage`) now correctly conflict with each other
17
+
18
+ ## [0.2.0] - 2026-03-31
19
+
20
+ ### Added
21
+ - **`spark` pack** — Hotwire Spark hot reloading for HTML, CSS, and Ruby changes without full page reload (conflicts with `hotwire_livereload`)
22
+ - **`anycable` pack** — AnyCable high-performance WebSocket server replacing ActionCable (conflicts with `websockets`)
23
+
3
24
  ## [0.1.0] - 2026-03-31
4
25
 
5
26
  ### Added
data/README.md CHANGED
@@ -6,6 +6,7 @@ rails-metro compiles your selections into a [Rails Application Template](https:/
6
6
 
7
7
  ## Installation
8
8
 
9
+ **RubyGems**
9
10
  ```bash
10
11
  gem install rails-metro
11
12
 
@@ -13,6 +14,17 @@ gem install rails-metro
13
14
  gem install bubbletea
14
15
  ```
15
16
 
17
+ **Homebrew**
18
+ ```bash
19
+ brew tap rish/tap
20
+ brew install metro
21
+ ```
22
+
23
+ **Arch Linux (AUR)**
24
+ ```bash
25
+ yay -S ruby-rails-metro
26
+ ```
27
+
16
28
  ## Quick Start
17
29
 
18
30
  ```bash
@@ -0,0 +1,33 @@
1
+ module Rails
2
+ module Metro
3
+ module Packs
4
+ class AnycablePack < FeaturePack
5
+ pack_name "anycable"
6
+ description "AnyCable — high-performance WebSocket server replacing ActionCable"
7
+ category "core"
8
+
9
+ conflicts_with "websockets"
10
+
11
+ def gems
12
+ [
13
+ {name: "anycable-rails"}
14
+ ]
15
+ end
16
+
17
+ def template_lines
18
+ [
19
+ 'generate "anycable:setup"'
20
+ ]
21
+ end
22
+
23
+ def post_install_notes
24
+ [
25
+ "AnyCable: Install the AnyCable Go server: https://docs.anycable.io/anycable-go/getting_started",
26
+ "AnyCable: Start alongside Rails with: anycable & rails s",
27
+ "AnyCable: See https://docs.anycable.io for full configuration"
28
+ ]
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,45 @@
1
+ module Rails
2
+ module Metro
3
+ module Packs
4
+ class AzureStoragePack < FeaturePack
5
+ pack_name "azure_storage"
6
+ description "Azure Blob Storage for Active Storage file uploads"
7
+ category "core"
8
+
9
+ conflicts_with "s3_storage", "r2_storage", "gcs_storage"
10
+
11
+ def gems
12
+ [
13
+ {name: "azure-storage-blob"}
14
+ ]
15
+ end
16
+
17
+ def template_lines
18
+ [
19
+ 'inject_into_file "config/storage.yml", <<~YML',
20
+ "",
21
+ " azure:",
22
+ " service: AzureStorage",
23
+ " storage_account_name: <%= Rails.application.credentials.dig(:azure, :storage_account_name) %>",
24
+ " storage_access_key: <%= Rails.application.credentials.dig(:azure, :storage_access_key) %>",
25
+ " container: <%= Rails.application.credentials.dig(:azure, :container) %>",
26
+ "YML",
27
+ "",
28
+ 'environment "config.active_storage.service = :azure", env: "production"'
29
+ ]
30
+ end
31
+
32
+ def post_install_notes
33
+ [
34
+ "Azure: Add your credentials with `bin/rails credentials:edit`:",
35
+ " azure:",
36
+ " storage_account_name: your-account-name",
37
+ " storage_access_key: your-access-key",
38
+ " container: your-container-name",
39
+ "Azure: Create a storage account at portal.azure.com and grab the access key from Access Keys"
40
+ ]
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,32 @@
1
+ module Rails
2
+ module Metro
3
+ module Packs
4
+ class CarrierWavePack < FeaturePack
5
+ pack_name "carrierwave"
6
+ description "CarrierWave file upload library"
7
+ category "core"
8
+
9
+ conflicts_with "shrine"
10
+
11
+ def gems
12
+ [
13
+ {name: "carrierwave"}
14
+ ]
15
+ end
16
+
17
+ def template_lines
18
+ []
19
+ end
20
+
21
+ def post_install_notes
22
+ [
23
+ "CarrierWave: Generate your first uploader: rails generate uploader Avatar",
24
+ "CarrierWave: Mount in a model: mount_uploader :avatar, AvatarUploader",
25
+ "CarrierWave: Add migration: add_column :users, :avatar, :string",
26
+ "CarrierWave: See https://github.com/carrierwaveuploader/carrierwave for docs"
27
+ ]
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -5,7 +5,6 @@ module Rails
5
5
  pack_name "elasticsearch"
6
6
  description "Searchkick for Elasticsearch-powered search"
7
7
  category "data"
8
- conflicts_with "search", "meilisearch"
9
8
 
10
9
  def gems
11
10
  [
@@ -2,10 +2,9 @@ module Rails
2
2
  module Metro
3
3
  module Packs
4
4
  class ErrorTrackingPack < FeaturePack
5
- pack_name "error_tracking"
5
+ pack_name "sentry"
6
6
  description "Sentry for error tracking and performance monitoring"
7
7
  category "ops"
8
- conflicts_with "honeybadger", "rollbar"
9
8
 
10
9
  def gems
11
10
  [
@@ -0,0 +1,49 @@
1
+ module Rails
2
+ module Metro
3
+ module Packs
4
+ class GcsStoragePack < FeaturePack
5
+ pack_name "gcs_storage"
6
+ description "Google Cloud Storage for Active Storage file uploads"
7
+ category "core"
8
+
9
+ conflicts_with "s3_storage", "r2_storage", "azure_storage"
10
+
11
+ def gems
12
+ [
13
+ {name: "google-cloud-storage"}
14
+ ]
15
+ end
16
+
17
+ def template_lines
18
+ [
19
+ 'inject_into_file "config/storage.yml", <<~YML',
20
+ "",
21
+ " google:",
22
+ " service: GCS",
23
+ " project: <%= Rails.application.credentials.dig(:gcs, :project) %>",
24
+ " credentials: <%= Rails.application.credentials.dig(:gcs, :credentials) %>",
25
+ " bucket: <%= Rails.application.credentials.dig(:gcs, :bucket) %>",
26
+ "YML",
27
+ "",
28
+ 'environment "config.active_storage.service = :google", env: "production"'
29
+ ]
30
+ end
31
+
32
+ def post_install_notes
33
+ [
34
+ "GCS: Add your credentials with `bin/rails credentials:edit`:",
35
+ " gcs:",
36
+ " project: your-gcp-project-id",
37
+ " bucket: your-bucket-name",
38
+ " credentials:",
39
+ " type: service_account",
40
+ " project_id: your-gcp-project-id",
41
+ " private_key_id: ...",
42
+ " private_key: ...",
43
+ "GCS: Create a service account at console.cloud.google.com with Storage Object Admin role"
44
+ ]
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -5,7 +5,6 @@ module Rails
5
5
  pack_name "honeybadger"
6
6
  description "Honeybadger for error tracking and uptime monitoring"
7
7
  category "ops"
8
- conflicts_with "error_tracking", "rollbar"
9
8
 
10
9
  def gems
11
10
  [
@@ -6,6 +6,8 @@ module Rails
6
6
  description "Hotwire LiveReload for automatic page refresh on file changes"
7
7
  category "ops"
8
8
 
9
+ conflicts_with "spark"
10
+
9
11
  def gems
10
12
  [
11
13
  {name: "hotwire-livereload", group: :development}
@@ -0,0 +1,32 @@
1
+ module Rails
2
+ module Metro
3
+ module Packs
4
+ class ImageProcessingPack < FeaturePack
5
+ pack_name "image_processing"
6
+ description "Image processing for Active Storage variants using libvips (Rails 7+ recommended)"
7
+ category "core"
8
+
9
+ def gems
10
+ [
11
+ {name: "image_processing"},
12
+ {name: "ruby-vips"}
13
+ ]
14
+ end
15
+
16
+ def template_lines
17
+ []
18
+ end
19
+
20
+ def post_install_notes
21
+ [
22
+ "ImageProcessing: Install libvips on your system:",
23
+ " macOS: brew install vips",
24
+ " Ubuntu: apt install libvips-tools",
25
+ " Heroku: add the heroku/heroku-buildpack-apt buildpack and apt-packages: libvips",
26
+ "ImageProcessing: Use variants in views: <%= image_tag user.avatar.variant(resize_to_limit: [300, 300]) %>"
27
+ ]
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -5,7 +5,6 @@ module Rails
5
5
  pack_name "meilisearch"
6
6
  description "Meilisearch for typo-tolerant, fast full-text search"
7
7
  category "data"
8
- conflicts_with "search", "elasticsearch"
9
8
 
10
9
  def gems
11
10
  [
@@ -5,7 +5,7 @@ module Rails
5
5
  pack_name "r2_storage"
6
6
  description "Cloudflare R2 for S3-compatible Active Storage (no egress fees)"
7
7
  category "core"
8
- conflicts_with "s3_storage"
8
+ conflicts_with "s3_storage", "gcs_storage", "azure_storage"
9
9
 
10
10
  def gems
11
11
  [
@@ -5,7 +5,6 @@ module Rails
5
5
  pack_name "rollbar"
6
6
  description "Rollbar for real-time error tracking and debugging"
7
7
  category "ops"
8
- conflicts_with "error_tracking", "honeybadger"
9
8
 
10
9
  def gems
11
10
  [
@@ -5,7 +5,7 @@ module Rails
5
5
  pack_name "s3_storage"
6
6
  description "AWS S3 for Active Storage file uploads"
7
7
  category "core"
8
- conflicts_with "r2_storage"
8
+ conflicts_with "r2_storage", "gcs_storage", "azure_storage"
9
9
 
10
10
  def gems
11
11
  [
@@ -5,7 +5,6 @@ module Rails
5
5
  pack_name "search"
6
6
  description "pg_search for PostgreSQL full-text search"
7
7
  category "data"
8
- conflicts_with "meilisearch", "elasticsearch"
9
8
 
10
9
  def gems
11
10
  [
@@ -0,0 +1,62 @@
1
+ module Rails
2
+ module Metro
3
+ module Packs
4
+ class ShrinePack < FeaturePack
5
+ pack_name "shrine"
6
+ description "Shrine file attachment library — flexible alternative to Active Storage"
7
+ category "core"
8
+
9
+ conflicts_with "carrierwave"
10
+
11
+ def gems
12
+ [
13
+ {name: "shrine"}
14
+ ]
15
+ end
16
+
17
+ def template_lines
18
+ [
19
+ 'create_file "config/initializers/shrine.rb", <<~RUBY',
20
+ " require \"shrine\"",
21
+ " require \"shrine/storage/file_system\"",
22
+ "",
23
+ " if Rails.env.production?",
24
+ " require \"shrine/storage/s3\"",
25
+ "",
26
+ " s3_options = {",
27
+ " bucket: Rails.application.credentials.dig(:aws, :bucket),",
28
+ " region: Rails.application.credentials.dig(:aws, :region) || \"us-east-1\",",
29
+ " access_key_id: Rails.application.credentials.dig(:aws, :access_key_id),",
30
+ " secret_access_key: Rails.application.credentials.dig(:aws, :secret_access_key)",
31
+ " }",
32
+ "",
33
+ " Shrine.storages = {",
34
+ " cache: Shrine::Storage::S3.new(prefix: \"cache\", **s3_options),",
35
+ " store: Shrine::Storage::S3.new(**s3_options)",
36
+ " }",
37
+ " else",
38
+ " Shrine.storages = {",
39
+ " cache: Shrine::Storage::FileSystem.new(\"public\", prefix: \"uploads/cache\"),",
40
+ " store: Shrine::Storage::FileSystem.new(\"public\", prefix: \"uploads\")",
41
+ " }",
42
+ " end",
43
+ "",
44
+ " Shrine.plugin :activerecord",
45
+ " Shrine.plugin :cached_attachment_data",
46
+ " Shrine.plugin :restore_cached_data",
47
+ "RUBY"
48
+ ]
49
+ end
50
+
51
+ def post_install_notes
52
+ [
53
+ "Shrine: Create an uploader: app/uploaders/image_uploader.rb",
54
+ "Shrine: Include in models: include ImageUploader::Attachment(:photo)",
55
+ "Shrine: Add migration: add_column :users, :photo_data, :text",
56
+ "Shrine: See https://shrinerb.com for full documentation"
57
+ ]
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,30 @@
1
+ module Rails
2
+ module Metro
3
+ module Packs
4
+ class SparkPack < FeaturePack
5
+ pack_name "spark"
6
+ description "Hotwire Spark — hot reloading for HTML, CSS, and Ruby changes without full page reload"
7
+ category "ops"
8
+
9
+ conflicts_with "hotwire_livereload"
10
+
11
+ def gems
12
+ [
13
+ {name: "hotwire-spark", group: :development}
14
+ ]
15
+ end
16
+
17
+ def template_lines
18
+ []
19
+ end
20
+
21
+ def post_install_notes
22
+ [
23
+ "Spark: HTML, CSS, and Ruby file changes are streamed live without full page reload",
24
+ "Spark: No browser extension needed -- works via Turbo Streams over ActionCable"
25
+ ]
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -6,6 +6,8 @@ module Rails
6
6
  description "Solid Cable (Rails 8 default, database-backed ActionCable)"
7
7
  category "core"
8
8
 
9
+ conflicts_with "anycable"
10
+
9
11
  def gems
10
12
  [
11
13
  {name: "solid_cable"}
@@ -1,5 +1,5 @@
1
1
  module Rails
2
2
  module Metro
3
- VERSION = "0.1.0"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-metro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - rails-metro contributors
@@ -52,6 +52,7 @@ files:
52
52
  - lib/rails/metro/packs/ahoy_pack.rb
53
53
  - lib/rails/metro/packs/amplitude_pack.rb
54
54
  - lib/rails/metro/packs/annotate_pack.rb
55
+ - lib/rails/metro/packs/anycable_pack.rb
55
56
  - lib/rails/metro/packs/api_cors_pack.rb
56
57
  - lib/rails/metro/packs/api_docs_pack.rb
57
58
  - lib/rails/metro/packs/api_guard_pack.rb
@@ -62,10 +63,12 @@ files:
62
63
  - lib/rails/metro/packs/authorization_pack.rb
63
64
  - lib/rails/metro/packs/avo_pack.rb
64
65
  - lib/rails/metro/packs/aws_ses_pack.rb
66
+ - lib/rails/metro/packs/azure_storage_pack.rb
65
67
  - lib/rails/metro/packs/background_jobs_pack.rb
66
68
  - lib/rails/metro/packs/blazer_pack.rb
67
69
  - lib/rails/metro/packs/breadcrumbs_pack.rb
68
70
  - lib/rails/metro/packs/caching_pack.rb
71
+ - lib/rails/metro/packs/carrierwave_pack.rb
69
72
  - lib/rails/metro/packs/charting_pack.rb
70
73
  - lib/rails/metro/packs/circuit_breaker_pack.rb
71
74
  - lib/rails/metro/packs/clicky_pack.rb
@@ -86,6 +89,7 @@ files:
86
89
  - lib/rails/metro/packs/fathom_pack.rb
87
90
  - lib/rails/metro/packs/feature_flags_pack.rb
88
91
  - lib/rails/metro/packs/friendly_id_pack.rb
92
+ - lib/rails/metro/packs/gcs_storage_pack.rb
89
93
  - lib/rails/metro/packs/geocoder_pack.rb
90
94
  - lib/rails/metro/packs/good_job_pack.rb
91
95
  - lib/rails/metro/packs/google_analytics_pack.rb
@@ -96,6 +100,7 @@ files:
96
100
  - lib/rails/metro/packs/honeybadger_pack.rb
97
101
  - lib/rails/metro/packs/hotwire_livereload_pack.rb
98
102
  - lib/rails/metro/packs/icons_pack.rb
103
+ - lib/rails/metro/packs/image_processing_pack.rb
99
104
  - lib/rails/metro/packs/invisible_captcha_pack.rb
100
105
  - lib/rails/metro/packs/kredis_pack.rb
101
106
  - lib/rails/metro/packs/lemon_squeezy_pack.rb
@@ -150,6 +155,7 @@ files:
150
155
  - lib/rails/metro/packs/sent_dm_pack.rb
151
156
  - lib/rails/metro/packs/seo_pack.rb
152
157
  - lib/rails/metro/packs/shoulda_matchers_pack.rb
158
+ - lib/rails/metro/packs/shrine_pack.rb
153
159
  - lib/rails/metro/packs/sidekiq_pack.rb
154
160
  - lib/rails/metro/packs/simple_calendar_pack.rb
155
161
  - lib/rails/metro/packs/simple_form_pack.rb
@@ -157,6 +163,7 @@ files:
157
163
  - lib/rails/metro/packs/slack_notifier_pack.rb
158
164
  - lib/rails/metro/packs/soft_deletes_pack.rb
159
165
  - lib/rails/metro/packs/solidus_pack.rb
166
+ - lib/rails/metro/packs/spark_pack.rb
160
167
  - lib/rails/metro/packs/spreadsheets_pack.rb
161
168
  - lib/rails/metro/packs/statcounter_pack.rb
162
169
  - lib/rails/metro/packs/stimulus_components_pack.rb