amazon-pricing 0.1.33 → 0.1.34
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/amazon-pricing.rb +4 -0
- data/lib/amazon-pricing/version.rb +1 -1
- data/test/ec2_instance_types_test.rb +12 -0
- metadata +4 -4
data/Gemfile.lock
CHANGED
data/lib/amazon-pricing.rb
CHANGED
@@ -343,6 +343,10 @@ module AwsPricing
|
|
343
343
|
@@OS_TYPES.each do |os|
|
344
344
|
fetch_ec2_instance_pricing(EC2_BASE_URL + "#{os}-od.min.js", :ondemand, os)
|
345
345
|
end
|
346
|
+
# Rinse & repeat for legacy instances
|
347
|
+
@@OS_TYPES.each do |os|
|
348
|
+
fetch_ec2_instance_pricing(EC2_BASE_URL + "previous-generation/#{os}-od.min.js", :ondemand, os)
|
349
|
+
end
|
346
350
|
end
|
347
351
|
|
348
352
|
def get_ec2_reserved_instance_pricing
|
@@ -105,4 +105,16 @@ class TestEc2InstanceTypes < Test::Unit::TestCase
|
|
105
105
|
assert instance.virtual_cores == 2
|
106
106
|
end
|
107
107
|
|
108
|
+
def test_bad_data
|
109
|
+
# Someone at AWS is fat fingering the pricing data and putting the text "os" where there should be the actual operating system (e.g. "linux") - see http://a0.awsstatic.com/pricing/1/ec2/linux-od.min.js
|
110
|
+
@@ec2_pricing.regions.each do |region|
|
111
|
+
region.ec2_instance_types.each do |instance|
|
112
|
+
instance.operating_systems.each do |os|
|
113
|
+
puts os.class.name
|
114
|
+
#assert os.ondemand_price_per_hour.nil? && (!os.light_price_per_hour_1_year.nil? || !os.medium_price_per_hour_1_year.nil? || !os.heavy_price_per_hour_1_year.nil?)
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
108
120
|
end
|
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.
|
4
|
+
version: 0.1.34
|
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: 2014-
|
12
|
+
date: 2014-05-22 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A Ruby library for retrieving pricing for Amazon Web Services
|
15
15
|
email:
|
@@ -65,7 +65,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
65
65
|
version: '0'
|
66
66
|
segments:
|
67
67
|
- 0
|
68
|
-
hash:
|
68
|
+
hash: 4440939778517060443
|
69
69
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
70
|
none: false
|
71
71
|
requirements:
|
@@ -74,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
74
|
version: '0'
|
75
75
|
segments:
|
76
76
|
- 0
|
77
|
-
hash:
|
77
|
+
hash: 4440939778517060443
|
78
78
|
requirements: []
|
79
79
|
rubyforge_project: amazon-pricing
|
80
80
|
rubygems_version: 1.8.25
|