amazon-pricing 0.1.72 → 0.1.73
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 +8 -8
- data/Gemfile.lock +1 -1
- data/lib/amazon-pricing/ec2-price-list.rb +6 -1
- data/lib/amazon-pricing/rds-price-list.rb +4 -0
- data/lib/amazon-pricing/version.rb +1 -1
- data/test/ec2_instance_types_test.rb +10 -13
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YzhlODhkYmE1OGQ1MmU5ZmJiNDMwMTdmNGY0NTRiMmQ0OTY5NDY5Mw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NjA5NGE1MjgwOGIwZjVjNTA4YzA4NWQ0N2JiZTY3OTFjMTQxZWFkYw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODczMjkyN2RjMzc1NzI3ZTQ4MDliOGE2NWEzZDVkYWZhMTJiZTFiMDZiNjg1
|
10
|
+
MTM5YTVhMDRlZmMwMzc4MWUyYzA4MjZkODBhODlkY2I4YWMyMWMzMjcwMzhl
|
11
|
+
MmQzNTI1NjBlY2YzZDdkYjQ3YmRkNThjY2RiMjkzYTE3ZjM3YjA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjczMThkZWM0ZWU1ZjY3YjhjY2E3OWNlM2M1NmUyZmVmMjBiOWU0NWZmYTJh
|
14
|
+
NjQwZGY4ZTUxMTViNTZjMTllN2M5ZWYzZTI0MjIwYzgzZThlNTNkZjI0Nzhh
|
15
|
+
OGRjZGQ1MDRlNThkOTJjMDc5YmQ5ODhmZDZhZGE1YzQzNWEzOTQ=
|
data/Gemfile.lock
CHANGED
@@ -61,7 +61,12 @@ module AwsPricing
|
|
61
61
|
def fetch_ec2_ebs_pricing
|
62
62
|
res = PriceList.fetch_url(EBS_BASE_URL + "pricing-ebs.min.js")
|
63
63
|
res["config"]["regions"].each do |ebs_types|
|
64
|
-
|
64
|
+
region_name = ebs_types["region"]
|
65
|
+
region = get_region(region_name)
|
66
|
+
if region.nil?
|
67
|
+
$stderr.puts "[fetch_ec2_ebs_pricing] WARNING: unable to find region #{region_name}"
|
68
|
+
next
|
69
|
+
end
|
65
70
|
region.ebs_price = EbsPrice.new(region)
|
66
71
|
region.ebs_price.update_from_json(ebs_types)
|
67
72
|
end
|
@@ -215,6 +215,10 @@ module AwsPricing
|
|
215
215
|
res['config']['regions'].each do |reg|
|
216
216
|
region_name = reg['region']
|
217
217
|
region = get_region(region_name)
|
218
|
+
if region.nil?
|
219
|
+
$stderr.puts "[fetch_on_demand_rds_instance_pricing] WARNING: unable to find region #{region_name}"
|
220
|
+
next
|
221
|
+
end
|
218
222
|
reg['types'].each do |type|
|
219
223
|
type['tiers'].each do |tier|
|
220
224
|
begin
|
@@ -177,18 +177,15 @@ class TestEc2InstanceTypes < Test::Unit::TestCase
|
|
177
177
|
region = @@ec2_pricing.get_region('us-gov-west-1')
|
178
178
|
instance = region.get_ec2_instance_type('r3.large')
|
179
179
|
os = instance.get_operating_system(:linux)
|
180
|
-
assert os.ondemand_price_per_hour == 0.
|
181
|
-
assert os.partialupfront_prepay_1_year ==
|
182
|
-
assert os.allupfront_prepay_1_year ==
|
183
|
-
assert os.partialupfront_prepay_3_year ==
|
184
|
-
assert os.allupfront_prepay_3_year ==
|
185
|
-
assert os.noupfront_effective_rate_1_year == 0.
|
186
|
-
assert os.partialupfront_effective_rate_1_year == 0.
|
187
|
-
assert os.allupfront_effective_rate_1_year == 0.
|
188
|
-
assert os.partialupfront_effective_rate_3_year == 0.
|
189
|
-
assert os.allupfront_effective_rate_3_year == 0.
|
180
|
+
assert os.ondemand_price_per_hour == 0.2
|
181
|
+
assert os.partialupfront_prepay_1_year == 617
|
182
|
+
assert os.allupfront_prepay_1_year == 927
|
183
|
+
assert os.partialupfront_prepay_3_year == 1177
|
184
|
+
assert os.allupfront_prepay_3_year == 1838
|
185
|
+
assert os.noupfront_effective_rate_1_year == 0.125
|
186
|
+
assert os.partialupfront_effective_rate_1_year == 0.1074
|
187
|
+
assert os.allupfront_effective_rate_1_year == 0.1058
|
188
|
+
assert os.partialupfront_effective_rate_3_year == 0.0738
|
189
|
+
assert os.allupfront_effective_rate_3_year == 0.0699
|
190
190
|
end
|
191
|
-
|
192
|
-
|
193
|
-
|
194
191
|
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.
|
4
|
+
version: 0.1.73
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Kinsella
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A Ruby library for retrieving pricing for Amazon Web Services
|
14
14
|
email:
|
@@ -96,3 +96,4 @@ test_files:
|
|
96
96
|
- spec/support/.gitignore
|
97
97
|
- test/ec2_instance_types_test.rb
|
98
98
|
- test/helper.rb
|
99
|
+
has_rdoc:
|