shoelace-rails 0.4.0 → 0.4.1

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: 4d765c426ef9b3551956028e292d1fe312f04c85b5e1184d2f44193c348809ae
4
- data.tar.gz: 662389bc95dc73c15851d9343304da787d70b6f93bff4dcb16124d42fa8fb7c6
3
+ metadata.gz: 7a2dfd18c31e8151980211fe86c5911629f795652e2662315055695f31b7e2d6
4
+ data.tar.gz: a2c224c7c8ba4fd199d9190d77e37246650753f9c76d29156c25b4754c65018b
5
5
  SHA512:
6
- metadata.gz: 21e95f106d6c8cff0b8edb1cdfec3d3e5d11e1a477a7ba2eff509035194666cdecadeef43465d8f426ea22082b4ce174fb3e47d82e8f7f9be4aa7e257e4a0e76
7
- data.tar.gz: 4eeb6447fb6c65179fd0514e58171ca45045069b87835cb993c8935aa4011e267b308308fffebca5fbe2409013d78548904defba33d8f28716d7370569c19b0b
6
+ metadata.gz: 8a78a2537a9851beb4f9d7e33214e51fbff8c3539cef0d244951b6ac36d7f0837a84129a8dfe36a46f8e7eec8f474e65b9a45078abde2a508b3a3b90f5322060
7
+ data.tar.gz: 5a99554ecd05cd33ffbe41929984a82828961db94ac3f4a4c796e6685bff57c08afef96ed8d8c58e055edaada87e2e0be0ebc5761b870bec74164a476c7e36e6
data/CHANGELOG.md CHANGED
@@ -1,12 +1,23 @@
1
- ## v0.4.0
1
+ ## v0.4.1
2
+
3
+ _<sup>released at 2023-03-21 05:01:50 UTC</sup>_
4
+
5
+ #### 🐞Bug Fixes
6
+
7
+ - Fixes a bug where `FormHelper` may not be defined when someone loads `ActionView` too early (d91ed3b595c01ce2dfc471b12b14311e0660d3d7)
8
+ - Fixes a bug where the Shoelace rake tasks blow up when the project does not depend on Sprockets or Propshaft (0e64cd6dc38a037171be04eaf1d3f59c3c8529eb, 75adf831b1faa7f5d1faeed26e672d4bc89b9513)
9
+
10
+ ## [v0.4.0](https://github.com/yuki24/shoelace-rails/tree/v0.4.0)
11
+
12
+ _<sup>released at 2023-01-07 07:23:50 UTC</sup>_
2
13
 
3
14
  #### 🚨 Breaking Changes
4
15
 
5
- - No longer works with 2.0.0-beta.88 and below.
16
+ - No longer works with `2.0.0-beta.88` and below.
6
17
 
7
18
  #### ⭐️ Features
8
19
 
9
- - Support Shoelace.style 2.0.0-beta.88
20
+ - Support Shoelace.style `2.0.0-beta.88`.
10
21
 
11
22
  ## [v0.3.0](https://github.com/yuki24/shoelace-rails/tree/v0.3.0)
12
23
 
@@ -2,9 +2,6 @@
2
2
 
3
3
  module Shoelace
4
4
  module FormHelper
5
- mattr_accessor :invalid_input_class_name
6
- self.invalid_input_class_name = nil
7
-
8
5
  class ShoelaceInputField < ActionView::Helpers::Tags::TextField #:nodoc:
9
6
  attr_reader :field_type
10
7
 
@@ -21,7 +18,7 @@ module Shoelace
21
18
 
22
19
  options["size"] = options["maxlength"] unless options.key?("size")
23
20
  options["type"] ||= field_type
24
- options["class"] ||= [options["class"], Shoelace::FormHelper.invalid_input_class_name].compact.join(" ") if @object.respond_to?(:errors) && @object.errors[@method_name].present?
21
+ options["class"] ||= [options["class"], Shoelace.invalid_input_class_name].compact.join(" ") if @object.respond_to?(:errors) && @object.errors[@method_name].present?
25
22
 
26
23
  add_default_name_and_id(options)
27
24
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Shoelace
4
4
  module Rails
5
- VERSION = "0.4.0"
5
+ VERSION = "0.4.1"
6
6
  end
7
7
  end
@@ -3,6 +3,9 @@
3
3
  require 'action_dispatch/middleware/static'
4
4
 
5
5
  module Shoelace
6
+ mattr_accessor :invalid_input_class_name
7
+ self.invalid_input_class_name = nil
8
+
6
9
  # The only reason this class exists is to clarify that we have a custom static file server after
7
10
  # `ActionDispatch::Static`. We could just use `ActionDispatch::Static` directly, but it would make the result of
8
11
  # `rake middleware` more difficult to understand, as the output would look like:
@@ -43,7 +46,7 @@ module Shoelace
43
46
 
44
47
  initializer "shoelace.form_helper" do |app|
45
48
  ActiveSupport.on_load :action_view do
46
- Shoelace::FormHelper.invalid_input_class_name = app.config.shoelace.invalid_input_class_name
49
+ Shoelace.invalid_input_class_name = app.config.shoelace.invalid_input_class_name
47
50
  end
48
51
  end
49
52
 
@@ -13,8 +13,12 @@ namespace :shoelace do
13
13
  end
14
14
 
15
15
  # Make sure `yarn install` is run before running `shoelace:icons:copy`.
16
- Rake::Task["shoelace:icons:copy"].enhance(["javascript:build"])
16
+ if Rake::Task.task_defined?("javascript:build")
17
+ Rake::Task["shoelace:icons:copy"].enhance(["javascript:build"])
18
+ end
17
19
 
18
20
  if Rake::Task.task_defined?("assets:precompile")
19
21
  Rake::Task["assets:precompile"].enhance(["shoelace:icons:copy"])
22
+ else
23
+ Rake::Task.define_task('assets:precompile' => ['shoelace:icons:copy'])
20
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shoelace-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuki Nishijima
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-07 00:00:00.000000000 Z
11
+ date: 2023-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -193,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
195
  requirements: []
196
- rubygems_version: 3.4.2
196
+ rubygems_version: 3.4.6
197
197
  signing_key:
198
198
  specification_version: 4
199
199
  summary: Rails view helpers Shoelace.style, the design system.