versionaire 8.2.0 → 8.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/LICENSE.adoc +1 -1
- data/README.adoc +110 -50
- data/lib/versionaire.rb +1 -0
- data/lib/versionaire/cast.rb +12 -0
- data/lib/versionaire/conversion.rb +12 -11
- data/lib/versionaire/errors/invalid_number.rb +1 -1
- data/lib/versionaire/errors/negative_number.rb +1 -1
- data/lib/versionaire/filler.rb +1 -0
- data/lib/versionaire/identity.rb +1 -1
- data/lib/versionaire/version.rb +19 -12
- metadata +8 -189
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b41a84e38c6e7d73b9ecc460bb8bbecc5d763aa11a05cac1021d16d8b3e17235
|
4
|
+
data.tar.gz: 10e14aeb64f4ca5c92eb559a594627bef37d03abb05d1029d417ce32c7b71ea0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5673376e2e87acee93d11e1ef4283d18bd89fea650c9fd77018263ad3a7a1e9f9041139f38d69c881540a4810eb0035dd307c5343a2dfc114d564d47c7825af1
|
7
|
+
data.tar.gz: 88cc980f9c39af47d3443d3348894e8189487c378a402c537e6565d53cb1f18f753892fcec26c7f41274d6bc1a4ea2b1d902708e12c6b68eed029b8f0c6caa96
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/LICENSE.adoc
CHANGED
@@ -150,7 +150,7 @@ additional liability.
|
|
150
150
|
|
151
151
|
END OF TERMS AND CONDITIONS
|
152
152
|
|
153
|
-
Copyright link:https://www.alchemists.io[
|
153
|
+
Copyright 2016 link:https://www.alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].
|
154
154
|
|
155
155
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
|
156
156
|
compliance with the License. You may obtain a link:https://www.apache.org/licenses/LICENSE-2.0[copy]
|
data/README.adoc
CHANGED
@@ -6,6 +6,8 @@
|
|
6
6
|
|
7
7
|
[link=http://badge.fury.io/rb/versionaire]
|
8
8
|
image::https://badge.fury.io/rb/versionaire.svg[Gem Version]
|
9
|
+
[link=https://www.alchemists.io/projects/code_quality]
|
10
|
+
image::https://img.shields.io/badge/code_style-alchemists-brightgreen.svg[Alchemists Style Guide]
|
9
11
|
[link=https://circleci.com/gh/bkuhlmann/versionaire]
|
10
12
|
image::https://circleci.com/gh/bkuhlmann/versionaire.svg?style=svg[Circle CI Status]
|
11
13
|
|
@@ -31,8 +33,6 @@ image::https://www.alchemists.io/images/screencasts/versionaire/cover.svg[Screen
|
|
31
33
|
|
32
34
|
== Setup
|
33
35
|
|
34
|
-
=== Production
|
35
|
-
|
36
36
|
To install, run:
|
37
37
|
|
38
38
|
[source,bash]
|
@@ -47,24 +47,6 @@ Add the following to your Gemfile:
|
|
47
47
|
gem "versionaire"
|
48
48
|
----
|
49
49
|
|
50
|
-
=== Development
|
51
|
-
|
52
|
-
To contribute, run:
|
53
|
-
|
54
|
-
[source,bash]
|
55
|
-
----
|
56
|
-
git clone https://github.com/bkuhlmann/versionaire.git
|
57
|
-
cd versionaire
|
58
|
-
bin/setup
|
59
|
-
----
|
60
|
-
|
61
|
-
You can also use the IRB console for direct access to all objects:
|
62
|
-
|
63
|
-
[source,bash]
|
64
|
-
----
|
65
|
-
bin/console
|
66
|
-
----
|
67
|
-
|
68
50
|
== Usage
|
69
51
|
|
70
52
|
=== Initialization
|
@@ -73,10 +55,10 @@ A new version can be initialized in a variety of ways:
|
|
73
55
|
|
74
56
|
[source,ruby]
|
75
57
|
----
|
76
|
-
Versionaire::Version.new
|
77
|
-
Versionaire::Version[major: 1]
|
78
|
-
Versionaire::Version[major: 1, minor: 2]
|
79
|
-
Versionaire::Version[major: 1, minor: 2, patch: 3]
|
58
|
+
Versionaire::Version.new # "0.0.0"
|
59
|
+
Versionaire::Version[major: 1] # "1.0.0"
|
60
|
+
Versionaire::Version[major: 1, minor: 2] # "1.2.0"
|
61
|
+
Versionaire::Version[major: 1, minor: 2, patch: 3] # "1.2.3"
|
80
62
|
----
|
81
63
|
|
82
64
|
=== Equality
|
@@ -92,18 +74,18 @@ version_a = Versionaire::Version[major: 1]
|
|
92
74
|
version_b = Versionaire::Version[major: 2]
|
93
75
|
version_c = Versionaire::Version[major: 1]
|
94
76
|
|
95
|
-
version_a == version_a
|
96
|
-
version_a == version_b
|
97
|
-
version_a == version_c
|
77
|
+
version_a == version_a # true
|
78
|
+
version_a == version_b # false
|
79
|
+
version_a == version_c # true
|
98
80
|
----
|
99
81
|
|
100
82
|
Knowning this, versions can be compared against one another too:
|
101
83
|
|
102
84
|
[source,ruby]
|
103
85
|
----
|
104
|
-
version_a > version_b
|
105
|
-
version_a < version_b
|
106
|
-
version_a.between? version_c, version_b
|
86
|
+
version_a > version_b # false
|
87
|
+
version_a < version_b # true
|
88
|
+
version_a.between? version_c, version_b # true
|
107
89
|
----
|
108
90
|
|
109
91
|
==== Hash (`#eql?`)
|
@@ -124,16 +106,16 @@ version_a = Versionaire::Version[major: 1]
|
|
124
106
|
version_b = Versionaire::Version[major: 2]
|
125
107
|
version_c = Versionaire::Version[major: 1]
|
126
108
|
|
127
|
-
version_a.equal? version_a
|
128
|
-
version_a.equal? version_b
|
129
|
-
version_a.equal? version_c
|
109
|
+
version_a.equal? version_a # true
|
110
|
+
version_a.equal? version_b # false
|
111
|
+
version_a.equal? version_c # false
|
130
112
|
----
|
131
113
|
|
132
114
|
=== Conversions
|
133
115
|
|
134
|
-
==== Function
|
116
|
+
==== Function
|
135
117
|
|
136
|
-
|
118
|
+
Use the `Versionaire::Version` function to explicitly cast to a version:
|
137
119
|
|
138
120
|
[source,ruby]
|
139
121
|
----
|
@@ -148,13 +130,36 @@ Versionaire::Version version
|
|
148
130
|
Each of these conversions will result in a version object that represents "`1.0.0`". When attempting
|
149
131
|
to convert an unsupported type, a `+Versionaire::Errors::Conversion+` exception will be thrown.
|
150
132
|
|
133
|
+
==== Refinement
|
134
|
+
|
135
|
+
Building upon the examples shown above, there is an even more elegant solution where you can use
|
136
|
+
this gem's built-in link:https://www.alchemists.io/articles/ruby_refinements[refinement] support:
|
137
|
+
|
138
|
+
[source,ruby]
|
139
|
+
----
|
140
|
+
using Versionaire::Cast
|
141
|
+
|
142
|
+
version = Versionaire::Version[major: 1]
|
143
|
+
|
144
|
+
Version "1.0.0"
|
145
|
+
Version [1, 0, 0]
|
146
|
+
Version major: 1, minor: 0, patch: 0
|
147
|
+
Version version
|
148
|
+
----
|
149
|
+
|
150
|
+
By adding `using Versionaire::Cast` to your implementation, this allows Versionaire to refine
|
151
|
+
`Kernel` so you have a top-level `Version` conversion function much like Kernel's native support for
|
152
|
+
`Integer`, `String`, `Array`, `Hash`, etc. The benefit to this approach is it reduces the amount of
|
153
|
+
typing, doesn't polute your entire object space like a monkey patch would, and provides a idiomatic
|
154
|
+
approach to casting like any other primitive.
|
155
|
+
|
151
156
|
==== Implicit
|
152
157
|
|
153
158
|
Implicit conversion to a `+String+` is supported:
|
154
159
|
|
155
160
|
[source,ruby]
|
156
161
|
----
|
157
|
-
"1.0.0".match Versionaire::Version[major: 1]
|
162
|
+
"1.0.0".match Versionaire::Version[major: 1] # <MatchData "1.0.0">
|
158
163
|
----
|
159
164
|
|
160
165
|
==== Explicit
|
@@ -165,9 +170,9 @@ Explicit conversion to a `String`, `Array`, or `Hash` is supported:
|
|
165
170
|
----
|
166
171
|
version = Versionaire::Version.new
|
167
172
|
|
168
|
-
version.to_s
|
169
|
-
version.to_a
|
170
|
-
version.to_h
|
173
|
+
version.to_s # "0.0.0"
|
174
|
+
version.to_a # [0, 0, 0]
|
175
|
+
version.to_h # {major: 0, minor: 0, patch: 0}
|
171
176
|
----
|
172
177
|
|
173
178
|
=== Comparisons
|
@@ -180,39 +185,94 @@ work. Example:
|
|
180
185
|
version_1 = Versionaire::Version "1.0.0"
|
181
186
|
version_2 = Versionaire::Version "2.0.0"
|
182
187
|
|
183
|
-
version_1 < version_2
|
184
|
-
version_1 <= version_2
|
185
|
-
version_1 == version_2
|
186
|
-
version_1 > version_2
|
187
|
-
version_1 >= version_2
|
188
|
-
version_1.between? version_1, version_2
|
189
|
-
version_1.clamp version_1, version_2
|
188
|
+
version_1 < version_2 # true
|
189
|
+
version_1 <= version_2 # true
|
190
|
+
version_1 == version_2 # false (see Equality section above for details)
|
191
|
+
version_1 > version_2 # false
|
192
|
+
version_1 >= version_2 # false
|
193
|
+
version_1.between? version_1, version_2 # true
|
194
|
+
version_1.clamp version_1, version_2 # version_1 (added in Ruby 2.4.0)
|
190
195
|
----
|
191
196
|
|
192
197
|
=== Math
|
193
198
|
|
194
|
-
Versions can be added
|
199
|
+
Versions can be added, subtracted, sequentially increased, or sequentially decreased from each
|
200
|
+
other.
|
195
201
|
|
196
202
|
==== Addition
|
197
203
|
|
204
|
+
Versions can be added together to produce a resulting version sum.
|
205
|
+
|
198
206
|
[source,ruby]
|
199
207
|
----
|
200
208
|
version_1 = Versionaire::Version[major: 1, minor: 2, patch: 3]
|
201
209
|
version_2 = Versionaire::Version[major: 2, minor: 5, patch: 7]
|
202
|
-
version_1 + version_2
|
210
|
+
version_1 + version_2 # "3.7.10"
|
203
211
|
----
|
204
212
|
|
205
213
|
==== Subtraction
|
206
214
|
|
215
|
+
Versions can be substracted from each other as long as there isn't a negative result.
|
216
|
+
|
207
217
|
[source,ruby]
|
208
218
|
----
|
209
219
|
version_1 = Versionaire::Version[major: 1, minor: 2, patch: 3]
|
210
220
|
version_2 = Versionaire::Version[major: 1, minor: 1, patch: 1]
|
211
|
-
version_1 - version_2
|
221
|
+
version_1 - version_2 # "0.1.2"
|
212
222
|
|
213
223
|
version_1 = Versionaire::Version[major: 1]
|
214
224
|
version_2 = Versionaire::Version[major: 5]
|
215
|
-
version_1 - version_2
|
225
|
+
version_1 - version_2 # Versionaire::Errors::NegativeNumber
|
226
|
+
----
|
227
|
+
|
228
|
+
==== Up
|
229
|
+
|
230
|
+
Versions can be sequentially increased or given a specific version to jump to.
|
231
|
+
|
232
|
+
[source,ruby]
|
233
|
+
----
|
234
|
+
version = Versionaire::Version[major: 1, minor: 1, patch: 1]
|
235
|
+
version.up :major # => "2.1.1"
|
236
|
+
version.up :major, 3 # => "4.1.1"
|
237
|
+
version.up :minor # => "1.2.1"
|
238
|
+
version.up :minor, 3 # => "1.4.1"
|
239
|
+
version.up :patch # => "1.1.2"
|
240
|
+
version.up :patch, 3 # => "1.1.4"
|
241
|
+
----
|
242
|
+
|
243
|
+
==== Down
|
244
|
+
|
245
|
+
Versions can be sequentially decreased or given a specific version to jump to as long as the result
|
246
|
+
is not negative.
|
247
|
+
|
248
|
+
[source,ruby]
|
249
|
+
----
|
250
|
+
version = Versionaire::Version[major: 5, minor: 5, patch: 5]
|
251
|
+
version.down :major # => "4.5.5"
|
252
|
+
version.down :major, 3 # => "2.5.5"
|
253
|
+
version.down :minor # => "5.4.5"
|
254
|
+
version.down :minor, 3 # => "5.2.5"
|
255
|
+
version.down :patch # => "5.5.4"
|
256
|
+
version.down :patch, 3 # => "5.5.2"
|
257
|
+
version.down :major, 6 # => Versionaire::Errors::NegativeNumber
|
258
|
+
----
|
259
|
+
|
260
|
+
== Development
|
261
|
+
|
262
|
+
To contribute, run:
|
263
|
+
|
264
|
+
[source,bash]
|
265
|
+
----
|
266
|
+
git clone https://github.com/bkuhlmann/versionaire.git
|
267
|
+
cd versionaire
|
268
|
+
bin/setup
|
269
|
+
----
|
270
|
+
|
271
|
+
You can also use the IRB console for direct access to all objects:
|
272
|
+
|
273
|
+
[source,bash]
|
274
|
+
----
|
275
|
+
bin/console
|
216
276
|
----
|
217
277
|
|
218
278
|
== Tests
|
data/lib/versionaire.rb
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "refinements/arrays"
|
4
|
+
require "refinements/structs"
|
5
|
+
|
3
6
|
# The gem namespace.
|
4
7
|
module Versionaire
|
5
8
|
module_function
|
@@ -20,23 +23,25 @@ module Versionaire
|
|
20
23
|
|
21
24
|
# Aids with converting objects into valid versions.
|
22
25
|
class Converter
|
23
|
-
|
26
|
+
using Refinements::Arrays
|
27
|
+
using Refinements::Structs
|
28
|
+
|
29
|
+
def initialize object
|
24
30
|
@object = object
|
25
|
-
@filler = filler
|
26
31
|
end
|
27
32
|
|
28
33
|
def from_string
|
29
34
|
body = "Use: <major>.<minor>.<patch>, <major>.<minor>, <major>, or empty string."
|
30
35
|
fail Errors::Conversion, error_message(object, body) unless Version.regex.match? object
|
31
36
|
|
32
|
-
|
37
|
+
string_to_version
|
33
38
|
end
|
34
39
|
|
35
40
|
def from_array
|
36
41
|
body = "Use: [<major>, <minor>, <patch>], [<major>, <minor>], [<major>], or []."
|
37
42
|
fail Errors::Conversion, error_message(object, body) unless (0..3).cover? object.size
|
38
43
|
|
39
|
-
Version
|
44
|
+
Version.with_positions(*object.pad(0, max: 3))
|
40
45
|
end
|
41
46
|
|
42
47
|
def from_hash
|
@@ -55,15 +60,11 @@ module Versionaire
|
|
55
60
|
|
56
61
|
attr_reader :object, :filler
|
57
62
|
|
58
|
-
def
|
63
|
+
def string_to_version
|
59
64
|
object.split(DELIMITER)
|
60
65
|
.map(&:to_i)
|
61
|
-
.then { |numbers|
|
62
|
-
.then { |arguments| Version.
|
63
|
-
end
|
64
|
-
|
65
|
-
def array_to_arguments
|
66
|
-
Version.arguments(*filler.call(object))
|
66
|
+
.then { |numbers| numbers.pad 0, max: 3 }
|
67
|
+
.then { |arguments| Version.with_positions(*arguments) }
|
67
68
|
end
|
68
69
|
|
69
70
|
def required_keys?
|
data/lib/versionaire/filler.rb
CHANGED
data/lib/versionaire/identity.rb
CHANGED
data/lib/versionaire/version.rb
CHANGED
@@ -1,13 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "refinements/structs"
|
4
|
+
|
3
5
|
module Versionaire
|
4
6
|
DELIMITER = "."
|
5
7
|
|
6
8
|
# An immutable, semantic version value object.
|
7
|
-
# rubocop:disable Metrics/BlockLength
|
8
9
|
Version = Struct.new :major, :minor, :patch, keyword_init: true do
|
9
10
|
include Comparable
|
10
11
|
|
12
|
+
using Refinements::Structs
|
13
|
+
|
11
14
|
def self.regex
|
12
15
|
/
|
13
16
|
\A( # Start of string and OR.
|
@@ -31,12 +34,16 @@ module Versionaire
|
|
31
34
|
freeze
|
32
35
|
end
|
33
36
|
|
37
|
+
def []= key, value
|
38
|
+
super(key, value).tap { validate }
|
39
|
+
end
|
40
|
+
|
34
41
|
def + other
|
35
|
-
|
42
|
+
revalue(other.to_h) { |previous, current| previous + current }
|
36
43
|
end
|
37
44
|
|
38
45
|
def - other
|
39
|
-
|
46
|
+
revalue(other.to_h) { |previous, current| previous - current }
|
40
47
|
end
|
41
48
|
|
42
49
|
def == other
|
@@ -49,15 +56,20 @@ module Versionaire
|
|
49
56
|
to_s <=> other.to_s
|
50
57
|
end
|
51
58
|
|
59
|
+
def down key, value = 1
|
60
|
+
revalue(key => value) { |previous, current| previous - current }
|
61
|
+
end
|
62
|
+
|
63
|
+
def up key, value = 1
|
64
|
+
revalue(key => value) { |previous, current| previous + current }
|
65
|
+
end
|
66
|
+
|
52
67
|
def to_s
|
53
68
|
to_a.join DELIMITER
|
54
69
|
end
|
55
70
|
|
56
71
|
alias_method :to_str, :to_s
|
57
|
-
|
58
|
-
def to_a
|
59
|
-
[major, minor, patch]
|
60
|
-
end
|
72
|
+
alias_method :values, :to_a
|
61
73
|
|
62
74
|
private
|
63
75
|
|
@@ -65,10 +77,5 @@ module Versionaire
|
|
65
77
|
fail Errors::InvalidNumber if to_a.any? { |number| !number.is_a? Integer }
|
66
78
|
fail Errors::NegativeNumber if to_a.any?(&:negative?)
|
67
79
|
end
|
68
|
-
|
69
|
-
def reduce other, action
|
70
|
-
to_a.zip(other.to_a).map { |pair| pair.reduce action }
|
71
|
-
end
|
72
80
|
end
|
73
|
-
# rubocop:enable Metrics/BlockLength
|
74
81
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: versionaire
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 8.
|
4
|
+
version: 8.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -28,204 +28,22 @@ cert_chain:
|
|
28
28
|
2XV8FRa7/JimI07sPLC13eLY3xd/aYTi85Z782KIA4j0G8XEEWAX0ouBhlXPocZv
|
29
29
|
QWc=
|
30
30
|
-----END CERTIFICATE-----
|
31
|
-
date: 2020-
|
31
|
+
date: 2020-12-21 00:00:00.000000000 Z
|
32
32
|
dependencies:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
|
-
name:
|
34
|
+
name: refinements
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
40
|
-
type: :
|
39
|
+
version: '7.18'
|
40
|
+
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: gemsmith
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
50
|
-
requirements:
|
51
|
-
- - "~>"
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '14.2'
|
54
|
-
type: :development
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
requirements:
|
58
|
-
- - "~>"
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '14.2'
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: git-lint
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
65
|
-
- - "~>"
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '1.0'
|
68
|
-
type: :development
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: !ruby/object:Gem::Requirement
|
71
|
-
requirements:
|
72
|
-
- - "~>"
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: '1.0'
|
75
|
-
- !ruby/object:Gem::Dependency
|
76
|
-
name: guard-rspec
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
79
|
-
- - "~>"
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: '4.7'
|
82
|
-
type: :development
|
83
|
-
prerelease: false
|
84
|
-
version_requirements: !ruby/object:Gem::Requirement
|
85
|
-
requirements:
|
86
|
-
- - "~>"
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: '4.7'
|
89
|
-
- !ruby/object:Gem::Dependency
|
90
|
-
name: pry
|
91
|
-
requirement: !ruby/object:Gem::Requirement
|
92
|
-
requirements:
|
93
|
-
- - "~>"
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
version: '0.13'
|
96
|
-
type: :development
|
97
|
-
prerelease: false
|
98
|
-
version_requirements: !ruby/object:Gem::Requirement
|
99
|
-
requirements:
|
100
|
-
- - "~>"
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: '0.13'
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
name: pry-byebug
|
105
|
-
requirement: !ruby/object:Gem::Requirement
|
106
|
-
requirements:
|
107
|
-
- - "~>"
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '3.9'
|
110
|
-
type: :development
|
111
|
-
prerelease: false
|
112
|
-
version_requirements: !ruby/object:Gem::Requirement
|
113
|
-
requirements:
|
114
|
-
- - "~>"
|
115
|
-
- !ruby/object:Gem::Version
|
116
|
-
version: '3.9'
|
117
|
-
- !ruby/object:Gem::Dependency
|
118
|
-
name: rake
|
119
|
-
requirement: !ruby/object:Gem::Requirement
|
120
|
-
requirements:
|
121
|
-
- - "~>"
|
122
|
-
- !ruby/object:Gem::Version
|
123
|
-
version: '13.0'
|
124
|
-
type: :development
|
125
|
-
prerelease: false
|
126
|
-
version_requirements: !ruby/object:Gem::Requirement
|
127
|
-
requirements:
|
128
|
-
- - "~>"
|
129
|
-
- !ruby/object:Gem::Version
|
130
|
-
version: '13.0'
|
131
|
-
- !ruby/object:Gem::Dependency
|
132
|
-
name: reek
|
133
|
-
requirement: !ruby/object:Gem::Requirement
|
134
|
-
requirements:
|
135
|
-
- - "~>"
|
136
|
-
- !ruby/object:Gem::Version
|
137
|
-
version: '6.0'
|
138
|
-
type: :development
|
139
|
-
prerelease: false
|
140
|
-
version_requirements: !ruby/object:Gem::Requirement
|
141
|
-
requirements:
|
142
|
-
- - "~>"
|
143
|
-
- !ruby/object:Gem::Version
|
144
|
-
version: '6.0'
|
145
|
-
- !ruby/object:Gem::Dependency
|
146
|
-
name: rspec
|
147
|
-
requirement: !ruby/object:Gem::Requirement
|
148
|
-
requirements:
|
149
|
-
- - "~>"
|
150
|
-
- !ruby/object:Gem::Version
|
151
|
-
version: '3.9'
|
152
|
-
type: :development
|
153
|
-
prerelease: false
|
154
|
-
version_requirements: !ruby/object:Gem::Requirement
|
155
|
-
requirements:
|
156
|
-
- - "~>"
|
157
|
-
- !ruby/object:Gem::Version
|
158
|
-
version: '3.9'
|
159
|
-
- !ruby/object:Gem::Dependency
|
160
|
-
name: rubocop
|
161
|
-
requirement: !ruby/object:Gem::Requirement
|
162
|
-
requirements:
|
163
|
-
- - "~>"
|
164
|
-
- !ruby/object:Gem::Version
|
165
|
-
version: '0.83'
|
166
|
-
type: :development
|
167
|
-
prerelease: false
|
168
|
-
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
requirements:
|
170
|
-
- - "~>"
|
171
|
-
- !ruby/object:Gem::Version
|
172
|
-
version: '0.83'
|
173
|
-
- !ruby/object:Gem::Dependency
|
174
|
-
name: rubocop-performance
|
175
|
-
requirement: !ruby/object:Gem::Requirement
|
176
|
-
requirements:
|
177
|
-
- - "~>"
|
178
|
-
- !ruby/object:Gem::Version
|
179
|
-
version: '1.5'
|
180
|
-
type: :development
|
181
|
-
prerelease: false
|
182
|
-
version_requirements: !ruby/object:Gem::Requirement
|
183
|
-
requirements:
|
184
|
-
- - "~>"
|
185
|
-
- !ruby/object:Gem::Version
|
186
|
-
version: '1.5'
|
187
|
-
- !ruby/object:Gem::Dependency
|
188
|
-
name: rubocop-rake
|
189
|
-
requirement: !ruby/object:Gem::Requirement
|
190
|
-
requirements:
|
191
|
-
- - "~>"
|
192
|
-
- !ruby/object:Gem::Version
|
193
|
-
version: '0.5'
|
194
|
-
type: :development
|
195
|
-
prerelease: false
|
196
|
-
version_requirements: !ruby/object:Gem::Requirement
|
197
|
-
requirements:
|
198
|
-
- - "~>"
|
199
|
-
- !ruby/object:Gem::Version
|
200
|
-
version: '0.5'
|
201
|
-
- !ruby/object:Gem::Dependency
|
202
|
-
name: rubocop-rspec
|
203
|
-
requirement: !ruby/object:Gem::Requirement
|
204
|
-
requirements:
|
205
|
-
- - "~>"
|
206
|
-
- !ruby/object:Gem::Version
|
207
|
-
version: '1.39'
|
208
|
-
type: :development
|
209
|
-
prerelease: false
|
210
|
-
version_requirements: !ruby/object:Gem::Requirement
|
211
|
-
requirements:
|
212
|
-
- - "~>"
|
213
|
-
- !ruby/object:Gem::Version
|
214
|
-
version: '1.39'
|
215
|
-
- !ruby/object:Gem::Dependency
|
216
|
-
name: simplecov
|
217
|
-
requirement: !ruby/object:Gem::Requirement
|
218
|
-
requirements:
|
219
|
-
- - "~>"
|
220
|
-
- !ruby/object:Gem::Version
|
221
|
-
version: '0.18'
|
222
|
-
type: :development
|
223
|
-
prerelease: false
|
224
|
-
version_requirements: !ruby/object:Gem::Requirement
|
225
|
-
requirements:
|
226
|
-
- - "~>"
|
227
|
-
- !ruby/object:Gem::Version
|
228
|
-
version: '0.18'
|
46
|
+
version: '7.18'
|
229
47
|
description:
|
230
48
|
email:
|
231
49
|
- brooke@alchemists.io
|
@@ -238,6 +56,7 @@ files:
|
|
238
56
|
- LICENSE.adoc
|
239
57
|
- README.adoc
|
240
58
|
- lib/versionaire.rb
|
59
|
+
- lib/versionaire/cast.rb
|
241
60
|
- lib/versionaire/conversion.rb
|
242
61
|
- lib/versionaire/errors/base.rb
|
243
62
|
- lib/versionaire/errors/conversion.rb
|
@@ -269,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
269
88
|
- !ruby/object:Gem::Version
|
270
89
|
version: '0'
|
271
90
|
requirements: []
|
272
|
-
rubygems_version: 3.
|
91
|
+
rubygems_version: 3.2.2
|
273
92
|
signing_key:
|
274
93
|
specification_version: 4
|
275
94
|
summary: Provides an immutable, thread-safe, and semantic version type.
|
metadata.gz.sig
CHANGED
Binary file
|