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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YmNjMjQ0OTAyZDYwYTFmMGVkZWE5OTEzNDhjZmQ2OTczNmE1YjMxMQ==
4
+ OGM5YjZlZjA0ODk5NzQ4YTY1ZDU2Nzk4MzJhMGRiODY1ZjNlMDgyMQ==
5
5
  data.tar.gz: !binary |-
6
- YWU4NjcyODZjNDc2ODc1ZjM1MDk4NWE5Zjg1OWM3OTRlYjg3NzI1Ng==
6
+ MTVmOGNkMmQyZTZlM2U5M2UzOWVhYjZhM2I5YzVlOTc5Yzg1NTliZg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YmFkYTM0OWExODk3MzUzOWRhYmE3M2NmMjZkYmNiMTQ4MGM4ZTIyOWE4ZjA1
10
- ZDAzZDIxMDkwOThjOGFkZWU5NWE5YzE1MWE5MGRkM2Y5NjcyNzM0MWI4MjMz
11
- Y2IwNDM2MDE3NzkxNTA0ZmMwMGZjN2QyYzczZWIwMGZmMWIxMmE=
9
+ NDRkNWU0MWU2MTRmZGMwMzJjYWYxZDg0ODJhNjgwYzVjYzllYzJiMDAxY2Mx
10
+ YjFlZTBlNTRjOTk2NmQyY2Q5MGRlY2UyN2M0MjhjZWExMzJmMTk5MTdiNTcw
11
+ MDk1ZTFiZjRhMzJlZjA5MzMyNWM4OWE3NGYxMWNkMDQwMDUzZGI=
12
12
  data.tar.gz: !binary |-
13
- NTkxNGYwN2Y1MDEyNjAxYzk4Y2UwYTJlM2UzMjI5ZTExNjk5ZDM1YWUwYTY5
14
- ZTliZDkxYTU0MjJlZmRmNWZkZGU1NjA2MDJkMDg4NDZlZDM1OGM3ODZiNTI5
15
- MWI2Nzg1YTY3ZThkMjJlYjE2NzBhM2ZjYzA1NTQyNzczOWJhMTA=
13
+ MjE4YWQ5ZDc5MzAxMGE5MTk3ZmM4MDAxNGM2OTUzMjY0ZTlkZTdlZjVhNmE2
14
+ YTQwYzExZTE3MDU4NTBkYzkzMTA1ODU4ZjliM2FlNjI5YzY2YzAyYzU2N2Iz
15
+ YzIwM2UwNjMzZmJiYjdmZTdlNzlhYTYwNDZiMjI1OWMzODNmNmI=
@@ -1,7 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- amazon-pricing (0.1.55)
4
+ amazon-pricing (0.1.56)
5
+ mechanize (~> 2.7.3)
5
6
 
6
7
  GEM
7
8
  remote: https://rubygems.org/
@@ -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
- end
25
+
26
+ s.add_dependency 'mechanize', '~> 2.7.3'
27
+ end
@@ -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
-
@@ -8,5 +8,5 @@
8
8
  # Home:: http://github.com/CloudHealth/amazon-pricing
9
9
  #++
10
10
  module AwsPricing
11
- VERSION = '0.1.55'
11
+ VERSION = '0.1.56'
12
12
  end
@@ -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.55
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-13 00:00:00.000000000 Z
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