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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bda974ceb8af965dbf0e8b4c4f1a36ea6fa9df31ec1e51380c9f797600ebea71
4
- data.tar.gz: 9ef88336a6f9591f5b3f50ba1b4fc477f530e6d71b52b22cdbe26a4bd5e4157e
3
+ metadata.gz: e616b5fe9433c401e70a775fae2a8d981aa4714f46b5f314bf566a995eb0a861
4
+ data.tar.gz: 3c636082f38cd91d3fe1ca8d0708f424d28bb0609cea6c6864663551b861e81e
5
5
  SHA512:
6
- metadata.gz: 974161979627148c94a94f6ea18d50a1f14a8f7fa8b14650d66645ef6dc81255a55a3b14810eeeb8a158e612c668c907a491f30d745f8d939ac852505c03049d
7
- data.tar.gz: 6bb161f8440e25d236d1b27414034ab9a2d89458f58daf544391363eb3dc9600f9115197c7e4216e1fd6b98ff2f21fb451ad96cee17ddcef29af6f411b303b24
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.0", require: "loco_motion"
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)
@@ -175,8 +175,15 @@ module LocoMotion
175
175
  added = COMPONENTS.dig(component_name, :added)
176
176
  return false if added.nil?
177
177
 
178
- current_series = Gem::Version.new(LocoMotion::VERSION).segments[0..1].join(".")
179
- Gem::Version.new(added) >= Gem::Version.new(current_series)
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
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LocoMotion
4
- VERSION = "0.7.0"
4
+ VERSION = "0.7.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: loco_motion-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Topher Fangio