jet_ui 0.2.5 → 0.2.7

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: d0ada5d27d51347fe8c7c9a1115cea20583ebd71ed6bb5a01cb9fc3e037870c5
4
- data.tar.gz: 8a26c689f883d6d21e4697e0f6294435ab0c301542e1526df76c2c8eb007fb03
3
+ metadata.gz: fcadff31d7c347d620f7426051002b85a7cdc18f245bd642b6bd0dddfc9ddb84
4
+ data.tar.gz: 22ee5fb1f26ca32f57db44cd42b644c333235e69900264fe0c5affad323ee01c
5
5
  SHA512:
6
- metadata.gz: 34c6d3e692ba8f9fb508983decc576ab90954636a71327e8a2e3f2d1434e5a3467aa3b63db158f18edee717292bb9e8256b6e32b1f4176138057e9c23f9f573f
7
- data.tar.gz: e5f38681f8497b923ff6b3be32512f71c86cc8e93ff2bacccab6244627495519fd53781e0668b04cd3b078cd192adb6a4e144c9d42dde3a0238e6cf4b93fd358
6
+ metadata.gz: 1a1a6e09e5dd6779994e47f3723774eb13d574049e08ad6b8b91b99cc38c9dd8e50639b57ed7f2dda1f0ba7b74bcad4ee34531dbd9de1d52c18bd22dd9bcd8f4
7
+ data.tar.gz: 957311b4ac04bbe71784cdef0b31981a552db18b52bc55221b5ef93a4afeebc9a8e19b7e04e9114082fb129b8ce7fbafcaa06fb9648112c9be17be5b3bc73d08
data/CHANGELOG.md CHANGED
@@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.7] - 2026-05-29
11
+
12
+ ### Added
13
+ - Generator tests for `jet_ui:eject` and `jet_ui:install`
14
+
15
+ ### Changed
16
+ - `jet_ui:eject --help` now lists all available components derived directly from `MANIFEST` — always accurate, never stale
17
+ - `jet_ui:install --help` updated with gem overview and pointer to `jet_ui:eject --help`
18
+ - Upgrade development Ruby version to 4.0.5
19
+
20
+ ### Removed
21
+ - Stale `USAGE` files for `eject` and `install` generators — superseded by the class-level `desc`
22
+
23
+ ## [0.2.6] - 2026-05-13
24
+
25
+ ### Changed
26
+ - Upgrade development Ruby version to 4.0.4
27
+
10
28
  ## [0.2.5] - 2026-05-11
11
29
 
12
30
  ### Added
@@ -9,35 +9,6 @@ module JetUi
9
9
  [File.expand_path('../../../..', __dir__)]
10
10
  end
11
11
 
12
- desc <<~DESC
13
- Copies one or more JetUi component source files into your application
14
- so they can be customised locally. Ejected files take precedence over
15
- the gem's built-in versions automatically — no extra configuration needed.
16
-
17
- Available components: #{%w[accordion btn card clipboard divider drawer dropdown empty flash header icon list modal navbar pagy popover sidebar spinner stat stepper table tabs timeline tooltip turbo_confirm].join(', ')}
18
-
19
- Examples:
20
- rails generate jet_ui:eject btn
21
- rails generate jet_ui:eject flash
22
- rails generate jet_ui:eject modal drawer
23
- rails generate jet_ui:eject btn --skip-test
24
- rails generate jet_ui:eject btn --skip-preview
25
- rails generate jet_ui:eject flash --skip-javascript
26
- rails generate jet_ui:eject btn --skip-test --skip-preview
27
- DESC
28
-
29
- argument :components, type: :array, banner: 'component [component ...]',
30
- desc: 'One or more component names to eject (e.g. btn card)'
31
-
32
- class_option :skip_test, type: :boolean, default: false,
33
- desc: 'Skip ejecting the component test file'
34
-
35
- class_option :skip_preview, type: :boolean, default: false,
36
- desc: 'Skip ejecting the ViewComponent preview file'
37
-
38
- class_option :skip_javascript, type: :boolean, default: false,
39
- desc: 'Skip ejecting the Stimulus controller JS file (for components that have one)'
40
-
41
12
  MANIFEST = {
42
13
  'btn' => {
43
14
  files: [
@@ -338,11 +309,41 @@ module JetUi
338
309
  }
339
310
  }.freeze
340
311
 
312
+ desc <<~DESC
313
+ Copies one or more JetUi component source files into your application
314
+ so they can be customised locally. Ejected files take precedence over
315
+ the gem's built-in versions automatically — no extra configuration needed.
316
+
317
+ Available components (#{MANIFEST.size}):
318
+ #{MANIFEST.keys.sort.join(', ')}
319
+
320
+ Examples:
321
+ rails generate jet_ui:eject btn
322
+ rails generate jet_ui:eject flash
323
+ rails generate jet_ui:eject modal drawer
324
+ rails generate jet_ui:eject btn --skip-test
325
+ rails generate jet_ui:eject btn --skip-preview
326
+ rails generate jet_ui:eject flash --skip-javascript
327
+ rails generate jet_ui:eject btn --skip-test --skip-preview
328
+ DESC
329
+
330
+ argument :components, type: :array, banner: 'component [component ...]',
331
+ desc: 'One or more component names to eject (e.g. btn card)'
332
+
333
+ class_option :skip_test, type: :boolean, default: false,
334
+ desc: 'Skip ejecting the component test file'
335
+
336
+ class_option :skip_preview, type: :boolean, default: false,
337
+ desc: 'Skip ejecting the ViewComponent preview file'
338
+
339
+ class_option :skip_javascript, type: :boolean, default: false,
340
+ desc: 'Skip ejecting the Stimulus controller JS file (for components that have one)'
341
+
341
342
  def eject_components
342
343
  unknown = components.map(&:downcase) - MANIFEST.keys
343
344
  if unknown.any?
344
345
  say "\nUnknown component(s): #{unknown.join(', ')}", :red
345
- say "Available: #{MANIFEST.keys.join(', ')}\n", :red
346
+ say "Available: #{MANIFEST.keys.join(', ')}", :red
346
347
  exit 1
347
348
  end
348
349
 
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'rails/generators'
4
+ require_relative '../eject/eject_generator'
4
5
 
5
6
  module JetUi
6
7
  module Generators
@@ -12,7 +13,11 @@ module JetUi
12
13
  source_root File.expand_path('templates', __dir__)
13
14
 
14
15
  desc <<~DESC
15
- Sets up JetUi in your Rails application.
16
+ JetUi is a ViewComponent-based UI library for Rails — #{EjectGenerator::MANIFEST.size} ready-made
17
+ components styled with Tailwind CSS v4, matching the design system at
18
+ ui.jetrockets.com.
19
+
20
+ This generator sets up JetUi in your Rails application:
16
21
 
17
22
  1. CSS — Detects your Tailwind source file and injects a single @import
18
23
  that covers all JetUi component stylesheets. New components added in
@@ -20,8 +25,7 @@ module JetUi
20
25
 
21
26
  2. JS — Adds eagerLoadControllersFrom("jet_ui", application) to your
22
27
  Stimulus controllers index. All current and future JetUi Stimulus
23
- controllers (flash, modal, etc.) are registered automatically when
24
- you update the gem — no further changes needed.
28
+ controllers are registered automatically when you update the gem.
25
29
 
26
30
  Safe to run multiple times — already-configured steps are skipped.
27
31
 
@@ -30,6 +34,9 @@ module JetUi
30
34
  app/assets/stylesheets/application.tailwind.css
31
35
  app/assets/stylesheets/application.postcss.css
32
36
 
37
+ To see all available components with descriptions:
38
+ rails generate jet_ui:eject --help
39
+
33
40
  Example:
34
41
  rails generate jet_ui:install
35
42
  DESC
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JetUi
4
- VERSION = '0.2.5'
4
+ VERSION = '0.2.7'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jet_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - JetRockets
@@ -633,9 +633,7 @@ files:
633
633
  - app/components/jet_ui/turbo_confirm/component.html.erb
634
634
  - app/components/jet_ui/turbo_confirm/component.rb
635
635
  - app/helpers/jet_ui_helper.rb
636
- - lib/generators/jet_ui/eject/USAGE
637
636
  - lib/generators/jet_ui/eject/eject_generator.rb
638
- - lib/generators/jet_ui/install/USAGE
639
637
  - lib/generators/jet_ui/install/install_generator.rb
640
638
  - lib/jet_ui.rb
641
639
  - lib/jet_ui/engine.rb
@@ -661,7 +659,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
661
659
  - !ruby/object:Gem::Version
662
660
  version: '0'
663
661
  requirements: []
664
- rubygems_version: 4.0.6
662
+ rubygems_version: 4.0.10
665
663
  specification_version: 4
666
664
  summary: ViewComponent-based UI library for Rails applications
667
665
  test_files: []
@@ -1,20 +0,0 @@
1
- Description:
2
- Ejects one or more JetUi components into your application so they can
3
- be customised locally. The ejected files take precedence over the gem's
4
- built-in versions, similar to how `rails generate devise:views` works.
5
-
6
- For components that include a Stimulus controller (e.g. flash), the JS
7
- file is also ejected alongside the Ruby and CSS files.
8
-
9
- Available components:
10
- btn, card, icon, spinner, avatar, breadcrumbs, tabs, empty, list,
11
- divider, timeline, stepper, table, pagy, flash
12
-
13
- Examples:
14
- rails generate jet_ui:eject btn
15
- rails generate jet_ui:eject flash
16
- rails generate jet_ui:eject btn card flash
17
- rails generate jet_ui:eject btn --skip-test
18
- rails generate jet_ui:eject btn --skip-preview
19
- rails generate jet_ui:eject flash --skip-javascript
20
- rails generate jet_ui:eject btn --skip-test --skip-preview
@@ -1,11 +0,0 @@
1
- Description:
2
- Sets up JetUi in your Rails application.
3
-
4
- - Injects the JetUi CSS import into your Tailwind entrypoint
5
- - Registers JetUi Stimulus controllers via eagerLoadControllersFrom
6
- (requires @hotwired/stimulus-loading, included in default Rails apps)
7
-
8
- Safe to run multiple times — already-configured steps are skipped.
9
-
10
- Example:
11
- rails generate jet_ui:install