foreman_datacenter 0.1.18 → 0.1.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f8352bba82a4ef07e0958ff9c75630adae67c8ee
4
- data.tar.gz: 142eae2fa82b5b0cac2229c5a315ce38815d8c98
3
+ metadata.gz: 34c6c5b3384140a3a056398e513fccfc8f70bf60
4
+ data.tar.gz: 79a1db09dbb17fe2c88de276a18a82bed736204f
5
5
  SHA512:
6
- metadata.gz: 6619472342de107a5ca385befff75e630b9bca73781debc4b72ed47617c83c912202e9c7a9b459127fe29ac5c11927dacf655c054f795f45b45a58317790e91d
7
- data.tar.gz: 5999ec8f590a3b7a16f88a98fcf05e59f644c457282494ed97d4a41c1fed24df1c163f6206e9834f7a6d28ba7c0a110dc240e3f233e26f1bf824783c053613a1
6
+ metadata.gz: 8d6f40ac324c5997ba001474d303af2aa23ae8e2ac3d7fb482af1df62ec82a95360662a8ce43da92968077d12c06e5944b7d1c21e3c20f3e4e1b1745aab03183
7
+ data.tar.gz: 931dbfb936d93a0e878cb867544c74b27ec7a28fb28c252e8d3ac841c5843f2a9f51e30e4607cfc3fcf51f4871f0548e273f5ff492320fbc57a6eb0b4dccca28
@@ -117,7 +117,7 @@ module ForemanDatacenter
117
117
  match[1] if match
118
118
  end
119
119
 
120
- def rack_positions
120
+ def positions
121
121
  result = []
122
122
  if size.nil?
123
123
  result << position
@@ -27,7 +27,13 @@ module ForemanDatacenter
27
27
  current_device == [] ? (result << [[i],[]]; i +=1 ) : (result << current_device[0]; i = current_device[0][0].last + 1)
28
28
  break if i > height
29
29
  end
30
- return result
30
+ device_sorting(result)
31
+ end
32
+
33
+ private
34
+
35
+ def device_sorting(devices)
36
+ devices.reverse.map { |d| [d[0].reverese, d[1]] }
31
37
  end
32
38
  end
33
39
  end
@@ -1,3 +1,3 @@
1
1
  module ForemanDatacenter
2
- VERSION = '0.1.18'.freeze
2
+ VERSION = '0.1.19'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_datacenter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.18
4
+ version: 0.1.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Ivanov