stemcell 0.11.8 → 0.11.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aac5c43057f6dedabdbae868bc6d2ba532a024f2
4
- data.tar.gz: c0dfd5f07899e1b6ead8c9ba6c201aebee2177dc
3
+ metadata.gz: 4d3d71d194f64fa371f8052946dd96ce7d014434
4
+ data.tar.gz: e25f56378baeeaee5e5750fb74fc938db759c2d4
5
5
  SHA512:
6
- metadata.gz: 33f543e985945155f3f08618b8d3922827c0351bbf1733e76a6384086bae081539d73eb36e5fc8c73febc47f5d6a2bd8397f288edcfe248f7366e9d36d428e91
7
- data.tar.gz: b15dc55412394a25fbb989fb12c7a3f8f2da632891755e312825e58a37ac889f1d0896a39f4fff747c92f7a90f9e34c1db43757ef2591a226ffd7de8e926b12f
6
+ metadata.gz: ad7f8d3f4343e2c98591339cda7f6351d25aac7648e54c7a4f6d46e23264fefeb704e74a4d69bbdb7cc67f12f0fcefdf44d69c43db1728a35f3850592a4408b8
7
+ data.tar.gz: 253d9789fe346065cb9a4911e6806a0a60a3a2ccd3161fd9452b307ff57f1c54d3a9daa5bb97e54c1ceb8bc4c5c7eefc6b5e12e208e42e56a4518fe2c05241c5
data/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
- # 0.11.7
1
+ # 0.11.9
2
+ - Transform chef_cookbook_attributes option for command-line parser
3
+ - Set vpc_id when creating Launcher object
4
+
5
+ # 0.11.8
2
6
  - Configure AWS earlier to work around aws-sdk-v1 vpc bug
3
7
 
4
8
  # 0.11.7
@@ -125,13 +125,14 @@ module Stemcell
125
125
  end
126
126
 
127
127
  def transform_parser_defaults(pd)
128
- # There are two special cases: security groups and tags. Security groups
128
+ # There are some special cases, eg security groups and tags. Security groups
129
129
  # are an array in the template, but trollop expects a string. Likewise,
130
130
  # in the case of tags, they are represented as a hash, but trollop wants
131
131
  # a string once again. In both cases, the data types are encoded as a
132
132
  # comma-separated list when presented as defaults.
133
133
  pd['security_groups'] &&= pd['security_groups'].join(',')
134
134
  pd['tags'] &&= pd['tags'].to_a.map { |p| p.join('=') }.join(',')
135
+ pd['chef_cookbook_attributes'] &&= pd['chef_cookbook_attributes'].join(',')
135
136
  end
136
137
 
137
138
  def parse_options_or_print_help
@@ -99,6 +99,7 @@ module Stemcell
99
99
  'aws_secret_key' => options['aws_secret_key'],
100
100
  'aws_session_token' => options['aws_session_token'],
101
101
  'region' => options['region'],
102
+ 'vpc_id' => options['vpc_id'],
102
103
  })
103
104
  # Slice off just the options used for launching.
104
105
  launch_options = {}
@@ -1,3 +1,3 @@
1
1
  module Stemcell
2
- VERSION = "0.11.8"
2
+ VERSION = "0.11.9"
3
3
  end
@@ -0,0 +1,29 @@
1
+ {
2
+ "defaults": {
3
+ "region": "us-east-1",
4
+ "security_groups": ["sg1", "sg2"],
5
+ "instance_type": "m1.small",
6
+ "backing_store": "hvm1",
7
+ "git_origin": "git1",
8
+ "instance_domain_name": "example.com",
9
+ "chef_package_source": "https://example.com/chef.deb",
10
+ "chef_version": "12.12.15-1",
11
+ "chef_cookbook_attributes": ["name::attribute"],
12
+ "tags": {
13
+ "tag1": "value"
14
+ }
15
+ },
16
+
17
+ "backing_store": {
18
+ "hvm1": {
19
+ "image_id": "ami-1"
20
+ },
21
+ "pv1": {
22
+ "image_id": "ami-2"
23
+ }
24
+ },
25
+
26
+ "availability_zones": {
27
+ "us-east-1": ["us-east-1a", "us-east-1b", "us-east-1c", "us-east-1e"]
28
+ }
29
+ }
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ describe Stemcell::CommandLine do
4
+ describe '#run!' do
5
+ let(:chef_root) { FixtureHelper.chef_repo_fixture_path }
6
+ let(:config_fn) { 'Stemcell::MetadataSource::DEFAULT_CONFIG_FILENAME' }
7
+ it 'outputs a help message' do
8
+ stub_const 'ARGV', ["--local-chef-root=#{chef_root}", "--help"]
9
+ stub_const config_fn, 'stemcell-options-parser.json'
10
+ expect do
11
+ subject.run!
12
+ end.to output(/Show this message/).to_stdout.and raise_error(SystemExit)
13
+ end
14
+ end
15
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stemcell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.8
4
+ version: 0.11.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Rhoads
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2018-01-02 00:00:00.000000000 Z
14
+ date: 2018-01-25 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: aws-sdk-v1
@@ -210,7 +210,9 @@ files:
210
210
  - spec/fixtures/chef_repo/stemcell-backing-store-missing.json
211
211
  - spec/fixtures/chef_repo/stemcell-cookbook-attribute.json
212
212
  - spec/fixtures/chef_repo/stemcell-defaults-missing.json
213
+ - spec/fixtures/chef_repo/stemcell-options-parser.json
213
214
  - spec/fixtures/chef_repo/stemcell.json
215
+ - spec/lib/stemcell/command_line_spec.rb
214
216
  - spec/lib/stemcell/launcher_spec.rb
215
217
  - spec/lib/stemcell/metadata_source/chef_repository_spec.rb
216
218
  - spec/lib/stemcell/metadata_source/configuration_spec.rb
@@ -239,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
239
241
  version: '0'
240
242
  requirements: []
241
243
  rubyforge_project:
242
- rubygems_version: 2.4.5.1
244
+ rubygems_version: 2.5.2
243
245
  signing_key:
244
246
  specification_version: 4
245
247
  summary: no summary
@@ -269,7 +271,9 @@ test_files:
269
271
  - spec/fixtures/chef_repo/stemcell-backing-store-missing.json
270
272
  - spec/fixtures/chef_repo/stemcell-cookbook-attribute.json
271
273
  - spec/fixtures/chef_repo/stemcell-defaults-missing.json
274
+ - spec/fixtures/chef_repo/stemcell-options-parser.json
272
275
  - spec/fixtures/chef_repo/stemcell.json
276
+ - spec/lib/stemcell/command_line_spec.rb
273
277
  - spec/lib/stemcell/launcher_spec.rb
274
278
  - spec/lib/stemcell/metadata_source/chef_repository_spec.rb
275
279
  - spec/lib/stemcell/metadata_source/configuration_spec.rb