test-kitchen-pc 0.1.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 +7 -0
- data/.gitignore +57 -0
- data/.kitchen.ci.yml +11 -0
- data/.kitchen.parent.yml +17 -0
- data/.kitchen.yml +6 -0
- data/.pryrc +27 -0
- data/.travis.yml +38 -0
- data/Berksfile +3 -0
- data/Gemfile +8 -0
- data/LICENSE +21 -0
- data/README.md +148 -0
- data/bin/kitchen-pc +13 -0
- data/lib/kitchen/pc/cli.rb +90 -0
- data/lib/kitchen/pc/version.rb +7 -0
- data/test-kitchen-pc.gemspec +35 -0
- data/test/cookbooks/test_cookbook/metadata.rb +6 -0
- data/test/cookbooks/test_cookbook/recipes/default.rb +1 -0
- data/test/integration/default/inspec/default_spec.rb +3 -0
- metadata +121 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: c9ff538b8800da1e38047406e03e606dc577c2d6
|
|
4
|
+
data.tar.gz: a5bd147e05844d207393cabb7d33c8f670483711
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 7e4c198879ae3f8c261699ad157320e6271aaee7c96f0baf51f6ad681517763fa9c114509093e2dd77b3e5250694cba84ff3e7b9c1b816b89dad989cff585fa3
|
|
7
|
+
data.tar.gz: 82341434cf0d5cfd0afc1aef317ac13adab44e71a8da504706448c5df4968701ceb0e46743f8cd4e05a9d1216ad96804e7b66c5cfa73109b133f2a377bf0835e
|
data/.gitignore
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
*.gem
|
|
2
|
+
*.rbc
|
|
3
|
+
/.config
|
|
4
|
+
/coverage/
|
|
5
|
+
/InstalledFiles
|
|
6
|
+
/pkg/
|
|
7
|
+
/spec/reports/
|
|
8
|
+
/spec/examples.txt
|
|
9
|
+
/test/tmp/
|
|
10
|
+
/test/version_tmp/
|
|
11
|
+
/tmp/
|
|
12
|
+
|
|
13
|
+
# Lockfiles
|
|
14
|
+
Berksfile.lock
|
|
15
|
+
Gemfile.lock
|
|
16
|
+
|
|
17
|
+
# Kitchen testing files
|
|
18
|
+
.kitchen/
|
|
19
|
+
|
|
20
|
+
# Used by dotenv library to load environment variables.
|
|
21
|
+
# .env
|
|
22
|
+
|
|
23
|
+
## Specific to RubyMotion:
|
|
24
|
+
.dat*
|
|
25
|
+
.repl_history
|
|
26
|
+
build/
|
|
27
|
+
*.bridgesupport
|
|
28
|
+
build-iPhoneOS/
|
|
29
|
+
build-iPhoneSimulator/
|
|
30
|
+
|
|
31
|
+
## Specific to RubyMotion (use of CocoaPods):
|
|
32
|
+
#
|
|
33
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
|
34
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
|
35
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
|
36
|
+
#
|
|
37
|
+
# vendor/Pods/
|
|
38
|
+
|
|
39
|
+
## Documentation cache and generated files:
|
|
40
|
+
/.yardoc/
|
|
41
|
+
/_yardoc/
|
|
42
|
+
/doc/
|
|
43
|
+
/rdoc/
|
|
44
|
+
|
|
45
|
+
## Environment normalization:
|
|
46
|
+
/.bundle/
|
|
47
|
+
/vendor/bundle
|
|
48
|
+
/lib/bundler/man/
|
|
49
|
+
|
|
50
|
+
# for a library or gem, you might want to ignore these files since the code is
|
|
51
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
52
|
+
# Gemfile.lock
|
|
53
|
+
# .ruby-version
|
|
54
|
+
# .ruby-gemset
|
|
55
|
+
|
|
56
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
|
57
|
+
.rvmrc
|
data/.kitchen.ci.yml
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
parent: ./.kitchen.parent.yml
|
|
3
|
+
|
|
4
|
+
# Configure to run on the CI machine (e.g. - Travis CI)
|
|
5
|
+
driver:
|
|
6
|
+
name: proxy
|
|
7
|
+
host: localhost
|
|
8
|
+
reset_command: "exit 0"
|
|
9
|
+
port: <%= ENV["machine_port"] %>
|
|
10
|
+
username: <%= ENV["machine_user"] %>
|
|
11
|
+
password: <%= ENV["machine_pass"] %>
|
data/.kitchen.parent.yml
ADDED
data/.kitchen.yml
ADDED
data/.pryrc
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# vim: set ft=ruby:
|
|
2
|
+
|
|
3
|
+
require 'rb-fsevent'
|
|
4
|
+
|
|
5
|
+
# Create a reload function that reloads all files in lib
|
|
6
|
+
def reload!
|
|
7
|
+
Object.send(:remove_const, :Kitchenw)
|
|
8
|
+
path = File.expand_path("../", __FILE__)
|
|
9
|
+
Dir.glob("#{path}/**/*.rb") { |f| load f }
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# Watch for changes and fire off the reload function
|
|
13
|
+
def watcher
|
|
14
|
+
fsevent = FSEvent.new
|
|
15
|
+
fsevent.watch Dir.pwd do |directories|
|
|
16
|
+
reload!
|
|
17
|
+
end
|
|
18
|
+
fsevent.run
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# Load the current directory into the Ruby lib search path,
|
|
22
|
+
# then pull in our module
|
|
23
|
+
$LOAD_PATH.unshift("#{File.dirname(__FILE__)}/lib")
|
|
24
|
+
#require("kitchenw.rb")
|
|
25
|
+
|
|
26
|
+
# Kick off the monitoring thread
|
|
27
|
+
Thread.start { watcher }
|
data/.travis.yml
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
language: ruby
|
|
2
|
+
|
|
3
|
+
rvm:
|
|
4
|
+
- 2.3.4
|
|
5
|
+
|
|
6
|
+
env:
|
|
7
|
+
- global:
|
|
8
|
+
- machine_user=travis
|
|
9
|
+
- machine_pass=travis
|
|
10
|
+
- machine_port=22
|
|
11
|
+
|
|
12
|
+
dist: precise
|
|
13
|
+
sudo: required
|
|
14
|
+
|
|
15
|
+
before_install:
|
|
16
|
+
- sudo usermod -p `openssl passwd -1 'travis'` travis
|
|
17
|
+
- gem --version
|
|
18
|
+
|
|
19
|
+
bundler_args: --without guard integration
|
|
20
|
+
|
|
21
|
+
script:
|
|
22
|
+
- bundle install --with integration
|
|
23
|
+
- export KITCHEN_YAML=.kitchen.ci.yml
|
|
24
|
+
- bundle exec kitchen-pc verify ubuntu
|
|
25
|
+
|
|
26
|
+
branches:
|
|
27
|
+
only:
|
|
28
|
+
- master
|
|
29
|
+
- /v\d+\.\d+[a-z]/
|
|
30
|
+
|
|
31
|
+
deploy:
|
|
32
|
+
provider: rubygems
|
|
33
|
+
api_key:
|
|
34
|
+
secure: B50sWvo60Ok+dfOcg7RGdeD2Eg7qLRU7XiVr050WIAWdOVY5UTjaRfKAEpC6UYq9d88Ab4dE+7EwgoObwEpcfMw4Aukcu0vlsz6fvyVO7lRtIfnZ9h5hYY5b1Q1kV6IUkcr5dwYZmrZiX2lLg2FW7S/y5DkELFiZA5RA/wKworB/eGvXfR4R7LhRZQpUywJ5hAFO8TLmK/CJehhtmuwqqFvKErU2Uwmu8DcAjhLvaTbmbVpVWxWVRraf0Y3ecBqvck81irgZKD63HmT2bRtQJmA7wvxhl1KCE2pxSnxuyLRoAOklfeTOYnLGblAEYPas8DefLE2V34DRy3tg+iWXsHaFwylnRMjYD6oDaK8TWJfmkdkIyC5T0yi/+PRibbCm012eYYK1nEjOOKV3kQ48gmfJgeKRZHSel11Oosm4ws/4jxODrj4NM1AWKo7eT/gmtUUQ0gGZlSRrGCZQvzvlrJLBOSobuIhGeam5OWey7pCDeEmJRixplsat1t3KketDwnxaGu2oqkneaUxfZFivllAGxgih3Ct887vv9eH755FnJmQArDQorMrIEXKn3fg0AUoiCxJar9zJtmuwDkd03YHZaSdib8sDQutLTiMlcoRh08/QBKfuhdkqj/RToE7z8GINYrW3HrZUarBFSRB/6xRVDNa29lBaLEfEBjblKoc=
|
|
35
|
+
gem: test-kitchen-pc
|
|
36
|
+
on:
|
|
37
|
+
tags: true
|
|
38
|
+
repo: rusnyder/test-kitchen-pc
|
data/Berksfile
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2017 Russell Snyder
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Test Kitchen Parent Child
|
|
2
|
+
|
|
3
|
+
[](http://badge.fury.io/rb/test-kitchen-pc)
|
|
4
|
+
[](https://travis-ci.org/rusnyder/test-kitchen-pc)
|
|
5
|
+
|
|
6
|
+
Test Kitchen Parent-Child is a thin wrapper around Test Kitchen that adds
|
|
7
|
+
support for inheritance in the .kitchen.yml configuration files for multi-role
|
|
8
|
+
projects.
|
|
9
|
+
|
|
10
|
+
## What is this for?
|
|
11
|
+
|
|
12
|
+
While Test Kitchen is a phenomenal tool for testing a suite of infrastructure
|
|
13
|
+
code, it doesn't lend itself quite as well to testing many related suites that
|
|
14
|
+
are contained in the same project.
|
|
15
|
+
|
|
16
|
+
I'm coming at this from the Ansible world where I've got a single project that
|
|
17
|
+
houses all of my "roles" (machine profiles), and Test Kitchen is great for
|
|
18
|
+
testing each individual role. The main pain point comes when these roles all
|
|
19
|
+
use the same set of test configurations, and it would be great to share configs
|
|
20
|
+
instead of duplicating them across dozens of roles.
|
|
21
|
+
|
|
22
|
+
Here's a sample directory structure of the type of project that this extension
|
|
23
|
+
was written to help test:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
ansible-project/
|
|
27
|
+
├── roles/
|
|
28
|
+
│ ├── ssh-role/
|
|
29
|
+
│ | ├── .kitchen.yml
|
|
30
|
+
│ | └── ...
|
|
31
|
+
│ ├── java-service-role/
|
|
32
|
+
│ | ├── .kitchen.yml
|
|
33
|
+
│ | └── ...
|
|
34
|
+
│ └── nginx-webserver-role/
|
|
35
|
+
│ ├── .kitchen.yml
|
|
36
|
+
│ └── ...
|
|
37
|
+
└── site.yml
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
This project aims at reducing the duplication between the `.kitchen.yml` files
|
|
41
|
+
and improving the maintainability of more complex infrastructure projects.
|
|
42
|
+
|
|
43
|
+
## Getting Started
|
|
44
|
+
|
|
45
|
+
Being only a simple extension to Test Kitchen, you should start with the
|
|
46
|
+
guides there. See the [Test Kitchen README][kitchen-readme] to get started
|
|
47
|
+
and to get your tests running without this extension.
|
|
48
|
+
|
|
49
|
+
[kitchen-readme]: https://github.com/test-kitchen/test-kitchen
|
|
50
|
+
|
|
51
|
+
## Usage
|
|
52
|
+
|
|
53
|
+
This can be run in all the same ways as Test Kitchen, just using the command
|
|
54
|
+
`kitchen-pc` instead of `kitchen`.
|
|
55
|
+
|
|
56
|
+
If you're using RubyGem to manage your gems:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Install the gem by name
|
|
60
|
+
gem install test-kitchen-pc
|
|
61
|
+
|
|
62
|
+
# Run kitchen-pc the same way you run kitchen
|
|
63
|
+
kitchen-pc converge default-centos-6
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Optionally, you can use [Bundler](http://bundler.io/) to manage the gem by
|
|
67
|
+
adding `gem "test-kitchen-pc"` to your `Gemfile`, then:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# Install the deps from the Gemspec
|
|
71
|
+
bundle install
|
|
72
|
+
|
|
73
|
+
# Run kitchen-pc the same way you run kitchen
|
|
74
|
+
bundle exec kitchen-pc converge default-centos-6
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Configuration
|
|
78
|
+
|
|
79
|
+
To support inheritance, this extensions adds support for the top-level
|
|
80
|
+
`parent` paremeter in any of the `.kitchen.yml` files that Test Kitchen
|
|
81
|
+
is configured to read normally.
|
|
82
|
+
|
|
83
|
+
Let's say you have a project `.kitchen.yml` that defines a set of pretty
|
|
84
|
+
generic settings for testing:
|
|
85
|
+
|
|
86
|
+
**`.kitchen.parent.yml`**
|
|
87
|
+
|
|
88
|
+
```yaml
|
|
89
|
+
---
|
|
90
|
+
driver:
|
|
91
|
+
name: docker
|
|
92
|
+
|
|
93
|
+
provisioner:
|
|
94
|
+
name: ansible_playbook
|
|
95
|
+
ansible_inventory: test/integration/inventory/hosts
|
|
96
|
+
roles_path: ../
|
|
97
|
+
|
|
98
|
+
platforms:
|
|
99
|
+
- name: centos-6
|
|
100
|
+
- name: centos-7
|
|
101
|
+
|
|
102
|
+
suites:
|
|
103
|
+
- name: default
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
The majority of this configuration will be the same across all of the
|
|
107
|
+
infrastructure modules that you're testing. Using this extension, you
|
|
108
|
+
can export all common configuration to a shared file, and then source
|
|
109
|
+
the shared configuration using the `parent` parameter, then inline any
|
|
110
|
+
customizations you may need to make.
|
|
111
|
+
|
|
112
|
+
For example, say we wanted to export the above as common configuration,
|
|
113
|
+
but then have a role that needs to define some host aliases in the
|
|
114
|
+
Docker driver:
|
|
115
|
+
|
|
116
|
+
**`roles/sample-role/.kitchen.yml`**
|
|
117
|
+
|
|
118
|
+
```yaml
|
|
119
|
+
---
|
|
120
|
+
parent: ../../.kitchen.parent.yml
|
|
121
|
+
|
|
122
|
+
driver:
|
|
123
|
+
name: docker
|
|
124
|
+
run_options:
|
|
125
|
+
add-host:
|
|
126
|
+
- "sample-host:127.0.0.1"
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
This will result in the `roles/sample-role/.kitchen.yml` config being merged
|
|
130
|
+
into the `.kitchen.parent.yml` file, with the former overriding and properties
|
|
131
|
+
that are specified in both.
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
## Development
|
|
135
|
+
|
|
136
|
+
If you'd like to contribute, feel free to open a PR. To run the tests prior
|
|
137
|
+
to submitting the PR, just clone the project and run the integration tests:
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
# Install deps
|
|
141
|
+
bundle install
|
|
142
|
+
|
|
143
|
+
# Run integration tests
|
|
144
|
+
bundle exec kitchen-pc test
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
data/bin/kitchen-pc
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# -*- encoding: utf-8 -*-
|
|
3
|
+
|
|
4
|
+
# Trap interrupts to quit cleanly. See
|
|
5
|
+
# https://twitter.com/mitchellh/status/283014103189053442
|
|
6
|
+
Signal.trap("INT") { exit 1 }
|
|
7
|
+
|
|
8
|
+
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), %w{.. lib})
|
|
9
|
+
require "rubygems"
|
|
10
|
+
require "kitchen/pc/cli"
|
|
11
|
+
require "kitchen/errors"
|
|
12
|
+
|
|
13
|
+
Kitchen.with_friendly_errors { Kitchen::PC::CLI.start }
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
require "kitchen"
|
|
2
|
+
require "kitchen/cli"
|
|
3
|
+
require "kitchen/config"
|
|
4
|
+
require "kitchen/loader/yaml"
|
|
5
|
+
require "tempfile"
|
|
6
|
+
require "yaml"
|
|
7
|
+
|
|
8
|
+
module Kitchen
|
|
9
|
+
module PC
|
|
10
|
+
class CLI < Kitchen::CLI
|
|
11
|
+
# Intercept the CLI call and merge project and parent configs
|
|
12
|
+
# before firing off the proper CLI intialization
|
|
13
|
+
def initialize(*args)
|
|
14
|
+
# Read the configs as provided
|
|
15
|
+
loader = Kitchen::Loader::YAML.new(
|
|
16
|
+
project_config: ENV["KITCHEN_YAML"],
|
|
17
|
+
local_config: ENV["KITCHEN_LOCAL_YAML"],
|
|
18
|
+
global_config: ENV["KITCHEN_GLOBAL_YAML"]
|
|
19
|
+
)
|
|
20
|
+
# For any configs that have parents, merge in the parents
|
|
21
|
+
# and write out to a temporary file, then set the associated
|
|
22
|
+
# environment variable for Test Kitchen to use that file
|
|
23
|
+
tmp_files = []
|
|
24
|
+
configs = [
|
|
25
|
+
{ :path_fn => :config_file, :yaml_fn => :yaml, :env_var => 'KITCHEN_YAML' },
|
|
26
|
+
{ :path_fn => :local_config_file, :yaml_fn => :local_yaml, :env_var => 'KITCHEN_LOCAL_YAML' },
|
|
27
|
+
{ :path_fn => :global_config_file, :yaml_fn => :global_yaml, :env_var => 'KITCHEN_GLOBAL_YAML' },
|
|
28
|
+
].each do |params|
|
|
29
|
+
config_path = loader.send params[:path_fn]
|
|
30
|
+
config = loader.send params[:yaml_fn]
|
|
31
|
+
if config.key?('parent')
|
|
32
|
+
merged_file = self.class.merge_parent(config)
|
|
33
|
+
ENV[params[:env_var]] = merged_file
|
|
34
|
+
tmp_files.push(merged_file)
|
|
35
|
+
else
|
|
36
|
+
ENV[params[:env_var]] = config_path
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Cleanup the temp config files on exit
|
|
41
|
+
at_exit do
|
|
42
|
+
begin
|
|
43
|
+
File.unlink(*tmp_files)
|
|
44
|
+
rescue
|
|
45
|
+
# ignore cleanup errors
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Finally delegate to super
|
|
50
|
+
super
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def self.merge_parent(config)
|
|
54
|
+
# If the config doesn't have a parent, except
|
|
55
|
+
if !config.key?('parent')
|
|
56
|
+
raise "Bad Programmer! merge_parent called on a config without a parent: #{config.to_s}"
|
|
57
|
+
end
|
|
58
|
+
# Create a temp file to write the merged config
|
|
59
|
+
file = Tempfile.new(['test-kitchen-config', '.yml'])
|
|
60
|
+
begin
|
|
61
|
+
parent = parse_config(File.expand_path(config['parent']))
|
|
62
|
+
merged = merge_configs(parent, config)
|
|
63
|
+
merged.delete('parent')
|
|
64
|
+
file.write merged.to_yaml
|
|
65
|
+
rescue
|
|
66
|
+
file.unlink # Only unlink here if an error occurred,
|
|
67
|
+
# otherwise we'll leave that up to the caller
|
|
68
|
+
# to unlink eonce finished processing the file
|
|
69
|
+
raise # Re-raise the original exception
|
|
70
|
+
ensure
|
|
71
|
+
file.close
|
|
72
|
+
end
|
|
73
|
+
return file.path
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def self.parse_config(config_path)
|
|
77
|
+
str = Kitchen::Loader::YAML.new.send(:yaml_string, config_path)
|
|
78
|
+
Kitchen::Loader::YAML.new.send(:parse_yaml_string, str, config_path)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def self.merge_configs(parent, child)
|
|
82
|
+
normalize(parent).rmerge(normalize(child))
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
def self.normalize(obj)
|
|
86
|
+
Kitchen::Loader::YAML.new.send(:normalize, obj)
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require "kitchen/pc/version"
|
|
5
|
+
require "English"
|
|
6
|
+
|
|
7
|
+
Gem::Specification.new do |gem|
|
|
8
|
+
gem.name = 'test-kitchen-pc'
|
|
9
|
+
gem.version = Kitchen::PC::VERSION
|
|
10
|
+
gem.license = 'MIT'
|
|
11
|
+
gem.authors = ['Russell Snyder']
|
|
12
|
+
gem.email = ['ru.snyder@gmail.com']
|
|
13
|
+
gem.summary = 'Test Kitchen Parent-Child adds config inheritance to '\
|
|
14
|
+
'Test Kitchen .kitchen.yml files'
|
|
15
|
+
gem.description = 'Test Kitchen Parent-Child is a thin wrapper around ' \
|
|
16
|
+
'Test Kitchen that adds support for inheritance in the ' \
|
|
17
|
+
'.kitchen.yml configuration files for multi-role projects.'
|
|
18
|
+
gem.homepage = 'https://github.com/rusnyder/test-kitchen-pc'
|
|
19
|
+
|
|
20
|
+
gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
|
21
|
+
gem.executables = %w{kitchen-pc}
|
|
22
|
+
#gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
|
23
|
+
gem.require_paths = ["lib"]
|
|
24
|
+
|
|
25
|
+
gem.required_ruby_version = ">= 2.3"
|
|
26
|
+
|
|
27
|
+
gem.add_dependency 'test-kitchen', '>= 1.0.0'
|
|
28
|
+
|
|
29
|
+
# General test/build gems
|
|
30
|
+
gem.add_development_dependency 'bundler'
|
|
31
|
+
gem.add_development_dependency 'rake'
|
|
32
|
+
|
|
33
|
+
# Integration testing gems
|
|
34
|
+
gem.add_development_dependency 'kitchen-inspec', '~> 0.14'
|
|
35
|
+
end
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
directory "/tk_test_directory"
|
metadata
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: test-kitchen-pc
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Russell Snyder
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2017-06-15 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: test-kitchen
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: 1.0.0
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ">="
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: 1.0.0
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: bundler
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ">="
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '0'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - ">="
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '0'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: rake
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - ">="
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '0'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - ">="
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: kitchen-inspec
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - "~>"
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '0.14'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - "~>"
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '0.14'
|
|
69
|
+
description: Test Kitchen Parent-Child is a thin wrapper around Test Kitchen that
|
|
70
|
+
adds support for inheritance in the .kitchen.yml configuration files for multi-role
|
|
71
|
+
projects.
|
|
72
|
+
email:
|
|
73
|
+
- ru.snyder@gmail.com
|
|
74
|
+
executables:
|
|
75
|
+
- kitchen-pc
|
|
76
|
+
extensions: []
|
|
77
|
+
extra_rdoc_files: []
|
|
78
|
+
files:
|
|
79
|
+
- ".gitignore"
|
|
80
|
+
- ".kitchen.ci.yml"
|
|
81
|
+
- ".kitchen.parent.yml"
|
|
82
|
+
- ".kitchen.yml"
|
|
83
|
+
- ".pryrc"
|
|
84
|
+
- ".travis.yml"
|
|
85
|
+
- Berksfile
|
|
86
|
+
- Gemfile
|
|
87
|
+
- LICENSE
|
|
88
|
+
- README.md
|
|
89
|
+
- bin/kitchen-pc
|
|
90
|
+
- lib/kitchen/pc/cli.rb
|
|
91
|
+
- lib/kitchen/pc/version.rb
|
|
92
|
+
- test-kitchen-pc.gemspec
|
|
93
|
+
- test/cookbooks/test_cookbook/metadata.rb
|
|
94
|
+
- test/cookbooks/test_cookbook/recipes/default.rb
|
|
95
|
+
- test/integration/default/inspec/default_spec.rb
|
|
96
|
+
homepage: https://github.com/rusnyder/test-kitchen-pc
|
|
97
|
+
licenses:
|
|
98
|
+
- MIT
|
|
99
|
+
metadata: {}
|
|
100
|
+
post_install_message:
|
|
101
|
+
rdoc_options: []
|
|
102
|
+
require_paths:
|
|
103
|
+
- lib
|
|
104
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
105
|
+
requirements:
|
|
106
|
+
- - ">="
|
|
107
|
+
- !ruby/object:Gem::Version
|
|
108
|
+
version: '2.3'
|
|
109
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
|
+
requirements:
|
|
111
|
+
- - ">="
|
|
112
|
+
- !ruby/object:Gem::Version
|
|
113
|
+
version: '0'
|
|
114
|
+
requirements: []
|
|
115
|
+
rubyforge_project:
|
|
116
|
+
rubygems_version: 2.6.11
|
|
117
|
+
signing_key:
|
|
118
|
+
specification_version: 4
|
|
119
|
+
summary: Test Kitchen Parent-Child adds config inheritance to Test Kitchen .kitchen.yml
|
|
120
|
+
files
|
|
121
|
+
test_files: []
|