amazon-pricing 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -7,7 +7,7 @@ Amazon Web Services offers cloud-based on demand compute, storage and applicatio
7
7
 
8
8
  For the most complete and up-to date README information please visit the project homepage at:
9
9
 
10
- http://github.com/sonian/amazon-pricing/tree/master
10
+ http://github.com/CloudHealth/amazon-pricing/tree/master
11
11
 
12
12
 
13
13
  == Installation
@@ -29,7 +29,7 @@ This is the standard install for stable releases from RubyGems.
29
29
 
30
30
  To install from git for adding features or fixing bugs, you'll need to clone and build.
31
31
 
32
- git clone git://github.com/sonian/amazon-pricing.git
32
+ git clone git://github.com/CloudHealth/amazon-pricing.git
33
33
  cd amazon-pricing
34
34
  bundle install
35
35
  rake test
@@ -55,9 +55,9 @@ The library exposes one main interface module
55
55
 
56
56
  === Project Websites
57
57
 
58
- * Project Home : http://github.com/sonian/amazon-pricing/tree/master
59
- * API Documentation : http://rdoc.info/projects/sonian/amazon-pricing
60
- * Report Bugs / Request Features : http://github.com/sonian/amazon-pricing/issues
58
+ * Project Home : http://github.com/CloudHealth/amazon-pricing/tree/master
59
+ * API Documentation : http://rdoc.info/projects/CloudHealth/amazon-pricing
60
+ * Report Bugs / Request Features : http://github.com/CloudHealth/amazon-pricing/issues
61
61
  * Amazon Web Services : http://aws.amazon.com
62
62
 
63
63
  == Credits
@@ -72,7 +72,7 @@ Comments, patches, Git pull requests and bug reports are welcome. Send an email
72
72
 
73
73
  Please follow these steps if you want to send a patch or a GitHub pull request:
74
74
 
75
- * Fork sonian/amazon-pricing
75
+ * Fork CloudHealth/amazon-pricing
76
76
  * Create a topic branch: `git checkout -b my_fix`
77
77
  * Make sure you add tests for your changes and that they all pass with 'rake test'
78
78
  * Don't change files that you don't own like the gemspec or version.rb
@@ -84,5 +84,5 @@ Please follow these steps if you want to send a patch or a GitHub pull request:
84
84
 
85
85
  Enjoy!
86
86
 
87
- Sonian
87
+ CloudHealth
88
88
 
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Joe Kinsella"]
10
10
  s.email = ["joe.kinsella@gmail.com"]
11
- s.homepage = "http://github.com/sonian/amazon-pricing"
11
+ s.homepage = "http://github.com/CloudHealth/amazon-pricing"
12
12
  s.summary = "Amazon Web Services Pricing Ruby gem"
13
13
  s.description = "A Ruby library for retrieving pricing for Amazon Web Services"
14
14
  s.license = 'MIT'
@@ -8,9 +8,9 @@ Dir[File.join(File.dirname(__FILE__), 'amazon-pricing/*.rb')].sort.each { |lib|
8
8
  #
9
9
  # Ruby Gem Name:: amazon-pricing
10
10
  # Author:: Joe Kinsella (mailto:joe.kinsella@gmail.com)
11
- # Copyright:: Copyright (c) 2011-2012 Sonian
11
+ # Copyright:: Copyright (c) 2011-2013 CloudHealth
12
12
  # License:: Distributes under the same terms as Ruby
13
- # Home:: http://github.com/sonian/amazon-pricing
13
+ # Home:: http://github.com/CloudHealth/amazon-pricing
14
14
  #++
15
15
  module AwsPricing
16
16
 
@@ -3,9 +3,9 @@
3
3
  #
4
4
  # Ruby Gem Name:: amazon-pricing
5
5
  # Author:: Joe Kinsella (mailto:joe.kinsella@gmail.com)
6
- # Copyright:: Copyright (c) 2011-2012 Sonian
6
+ # Copyright:: Copyright (c) 2011-2013 CloudHealth
7
7
  # License:: Distributes under the same terms as Ruby
8
- # Home:: http://github.com/sonian/amazon-pricing
8
+ # Home:: http://github.com/CloudHealth/amazon-pricing
9
9
  #++
10
10
  module AwsPricing
11
11
 
@@ -3,9 +3,9 @@
3
3
  #
4
4
  # Ruby Gem Name:: amazon-pricing
5
5
  # Author:: Joe Kinsella (mailto:joe.kinsella@gmail.com)
6
- # Copyright:: Copyright (c) 2011-2012 Sonian
6
+ # Copyright:: Copyright (c) 2011-2013 CloudHealth
7
7
  # License:: Distributes under the same terms as Ruby
8
- # Home:: http://github.com/sonian/amazon-pricing
8
+ # Home:: http://github.com/CloudHealth/amazon-pricing
9
9
  #++
10
10
  module AwsPricing
11
11
 
@@ -119,20 +119,13 @@ module AwsPricing
119
119
  #attr_accessor :size, :instance_type
120
120
 
121
121
  # Returns [api_name, name]
122
- def self.get_name(instance_type, size, is_reserved = false)
123
- lookup = @@Api_Name_Lookup
124
- lookup = @@Api_Name_Lookup_Reserved if is_reserved
125
-
122
+ def self.get_name(instance_type, api_name, is_reserved = false)
126
123
  # Let's handle new instances more gracefully
127
- unless lookup.has_key? instance_type
128
- raise UnknownTypeError, "Unknown instance type #{instance_type}", caller
129
- else
130
- api_name = lookup[instance_type][size]
124
+ unless @@Memory_Lookup.has_key? api_name
125
+ raise UnknownTypeError, "Unknown instance type #{instance_type} #{api_name}", caller
131
126
  end
132
127
 
133
- lookup = @@Name_Lookup
134
- lookup = @@Name_Lookup_Reserved if is_reserved
135
- name = lookup[instance_type][size]
128
+ name = @@Name_Lookup[api_name]
136
129
 
137
130
  [api_name, name]
138
131
  end
@@ -147,55 +140,19 @@ module AwsPricing
147
140
  values
148
141
  end
149
142
 
150
- @@Api_Name_Lookup = {
151
- 'stdODI' => {'sm' => 'm1.small', 'med' => 'm1.medium', 'lg' => 'm1.large', 'xl' => 'm1.xlarge'},
152
- 'hiMemODI' => {'xl' => 'm2.xlarge', 'xxl' => 'm2.2xlarge', 'xxxxl' => 'm2.4xlarge'},
153
- 'hiCPUODI' => {'med' => 'c1.medium', 'xl' => 'c1.xlarge'},
154
- 'hiIoODI' => {'xxxxl' => 'hi1.4xlarge'},
155
- 'clusterGPUI' => {'xxxxl' => 'cg1.4xlarge'},
156
- 'clusterComputeI' => {'xxxxl' => 'cc1.4xlarge','xxxxxxxxl' => 'cc2.8xlarge'},
157
- 'uODI' => {'u' => 't1.micro'},
158
- 'secgenstdODI' => {'xl' => 'm3.xlarge', 'xxl' => 'm3.2xlarge'},
159
- 'clusterHiMemODI' => {'xxxxxxxxl' => 'cr1.8xlarge'},
160
- 'hiStoreODI' => {'xxxxxxxxl' => 'hs1.8xlarge'},
161
- }
162
143
  @@Name_Lookup = {
163
- 'stdODI' => {'sm' => 'Standard Small', 'med' => 'Standard Medium', 'lg' => 'Standard Large', 'xl' => 'Standard Extra Large'},
164
- 'hiMemODI' => {'xl' => 'Hi-Memory Extra Large', 'xxl' => 'Hi-Memory Double Extra Large', 'xxxxl' => 'Hi-Memory Quadruple Extra Large'},
165
- 'hiCPUODI' => {'med' => 'High-CPU Medium', 'xl' => 'High-CPU Extra Large'},
166
- 'hiIoODI' => {'xxxxl' => 'High I/O Quadruple Extra Large'},
167
- 'clusterGPUI' => {'xxxxl' => 'Cluster GPU Quadruple Extra Large'},
168
- 'clusterComputeI' => {'xxxxl' => 'Cluster Compute Quadruple Extra Large', 'xxxxxxxxl' => 'Cluster Compute Eight Extra Large'},
169
- 'uODI' => {'u' => 'Micro'},
170
- 'secgenstdODI' => {'xl' => 'M3 Extra Large Instance', 'xxl' => 'M3 Double Extra Large Instance'},
171
- 'clusterHiMemODI' => {'xxxxxxxxl' => 'High-Memory Cluster Eight Extra Large'},
172
- 'hiStoreODI' => {'xxxxxxxxl' => 'High-Storage Eight Extra Large'},
144
+ 'm1.small' => 'Standard Small', 'm1.medium' => 'Standard Medium', 'm1.large' => 'Standard Large', 'm1.xlarge' => 'Standard Extra Large',
145
+ 'm2.xlarge' => 'Hi-Memory Extra Large', 'm2.2xlarge' => 'Hi-Memory Double Extra Large', 'm2.4xlarge' => 'Hi-Memory Quadruple Extra Large',
146
+ 'm3.xlarge' => 'M3 Extra Large Instance', 'm3.2xlarge' => 'M3 Double Extra Large Instance',
147
+ 'c1.medium' => 'High-CPU Medium', 'c1.xlarge' => 'High-CPU Extra Large',
148
+ 'hi1.4xlarge' => 'High I/O Quadruple Extra Large',
149
+ 'cg1.4xlarge' => 'Cluster GPU Quadruple Extra Large',
150
+ 'cc1.4xlarge' => 'Cluster Compute Quadruple Extra Large', 'cc2.8xlarge' => 'Cluster Compute Eight Extra Large',
151
+ 't1.micro' => 'Micro',
152
+ 'cr1.8xlarge' => 'High-Memory Cluster Eight Extra Large',
153
+ 'hs1.8xlarge' => 'High-Storage Eight Extra Large',
154
+ 'g2.2xlarge' => 'Cluster GPU Double Extra Large',
173
155
  }
174
- @@Api_Name_Lookup_Reserved = {
175
- 'stdResI' => {'sm' => 'm1.small', 'med' => 'm1.medium', 'lg' => 'm1.large', 'xl' => 'm1.xlarge'},
176
- 'hiMemResI' => {'xl' => 'm2.xlarge', 'xxl' => 'm2.2xlarge', 'xxxxl' => 'm2.4xlarge'},
177
- 'hiCPUResI' => {'med' => 'c1.medium', 'xl' => 'c1.xlarge'},
178
- 'clusterGPUResI' => {'xxxxl' => 'cg1.4xlarge'},
179
- 'clusterCompResI' => {'xxxxl' => 'cc1.4xlarge', 'xxxxxxxxl' => 'cc2.8xlarge'},
180
- 'uResI' => {'u' => 't1.micro'},
181
- 'hiIoResI' => {'xxxxl' => 'hi1.4xlarge'},
182
- 'secgenstdResI' => {'xl' => 'm3.xlarge', 'xxl' => 'm3.2xlarge'},
183
- 'clusterHiMemResI' => {'xxxxxxxxl' => 'cr1.8xlarge'},
184
- 'hiStoreResI' => {'xxxxxxxxl' => 'hs1.8xlarge'},
185
- }
186
- @@Name_Lookup_Reserved = {
187
- 'stdResI' => {'sm' => 'Standard Small', 'med' => 'Standard Medium', 'lg' => 'Standard Large', 'xl' => 'Standard Extra Large'},
188
- 'hiMemResI' => {'xl' => 'Hi-Memory Extra Large', 'xxl' => 'Hi-Memory Double Extra Large', 'xxxxl' => 'Hi-Memory Quadruple Extra Large'},
189
- 'hiCPUResI' => {'med' => 'High-CPU Medium', 'xl' => 'High-CPU Extra Large'},
190
- 'clusterGPUResI' => {'xxxxl' => 'Cluster GPU Quadruple Extra Large'},
191
- 'clusterCompResI' => {'xxxxl' => 'Cluster Compute Quadruple Extra Large', 'xxxxxxxxl' => 'Cluster Compute Eight Extra Large'},
192
- 'uResI' => {'u' => 'Micro'},
193
- 'hiIoResI' => {'xxxxl' => 'High I/O Quadruple Extra Large Instance'},
194
- 'secgenstdResI' => {'xl' => 'M3 Extra Large Instance', 'xxl' => 'M3 Double Extra Large Instance'},
195
- 'clusterHiMemResI' => {'xxxxxxxxl' => 'High-Memory Cluster Eight Extra Large'},
196
- 'hiStoreResI' => {'xxxxxxxxl' => 'High-Storage Eight Extra Large'},
197
- }
198
-
199
156
  @@Memory_Lookup = {
200
157
  'm1.small' => 1700, 'm1.medium' => 3750, 'm1.large' => 7500, 'm1.xlarge' => 15000,
201
158
  'm2.xlarge' => 17100, 'm2.2xlarge' => 34200, 'm2.4xlarge' => 68400,
@@ -208,6 +165,7 @@ module AwsPricing
208
165
  'm3.xlarge' => 15000, 'm3.xlarge' => 30000,
209
166
  'cr1.8xlarge' => 244000,
210
167
  'hs1.8xlarge' => 117000,
168
+ 'g2.2xlarge' => 15000,
211
169
  }
212
170
  @@Disk_Lookup = {
213
171
  'm1.small' => 160, 'm1.medium' => 410, 'm1.large' =>850, 'm1.xlarge' => 1690,
@@ -221,6 +179,7 @@ module AwsPricing
221
179
  'm3.xlarge' => 0, 'm3.xlarge' => 0,
222
180
  'cr1.8xlarge' => 240,
223
181
  'hs1.8xlarge' => 48000,
182
+ 'g2.2xlarge' => 60,
224
183
  }
225
184
  @@Platform_Lookup = {
226
185
  'm1.small' => 32, 'm1.medium' => 32, 'm1.large' => 64, 'm1.xlarge' => 64,
@@ -234,6 +193,7 @@ module AwsPricing
234
193
  'm3.xlarge' => 64, 'm3.xlarge' => 64,
235
194
  'cr1.8xlarge' => 64,
236
195
  'hs1.8xlarge' => 64,
196
+ 'g2.2xlarge' => 64,
237
197
  }
238
198
  @@Compute_Units_Lookup = {
239
199
  'm1.small' => 1, 'm1.medium' => 2, 'm1.large' => 4, 'm1.xlarge' => 8,
@@ -246,6 +206,7 @@ module AwsPricing
246
206
  't1.micro' => 2,
247
207
  'cr1.8xlarge' => 88,
248
208
  'hs1.8xlarge' => 35,
209
+ 'g2.2xlarge' => 26,
249
210
  'unknown' => 0,
250
211
  }
251
212
  @@Virtual_Cores_Lookup = {
@@ -259,6 +220,7 @@ module AwsPricing
259
220
  't1.micro' => 0,
260
221
  'cr1.8xlarge' => 16,
261
222
  'hs1.8xlarge' => 16,
223
+ 'g2.2xlarge' => 8,
262
224
  'unknown' => 0,
263
225
  }
264
226
  end
@@ -3,9 +3,9 @@
3
3
  #
4
4
  # Ruby Gem Name:: amazon-pricing
5
5
  # Author:: Joe Kinsella (mailto:joe.kinsella@gmail.com)
6
- # Copyright:: Copyright (c) 2011-2012 Sonian
6
+ # Copyright:: Copyright (c) 2011-2013 CloudHealth
7
7
  # License:: Distributes under the same terms as Ruby
8
- # Home:: http://github.com/sonian/amazon-pricing
8
+ # Home:: http://github.com/CloudHealth/amazon-pricing
9
9
  #++
10
10
  module AwsPricing
11
11
 
@@ -3,9 +3,9 @@
3
3
  #
4
4
  # Ruby Gem Name:: amazon-pricing
5
5
  # Author:: Joe Kinsella (mailto:joe.kinsella@gmail.com)
6
- # Copyright:: Copyright (c) 2011-2012 Sonian
6
+ # Copyright:: Copyright (c) 2011-2013 CloudHealth
7
7
  # License:: Distributes under the same terms as Ruby
8
- # Home:: http://github.com/sonian/amazon-pricing
8
+ # Home:: http://github.com/CloudHealth/amazon-pricing
9
9
  #++
10
10
  module AwsPricing
11
11
  # Region represents a geographic area in which Amazon Web Services has
@@ -3,10 +3,10 @@
3
3
  #
4
4
  # Ruby Gem Name:: amazon-pricing
5
5
  # Author:: Joe Kinsella (mailto:joe.kinsella@gmail.com)
6
- # Copyright:: Copyright (c) 2011-2012 Sonian
6
+ # Copyright:: Copyright (c) 2011-2013 CloudHealth
7
7
  # License:: Distributes under the same terms as Ruby
8
- # Home:: http://github.com/sonian/amazon-pricing
8
+ # Home:: http://github.com/CloudHealth/amazon-pricing
9
9
  #++
10
10
  module AwsPricing
11
- VERSION = '0.1.8'
11
+ VERSION = '0.1.9'
12
12
  end
@@ -3,9 +3,9 @@
3
3
  #
4
4
  # Ruby Gem Name:: amazon-pricing
5
5
  # Author:: Joe Kinsella (mailto:joe.kinsella@gmail.com)
6
- # Copyright:: Copyright (c) 2011-2012 Sonian
6
+ # Copyright:: Copyright (c) 2011-2013 CloudHealth
7
7
  # License:: Distributes under the same terms as Ruby
8
- # Home:: http://github.com/sonian/amazon-pricing
8
+ # Home:: http://github.com/CloudHealth/amazon-pricing
9
9
  #++
10
10
 
11
11
  require 'rubygems'
@@ -5,9 +5,9 @@
5
5
  #
6
6
  # Ruby Gem Name:: amazon-pricing
7
7
  # Author:: Joe Kinsella (mailto:joe.kinsella@gmail.com)
8
- # Copyright:: Copyright (c) 2011-2012 Sonian
8
+ # Copyright:: Copyright (c) 2011-2013 CloudHealth
9
9
  # License:: Distributes under the same terms as Ruby
10
- # Home:: http://github.com/sonian/amazon-pricing
10
+ # Home:: http://github.com/CloudHealth/amazon-pricing
11
11
  #++
12
12
 
13
13
  $: << File.expand_path(File.dirname(__FILE__))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amazon-pricing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-25 00:00:00.000000000 Z
12
+ date: 2013-11-06 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A Ruby library for retrieving pricing for Amazon Web Services
15
15
  email:
@@ -36,7 +36,7 @@ files:
36
36
  - spec/price_list_spec.rb
37
37
  - test/helper.rb
38
38
  - test/test-ec2-instance-types.rb
39
- homepage: http://github.com/sonian/amazon-pricing
39
+ homepage: http://github.com/CloudHealth/amazon-pricing
40
40
  licenses:
41
41
  - MIT
42
42
  post_install_message: