knife-joyent 0.4.8 → 0.4.9

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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 671988423a3e9399059e8ec751f8dcbe2e6ba024
4
+ data.tar.gz: fd0fae85db93261f3381900c3cfef6be0e104261
5
+ SHA512:
6
+ metadata.gz: d8106e6b800ccec1915531c63d02a592d7eae324023f3a0f30524b22aab127e0368c793ee061b70778e26f40871eb1d11b91dd12c8d5ba834365b5ec4cae359a
7
+ data.tar.gz: 87af80ca2eecc9633979cc11b14a8b2f313ad8cf0a16179e5e78c02c20756924a044f68dd708588fa35d21c52f6779c3a51ca993edee5f3445f749a6847f8cf3
data/README.md CHANGED
@@ -171,6 +171,7 @@ by/from different sources / users.
171
171
  - [Sean Omera](https://github.com/someara) - Opscode
172
172
  - [Eric Saxby](https://github.com/sax) - Wanelo
173
173
  - [Stephen Lauck](https://github.com/stephenlauck) - ModCloth
174
+ - [Konstantin Gredeskoul](https://github.com/kigster) - Wanelo
174
175
 
175
176
  ## Bootstrap template for smartos
176
177
 
data/knife-joyent.gemspec CHANGED
@@ -19,10 +19,9 @@ Gem::Specification.new do |s|
19
19
  s.add_dependency "fog", "~> 1.21.0"
20
20
  s.add_dependency "multi_json", "~> 1.7"
21
21
  s.add_dependency "chef", "~> 11.6"
22
- s.add_dependency "joyent-cloud-pricing", ">= 1.0.3"
22
+ s.add_dependency "joyent-cloud-pricing", ">= 1.0.9"
23
23
 
24
24
  s.add_development_dependency 'rspec'
25
- s.add_development_dependency 'guard-rspec'
26
25
 
27
26
  s.require_paths = ["lib"]
28
27
 
@@ -132,6 +132,11 @@ class Chef
132
132
  end
133
133
  obj
134
134
  end
135
+
136
+ def pricing
137
+ @pricing ||= Joyent::Cloud::Pricing::Formatter.new(Joyent::Cloud::Pricing::Configuration.instance)
138
+ end
139
+
135
140
  end
136
141
  end
137
142
  end
@@ -22,7 +22,7 @@ class Chef
22
22
  flavor_list << "#{sprintf "%6.2f", flavor.memory/1024.0} GB"
23
23
  flavor_list << "#{sprintf "%6.0f", flavor.disk/1024.0} GB"
24
24
  flavor_list << "#{sprintf "%5.0f", flavor.swap/1024.0} GB"
25
- flavor_list << pricing.monthly_formatted_price_for_flavor(flavor.name.to_s, 10)
25
+ flavor_list << pricing.format_monthly_price(flavor.name.to_s, 10)
26
26
  end
27
27
 
28
28
  puts ui.list(flavor_list, :uneven_columns_across, 5)
@@ -128,10 +128,6 @@ class Chef
128
128
  matrix[field.to_sym] || matrix[:name]
129
129
  end
130
130
 
131
- def pricing
132
- @pricing ||= Joyent::Cloud::Pricing::Formatter.new(Joyent::Cloud::Pricing::Configuration.instance)
133
- end
134
-
135
131
  end
136
132
  end
137
133
  end
@@ -9,10 +9,16 @@ class Chef
9
9
  option :reserve_pricing,
10
10
  :short => '-r <file>',
11
11
  :long => '--reserve-pricing <file>',
12
- :description => 'Apply reserve pricing to instances that qualify from a YAML file (see joyent-cloud-pricing gem)',
12
+ :description => 'Apply reserve discounts from a YAML config (see joyent-cloud-pricing gem)',
13
13
  :proc => Proc.new { |key| Chef::Config[:knife][:reserve_pricing] = key }
14
14
 
15
- banner "knife joyent server pricing [-r <reserve-pricing-configuration.yml> ]"
15
+ option :show_zones,
16
+ :short => '-z',
17
+ :long => '--show-zones',
18
+ :description => 'Print list of on-demand zones sorted by price',
19
+ :proc => Proc.new { |key| Chef::Config[:knife][:show_zones] = key }
20
+
21
+ banner 'knife joyent server pricing [-r <reserve-pricing.yml> ] [ -z ] '
16
22
 
17
23
  def run
18
24
  flavors = []
@@ -21,6 +27,7 @@ class Chef
21
27
  flavors << flavor
22
28
  end
23
29
  reporter = Joyent::Cloud::Pricing::Reporter.new(Chef::Config[:knife][:reserve_pricing], flavors)
30
+ reporter.print_zone_list = Chef::Config[:knife][:show_zones]
24
31
  puts reporter.render
25
32
  rescue => e
26
33
  output_error(e)
@@ -1,3 +1,3 @@
1
1
  module KnifeJoyent
2
- VERSION = "0.4.8"
2
+ VERSION = "0.4.9"
3
3
  end
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-joyent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
5
- prerelease:
4
+ version: 0.4.9
6
5
  platform: ruby
7
6
  authors:
8
7
  - Kevin Chan
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-03-30 00:00:00.000000000 Z
11
+ date: 2014-05-10 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: fog
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: multi_json
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: chef
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
@@ -62,49 +55,29 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: joyent-cloud-pricing
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
- version: 1.0.3
61
+ version: 1.0.9
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
- version: 1.0.3
68
+ version: 1.0.9
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: rspec
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - '>='
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
92
- - !ruby/object:Gem::Version
93
- version: '0'
94
- - !ruby/object:Gem::Dependency
95
- name: guard-rspec
96
- requirement: !ruby/object:Gem::Requirement
97
- none: false
98
- requirements:
99
- - - ! '>='
100
- - !ruby/object:Gem::Version
101
- version: '0'
102
- type: :development
103
- prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ! '>='
80
+ - - '>='
108
81
  - !ruby/object:Gem::Version
109
82
  version: '0'
110
83
  description: Joyent CloudAPI Support for Chef's Knife Command
@@ -120,7 +93,6 @@ files:
120
93
  - .rspec
121
94
  - CHANGES.md
122
95
  - Gemfile
123
- - Guardfile
124
96
  - LICENSE
125
97
  - README.md
126
98
  - Rakefile
@@ -163,27 +135,27 @@ files:
163
135
  - spec/spec_helper.rb
164
136
  homepage: https://github.com/kevinykchan/knife-joyent
165
137
  licenses: []
138
+ metadata: {}
166
139
  post_install_message:
167
140
  rdoc_options: []
168
141
  require_paths:
169
142
  - lib
170
143
  required_ruby_version: !ruby/object:Gem::Requirement
171
- none: false
172
144
  requirements:
173
- - - ! '>='
145
+ - - '>='
174
146
  - !ruby/object:Gem::Version
175
147
  version: '0'
176
148
  required_rubygems_version: !ruby/object:Gem::Requirement
177
- none: false
178
149
  requirements:
179
- - - ! '>='
150
+ - - '>='
180
151
  - !ruby/object:Gem::Version
181
152
  version: '0'
182
153
  requirements: []
183
154
  rubyforge_project:
184
- rubygems_version: 1.8.23
155
+ rubygems_version: 2.0.5
185
156
  signing_key:
186
- specification_version: 3
157
+ specification_version: 4
187
158
  summary: Joyent CloudAPI Support for Chef's Knife Command
188
159
  test_files:
189
160
  - spec/spec_helper.rb
161
+ has_rdoc: true
data/Guardfile DELETED
@@ -1,24 +0,0 @@
1
- # A sample Guardfile
2
- # More info at https://github.com/guard/guard#readme
3
-
4
- guard :rspec do
5
- watch(%r{^spec/.+_spec\.rb$})
6
- watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
7
- watch('spec/spec_helper.rb') { "spec" }
8
-
9
- # Rails example
10
- watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
11
- watch(%r{^app/(.*)(\.erb|\.haml|\.slim)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
12
- watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
13
- watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
14
- watch('config/routes.rb') { "spec/routing" }
15
- watch('app/controllers/application_controller.rb') { "spec/controllers" }
16
-
17
- # Capybara features specs
18
- watch(%r{^app/views/(.+)/.*\.(erb|haml|slim)$}) { |m| "spec/features/#{m[1]}_spec.rb" }
19
-
20
- # Turnip features and steps
21
- watch(%r{^spec/acceptance/(.+)\.feature$})
22
- watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
23
- end
24
-