amazon-pricing 0.1.135 → 0.1.136

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 10b7c63f50fa80a65001aa63c92463a23ee353ea9ef818720e90ee197a9aa6c0
4
- data.tar.gz: c2b8582a55deb863cd43633fed151c49b81ff2df7c49af84821cedf0789dbd65
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NmQ4MjBkNTg3OWExYWFmZDNhYTQ4MzgxNmQ4NDJhMWUwNmNkZTA3Yg==
5
+ data.tar.gz: !binary |-
6
+ ZmUzZjE3Yzg1MDNiOGFiNTU0YmNmYTY2ZmU1MWIyODA2YzQ1YTlhOQ==
5
7
  SHA512:
6
- metadata.gz: 89c637ec8690664d6e31f587608366e4bbe4886530e0c2e54e835f9f82ab319c665aef5c57767dcb76b43bb304c65c1542633e39895d5c02cb313c3e1948c03c
7
- data.tar.gz: aeeb9414b090745a2dbb567cf1efe11c3e4a060b2d89499d45f1743933da1423edae3fb8969f0623dac68180dfca17eb02804eb75dc80f42c4d56e8484cf6920
8
+ metadata.gz: !binary |-
9
+ YzAxOTk3MTIxZmIyYWMxZTIzOTQwMGUzOGFmYmI4NWRhNTg2Zjk0YjI3NWQw
10
+ NTUwMTFkNTcxYzk1MGExNDBiMzExMTJjZDUyNzU3MmZkODdlZTRlODM0NmM5
11
+ ZGRhYmY1YTk0Y2RmNGVhMTU5YmZhMmE3YjRiNDViMjc3ZDI2Yjc=
12
+ data.tar.gz: !binary |-
13
+ MzZjOWI5ZDY2ZTEyOTVlYjZjN2Q4YTcyYmE0ODlkNjQxOTdmODRjZjkyMDU5
14
+ YTU1OGRlZGYyMWVjNWQ4OGMxOGRmNGVhNjhlYmJmZGU5ZWMzNjU1MzE5OTdh
15
+ ZTE5ZWVmNTI2ZjllOWE1ZjFiNzhjMDI4Y2I0ZTE5ZDIzNTAzZTE=
data/Jenkinsfile CHANGED
@@ -2,14 +2,12 @@
2
2
  @Library('cht-jenkins-pipeline') _
3
3
 
4
4
  properties([
5
- [$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '15']],
6
- compressBuildLog()
5
+ [$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '15']]
7
6
  ]);
8
7
 
9
8
  if (env.BRANCH_NAME == 'master') {
10
9
  properties([pipelineTriggers([cron('H H(8-10) * * 4')]),
11
- [$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '15']],
12
- compressBuildLog()
10
+ [$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '15']]
13
11
  ]);
14
12
  }
15
13
 
@@ -195,7 +195,8 @@ module AwsPricing
195
195
  type = sizes[-2].split('.').last # 'metal' already largest, so 2nd largest
196
196
  end
197
197
  end
198
- size_to_nf[type]
198
+ full_type = type.gsub(/xl$/, 'xlarge')
199
+ size_to_nf[full_type]
199
200
  end
200
201
 
201
202
  # note: the next smaller type may _not_ be supported for a given family
@@ -9,6 +9,6 @@
9
9
  #++
10
10
  module AwsPricing
11
11
 
12
- VERSION = '0.1.135' # [major,minor.fix]: Moving instance-type methods to be class methods rather than instance methods
12
+ VERSION = '0.1.136' # [major,minor.fix]: Adding support for xl instance sizes to InstanceType module
13
13
 
14
14
  end
@@ -3,9 +3,6 @@ require 'amazon-pricing/helpers/instance-type'
3
3
  require 'amazon-pricing/definitions/ec2-instance-type'
4
4
 
5
5
  describe 'AwsPricing::Helper::InstanceType' do
6
- let(:dummy_class) { Class.new { include AwsPricing::Helper::InstanceType } }
7
- let(:helper) {dummy_class.new }
8
-
9
6
  context 'family_members' do
10
7
 
11
8
  # get a list of supported instance types, and filter out anything with more than 2 parts to its name (to get
@@ -15,8 +12,19 @@ describe 'AwsPricing::Helper::InstanceType' do
15
12
  # test that we can get the family member for each type
16
13
  types.each do |type|
17
14
  it "should be able to get family members for #{type}" do
18
- helper.family_members(type).should_not eq(nil)
15
+ AwsPricing::Helper::InstanceType.family_members(type).should_not eq(nil)
19
16
  end
20
17
  end
21
18
  end
22
- end
19
+
20
+ it 'should lookup *xl instance as *xlarge' do
21
+ expect(AwsPricing::Helper::InstanceType.api_name_to_nf('xl')).to(
22
+ eq(AwsPricing::Helper::InstanceType.api_name_to_nf('xlarge')))
23
+ expect(AwsPricing::Helper::InstanceType.api_name_to_nf('xl')).to_not eq nil
24
+ [2, 3, 4, 6, 8, 9, 10, 12, 16, 18, 24, 32].each do |size|
25
+ nf = AwsPricing::Helper::InstanceType.api_name_to_nf("#{size}xl")
26
+ expect(nf).to_not eq nil
27
+ expect(nf).to eq(AwsPricing::Helper::InstanceType.api_name_to_nf("#{size}xlarge"))
28
+ end
29
+ end
30
+ 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.135
4
+ version: 0.1.136
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Kinsella
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-27 00:00:00.000000000 Z
11
+ date: 2019-03-27 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A Ruby library for retrieving pricing for Amazon Web Services
14
14
  email:
@@ -19,7 +19,7 @@ extra_rdoc_files:
19
19
  - LICENSE
20
20
  - README.md
21
21
  files:
22
- - ".gitignore"
22
+ - .gitignore
23
23
  - CHANGELOG.md
24
24
  - Gemfile
25
25
  - Gemfile.lock
@@ -73,25 +73,26 @@ licenses:
73
73
  metadata: {}
74
74
  post_install_message:
75
75
  rdoc_options:
76
- - "--title"
76
+ - --title
77
77
  - amazon-pricing documentation
78
- - "--line-numbers"
79
- - "--main"
78
+ - --line-numbers
79
+ - --main
80
80
  - README.md
81
81
  require_paths:
82
82
  - lib
83
83
  required_ruby_version: !ruby/object:Gem::Requirement
84
84
  requirements:
85
- - - ">="
85
+ - - ! '>='
86
86
  - !ruby/object:Gem::Version
87
87
  version: '0'
88
88
  required_rubygems_version: !ruby/object:Gem::Requirement
89
89
  requirements:
90
- - - ">="
90
+ - - ! '>='
91
91
  - !ruby/object:Gem::Version
92
92
  version: '0'
93
93
  requirements: []
94
- rubygems_version: 3.0.2
94
+ rubyforge_project: amazon-pricing
95
+ rubygems_version: 2.6.14
95
96
  signing_key:
96
97
  specification_version: 4
97
98
  summary: Amazon Web Services Pricing Ruby gem