hostlist_expression 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/hostlist_expression.rb +2 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9850d3b38f2db45ecab5bc18bf7493188deff215
4
- data.tar.gz: 2bde9da4e2e26741a6de79ecf313df1b2daa4913
3
+ metadata.gz: 80ed12d4cf8f0d716de3c766de55a1cb052da4ce
4
+ data.tar.gz: ba61a29b097eae918d2623207d5e6824b7227211
5
5
  SHA512:
6
- metadata.gz: 888de47ff1e69726e16d4ff6a950c28d3422d659ce28dd6dd4a8478ddd64a51a68388bf58e0e9600baf691db834547b30cc417bca96db23dc703f0f6609f6a33
7
- data.tar.gz: 292d045103e248d93f868288a4ddae615a251dcf77f9222bc044b3fc360d828ff99093a3b3df0467438d0c4ce4b8bdc84ad01b2126bb1af1c4d97f0b5f7c6260
6
+ metadata.gz: f92ce87db337993ab0dc0cc298bc9da0e2cb43dd2f44381c3d4890a4aac77e45756f953f5d77c713993acf983629f5c86de1db0e073bb7b21889f0e936e32db6
7
+ data.tar.gz: 64c2e257fc51eaa15d4095b9e73c604fc260f90339d6676e9122751d666b37de932c3a93a1997454e1c52130ca98b3f01b8b94ece8a93010822b32eaa7fd030a
@@ -5,10 +5,9 @@
5
5
  # Expand hostlist expression
6
6
  #
7
7
  # @param [ String ] expression A host list expression.
8
- # @param [ String, Array<String> ] separator - Character(s) for separating ranges (default: [":", "-"]).
8
+ # @param [ String, Array<String> ] separator - Character(s) for separating ranges.
9
9
  #
10
10
  # @example
11
- #
12
11
  # hostlist_expression("your-host-[1-3].com")
13
12
  # # => ["your-host-1.com", "your-host-2.com", "your-host-3.com"]
14
13
  #
@@ -55,7 +54,7 @@ def hostlist_expression(expression, separator = [":", "-"])
55
54
  end
56
55
 
57
56
  # Get lower and higher value of range
58
- if range_items[0].to_i < range_items[1].to_i
57
+ if range_items[0] < range_items[1]
59
58
  from = range_items[0]
60
59
  to = range_items[1]
61
60
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hostlist_expression
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Schroeder