amazon-pricing 0.1.55 → 0.1.56
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Gemfile.lock +2 -1
- data/amazon-pricing.gemspec +3 -1
- data/lib/amazon-pricing.rb +1 -1
- data/lib/amazon-pricing/version.rb +1 -1
- data/lib/dynamo-db-price-list.rb +30 -0
- metadata +18 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OGM5YjZlZjA0ODk5NzQ4YTY1ZDU2Nzk4MzJhMGRiODY1ZjNlMDgyMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTVmOGNkMmQyZTZlM2U5M2UzOWVhYjZhM2I5YzVlOTc5Yzg1NTliZg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NDRkNWU0MWU2MTRmZGMwMzJjYWYxZDg0ODJhNjgwYzVjYzllYzJiMDAxY2Mx
|
10
|
+
YjFlZTBlNTRjOTk2NmQyY2Q5MGRlY2UyN2M0MjhjZWExMzJmMTk5MTdiNTcw
|
11
|
+
MDk1ZTFiZjRhMzJlZjA5MzMyNWM4OWE3NGYxMWNkMDQwMDUzZGI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjE4YWQ5ZDc5MzAxMGE5MTk3ZmM4MDAxNGM2OTUzMjY0ZTlkZTdlZjVhNmE2
|
14
|
+
YTQwYzExZTE3MDU4NTBkYzkzMTA1ODU4ZjliM2FlNjI5YzY2YzAyYzU2N2Iz
|
15
|
+
YzIwM2UwNjMzZmJiYjdmZTdlNzlhYTYwNDZiMjI1OWMzODNmNmI=
|
data/Gemfile.lock
CHANGED
data/amazon-pricing.gemspec
CHANGED
@@ -22,4 +22,6 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
23
23
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
24
24
|
s.require_paths = %w(lib)
|
25
|
-
|
25
|
+
|
26
|
+
s.add_dependency 'mechanize', '~> 2.7.3'
|
27
|
+
end
|
data/lib/amazon-pricing.rb
CHANGED
@@ -8,8 +8,8 @@ Dir[File.join(File.dirname(__FILE__), 'amazon-pricing/*.rb')].sort.each { |lib|
|
|
8
8
|
require 'aws-price-list'
|
9
9
|
require 'ec2-price-list'
|
10
10
|
require 'rds-price-list'
|
11
|
+
require 'dynamo-db-price-list'
|
11
12
|
|
12
13
|
require 'logger'
|
13
14
|
logger = Logger.new(STDERR)
|
14
15
|
logger.level = Logger::WARN
|
15
|
-
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module AwsPricing
|
2
|
+
class DynamoDBPriceList < PriceList
|
3
|
+
|
4
|
+
THROUGHPUT_URL = "http://a0.awsstatic.com/pricing/1/dynamodb/pricing-data-throughput.min.js"
|
5
|
+
STORAGE_URL = "http://a0.awsstatic.com/pricing/1/dynamodb/pricing-data-storage.min.js"
|
6
|
+
RESERVED_CAPACITY_URL = "http://a0.awsstatic.com/pricing/1/dynamodb/pricing-reserved-capacity.min.js"
|
7
|
+
DATA_TRANSFER_URL = "http://a0.awsstatic.com/pricing/1/dynamodb/pricing-data-transfer.min.js"
|
8
|
+
|
9
|
+
def initialize
|
10
|
+
super
|
11
|
+
end
|
12
|
+
|
13
|
+
def throughput_pricing
|
14
|
+
@throughput_pricing ||= PriceList.fetch_url(THROUGHPUT_URL)
|
15
|
+
end
|
16
|
+
|
17
|
+
def storage_pricing
|
18
|
+
@storage_pricing ||= PriceList.fetch_url(STORAGE_URL)
|
19
|
+
end
|
20
|
+
|
21
|
+
def reserved_capacity_pricing
|
22
|
+
@reserved_capacity_pricing ||= PriceList.fetch_url(RESERVED_CAPACITY_URL)
|
23
|
+
end
|
24
|
+
|
25
|
+
def data_transfer_pricing
|
26
|
+
@data_transfer_pricing ||= PriceList.fetch_url(DATA_TRANSFER_URL)
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
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.56
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Kinsella
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
12
|
-
dependencies:
|
11
|
+
date: 2015-01-20 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: mechanize
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.7.3
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.7.3
|
13
27
|
description: A Ruby library for retrieving pricing for Amazon Web Services
|
14
28
|
email:
|
15
29
|
- joe.kinsella@gmail.com
|
@@ -42,6 +56,7 @@ files:
|
|
42
56
|
- lib/amazon-pricing/region.rb
|
43
57
|
- lib/amazon-pricing/version.rb
|
44
58
|
- lib/aws-price-list.rb
|
59
|
+
- lib/dynamo-db-price-list.rb
|
45
60
|
- lib/ec2-price-list.rb
|
46
61
|
- lib/rds-price-list.rb
|
47
62
|
- spec/instance_type_spec.rb
|