amazon-pricing 0.0.6 → 0.0.7
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.
- data/Rakefile +6 -0
- data/lib/amazon-pricing.rb +1 -1
- data/lib/amazon-pricing/version.rb +1 -1
- data/test/test-ec2-instance-types.rb +8 -0
- metadata +4 -4
data/Rakefile
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'bundler'
|
2
2
|
require 'rake/testtask'
|
3
|
+
require 'lib/amazon-pricing/version'
|
3
4
|
|
4
5
|
Rake::TestTask.new(:test) do |test|
|
5
6
|
test.libs << 'lib' << 'test'
|
@@ -13,6 +14,11 @@ task :gem do
|
|
13
14
|
sh 'gem build *.gemspec'
|
14
15
|
end
|
15
16
|
|
17
|
+
desc "Publish the gem"
|
18
|
+
task :publish do
|
19
|
+
sh "gem push amazon-pricing-#{AwsPricing::VERSION}.gem"
|
20
|
+
end
|
21
|
+
|
16
22
|
desc "Installs the gem"
|
17
23
|
task :install => :gem do
|
18
24
|
sh "#{SUDO} gem install amazon-pricing.gem --no-rdoc --no-ri"
|
data/lib/amazon-pricing.rb
CHANGED
@@ -82,7 +82,7 @@ module AwsPricing
|
|
82
82
|
end
|
83
83
|
|
84
84
|
def get_ec2_reserved_instance_pricing
|
85
|
-
fetch_ec2_reserved_instance_pricing(EC2_RESERVED_INSTANCE_LIGHT_PRICING_URL, :
|
85
|
+
fetch_ec2_reserved_instance_pricing(EC2_RESERVED_INSTANCE_LIGHT_PRICING_URL, :light)
|
86
86
|
fetch_ec2_reserved_instance_pricing(EC2_RESERVED_INSTANCE_MEDIUM_PRICING_URL, :medium)
|
87
87
|
fetch_ec2_reserved_instance_pricing(EC2_RESERVED_INSTANCE_HEAVY_PRICING_URL, :heavy)
|
88
88
|
end
|
@@ -19,20 +19,28 @@ class TestEc2InstanceTypes < Test::Unit::TestCase
|
|
19
19
|
pricing.regions.each do |region|
|
20
20
|
assert_not_nil region.name
|
21
21
|
region.ec2_on_demand_instance_types.each do |instance_type|
|
22
|
+
puts "On-demand: #{instance_type.api_name}"
|
22
23
|
assert_not_nil instance_type.api_name
|
23
24
|
assert_not_nil instance_type.name
|
25
|
+
#assert instance_type.api_name != instance_type.name
|
24
26
|
end
|
25
27
|
region.ec2_reserved_instance_types(:light).each do |instance_type|
|
28
|
+
puts "Light: #{instance_type.api_name}"
|
26
29
|
assert_not_nil instance_type.api_name
|
27
30
|
assert_not_nil instance_type.name
|
31
|
+
#assert instance_type.api_name != instance_type.name
|
28
32
|
end
|
29
33
|
region.ec2_reserved_instance_types(:medium).each do |instance_type|
|
34
|
+
puts "Medium: #{instance_type.api_name}"
|
30
35
|
assert_not_nil instance_type.api_name
|
31
36
|
assert_not_nil instance_type.name
|
37
|
+
#assert instance_type.api_name != instance_type.name
|
32
38
|
end
|
33
39
|
region.ec2_reserved_instance_types(:heavy).each do |instance_type|
|
40
|
+
puts "Heavy: #{instance_type.api_name}"
|
34
41
|
assert_not_nil instance_type.api_name
|
35
42
|
assert_not_nil instance_type.name
|
43
|
+
#assert instance_type.api_name != instance_type.name
|
36
44
|
end
|
37
45
|
end
|
38
46
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: amazon-pricing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 7
|
10
|
+
version: 0.0.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Joe Kinsella
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
18
|
+
date: 2012-08-04 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|