loco_motion-rails 0.7.0 → 0.7.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 +4 -4
- data/README.md +1 -1
- data/lib/loco_motion/helpers.rb +9 -2
- data/lib/loco_motion/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e616b5fe9433c401e70a775fae2a8d981aa4714f46b5f314bf566a995eb0a861
|
|
4
|
+
data.tar.gz: 3c636082f38cd91d3fe1ca8d0708f424d28bb0609cea6c6864663551b861e81e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8cb08102f422e88645987c90188a8edc149ed3434731721943f1f3236352f55a370d7092c9bc12b8797717d23bb74a58cd317ccf45c2d8c9271981f1f141b354
|
|
7
|
+
data.tar.gz: 9c51e815312aa7d15527f5fb68984fb7940cb3867e0e25f0c5cea298fd320efd4341de89d636de883f13c82a83fe221632cc0ca28f6435fd60fc74e7295a8e60
|
data/README.md
CHANGED
|
@@ -70,7 +70,7 @@ Add the gem to your `Gemfile` and run `bundle`:
|
|
|
70
70
|
|
|
71
71
|
```ruby
|
|
72
72
|
# Gemfile
|
|
73
|
-
gem "loco_motion-rails", "~> 0.7.
|
|
73
|
+
gem "loco_motion-rails", "~> 0.7.1", require: "loco_motion"
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
Some components also need a JavaScript package (for their Stimulus controllers)
|
data/lib/loco_motion/helpers.rb
CHANGED
|
@@ -175,8 +175,15 @@ module LocoMotion
|
|
|
175
175
|
added = COMPONENTS.dig(component_name, :added)
|
|
176
176
|
return false if added.nil?
|
|
177
177
|
|
|
178
|
-
|
|
179
|
-
|
|
178
|
+
version = Gem::Version.new(LocoMotion::VERSION)
|
|
179
|
+
major, minor = version.segments[0..1]
|
|
180
|
+
|
|
181
|
+
# A pre-release on main (e.g. `0.8.0.pre`) sits *between* series: 0.8
|
|
182
|
+
# hasn't shipped, so badges must match what the published 0.7 demo
|
|
183
|
+
# shows. Compare against the last released series instead.
|
|
184
|
+
minor -= 1 if version.prerelease? && minor.positive?
|
|
185
|
+
|
|
186
|
+
Gem::Version.new(added) >= Gem::Version.new("#{major}.#{minor}")
|
|
180
187
|
end
|
|
181
188
|
|
|
182
189
|
#
|
data/lib/loco_motion/version.rb
CHANGED