versionaire 7.3.2 → 7.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 78bad5cb218c50bf813fc272048ec3ae2b8a7693a2caf33437afc946fbb260d0
4
- data.tar.gz: 1a1ab5086e109e7d3760bb85553dc791e5e678d28dad3bec9909361138a72e85
3
+ metadata.gz: 9b92b6579708d03cdf30774248cf2755793afdf960c9133c978b266368522cd0
4
+ data.tar.gz: 6bf79d5970e399b266c23ff4658ab0929536be5debe7b57693d8c67515ec7480
5
5
  SHA512:
6
- metadata.gz: d5ede5dc166d9816654283f2fbf4aefb700dec11582c2ede0b77f1c712e3fb690ad0d1234ec2ed45387fd1d6ebb4d155c7631f05de32f814f82c4f82e4dcda7c
7
- data.tar.gz: c1b302ece32652b2f0176f1bfa63bada36a03f9642d5a397b1a8a2879e76307db5568fc63acc271207a88372dce4046bfe5c94f22e66ad9dde04634da980f696
6
+ metadata.gz: e6ae58a8a09e0b493c1d7e0bbaf29102f066b2daf101d343e486346736752b0276099cd73b2c793ff51e9afdd0fa5e8a60b824a2574a6d57c96825c544f827b7
7
+ data.tar.gz: 42b9df6bc22ef425504b5846e3cc9890c10dce3e67435c10f273f8914532354f1b8ef809a6588475c4bdc9360d8858aca2a72ec268d08760a6fef317a5300d80
Binary file
data.tar.gz.sig CHANGED
Binary file
data/README.md CHANGED
@@ -52,7 +52,7 @@ Provides immutable, thread-safe, semantic versioning.
52
52
 
53
53
  ## Screencasts
54
54
 
55
- [![asciicast](https://asciinema.org/a/155980.png)](https://asciinema.org/a/155980)
55
+ [![asciicast](https://asciinema.org/a/263062.svg)](https://asciinema.org/a/263062)
56
56
 
57
57
  ## Requirements
58
58
 
@@ -75,9 +75,9 @@ Add the following to your Gemfile:
75
75
  A new version can be initialized in a variety of ways:
76
76
 
77
77
  Versionaire::Version.new # "0.0.0"
78
- Versionaire::Version.new major: 1 # "1.0.0"
79
- Versionaire::Version.new major: 1, minor: 2 # "1.2.0"
80
- Versionaire::Version.new major: 1, minor: 2, maintenance: 3 # "1.2.3"
78
+ Versionaire::Version[major: 1] # "1.0.0"
79
+ Versionaire::Version[major: 1, minor: 2] # "1.2.0"
80
+ Versionaire::Version[major: 1, minor: 2, maintenance: 3] # "1.2.3"
81
81
 
82
82
  ### Equality
83
83
 
@@ -86,9 +86,9 @@ A new version can be initialized in a variety of ways:
86
86
  Equality is deterimined by the state of the object. This means that a version is equal to another
87
87
  version as long as all of the values (i.e. state) are equal to each other. Example:
88
88
 
89
- version_a = Versionaire::Version.new major: 1
90
- version_b = Versionaire::Version.new major: 2
91
- version_c = Versionaire::Version.new major: 1
89
+ version_a = Versionaire::Version[major: 1]
90
+ version_b = Versionaire::Version[major: 2]
91
+ version_c = Versionaire::Version[major: 1]
92
92
 
93
93
  version_a == version_a # true
94
94
  version_a == version_b # false
@@ -112,9 +112,9 @@ Behaves exactly as `#==`.
112
112
 
113
113
  Works like any other standard Ruby object where an object is equal only to itself.
114
114
 
115
- version_a = Versionaire::Version.new major: 1
116
- version_b = Versionaire::Version.new major: 2
117
- version_c = Versionaire::Version.new major: 1
115
+ version_a = Versionaire::Version[major: 1]
116
+ version_b = Versionaire::Version[major: 2]
117
+ version_c = Versionaire::Version[major: 1]
118
118
 
119
119
  version_a.equal? version_a # true
120
120
  version_a.equal? version_b # false
@@ -126,7 +126,7 @@ Works like any other standard Ruby object where an object is equal only to itsel
126
126
 
127
127
  The `Versionaire::Version` function is provided for explicit casting to a version:
128
128
 
129
- version = Versionaire::Version.new major: 1
129
+ version = Versionaire::Version[major: 1]
130
130
 
131
131
  Versionaire::Version "1.0.0"
132
132
  Versionaire::Version [1, 0, 0]
@@ -140,7 +140,7 @@ to convert an unsupported type, a `Versionaire::Errors::Conversion` exception wi
140
140
 
141
141
  Implicit conversion to a `String` is supported:
142
142
 
143
- "1.0.0".match Versionaire::Version.new(major: 1) # <MatchData "1.0.0">
143
+ "1.0.0".match Versionaire::Version[major: 1] # <MatchData "1.0.0">
144
144
 
145
145
  #### Explicit
146
146
 
@@ -174,18 +174,18 @@ Versions can be added and subtracted from each other.
174
174
 
175
175
  #### Addition
176
176
 
177
- version_1 = Versionaire::Version.new major: 1, minor: 2, maintenance: 3
178
- version_2 = Versionaire::Version.new major: 2, minor: 5, maintenance: 7
177
+ version_1 = Versionaire::Version[major: 1, minor: 2, maintenance: 3]
178
+ version_2 = Versionaire::Version[major: 2, minor: 5, maintenance: 7]
179
179
  version_1 + version_2 # "3.7.10"
180
180
 
181
181
  #### Subtraction
182
182
 
183
- version_1 = Versionaire::Version.new major: 1, minor: 2, maintenance: 3
184
- version_2 = Versionaire::Version.new major: 1, minor: 1, maintenance: 1
183
+ version_1 = Versionaire::Version[major: 1, minor: 2, maintenance: 3]
184
+ version_2 = Versionaire::Version[major: 1, minor: 1, maintenance: 1]
185
185
  version_1 - version_2 # "0.1.2"
186
186
 
187
- version_1 = Versionaire::Version.new major: 1
188
- version_2 = Versionaire::Version.new major: 5
187
+ version_1 = Versionaire::Version[major: 1]
188
+ version_2 = Versionaire::Version[major: 5]
189
189
  version_1 - version_2 # Fails with a Versionaire::Errors::NegativeNumber
190
190
 
191
191
  ## Tests
@@ -28,14 +28,14 @@ module Versionaire
28
28
  body = %(Use: "<major>.<minor>.<maintenance>" or "v<major>.<minor>.<maintenance>".)
29
29
  fail Errors::Conversion, error_message(object, body) unless Version.regex.match? object
30
30
 
31
- Version.new string_to_arguments
31
+ Version[string_to_arguments]
32
32
  end
33
33
 
34
34
  def from_array
35
35
  body = "Use: [], [<major>], [<major>, <minor>], or [<major>, <minor>, <maintenance>]."
36
36
  fail Errors::Conversion, error_message(object, body) unless (0..3).cover? object.size
37
37
 
38
- Version.new array_to_arguments
38
+ Version[array_to_arguments]
39
39
  end
40
40
 
41
41
  def from_hash
@@ -44,7 +44,7 @@ module Versionaire
44
44
  "{major: <major>, minor: <minor>, maintenance: <maintenance>}."
45
45
  fail Errors::Conversion, error_message(object, body) unless required_keys?
46
46
 
47
- Version.new object
47
+ Version[object]
48
48
  end
49
49
 
50
50
  def from_object
@@ -12,7 +12,7 @@ module Versionaire
12
12
  end
13
13
 
14
14
  def self.version
15
- "7.3.2"
15
+ "7.3.3"
16
16
  end
17
17
 
18
18
  def self.version_label
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: 7.3.2
4
+ version: 7.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -28,7 +28,7 @@ cert_chain:
28
28
  dKvURM+1PwDCzC5tvRwjhUJIizau6+MtkFCvJHmaAj1aZL3odcPejHj5Hxt/0CUW
29
29
  y84=
30
30
  -----END CERTIFICATE-----
31
- date: 2019-06-01 00:00:00.000000000 Z
31
+ date: 2019-09-01 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: awesome_print
@@ -204,28 +204,28 @@ dependencies:
204
204
  requirements:
205
205
  - - "~>"
206
206
  - !ruby/object:Gem::Version
207
- version: '0.69'
207
+ version: '0.73'
208
208
  type: :development
209
209
  prerelease: false
210
210
  version_requirements: !ruby/object:Gem::Requirement
211
211
  requirements:
212
212
  - - "~>"
213
213
  - !ruby/object:Gem::Version
214
- version: '0.69'
214
+ version: '0.73'
215
215
  - !ruby/object:Gem::Dependency
216
216
  name: rubocop-performance
217
217
  requirement: !ruby/object:Gem::Requirement
218
218
  requirements:
219
219
  - - "~>"
220
220
  - !ruby/object:Gem::Version
221
- version: '1.3'
221
+ version: '1.4'
222
222
  type: :development
223
223
  prerelease: false
224
224
  version_requirements: !ruby/object:Gem::Requirement
225
225
  requirements:
226
226
  - - "~>"
227
227
  - !ruby/object:Gem::Version
228
- version: '1.3'
228
+ version: '1.4'
229
229
  - !ruby/object:Gem::Dependency
230
230
  name: rubocop-rspec
231
231
  requirement: !ruby/object:Gem::Requirement
@@ -309,7 +309,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
309
309
  - !ruby/object:Gem::Version
310
310
  version: '0'
311
311
  requirements: []
312
- rubygems_version: 3.0.3
312
+ rubygems_version: 3.0.6
313
313
  signing_key:
314
314
  specification_version: 4
315
315
  summary: Provides immutable, thread-safe, semantic versioning.
metadata.gz.sig CHANGED
@@ -1,2 +1,5 @@
1
- c4IIw���� 0��"0A��S,
2
- �!�u?|&uVCq��D%��{�$�R39Jd[�~��-�/Sh���L0�%}v��C����#�7Y'wp L`�FL����D
1
+ )����,���ח�)��� |�
2
+ ���O5o�x4ޜ4�HmB�͗��E����A���i`aD2@Ga�A@כ��ka�$�
3
+ r��U���B�r��1�� Jϣ�_��>�ۡ6(B�Kl|�`��2�aVw�k�W)�&�ɼy�����u��)
4
+ l� ��ϵ���[�H���.B���?�Mzg�
5
+ ^���<�c�����<�R2�*���<��`x>�*�ũ