versionaire 7.2.0 → 7.3.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/lib/versionaire/conversion.rb +3 -3
- data/lib/versionaire/identity.rb +1 -1
- data/lib/versionaire/version.rb +3 -3
- data.tar.gz.sig +0 -0
- metadata +3 -3
- 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: 5a8b40e6d6a63249309538bc6e0f63d284cf45b6ae441c1c6c567839032f7509
|
4
|
+
data.tar.gz: 7a8c79520b7383981ba9b7b74de01cc7c144dc669eeef901723a1a90a8a5d1fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0f782648e115a173a066ab5c401a9901646010acf7b66d588298024ac597df351f5ee13efc8c21d394c0ae2e029224c5f68a016e619c8b31649b55e6182ef99
|
7
|
+
data.tar.gz: 893b6b118968bd6993b3f3257421d7aed83ae26110f2e3cbb2dc60f200783c9e645292f90f38c11651701145424622b3e6ed0984fb75bc849fc9a798c870dfa8
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -26,14 +26,14 @@ module Versionaire
|
|
26
26
|
|
27
27
|
def from_string
|
28
28
|
body = %(Use: "<major>.<minor>.<maintenance>" or "v<major>.<minor>.<maintenance>".)
|
29
|
-
fail
|
29
|
+
fail Errors::Conversion, error_message(object, body) unless Version.regex.match? object
|
30
30
|
|
31
31
|
Version.new 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
|
-
fail
|
36
|
+
fail Errors::Conversion, error_message(object, body) unless (0..3).cover? object.size
|
37
37
|
|
38
38
|
Version.new array_to_arguments
|
39
39
|
end
|
@@ -42,7 +42,7 @@ module Versionaire
|
|
42
42
|
body = "Use: {major: <major>}, " \
|
43
43
|
"{major: <major>, minor: <minor>}, or " \
|
44
44
|
"{major: <major>, minor: <minor>, maintenance: <maintenance>}."
|
45
|
-
fail
|
45
|
+
fail Errors::Conversion, error_message(object, body) unless required_keys?
|
46
46
|
|
47
47
|
Version.new object
|
48
48
|
end
|
data/lib/versionaire/identity.rb
CHANGED
data/lib/versionaire/version.rb
CHANGED
@@ -64,12 +64,12 @@ module Versionaire
|
|
64
64
|
private
|
65
65
|
|
66
66
|
def validate
|
67
|
-
fail
|
68
|
-
fail
|
67
|
+
fail Errors::InvalidNumber if to_a.any? { |number| !number.is_a? Integer }
|
68
|
+
fail Errors::NegativeNumber if to_a.any?(&:negative?)
|
69
69
|
end
|
70
70
|
|
71
71
|
def reduce other, action
|
72
|
-
to_a.zip(other.to_a).map { |pair| pair.reduce
|
72
|
+
to_a.zip(other.to_a).map { |pair| pair.reduce action }
|
73
73
|
end
|
74
74
|
end
|
75
75
|
# rubocop:enable Metrics/BlockLength
|
data.tar.gz.sig
CHANGED
Binary file
|
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.
|
4
|
+
version: 7.3.0
|
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-
|
31
|
+
date: 2019-04-01 00:00:00.000000000 Z
|
32
32
|
dependencies:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: awesome_print
|
@@ -295,7 +295,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
295
295
|
- !ruby/object:Gem::Version
|
296
296
|
version: '0'
|
297
297
|
requirements: []
|
298
|
-
rubygems_version: 3.0.
|
298
|
+
rubygems_version: 3.0.3
|
299
299
|
signing_key:
|
300
300
|
specification_version: 4
|
301
301
|
summary: Provides immutable, thread-safe, semantic versioning.
|
metadata.gz.sig
CHANGED
Binary file
|