kitchen-config 0.1.1 → 0.2.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.
- checksums.yaml +4 -4
- data/.travis.yml +12 -4
- data/README.md +81 -3
- data/example/config.yml +5 -0
- data/{kitchen-config.gemspec → kitchen-pantry.gemspec} +2 -2
- data/lib/kitchen/{config.rb → pantry.rb} +2 -2
- data/lib/kitchen/pantry/version.rb +5 -0
- data/lib/kitchen/{config → pantry}/win32ole_chefspec_linux.rb +0 -0
- data/lib/kitchen/{config → pantry}/win32registry_chefspec_linux.rb +0 -0
- data/spec/lib/kitchen/{config → pantry}/win32ole_chefspec_linux_spec.rb +0 -0
- data/spec/lib/kitchen/{config → pantry}/win32registry_chefspec_linux_spec.rb +0 -0
- data/spec/lib/kitchen/{config_spec.rb → pantry_spec.rb} +7 -7
- metadata +14 -13
- data/lib/kitchen/config/version.rb +0 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a9cfc6e59a6e912fd129495bf4e10532d806cdd7
|
|
4
|
+
data.tar.gz: d4071361c6e90d7b7e89743220753074efeea4df
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7a0640250a79c77972466076d7d05a63742c632915853b4aaa919c0d511de565a1fb7dc9e5c6de25ad5ca921e666d1974ec798df647e9dda6c6fd284915b2786
|
|
7
|
+
data.tar.gz: 5ce8a4d7bc247258011ee387867fcd0ce8ce6648f62315438863dbfcfd228ab4ed5f648abbf7379991037873fac8f8a1a91f14878873454210e9c9996efc3f32
|
data/.travis.yml
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
language: ruby
|
|
2
2
|
rvm:
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
- 2.2.0
|
|
4
|
+
- 2.1.0
|
|
5
5
|
addons:
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
code_climate:
|
|
7
|
+
repo_token: 51b75c40638d400d9a0a96c199f6675c3149cecf164b7922a8fa835e7c6
|
|
8
|
+
deploy:
|
|
9
|
+
provider: rubygems
|
|
10
|
+
api_key:
|
|
11
|
+
secure: ZeT0xb/y1DkU/t68HCmTH0mzvMO0cE+8/UloDIEzhh+PmKX/MTtSvddBGuaTWRG7w9aTUCu1RwfQJlwvoLPcQAJLitfUL05Kc8lEnxuTTUDYrOaEMOJbKK+hzqpYJz/1xK97BN1X+GUa4YiHSJOX9xk7CHJTEZqusQ56ynOiYU5nRCJhKpY9UW4UhmSOM3y8xfRvXbKnOtGBzTKeFTfvYSOwHygk+Rp/TDwlccfXdPoh2ITP1hoQqvDR1xhtwWw+kycvy9pLOm0ccQV07mpsZ4bxhSJxnjQD8eTqOCG+9v/qzjlBRiZzwlCNS8NNGnP/0K4xMePC/WgX8UFfdBgmwTmBYZoww8XGSYMJw+bjsmAH+PxyXaTeEC/J2inFt83wtvlldgyHNwSh/BpAwdxN9WeO+K64StoBQm6bnmLYMrliKhzp6LlS00+YRFzigtjlNZMUwo/Q4fLHhBsU7OhQlEddesRHcvHiqXNSE0hl8x533hZKgtR7TzQ51XFgo6RuNKhYcQgWAtuDjNgazHdfwYjD2WqI2vqbknr73aAD3NYxfFfCKmbF1R8UDzKzZpqCmKGOYxnd+cHenOzLG6wlWUj1nsBus60H7Y9MEYaXkyRRNZKtAM8mAwhIzXfvGd8aSPvAFexPs0PkuxtURlVWcRlhX1M/Z5IuZXzVlMYXDQo=
|
|
12
|
+
gem: kitchen-config
|
|
13
|
+
on:
|
|
14
|
+
tags: true
|
|
15
|
+
repo: callmeradical/kitchen-config
|
data/README.md
CHANGED
|
@@ -1,10 +1,88 @@
|
|
|
1
1
|
[](https://travis-ci.org/callmeradical/kitchen-config)
|
|
2
2
|
[](https://codeclimate.com/github/callmeradical/kitchen-config)
|
|
3
3
|
[](https://codeclimate.com/github/callmeradical/kitchen-config/coverage)
|
|
4
|
-
# Kitchen::
|
|
4
|
+
# Kitchen::Pantry
|
|
5
5
|
|
|
6
|
-
Kitchen::
|
|
6
|
+
Kitchen::Pantry handles initializing a new cookbook and provides an easy way to
|
|
7
|
+
configure your kitchen.yml variables across all your projects.
|
|
7
8
|
|
|
8
9
|
## Usage
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
To use kitchen-config add this to your Gemfile:
|
|
12
|
+
```ruby
|
|
13
|
+
gem 'kitchen-config'
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Once you have added this to your project you create a config.yml in the
|
|
17
|
+
location of your choice and set an environment variable called KITCHEN_PANTRY
|
|
18
|
+
where you'll keep it.
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
$ mkdir ~/.kitchen
|
|
22
|
+
$ touch ~/.kitchen/config.yml
|
|
23
|
+
$ export KITCHEN_PANTRY=$HOME/.kitchen/config.yml
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
Once you have created the file and set your environment variable you can start
|
|
29
|
+
creating keys in your config to standardize your config options.
|
|
30
|
+
|
|
31
|
+
Example config.yml
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
```yaml
|
|
35
|
+
---
|
|
36
|
+
:key_id: 'your_key_here'
|
|
37
|
+
:tester_ami: 'your_ami_here'
|
|
38
|
+
:tester_flavor_id: 'your_instance_size'
|
|
39
|
+
:region: 'your_region'
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
Once your kitchen-pantry is set-up you may now include kitchen-pantry in your
|
|
46
|
+
.kitchen.yml file:
|
|
47
|
+
|
|
48
|
+
```yaml
|
|
49
|
+
<% require 'kitchen/pantry' %>
|
|
50
|
+
<% config = Kitchen::Pantry %>
|
|
51
|
+
<% user = "#{`git config --get user.name`.chomp}" %>
|
|
52
|
+
---
|
|
53
|
+
settings:
|
|
54
|
+
parallel: true
|
|
55
|
+
|
|
56
|
+
driver:
|
|
57
|
+
name: <%= config.driver %>
|
|
58
|
+
require_chef_omnibus: <%= config.chef_version %>
|
|
59
|
+
image_id: <%= config.amazon_ami %>
|
|
60
|
+
aws_ssh_key_id: <%= config.key_id %>
|
|
61
|
+
instance_type: '<%= config.tester_flavor_id %>'
|
|
62
|
+
region: '<%= config.region %>'
|
|
63
|
+
availability_zone: '<%= config.availability_zone %>'
|
|
64
|
+
subnet_id: '<%= config.subnet_id %>'
|
|
65
|
+
require_chef_omnibus: <%= config.chef_version %>
|
|
66
|
+
iam_profile_name: '<%= config.iam_profile_name%>'
|
|
67
|
+
<%= config.tags 'kitchen_config_test', user %>
|
|
68
|
+
|
|
69
|
+
transport:
|
|
70
|
+
ssh_key: <%= ENV['HOME'] %>/.ssh/<%= config.key_id %>.pem
|
|
71
|
+
username: '<%= config.username %>'
|
|
72
|
+
|
|
73
|
+
provisioner:
|
|
74
|
+
name: <%= config.provisioner %>
|
|
75
|
+
|
|
76
|
+
platforms:
|
|
77
|
+
- name: <%= config.default_platform %>
|
|
78
|
+
- name: rhel7
|
|
79
|
+
driver:
|
|
80
|
+
image_id: <%= config.rhel7_ami %>
|
|
81
|
+
|
|
82
|
+
suites:
|
|
83
|
+
- name: default
|
|
84
|
+
run_list:
|
|
85
|
+
- recipe[kitchen_config_test::test]
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
|
data/example/config.yml
ADDED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
-
require 'kitchen/
|
|
4
|
+
require 'kitchen/pantry/version'
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |spec|
|
|
7
7
|
spec.name = 'kitchen-config'
|
|
8
|
-
spec.version = Kitchen::
|
|
8
|
+
spec.version = Kitchen::Pantry::VERSION
|
|
9
9
|
spec.authors = ['craig monson', 'lars cromley']
|
|
10
10
|
spec.email = ['craig@malachiarts.com', 'lars@callmeradical.com']
|
|
11
11
|
spec.summary = 'Basic gem for cookbook config and init.'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require 'spec_helper'
|
|
2
2
|
|
|
3
|
-
RSpec.describe Kitchen::
|
|
3
|
+
RSpec.describe Kitchen::Pantry do
|
|
4
4
|
context 'A Valid Kitchen Config' do
|
|
5
5
|
mimic_config = {
|
|
6
6
|
key_id: 'super_secret_key',
|
|
@@ -13,11 +13,11 @@ RSpec.describe Kitchen::Config do
|
|
|
13
13
|
user = 'Derp'
|
|
14
14
|
os = 'DerpOS'
|
|
15
15
|
|
|
16
|
-
let(:subj) { Kitchen::
|
|
16
|
+
let(:subj) { Kitchen::Pantry }
|
|
17
17
|
subject { subj }
|
|
18
18
|
before :each do
|
|
19
19
|
config = File.expand_path(__FILE__)
|
|
20
|
-
ENV['
|
|
20
|
+
ENV['KITCHEN_PANTRY'] = "#{config}/config.yml"
|
|
21
21
|
subj.instance_variable_set('@config', mimic_config)
|
|
22
22
|
end
|
|
23
23
|
|
|
@@ -29,7 +29,7 @@ RSpec.describe Kitchen::Config do
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
describe '#load_config' do
|
|
32
|
-
let(:method) { subj.load_config(ENV['
|
|
32
|
+
let(:method) { subj.load_config(ENV['KITCHEN_PANTRY']) }
|
|
33
33
|
it { expect(subj).to respond_to(:load_config) }
|
|
34
34
|
end
|
|
35
35
|
|
|
@@ -49,9 +49,9 @@ RSpec.describe Kitchen::Config do
|
|
|
49
49
|
end
|
|
50
50
|
end
|
|
51
51
|
|
|
52
|
-
context 'An INVALID Kitchen
|
|
53
|
-
let(:subj) { Kitchen::
|
|
54
|
-
describe 'if
|
|
52
|
+
context 'An INVALID Kitchen Pantry' do
|
|
53
|
+
let(:subj) { Kitchen::Pantry }
|
|
54
|
+
describe 'if KITCHEN_PANTRY is not valid' do
|
|
55
55
|
it 'it raises an exception' do
|
|
56
56
|
expect { subj.load_config(nil) }.to raise_error /ArguementError/
|
|
57
57
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kitchen-config
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- craig monson
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2016-
|
|
12
|
+
date: 2016-05-19 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: bundler
|
|
@@ -73,15 +73,16 @@ files:
|
|
|
73
73
|
- README.md
|
|
74
74
|
- Rakefile
|
|
75
75
|
- bin/initialize_cookbook
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
- lib/kitchen/
|
|
79
|
-
- lib/kitchen/
|
|
80
|
-
- lib/kitchen/
|
|
76
|
+
- example/config.yml
|
|
77
|
+
- kitchen-pantry.gemspec
|
|
78
|
+
- lib/kitchen/pantry.rb
|
|
79
|
+
- lib/kitchen/pantry/version.rb
|
|
80
|
+
- lib/kitchen/pantry/win32ole_chefspec_linux.rb
|
|
81
|
+
- lib/kitchen/pantry/win32registry_chefspec_linux.rb
|
|
81
82
|
- spec/lib/kitchen/config.yml
|
|
82
|
-
- spec/lib/kitchen/
|
|
83
|
-
- spec/lib/kitchen/
|
|
84
|
-
- spec/lib/kitchen/
|
|
83
|
+
- spec/lib/kitchen/pantry/win32ole_chefspec_linux_spec.rb
|
|
84
|
+
- spec/lib/kitchen/pantry/win32registry_chefspec_linux_spec.rb
|
|
85
|
+
- spec/lib/kitchen/pantry_spec.rb
|
|
85
86
|
- spec/spec_helper.rb
|
|
86
87
|
- templates/.gitignore
|
|
87
88
|
- templates/.kitchen.yml
|
|
@@ -123,7 +124,7 @@ specification_version: 4
|
|
|
123
124
|
summary: Basic gem for cookbook config and init.
|
|
124
125
|
test_files:
|
|
125
126
|
- spec/lib/kitchen/config.yml
|
|
126
|
-
- spec/lib/kitchen/
|
|
127
|
-
- spec/lib/kitchen/
|
|
128
|
-
- spec/lib/kitchen/
|
|
127
|
+
- spec/lib/kitchen/pantry/win32ole_chefspec_linux_spec.rb
|
|
128
|
+
- spec/lib/kitchen/pantry/win32registry_chefspec_linux_spec.rb
|
|
129
|
+
- spec/lib/kitchen/pantry_spec.rb
|
|
129
130
|
- spec/spec_helper.rb
|