knife-rackspace 1.0.0 → 1.0.1

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: 967c80d89cf4bd3ce780e24b678aaf50324c52f6
4
- data.tar.gz: 68897241bb46bd04c1f61e9ed40b9ea002997a8e
3
+ metadata.gz: 3424287dbc7b2fc0cacf8f5d59f5f270620f114f
4
+ data.tar.gz: 622cf2499996948177d909c495ca9d036a9cf149
5
5
  SHA512:
6
- metadata.gz: aeaed772b104df0db30785c4ca82f3ff121bb3e311201bc48de2c3b6f8df21b1f1784278a14e2895796acb4a68fcb6cd48a3951135ca5c75735b1278e233ffd3
7
- data.tar.gz: f2501f2c1f7d29e6f3778d58145f2768bb6b6a9a355a0e49a778ae2573cb8ee07838587536ad42268bea2d9392563ce013fd6206d28142cb2c59701f3f4508fc
6
+ metadata.gz: a55cb84a25d9374ec39003f52312c58960e907eeff6f68612fd63e77d103ac773261c23a384fc12389b1ddcc079d893440228c6f69eac81a529509a550bc57fc
7
+ data.tar.gz: c727dbaa60bc04a9f2c5899c193cad18555e2ec9bcbd5493096b83a72a5dab724130bd913775e91b8dc59fd2ddae2b7146a0552f0395677b4fb670ab75027037
@@ -1,3 +1,7 @@
1
+ ## v1.0.1
2
+ * Fix Server List exception (#131)
3
+ * Fix bug preferring knife over CLI configurations items (#128)
4
+
1
5
  ## v1.0.0
2
6
  * Use fog/rackspace instead of fog gem
3
7
  * Require Ruby 2.2.2 / Chef 12 and general cleanup
@@ -159,7 +159,7 @@ class Chef
159
159
 
160
160
  def locate_config_value(key)
161
161
  key = key.to_sym
162
- Chef::Config[:knife][key] || config[key]
162
+ config[key] || Chef::Config[:knife][key]
163
163
  end
164
164
 
165
165
  def msg_pair(label, value, color = :cyan)
@@ -39,7 +39,7 @@ class Chef
39
39
  if version_one?
40
40
  network_list = %w{public private}
41
41
  else
42
- network_list = connection.images.sort_by(&:name).collect { |t| t.label }
42
+ network_list = connection.networks.sort_by(&:label).collect { |t| t.label }
43
43
  end
44
44
  server_list.insert(2, network_list.collect { |n| ui.color("#{n.capitalize} IP", :bold) }).flatten!
45
45
  num_columns_across = server_list.length
@@ -1,6 +1,6 @@
1
1
  module Knife
2
2
  module Rackspace
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  MAJOR, MINOR, TINY = VERSION.split(".")
5
5
  end
6
6
  end
@@ -36,3 +36,29 @@ describe "auth_endpoint" do
36
36
  expect(tester.auth_endpoint).to eq(::Fog::Rackspace::UK_AUTH_ENDPOINT)
37
37
  end
38
38
  end
39
+
40
+ describe "locate_config_value" do
41
+ it 'with cli options' do
42
+ # CLI
43
+ tester = RackspaceBaseTester.new
44
+ tester.parse_options([ "--rackspace-api-key", "12345" ])
45
+
46
+ # Knife Config
47
+ Chef::Config[:knife][:rackspace_api_key] = "67890"
48
+
49
+ # Test
50
+ expect(tester.locate_config_value(:rackspace_api_key)).to eq("12345")
51
+ end
52
+
53
+ it 'without cli options' do
54
+ # CLI
55
+ tester = RackspaceBaseTester.new
56
+ tester.parse_options([])
57
+
58
+ # Knife Config
59
+ Chef::Config[:knife][:rackspace_api_key] = "67890"
60
+
61
+ # Test
62
+ expect(tester.locate_config_value(:rackspace_api_key)).to eq("67890")
63
+ end
64
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-rackspace
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Jacob
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2016-11-16 00:00:00.000000000 Z
15
+ date: 2016-12-14 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: knife-windows