aws-pricing 0.4.0 → 0.5.0

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.
@@ -0,0 +1 @@
1
+ language: ruby
data/Gemfile CHANGED
@@ -4,8 +4,8 @@ gem 'httparty'
4
4
  gem 'json'
5
5
 
6
6
  group :development do
7
- gem "rspec", "~> 2.8.0"
7
+ gem "rspec", "~> 2.11.0"
8
8
  gem "rdoc", "~> 3.12"
9
- gem "bundler", "~> 1.0.0"
9
+ gem "bundler", "~> 1.1.3"
10
10
  gem "jeweler", "~> 1.8.3"
11
11
  end
@@ -17,22 +17,22 @@ GEM
17
17
  rake (0.9.2.2)
18
18
  rdoc (3.12)
19
19
  json (~> 1.4)
20
- rspec (2.8.0)
21
- rspec-core (~> 2.8.0)
22
- rspec-expectations (~> 2.8.0)
23
- rspec-mocks (~> 2.8.0)
24
- rspec-core (2.8.0)
25
- rspec-expectations (2.8.0)
26
- diff-lcs (~> 1.1.2)
27
- rspec-mocks (2.8.0)
20
+ rspec (2.11.0)
21
+ rspec-core (~> 2.11.0)
22
+ rspec-expectations (~> 2.11.0)
23
+ rspec-mocks (~> 2.11.0)
24
+ rspec-core (2.11.0)
25
+ rspec-expectations (2.11.1)
26
+ diff-lcs (~> 1.1.3)
27
+ rspec-mocks (2.11.1)
28
28
 
29
29
  PLATFORMS
30
30
  ruby
31
31
 
32
32
  DEPENDENCIES
33
- bundler (~> 1.0.0)
33
+ bundler (~> 1.1.3)
34
34
  httparty
35
35
  jeweler (~> 1.8.3)
36
36
  json
37
37
  rdoc (~> 3.12)
38
- rspec (~> 2.8.0)
38
+ rspec (~> 2.11.0)
@@ -1,5 +1,9 @@
1
1
  = aws-pricing
2
2
 
3
+ {<img src="https://secure.travis-ci.org/seeingidog/aws-pricing.png?branch=master" alt="Build Status" />}[http://travis-ci.org/seeingidog/aws-pricing]
4
+ {<img src="https://gemnasium.com/seeingidog/aws-pricing.png" alt="Dependency Status" />}[https://gemnasium.com/seeingidog/aws-pricing]
5
+
6
+
3
7
  Simpler interface to AWS pricing data. Uses Amazon's unofficial json price URLs.
4
8
 
5
9
  == Scope of data available
data/Rakefile CHANGED
@@ -29,6 +29,7 @@ require 'rspec/core'
29
29
  require 'rspec/core/rake_task'
30
30
  RSpec::Core::RakeTask.new(:spec) do |spec|
31
31
  spec.pattern = FileList['spec/**/*_spec.rb']
32
+ spec.rspec_opts = %w[-fs --color --backtrace]
32
33
  end
33
34
 
34
35
  RSpec::Core::RakeTask.new(:rcov) do |spec|
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.5.0
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "aws-pricing"
8
- s.version = "0.4.0"
8
+ s.version = "0.5.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ian Morgan"]
12
- s.date = "2012-04-20"
12
+ s.date = "2012-07-15"
13
13
  s.description = "Simpler interface to AWS pricing data"
14
14
  s.email = "ian@ruby-code.com"
15
15
  s.extra_rdoc_files = [
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.files = [
20
20
  ".document",
21
21
  ".rspec",
22
+ ".travis.yml",
22
23
  "Gemfile",
23
24
  "Gemfile.lock",
24
25
  "LICENSE.txt",
@@ -39,7 +40,7 @@ Gem::Specification.new do |s|
39
40
  s.homepage = "http://github.com/seeingidog/aws-pricing"
40
41
  s.licenses = ["MIT"]
41
42
  s.require_paths = ["lib"]
42
- s.rubygems_version = "1.8.10"
43
+ s.rubygems_version = "1.8.24"
43
44
  s.summary = "Simpler interface to AWS pricing data"
44
45
 
45
46
  if s.respond_to? :specification_version then
@@ -48,24 +49,24 @@ Gem::Specification.new do |s|
48
49
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
49
50
  s.add_runtime_dependency(%q<httparty>, [">= 0"])
50
51
  s.add_runtime_dependency(%q<json>, [">= 0"])
51
- s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
52
+ s.add_development_dependency(%q<rspec>, ["~> 2.11.0"])
52
53
  s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
53
- s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
54
+ s.add_development_dependency(%q<bundler>, ["~> 1.1.3"])
54
55
  s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
55
56
  else
56
57
  s.add_dependency(%q<httparty>, [">= 0"])
57
58
  s.add_dependency(%q<json>, [">= 0"])
58
- s.add_dependency(%q<rspec>, ["~> 2.8.0"])
59
+ s.add_dependency(%q<rspec>, ["~> 2.11.0"])
59
60
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
60
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
61
+ s.add_dependency(%q<bundler>, ["~> 1.1.3"])
61
62
  s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
62
63
  end
63
64
  else
64
65
  s.add_dependency(%q<httparty>, [">= 0"])
65
66
  s.add_dependency(%q<json>, [">= 0"])
66
- s.add_dependency(%q<rspec>, ["~> 2.8.0"])
67
+ s.add_dependency(%q<rspec>, ["~> 2.11.0"])
67
68
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
68
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
69
+ s.add_dependency(%q<bundler>, ["~> 1.1.3"])
69
70
  s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
70
71
  end
71
72
  end
@@ -4,9 +4,9 @@ module AWSPricing
4
4
  format :json
5
5
  base_uri 'http://aws.amazon.com/'
6
6
 
7
-
7
+ private
8
8
  def self.get(url)
9
- super(url).parsed_response['config']
9
+ super(url+'.json').parsed_response['config']
10
10
  end
11
11
 
12
12
  end
@@ -5,12 +5,12 @@ module AWSPricing
5
5
 
6
6
  #Returns Hash of request pricing information
7
7
  def self.requests
8
- Base.get('/cloudfront/pricing/pricing-cloudfront-requests.json')
8
+ Base.get('/cloudfront/pricing/pricing-cloudfront-requests')
9
9
  end
10
10
 
11
11
  #Returns Hash of data transfer pricing information
12
12
  def self.data_transfer
13
- Base.get('/cloudfront/pricing/pricing-cloudfront-on-demand.json')
13
+ Base.get('/cloudfront/pricing/pricing-cloudfront-on-demand')
14
14
  end
15
15
 
16
16
  end
@@ -5,7 +5,7 @@ module AWSPricing
5
5
 
6
6
  #Returns Hash of on-demand server instance pricing information
7
7
  def self.instances
8
- Base.get('/ec2/pricing/pricing-on-demand-instances.json')
8
+ Base.get('/ec2/pricing/pricing-on-demand-instances')
9
9
  end
10
10
 
11
11
  #Returns Hash of current spot instance pricing information (5m)
@@ -18,27 +18,27 @@ module AWSPricing
18
18
 
19
19
  #Returns Hash of elastic block storage pricing information
20
20
  def self.ebs
21
- Base.get('/ec2/pricing/pricing-ebs.json')
21
+ Base.get('/ec2/pricing/pricing-ebs')
22
22
  end
23
23
 
24
24
  #Returns Hash of data transfer pricing information
25
25
  def self.data_transfer
26
- Base.get('/ec2/pricing/pricing-data-transfer.json')
26
+ Base.get('/ec2/pricing/pricing-data-transfer')
27
27
  end
28
28
 
29
29
  #Returns Hash of elastic IP pricing information
30
30
  def self.elastic_ips
31
- Base.get('/ec2/pricing/pricing-elastic-ips.json')
31
+ Base.get('/ec2/pricing/pricing-elastic-ips')
32
32
  end
33
33
 
34
34
  #Returns Hash of Cloudwatch monitoring pricing information
35
35
  def self.cloud_watch
36
- Base.get('/ec2/pricing/pricing-cloudwatch.json')
36
+ Base.get('/ec2/pricing/pricing-cloudwatch')
37
37
  end
38
38
 
39
39
  #Returns Hash of elastic loadbalancer pricing information
40
40
  def self.elb
41
- Base.get('/ec2/pricing/pricing-elb.json')
41
+ Base.get('/ec2/pricing/pricing-elb')
42
42
  end
43
43
 
44
44
  end
@@ -5,7 +5,7 @@ module AWSPricing
5
5
 
6
6
  #Returns Hash of pricing information
7
7
  def self.pricing
8
- Base.get('/elasticmapreduce/pricing/pricing-emr.json')
8
+ Base.get('/elasticmapreduce/pricing/pricing-emr')
9
9
  end
10
10
 
11
11
  end
@@ -5,12 +5,12 @@ module AWSPricing
5
5
 
6
6
  #Returns Hash of standard deployment pricing information
7
7
  def self.standard
8
- Base.get('/rds/pricing/mysql/pricing-standard-deployments.json')
8
+ Base.get('/rds/pricing/mysql/pricing-standard-deployments')
9
9
  end
10
10
 
11
11
  #Returns Hash of multi-availability zone deployment pricing information
12
12
  def self.multi_az
13
- Base.get('/rds/pricing/mysql/pricing-multiAZ-deployments.json')
13
+ Base.get('/rds/pricing/mysql/pricing-multiAZ-deployments')
14
14
  end
15
15
 
16
16
  end
@@ -4,17 +4,17 @@ module AWSPricing
4
4
 
5
5
  #Returns Hash of storage pricing information
6
6
  def self.storage
7
- Base.get('/s3/pricing/pricing-storage.json')
7
+ Base.get('/s3/pricing/pricing-storage')
8
8
  end
9
9
 
10
10
  #Returns Hash of data transfer pricing information
11
11
  def self.data_transfer
12
- Base.get('/s3/pricing/pricing-data-transfer.json')
12
+ Base.get('/s3/pricing/pricing-data-transfer')
13
13
  end
14
14
 
15
15
  #Returns Hash of request pricing information
16
16
  def self.requests
17
- Base.get('/s3/pricing/pricing-requests.json')
17
+ Base.get('/s3/pricing/pricing-requests')
18
18
  end
19
19
  end
20
20
 
@@ -1,73 +1,74 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
2
 
3
+ include AWSPricing
4
+
3
5
  describe "AwsPricing" do
4
6
 
5
7
  describe "EC2 pricing" do
6
8
  it "returns a hash of instance pricing" do
7
- AWSPricing::EC2.instances.class.should == Hash
9
+ EC2.instances.class.should == Hash
8
10
  end
9
11
 
10
12
  it "returns a hash of ebs pricing" do
11
- AWSPricing::EC2.ebs.class.should == Hash
13
+ EC2.ebs.class.should == Hash
12
14
  end
13
15
 
14
16
  it "returns a hash of data transfer pricing" do
15
- AWSPricing::EC2.data_transfer.class.should == Hash
17
+ EC2.data_transfer.class.should == Hash
16
18
  end
17
19
 
18
20
  it "returns a hash of elb pricing" do
19
- AWSPricing::EC2.elb.class.should == Hash
21
+ EC2.elb.class.should == Hash
20
22
  end
21
23
 
22
24
  it "returns a hash of cloudwatch pricing" do
23
- AWSPricing::EC2.cloud_watch.class.should == Hash
25
+ EC2.cloud_watch.class.should == Hash
24
26
  end
25
27
 
26
28
  it "returns a hash of elastic ip pricing" do
27
- AWSPricing::EC2.elastic_ips.class.should == Hash
29
+ EC2.elastic_ips.class.should == Hash
28
30
  end
29
31
 
30
32
  it "returns a hash of spot instance pricing from jsonp callback hack" do
31
- AWSPricing::EC2.spot_instances.class.should == Hash
33
+ EC2.spot_instances.class.should == Hash
32
34
  end
33
35
 
34
-
35
36
  end
36
37
 
37
38
  describe "S3 Pricing" do
38
39
  it "returns a hash of storage pricing" do
39
- AWSPricing::S3.storage.class.should == Hash
40
+ S3.storage.class.should == Hash
40
41
  end
41
42
  it "returns a hash of data transfer pricing" do
42
- AWSPricing::S3.data_transfer.class.should == Hash
43
+ S3.data_transfer.class.should == Hash
43
44
  end
44
45
  it "returns a hash of requests pricing" do
45
- AWSPricing::S3.requests.class.should == Hash
46
+ S3.requests.class.should == Hash
46
47
  end
47
48
  end
48
49
 
49
50
  describe "Cloudfront pricing" do
50
51
  it "returns a hash of requests pricing" do
51
- AWSPricing::CloudFront.data_transfer.class.should == Hash
52
+ CloudFront.data_transfer.class.should == Hash
52
53
  end
53
54
  it "returns a hash of requests pricing" do
54
- AWSPricing::CloudFront.requests.class.should == Hash
55
+ CloudFront.requests.class.should == Hash
55
56
  end
56
57
  end
57
58
 
58
59
  describe "Elastic Mapreduce pricing" do
59
60
  it "returns a hash of pricing" do
60
- AWSPricing::EMR.pricing.class.should == Hash
61
+ EMR.pricing.class.should == Hash
61
62
  end
62
63
  end
63
64
 
64
65
  describe "RDS pricing" do
65
66
  it "returns a hash of standard deployment pricing" do
66
- AWSPricing::RDS.standard.class.should == Hash
67
+ RDS.standard.class.should == Hash
67
68
  end
68
69
 
69
70
  it "returns a hash of multi-az deployment pricing" do
70
- AWSPricing::RDS.multi_az.class.should == Hash
71
+ RDS.multi_az.class.should == Hash
71
72
  end
72
73
 
73
74
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-pricing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-20 00:00:00.000000000Z
12
+ date: 2012-07-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
16
- requirement: &2153300040 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2153300040
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: json
27
- requirement: &2153299340 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,21 +37,31 @@ dependencies:
32
37
  version: '0'
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *2153299340
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: rspec
38
- requirement: &2153298680 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ~>
42
52
  - !ruby/object:Gem::Version
43
- version: 2.8.0
53
+ version: 2.11.0
44
54
  type: :development
45
55
  prerelease: false
46
- version_requirements: *2153298680
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 2.11.0
47
62
  - !ruby/object:Gem::Dependency
48
63
  name: rdoc
49
- requirement: &2153298140 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
50
65
  none: false
51
66
  requirements:
52
67
  - - ~>
@@ -54,21 +69,31 @@ dependencies:
54
69
  version: '3.12'
55
70
  type: :development
56
71
  prerelease: false
57
- version_requirements: *2153298140
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: '3.12'
58
78
  - !ruby/object:Gem::Dependency
59
79
  name: bundler
60
- requirement: &2153297500 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
61
81
  none: false
62
82
  requirements:
63
83
  - - ~>
64
84
  - !ruby/object:Gem::Version
65
- version: 1.0.0
85
+ version: 1.1.3
66
86
  type: :development
67
87
  prerelease: false
68
- version_requirements: *2153297500
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: 1.1.3
69
94
  - !ruby/object:Gem::Dependency
70
95
  name: jeweler
71
- requirement: &2153296740 !ruby/object:Gem::Requirement
96
+ requirement: !ruby/object:Gem::Requirement
72
97
  none: false
73
98
  requirements:
74
99
  - - ~>
@@ -76,7 +101,12 @@ dependencies:
76
101
  version: 1.8.3
77
102
  type: :development
78
103
  prerelease: false
79
- version_requirements: *2153296740
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: 1.8.3
80
110
  description: Simpler interface to AWS pricing data
81
111
  email: ian@ruby-code.com
82
112
  executables: []
@@ -87,6 +117,7 @@ extra_rdoc_files:
87
117
  files:
88
118
  - .document
89
119
  - .rspec
120
+ - .travis.yml
90
121
  - Gemfile
91
122
  - Gemfile.lock
92
123
  - LICENSE.txt
@@ -118,7 +149,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
118
149
  version: '0'
119
150
  segments:
120
151
  - 0
121
- hash: -2911167471319597973
152
+ hash: 3576624189235302444
122
153
  required_rubygems_version: !ruby/object:Gem::Requirement
123
154
  none: false
124
155
  requirements:
@@ -127,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
158
  version: '0'
128
159
  requirements: []
129
160
  rubyforge_project:
130
- rubygems_version: 1.8.10
161
+ rubygems_version: 1.8.24
131
162
  signing_key:
132
163
  specification_version: 3
133
164
  summary: Simpler interface to AWS pricing data