amazon-pricing 0.1.33 → 0.1.34

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.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- amazon-pricing (0.1.33)
4
+ amazon-pricing (0.1.34)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -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
@@ -8,5 +8,5 @@
8
8
  # Home:: http://github.com/CloudHealth/amazon-pricing
9
9
  #++
10
10
  module AwsPricing
11
- VERSION = '0.1.33'
11
+ VERSION = '0.1.34'
12
12
  end
@@ -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.33
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-04-16 00:00:00.000000000 Z
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: -1176722608496314632
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: -1176722608496314632
77
+ hash: 4440939778517060443
78
78
  requirements: []
79
79
  rubyforge_project: amazon-pricing
80
80
  rubygems_version: 1.8.25