amazon-pricing 0.1.44 → 0.1.45

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZmVmZGI2MDkyMzAzZDUwMmYzMzc0NmE2ZjkxY2JmNjdjNTlkYzg5Yw==
4
+ YWEyNTk2NzExMjdlZTFlZmI4NDBmODEwOWI2OGI3OTcyZWNlOTExZg==
5
5
  data.tar.gz: !binary |-
6
- YzZiZDJhNDc3ZWIxZWU4ZWQyYjAyM2RmMWQ3OGFmYTAyNTA1NDIyNQ==
6
+ ZmIzYjBlMGU3ODI0OGM1MmI5MDRhZjY0Y2YzMzRiYjhjYzUzZjI2Mw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MzQ4YWM0NWM1MjRlMGFjNjFkNTc0ZjFjZWExMjJjYjgzYTJlMDMwM2Y0ZDkw
10
- MTU1MGQ3MDMyNjI3NDk5YzM3ZjNkOWJjNzdhYTJkY2I3YTk5ODZjODRiMjIz
11
- YzI1ZDYwMDk2M2M3ZDQ4ODg2NjdjN2VlZTZmNjQ1MzIxYTlmMTQ=
9
+ NGYxNGI4ZGNjMmM4NDUwN2U5YzFkMTg3MDZmZjM3OTYwNGI4NzRhYWZkY2Ix
10
+ NWY1Yjk1NGFmODYyZmFkNDg5YzExYjc2NjZlNDkxMTE4OTY4ODEyZWMzYzU5
11
+ ZTlmZTZkMWY5OTIwNGI2ZmIyZTBlNWNlNjhlZjQ0OTZiN2M4NmE=
12
12
  data.tar.gz: !binary |-
13
- ZGJlZGM0NzdiMDY5Yjg1MjllN2M5NmY3OTQzZjE2ZTE3NWEyNjBiNDUyY2M5
14
- OGJhOTcxOWM4MzcwMzc2MzA4Mzc5ZWQ1ZjE3OGIyOTRiM2UyNDQ2MjkzMjky
15
- MDJkMDY4MTA0NzFhOGFmYzViNjJiZTFmOTEzZjNmNmE5MzllOGM=
13
+ ZjcyYmUwNDczZTIzNThkZTZjOTgxYTdmY2VlZjZhOWJjOTNjNjlhZmNiMTMy
14
+ NDQ0MzJmOWVlNmNkNGQxYTQ5Y2U5OTM2ZjNjODAyYzI1MDM1NWUzYTY3ODE2
15
+ M2EwMmE5ZWE2NzQ4OWIzYjM2MWY2NDkxYjBlNTkwYzU0ZjczYTM=
@@ -34,7 +34,7 @@ module AwsPricing
34
34
  db = get_category_type(database_type, is_multi_az, is_byol)
35
35
  if db.nil?
36
36
  db = DatabaseType.new(self, database_type)
37
-
37
+
38
38
  if is_multi_az == true and is_byol == true
39
39
  @category_types["#{database_type}_byol_multiaz"] = db
40
40
  elsif is_multi_az == true and is_byol == false
@@ -52,6 +52,13 @@ module AwsPricing
52
52
  price = coerce_price(values[database_type.to_s])
53
53
  db.set_price_per_hour(type_of_instance, nil, price)
54
54
  else
55
+ # Amazon has another data error where they are still exposing reserved instance types when they do not actually exist (e.g. SQL Server t1.micro).
56
+ # Just warn and continue.
57
+ if db.ondemand_price_per_hour.nil?
58
+ $stderr.puts "WARNING: Skipping RDS instance type #{api_name}:#{database_type}:#{type_of_instance}:#{is_multi_az}:#{is_byol} due to lack of on-demand pricing"
59
+ return
60
+ end
61
+
55
62
  json['valueColumns'].each do |val|
56
63
  # As of 2014-04-02 we see entries w/o pricing, e.g. sqlserver_web heavy 1 year reservation = {"prices"=>{"USD"=>{}}, "name"=>"yrTerm1"}
57
64
  if val['prices']['USD'].empty?
@@ -8,5 +8,5 @@
8
8
  # Home:: http://github.com/CloudHealth/amazon-pricing
9
9
  #++
10
10
  module AwsPricing
11
- VERSION = '0.1.44'
11
+ VERSION = '0.1.45'
12
12
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amazon-pricing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.44
4
+ version: 0.1.45
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Kinsella
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-11 00:00:00.000000000 Z
11
+ date: 2014-08-12 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A Ruby library for retrieving pricing for Amazon Web Services
14
14
  email: