agent_orange 0.0.4 → 0.0.5

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.
@@ -8,7 +8,7 @@ module AgentOrange
8
8
  :ios => 'iphone|ipad|ipod',
9
9
  :linux => 'linux',
10
10
  :netbsd => 'netbsd',
11
- :osx => 'osx',
11
+ :osx => 'osx|os x',
12
12
  :windows => 'windows'
13
13
  }
14
14
 
@@ -1,5 +1,5 @@
1
1
  module AgentOrange
2
- VERSION = "0.0.4" # This is for the gem and does not conflict with the rest of the functionality
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
- case pieces.count
15
- when 1
16
- self.major = pieces[0]
17
- when 2
18
- self.major = pieces[0]
19
- self.minor = pieces[1]
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: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kevin Elliott