serverspec 0.13.6 → 0.13.7

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.
@@ -43,12 +43,11 @@ module Serverspec
43
43
  rv = @epoch <=> other.epoch
44
44
  return rv if rv != 0
45
45
 
46
- return ver_array(@version) <=> ver_array(other.version)
46
+ self.ver_array <=> other.ver_array
47
47
  end
48
48
 
49
- private
50
- def ver_array(val)
51
- val = val.dup
49
+ def ver_array
50
+ val = @version
52
51
  re = /^(?:(\d+)|(\D+))(.*)$/
53
52
  res = []
54
53
  while !val.empty?
@@ -56,7 +55,8 @@ module Serverspec
56
55
  if matches[1].nil?
57
56
  # String
58
57
  matches[2].to_s.each_byte do |b|
59
- res << ((b == 126) ? -2 : b)
58
+ code_point = defined?("~".ord) ? "~".ord : ?~
59
+ res << ((b == code_point) ? -2 : b)
60
60
  end
61
61
  else
62
62
  # Digits
@@ -1,3 +1,3 @@
1
1
  module Serverspec
2
- VERSION = "0.13.6"
2
+ VERSION = "0.13.7"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serverspec
3
3
  version: !ruby/object:Gem::Version
4
- hash: 39
4
+ hash: 37
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 13
9
- - 6
10
- version: 0.13.6
9
+ - 7
10
+ version: 0.13.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Gosuke Miyashita
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-12-18 00:00:00 +09:00
18
+ date: 2013-12-19 00:00:00 +09:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency