busser-serverspec_cisco 0.5.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.cane +1 -0
- data/.gitignore +17 -0
- data/.tailor +6 -0
- data/.travis.yml +12 -0
- data/CHANGELOG.md +90 -0
- data/Gemfile +4 -0
- data/LICENSE +15 -0
- data/README.md +79 -0
- data/Rakefile +34 -0
- data/busser-serverspec_cisco.gemspec +32 -0
- data/features/plugin_install_command.feature +13 -0
- data/features/plugin_list_command.feature +8 -0
- data/features/support/env.rb +16 -0
- data/features/test_command.feature +45 -0
- data/lib/busser/runner_plugin/serverspec_cisco.rb +67 -0
- data/lib/busser/serverspec_cisco/runner.rb +57 -0
- data/lib/busser/serverspec_cisco/version.rb +26 -0
- metadata +221 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 917c155c94b8ad146b2f2082dac94cca6183e731
|
4
|
+
data.tar.gz: c32890bd14f16bed93dddf2a5ae5a50dae18c757
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 781de3a8032521847e6c43e8968ef2b866faef284421b803fc936523325c49d52a8dd997700c51785127ca84e731958dc1b2f10f11ab8904ed77892c35fceaf0
|
7
|
+
data.tar.gz: 24da800e10da39099908a1fa06bc24f688153e0cd25d7b38d28691ed53dc143f52694c76835e2279cd08ef60d6a17922f572267d329ef3ab45c4797aae38f77c
|
data/.cane
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--style-measure 100
|
data/.gitignore
ADDED
data/.tailor
ADDED
data/.travis.yml
ADDED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,90 @@
|
|
1
|
+
## 0.5.7 / 2015-06-01
|
2
|
+
|
3
|
+
* use RbConfig instead of obsolete and deprecated Config, closes #29
|
4
|
+
suggested by Jörg Herzinger <joerg.herzinger@oiml.at>, thanks.
|
5
|
+
|
6
|
+
## 0.5.6 / 2015-04-27
|
7
|
+
|
8
|
+
* Run bundle with explicit path to ruby bin, closes #27
|
9
|
+
merge pull-req by Simon Detheridge <simon@widgit.com>, thanks.
|
10
|
+
|
11
|
+
## 0.5.5 / 2015-04-02
|
12
|
+
|
13
|
+
* use File::PATH_SEPARATOR to join ENV PATH. closes #24
|
14
|
+
suggested by Jacob McCann <jmccann.git@gmail.com>, thanks.
|
15
|
+
|
16
|
+
## 0.5.4 / 2015-03-30
|
17
|
+
|
18
|
+
* add the config bindir as well.
|
19
|
+
merge pull-req by Noah Kantrowitz <noah@coderanger.net>. thanks.
|
20
|
+
|
21
|
+
## 0.5.3 / 2014-10-17
|
22
|
+
|
23
|
+
* make private working methods, closes #18
|
24
|
+
|
25
|
+
## 0.5.2 / 2014-10-16
|
26
|
+
|
27
|
+
* reset gems db
|
28
|
+
|
29
|
+
## 0.5.1 / 2014-10-16
|
30
|
+
|
31
|
+
* move Gemfile process from postinstall to test.
|
32
|
+
|
33
|
+
## 0.5.0 / 2014-10-16
|
34
|
+
|
35
|
+
* enable to specify serverspec version in Gemfile, closes #16
|
36
|
+
* add 'log_switch', '~> 0.3.0', ref: turboladen/tailor#160
|
37
|
+
* drop ruby 1.9.2 test, because mime-types 2.4.2 does not support ruby 1.9.2.
|
38
|
+
|
39
|
+
## 0.4.0 / 2014-10-06
|
40
|
+
|
41
|
+
* add --default-path for RSpec 3, closes #15
|
42
|
+
* bump up version number (0.3: load Gemfile, 0.4: serverspec v2).
|
43
|
+
|
44
|
+
## 0.2.8 / 2014-10-05
|
45
|
+
|
46
|
+
* update for serverspec v2, closes #13
|
47
|
+
|
48
|
+
## 0.2.7 / 2014-09-24
|
49
|
+
|
50
|
+
* support loading Gemfile. closes #12
|
51
|
+
|
52
|
+
## 0.2.6 / 2014-01-25
|
53
|
+
|
54
|
+
* add globbing pattern note for frequency asked test failure.
|
55
|
+
* update links for moving to test-kitchen organization.
|
56
|
+
* update copyright.
|
57
|
+
|
58
|
+
## 0.2.5 / 2013-11-14
|
59
|
+
|
60
|
+
* issue #5: Added --color and --format documentation rspec options
|
61
|
+
merge pull-req by Kannan Manickam <kannan@rightscale.com>. thanks.
|
62
|
+
|
63
|
+
## 0.2.4 / 2013-11-01
|
64
|
+
|
65
|
+
* issue #4: Search all GEM_PATH values for `rspec` bin.
|
66
|
+
merge pull-req by Seth Chisamore <schisamo@opscode.com>. thanks.
|
67
|
+
|
68
|
+
## 0.2.3 / 2013-07-10
|
69
|
+
|
70
|
+
* issue #2: remove tight dependency of serverspec. thanks to rteabeault.
|
71
|
+
|
72
|
+
## 0.2.2 / 2013-07-09
|
73
|
+
|
74
|
+
* issue #2: remove dependency rspec.
|
75
|
+
|
76
|
+
## 0.2.1 / 2013-06-18
|
77
|
+
|
78
|
+
* fix silly exit value.
|
79
|
+
|
80
|
+
## 0.2.0 / 2013-06-18
|
81
|
+
|
82
|
+
* issue #1: do not print full backtrace if serverspec test failure.
|
83
|
+
|
84
|
+
## 0.1.1 / 2013-06-06
|
85
|
+
|
86
|
+
* add cucumber test and fix related things
|
87
|
+
|
88
|
+
## 0.1.0 / 2013-05-22
|
89
|
+
|
90
|
+
* Initial release
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
Author:: HIGUCHI Daisuke (<d-higuchi@creationline.com>)
|
2
|
+
|
3
|
+
Copyright (C) 2013-2014, HIGUCHI Daisuke
|
4
|
+
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
you may not use this file except in compliance with the License.
|
7
|
+
You may obtain a copy of the License at
|
8
|
+
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
See the License for the specific language governing permissions and
|
15
|
+
limitations under the License.
|
data/README.md
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
# <a name="title"></a> Busser::RunnerPlugin::Serverspec
|
2
|
+
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/busser-serverspec.png)](http://rubygems.org/gems/busser-serverspec) [![Build Status](https://secure.travis-ci.org/test-kitchen/busser-serverspec.png?branch=master)](https://travis-ci.org/test-kitchen/busser-serverspec) [![Dependency Status](https://gemnasium.com/test-kitchen/busser-serverspec.png)](https://gemnasium.com/test-kitchen/busser-serverspec) [![Code Climate](https://codeclimate.com/github/cl-lab-k/busser-serverspec.png)](https://codeclimate.com/github/cl-lab-k/busser-serverspec)
|
4
|
+
|
5
|
+
A Busser runner plugin for Serverspec
|
6
|
+
|
7
|
+
## <a name="installation"></a> Installation and Setup
|
8
|
+
|
9
|
+
Please read the Busser [plugin usage][plugin_usage] page for more details.
|
10
|
+
|
11
|
+
## <a name="usage"></a> Usage
|
12
|
+
|
13
|
+
Please put test files into [COOKBOOK]/test/integration/[SUITES]/serverspec/
|
14
|
+
|
15
|
+
```cookbook
|
16
|
+
`-- test
|
17
|
+
`-- integration
|
18
|
+
`-- default
|
19
|
+
`-- serverspec
|
20
|
+
|-- Gemfile
|
21
|
+
|-- localhost
|
22
|
+
| `-- httpd_spec.rb
|
23
|
+
`-- spec_helper.rb
|
24
|
+
```
|
25
|
+
|
26
|
+
`Gemfile` is optional. You can specify installing Serverspec version and install gems you need.
|
27
|
+
|
28
|
+
## <a name="note"></a> Note
|
29
|
+
|
30
|
+
### <a name="spec"></a> File Matching
|
31
|
+
|
32
|
+
Globbing pattern to match files is `"serverspec/*/*_spec.rb"`.
|
33
|
+
You need to use `"_spec.rb"` (underscore), not `"-spec.rb"` (minus).
|
34
|
+
|
35
|
+
### <a name="serverspec1"></a> Specify Serverspec version
|
36
|
+
|
37
|
+
If you have to specify Serverspec version, you can use Gemfile. Example Gemfile:
|
38
|
+
|
39
|
+
```Gemfile
|
40
|
+
source 'https://rubygems.org'
|
41
|
+
gem 'serverspec', '< 2.0'
|
42
|
+
```
|
43
|
+
|
44
|
+
### <a name="backend"></a> Serverspec backend
|
45
|
+
|
46
|
+
It runs on a target server for testing after ssh log in it.
|
47
|
+
So you need to specify `set :backend, :exec` not `set :backend, :ssh` (Serverspec v2).
|
48
|
+
If you use Serverspec v1, you need to specify `include SpecInfra::Helper::Exec` not `include SpecInfra::Helper::Ssh`.
|
49
|
+
|
50
|
+
|
51
|
+
## <a name="development"></a> Development
|
52
|
+
|
53
|
+
* Source hosted at [GitHub][repo]
|
54
|
+
* Report issues/questions/feature requests on [GitHub Issues][issues]
|
55
|
+
|
56
|
+
Pull requests are very welcome! Make sure your patches are well tested.
|
57
|
+
Ideally create a topic branch for every separate change you make. For
|
58
|
+
example:
|
59
|
+
|
60
|
+
1. Fork the repo
|
61
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
62
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
63
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
64
|
+
5. Create new Pull Request
|
65
|
+
|
66
|
+
## <a name="authors"></a> Authors
|
67
|
+
|
68
|
+
Created and maintained by [HIGUCHI Daisuke][author] (<d-higuchi@creationline.com>)
|
69
|
+
|
70
|
+
## <a name="license"></a> License
|
71
|
+
|
72
|
+
Apache 2.0 (see [LICENSE][license])
|
73
|
+
|
74
|
+
|
75
|
+
[author]: https://github.com/cl-lab-k
|
76
|
+
[issues]: https://github.com/test-kitchen/busser-serverspec/issues
|
77
|
+
[license]: https://github.com/test-kitchen/busser-serverspec/blob/master/LICENSE
|
78
|
+
[repo]: https://github.com/test-kitchen/busser-serverspec
|
79
|
+
[plugin_usage]: http://docs.kitchen-ci.org/busser/plugin-usage
|
data/Rakefile
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'coveralls/rake/task'
|
2
|
+
require "bundler/gem_tasks"
|
3
|
+
require 'cucumber/rake/task'
|
4
|
+
require 'cane/rake_task'
|
5
|
+
require 'tailor/rake_task'
|
6
|
+
|
7
|
+
Coveralls::RakeTask.new
|
8
|
+
|
9
|
+
Cucumber::Rake::Task.new(:features) do |t|
|
10
|
+
t.cucumber_opts = ['features', '-x', '--format progress']
|
11
|
+
end
|
12
|
+
|
13
|
+
desc "Run all test suites"
|
14
|
+
task :test => [:features]
|
15
|
+
|
16
|
+
desc "Run cane to check quality metrics"
|
17
|
+
Cane::RakeTask.new do |cane|
|
18
|
+
cane.canefile = './.cane'
|
19
|
+
end
|
20
|
+
|
21
|
+
Tailor::RakeTask.new
|
22
|
+
|
23
|
+
desc "Display LOC stats"
|
24
|
+
task :stats do
|
25
|
+
puts "\n## Production Code Stats"
|
26
|
+
sh "countloc -r lib"
|
27
|
+
puts "\n## Test Code Stats"
|
28
|
+
sh "countloc -r features"
|
29
|
+
end
|
30
|
+
|
31
|
+
desc "Run all quality tasks"
|
32
|
+
task :quality => [:cane, :tailor, :stats]
|
33
|
+
|
34
|
+
task :default => [:test, :quality, 'coveralls:push']
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
Gem::Specification.new do |spec|
|
3
|
+
spec.name = 'busser-serverspec_cisco'
|
4
|
+
spec.version = '0.5.10'
|
5
|
+
spec.authors = ['HIGUCHI Daisuke', 'Carl Perry']
|
6
|
+
spec.email = ['d-higuchi@creationline.com', 'partnereng@chef.io']
|
7
|
+
spec.description = %q{A Busser runner plugin for Serverspec with patches for Cisco platforms}
|
8
|
+
spec.summary = spec.description
|
9
|
+
spec.homepage = 'https://github.com/chef-partners/busser-serverspec-cisco'
|
10
|
+
spec.license = 'Apache 2.0'
|
11
|
+
|
12
|
+
spec.files = `git ls-files`.split($/)
|
13
|
+
spec.executables = []
|
14
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
15
|
+
spec.require_paths = ['lib']
|
16
|
+
|
17
|
+
spec.add_dependency 'busser'
|
18
|
+
|
19
|
+
spec.add_development_dependency 'serverspec'
|
20
|
+
|
21
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
22
|
+
spec.add_development_dependency 'rake'
|
23
|
+
spec.add_development_dependency 'aruba'
|
24
|
+
|
25
|
+
spec.add_development_dependency 'cane'
|
26
|
+
spec.add_development_dependency 'log_switch', '~> 0.3.0'
|
27
|
+
spec.add_development_dependency 'tailor'
|
28
|
+
spec.add_development_dependency 'countloc'
|
29
|
+
|
30
|
+
spec.add_development_dependency 'coveralls'
|
31
|
+
spec.add_development_dependency 'pry'
|
32
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
Feature: Plugin install command
|
2
|
+
In order to use this plugin
|
3
|
+
As a user of Busser
|
4
|
+
I want to run the postinstall for this plugin
|
5
|
+
|
6
|
+
Background:
|
7
|
+
Given a test BUSSER_ROOT directory named "busser-serverspec-install"
|
8
|
+
And a sandboxed GEM_HOME directory named "busser-serverspec-gem-home"
|
9
|
+
|
10
|
+
Scenario: Running the postinstall generator
|
11
|
+
When I run `busser plugin install busser-serverspec --force-postinstall`
|
12
|
+
Then a gem named "serverspec" is installed
|
13
|
+
And the exit status should be 0
|
@@ -0,0 +1,8 @@
|
|
1
|
+
Feature: Plugin list command
|
2
|
+
In order to use this plugin
|
3
|
+
As a user of Busser
|
4
|
+
I want to see this plugin in the 'busser plugin list' command
|
5
|
+
|
6
|
+
Scenario: Plugin appears in plugin list command
|
7
|
+
When I successfully run `busser plugin list`
|
8
|
+
Then the output should match /^serverspec\b/
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
SimpleCov.start
|
3
|
+
|
4
|
+
require 'aruba/cucumber'
|
5
|
+
require 'busser/cucumber'
|
6
|
+
|
7
|
+
Before do
|
8
|
+
@aruba_timeout_seconds = 60
|
9
|
+
end
|
10
|
+
|
11
|
+
After do |s|
|
12
|
+
# Tell Cucumber to quit after this scenario is done - if it failed.
|
13
|
+
# This is useful to inspect the 'tmp/aruba' directory before any other
|
14
|
+
# steps are executed and clear it out.
|
15
|
+
Cucumber.wants_to_quit = true if s.failed?
|
16
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
Feature: Test command
|
2
|
+
In order to run tests written with serverspec
|
3
|
+
As a user of Busser
|
4
|
+
I want my tests to run when the serverspec runner plugin is installed
|
5
|
+
|
6
|
+
Background:
|
7
|
+
Given a test BUSSER_ROOT directory named "busser-serverspec-test"
|
8
|
+
And a sandboxed GEM_HOME directory named "busser-serverspec-gem-home"
|
9
|
+
When I successfully run `busser plugin install busser-serverspec --force-postinstall`
|
10
|
+
Given a suite directory named "serverspec"
|
11
|
+
|
12
|
+
Scenario: A passing test suite
|
13
|
+
Given a file in suite "serverspec" named "localhost/default_spec.rb" with:
|
14
|
+
"""
|
15
|
+
require 'serverspec'
|
16
|
+
set :backend, :exec
|
17
|
+
|
18
|
+
describe command( "echo 'hello'" ) do
|
19
|
+
its(:exit_status) { should eq 0 }
|
20
|
+
its(:stdout) { should eq "hello\n" }
|
21
|
+
end
|
22
|
+
"""
|
23
|
+
When I run `busser test serverspec`
|
24
|
+
Then the output should contain:
|
25
|
+
"""
|
26
|
+
2 examples, 0 failures
|
27
|
+
"""
|
28
|
+
And the exit status should be 0
|
29
|
+
|
30
|
+
Scenario: A failing test suite
|
31
|
+
Given a file in suite "serverspec" named "localhost/default_spec.rb" with:
|
32
|
+
"""
|
33
|
+
require 'serverspec'
|
34
|
+
set :backend, :exec
|
35
|
+
|
36
|
+
describe command( 'which uhoh-whatzit-called' ) do
|
37
|
+
its(:exit_status) { should eq 0 }
|
38
|
+
end
|
39
|
+
"""
|
40
|
+
When I run `busser test serverspec`
|
41
|
+
Then the output should contain:
|
42
|
+
"""
|
43
|
+
1 example, 1 failure
|
44
|
+
"""
|
45
|
+
And the exit status should not be 0
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
#
|
3
|
+
# Author:: HIGUCHI Daisuke (<d-higuchi@creationline.com>)
|
4
|
+
#
|
5
|
+
# Copyright (C) 2013-2014, HIGUCHI Daisuke
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
|
19
|
+
require 'busser/runner_plugin'
|
20
|
+
require 'rubygems/dependency_installer'
|
21
|
+
|
22
|
+
# A Busser runner plugin for Serverspec.
|
23
|
+
#
|
24
|
+
# @author HIGUCHI Daisuke <d-higuchi@creationline.com>
|
25
|
+
#
|
26
|
+
class Busser::RunnerPlugin::ServerspecCisco < Busser::RunnerPlugin::Base
|
27
|
+
postinstall do
|
28
|
+
install_gem('bundler')
|
29
|
+
end
|
30
|
+
|
31
|
+
def test
|
32
|
+
run_bundle_install
|
33
|
+
install_serverspec
|
34
|
+
|
35
|
+
runner = File.join(File.dirname(__FILE__), %w{.. serverspec runner.rb})
|
36
|
+
bundle_exec = "#{File.join(RbConfig::CONFIG['bindir'], 'ruby')} " +
|
37
|
+
"#{File.join(Gem.bindir, 'bundle')} exec " +
|
38
|
+
"#{runner}"
|
39
|
+
run("#{bundle_exec}")
|
40
|
+
end
|
41
|
+
|
42
|
+
private
|
43
|
+
|
44
|
+
def run_bundle_install
|
45
|
+
# Referred from busser-shindo
|
46
|
+
gemfile_path = File.join(suite_path, 'serverspec', 'Gemfile')
|
47
|
+
if File.exists?(gemfile_path)
|
48
|
+
# Bundle install local completes quickly if the gems are already found
|
49
|
+
# locally it fails if it needs to talk to the internet. The || below is
|
50
|
+
# the fallback to the internet-enabled version. It's a speed optimization.
|
51
|
+
banner('Bundle Installing..')
|
52
|
+
ENV['PATH'] = [ENV['PATH'], Gem.bindir, RbConfig::CONFIG['bindir']].join(File::PATH_SEPARATOR)
|
53
|
+
bundle_exec = "#{File.join(RbConfig::CONFIG['bindir'], 'ruby')} " +
|
54
|
+
"#{File.join(Gem.bindir, 'bundle')} install --gemfile #{gemfile_path}"
|
55
|
+
run("#{bundle_exec} --local || #{bundle_exec}")
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
def install_serverspec
|
60
|
+
Gem::Specification.reset
|
61
|
+
if Array(Gem::Specification.find_all_by_name('serverspec')).size == 0
|
62
|
+
banner('Installing Serverspec..')
|
63
|
+
spec = install_gem('serverspec')
|
64
|
+
banner "serverspec installed (version #{spec.version})"
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# -*- encoding: utf-8 -*-
|
3
|
+
#
|
4
|
+
# Author:: HIGUCHI Daisuke (<d-higuchi@creationline.com>)
|
5
|
+
#
|
6
|
+
# Copyright (C) 2013-2014, HIGUCHI Daisuke
|
7
|
+
#
|
8
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
# you may not use this file except in compliance with the License.
|
10
|
+
# You may obtain a copy of the License at
|
11
|
+
#
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
#
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
# See the License for the specific language governing permissions and
|
18
|
+
# limitations under the License.
|
19
|
+
|
20
|
+
require 'rake'
|
21
|
+
require 'rspec/core/rake_task'
|
22
|
+
require 'rbconfig'
|
23
|
+
|
24
|
+
base_path = File.expand_path(ARGV.shift)
|
25
|
+
|
26
|
+
RSpec::Core::RakeTask.new(:spec) do |t|
|
27
|
+
candidate_bindirs = []
|
28
|
+
# Current Ruby's default bindir
|
29
|
+
candidate_bindirs << RbConfig::CONFIG['bindir']
|
30
|
+
# Search all Gem paths bindirs
|
31
|
+
candidate_bindirs << Gem.paths.path.map do |gem_path|
|
32
|
+
File.join(gem_path, 'bin')
|
33
|
+
end
|
34
|
+
|
35
|
+
candidate_rspec_bins = candidate_bindirs.flatten.map do |bin_dir|
|
36
|
+
File.join(bin_dir, 'rspec')
|
37
|
+
end
|
38
|
+
|
39
|
+
rspec_bin = candidate_rspec_bins.find do |candidate_rspec_bin|
|
40
|
+
FileTest.exist?(candidate_rspec_bin) &&
|
41
|
+
FileTest.executable?(candidate_rspec_bin)
|
42
|
+
end
|
43
|
+
|
44
|
+
t.rspec_path = rspec_bin if rspec_bin
|
45
|
+
t.rspec_opts = [
|
46
|
+
'--color',
|
47
|
+
'--format documentation',
|
48
|
+
"--default-path #{base_path}",
|
49
|
+
]
|
50
|
+
t.ruby_opts = "-I#{base_path}"
|
51
|
+
t.pattern = "#{base_path}/**/*_spec.rb"
|
52
|
+
end
|
53
|
+
begin
|
54
|
+
Rake::Task['spec'].invoke
|
55
|
+
rescue RuntimeError
|
56
|
+
exit 1
|
57
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
#
|
3
|
+
# Author:: HIGUCHI Daisuke (<d-higuchi@creationline.com>)
|
4
|
+
#
|
5
|
+
# Copyright (C) 2013-2014, HIGUCHI Daisuke
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
|
19
|
+
module Busser
|
20
|
+
|
21
|
+
module Serverspec
|
22
|
+
|
23
|
+
# Version string for the Serverspec Busser runner plugin
|
24
|
+
VERSION = '0.5.8'
|
25
|
+
end
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,221 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: busser-serverspec_cisco
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.5.10
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- HIGUCHI Daisuke
|
8
|
+
- Carl Perry
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2015-09-28 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: busser
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '0'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: serverspec
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: bundler
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '1.3'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '1.3'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: rake
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: aruba
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: cane
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
type: :development
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
name: log_switch
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - "~>"
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: 0.3.0
|
105
|
+
type: :development
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - "~>"
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: 0.3.0
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: tailor
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
type: :development
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: countloc
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
133
|
+
type: :development
|
134
|
+
prerelease: false
|
135
|
+
version_requirements: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - ">="
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '0'
|
140
|
+
- !ruby/object:Gem::Dependency
|
141
|
+
name: coveralls
|
142
|
+
requirement: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - ">="
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '0'
|
147
|
+
type: :development
|
148
|
+
prerelease: false
|
149
|
+
version_requirements: !ruby/object:Gem::Requirement
|
150
|
+
requirements:
|
151
|
+
- - ">="
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: '0'
|
154
|
+
- !ruby/object:Gem::Dependency
|
155
|
+
name: pry
|
156
|
+
requirement: !ruby/object:Gem::Requirement
|
157
|
+
requirements:
|
158
|
+
- - ">="
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: '0'
|
161
|
+
type: :development
|
162
|
+
prerelease: false
|
163
|
+
version_requirements: !ruby/object:Gem::Requirement
|
164
|
+
requirements:
|
165
|
+
- - ">="
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: '0'
|
168
|
+
description: A Busser runner plugin for Serverspec with patches for Cisco platforms
|
169
|
+
email:
|
170
|
+
- d-higuchi@creationline.com
|
171
|
+
- partnereng@chef.io
|
172
|
+
executables: []
|
173
|
+
extensions: []
|
174
|
+
extra_rdoc_files: []
|
175
|
+
files:
|
176
|
+
- ".cane"
|
177
|
+
- ".gitignore"
|
178
|
+
- ".tailor"
|
179
|
+
- ".travis.yml"
|
180
|
+
- CHANGELOG.md
|
181
|
+
- Gemfile
|
182
|
+
- LICENSE
|
183
|
+
- README.md
|
184
|
+
- Rakefile
|
185
|
+
- busser-serverspec_cisco.gemspec
|
186
|
+
- features/plugin_install_command.feature
|
187
|
+
- features/plugin_list_command.feature
|
188
|
+
- features/support/env.rb
|
189
|
+
- features/test_command.feature
|
190
|
+
- lib/busser/runner_plugin/serverspec_cisco.rb
|
191
|
+
- lib/busser/serverspec_cisco/runner.rb
|
192
|
+
- lib/busser/serverspec_cisco/version.rb
|
193
|
+
homepage: https://github.com/chef-partners/busser-serverspec-cisco
|
194
|
+
licenses:
|
195
|
+
- Apache 2.0
|
196
|
+
metadata: {}
|
197
|
+
post_install_message:
|
198
|
+
rdoc_options: []
|
199
|
+
require_paths:
|
200
|
+
- lib
|
201
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
202
|
+
requirements:
|
203
|
+
- - ">="
|
204
|
+
- !ruby/object:Gem::Version
|
205
|
+
version: '0'
|
206
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
207
|
+
requirements:
|
208
|
+
- - ">="
|
209
|
+
- !ruby/object:Gem::Version
|
210
|
+
version: '0'
|
211
|
+
requirements: []
|
212
|
+
rubyforge_project:
|
213
|
+
rubygems_version: 2.2.2
|
214
|
+
signing_key:
|
215
|
+
specification_version: 4
|
216
|
+
summary: A Busser runner plugin for Serverspec with patches for Cisco platforms
|
217
|
+
test_files:
|
218
|
+
- features/plugin_install_command.feature
|
219
|
+
- features/plugin_list_command.feature
|
220
|
+
- features/support/env.rb
|
221
|
+
- features/test_command.feature
|