agent_orange 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/agent_orange/operating_system.rb +1 -1
- data/lib/agent_orange/version.rb +7 -17
- metadata +3 -3
data/lib/agent_orange/version.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module AgentOrange
|
2
|
-
VERSION = "0.0.
|
2
|
+
VERSION = "0.0.5" # This is for the gem and does not conflict with the rest of the functionality
|
3
3
|
|
4
4
|
class Version
|
5
5
|
attr_accessor :major, :minor, :patch_level, :build_number
|
@@ -11,22 +11,12 @@ module AgentOrange
|
|
11
11
|
self.build_number = nil
|
12
12
|
|
13
13
|
pieces = version_string.split('.')
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
when 3
|
21
|
-
self.major = pieces[0]
|
22
|
-
self.minor = pieces[1]
|
23
|
-
self.patch_level = pieces[2]
|
24
|
-
when 4
|
25
|
-
self.major = pieces[0]
|
26
|
-
self.minor = pieces[1]
|
27
|
-
self.patch_level = pieces[2]
|
28
|
-
self.build_number = pieces[3]
|
29
|
-
end
|
14
|
+
pieces_count = pieces.count
|
15
|
+
|
16
|
+
self.major = pieces[0] if pieces_count >= 1
|
17
|
+
self.minor = pieces[1] if pieces_count >= 2
|
18
|
+
self.patch_level = pieces[2] if pieces_count >= 3
|
19
|
+
self.build_number = pieces[3] if pieces_count >= 4
|
30
20
|
end
|
31
21
|
|
32
22
|
def to_s
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: agent_orange
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Kevin Elliott
|