busser-serverspec_chefdk30 0.5.12 → 0.5.13
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/.cane +1 -0
- data/.github/dependabot.yml +7 -0
- data/.github/workflows/release.yml +27 -0
- data/.github/workflows/test.yml +12 -0
- data/.gitignore +18 -0
- data/CHANGELOG.md +114 -0
- data/CONTRIBUTING.md +6 -0
- data/Gemfile +3 -0
- data/LICENSE +15 -0
- data/README.md +32 -0
- data/Rakefile +28 -0
- data/busser-serverspec_chefdk30.gemspec +35 -0
- data/features/plugin_install_command.feature +16 -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_chefdk30.rb +67 -0
- data/lib/busser/serverspec/runner.rb +57 -0
- data/lib/busser/serverspec/version.rb +26 -0
- metadata +30 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25beb900c42cce4c123f6bb5c75300c487187a77798712441d96b3d3c25d4eca
|
4
|
+
data.tar.gz: 06511e5495f39a4f8eef901fc188647a600eed9218ef71a52cfdc01188279cff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e950913d9e3b20c74159e6021b4bf53b5d7b4fd4a21129b6ccf4e21b3ce425e2f715d359aab949a17b91874621394ca357f33eea5cf5fd25035090c84a80777
|
7
|
+
data.tar.gz: 89810671d1e4e09e73ab667c867afe0c6c3063d0edb76690cf101ce9e4d179ab4d4de1189d5f20574f89b3510361229c58862293da088ff8def7404e132ad079
|
data/.cane
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--style-measure 100
|
@@ -0,0 +1,27 @@
|
|
1
|
+
name: Publish Gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- v*
|
7
|
+
jobs:
|
8
|
+
build:
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@v2
|
13
|
+
|
14
|
+
- name: Release Gem
|
15
|
+
uses: ActionsToolbox/gem-build-and-release-action@master
|
16
|
+
env:
|
17
|
+
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
|
18
|
+
build:
|
19
|
+
runs-on: ubuntu-latest
|
20
|
+
steps:
|
21
|
+
- uses: actions/checkout@v3
|
22
|
+
- uses: ruby/setup-ruby@v1
|
23
|
+
with:
|
24
|
+
ruby-version: '2.3'
|
25
|
+
bundler-cache: true
|
26
|
+
- run: gem build busser-serverspec_chefdk30
|
27
|
+
- run: gem push busser-serverspec_chefdk30-${{ github.ref }}.gem
|
data/.gitignore
ADDED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,114 @@
|
|
1
|
+
# You should use Kitchen::Verifier::Shell + Serverspec
|
2
|
+
|
3
|
+
## 0.5.11 2023-01-04
|
4
|
+
|
5
|
+
* Install bundler 1.16.1 for Ruby version 2.3 and ChefDK 3.0
|
6
|
+
|
7
|
+
## 0.5.10 2016-08-12
|
8
|
+
|
9
|
+
* use container-based test at travis-ci.
|
10
|
+
* Make rake and rspec/core runtime deps
|
11
|
+
merge pull-req by John Keiser <john@johnkeiser.com>, thanks.
|
12
|
+
* Pin versions of aruba and cucumber
|
13
|
+
inspired by test-kitchen/busser-cucumber@cd3e6b3 by Peter Gallagher, thanks.
|
14
|
+
|
15
|
+
## 0.5.9 2016-01-22
|
16
|
+
|
17
|
+
* Fix frozen string issue when checking Ruby version
|
18
|
+
merge pull-req by Joe Friedl <jfriedl@digitalocean.com>, thanks.
|
19
|
+
|
20
|
+
## 0.5.8 / 2016-01-22, 0.6.0 / 2016-01-18 (yanked 2016-02-22)
|
21
|
+
|
22
|
+
* Install net-ssh < 2.10 for ruby < 2.0.
|
23
|
+
merge pull-req by Bill Ruddock <bill.ruddock@gmail.com>, thanks.
|
24
|
+
|
25
|
+
## 0.5.7 / 2015-06-01
|
26
|
+
|
27
|
+
* use RbConfig instead of obsolete and deprecated Config, closes #29
|
28
|
+
suggested by Jörg Herzinger <joerg.herzinger@oiml.at>, thanks.
|
29
|
+
|
30
|
+
## 0.5.6 / 2015-04-27
|
31
|
+
|
32
|
+
* Run bundle with explicit path to ruby bin, closes #27
|
33
|
+
merge pull-req by Simon Detheridge <simon@widgit.com>, thanks.
|
34
|
+
|
35
|
+
## 0.5.5 / 2015-04-02
|
36
|
+
|
37
|
+
* use File::PATH_SEPARATOR to join ENV PATH. closes #24
|
38
|
+
suggested by Jacob McCann <jmccann.git@gmail.com>, thanks.
|
39
|
+
|
40
|
+
## 0.5.4 / 2015-03-30
|
41
|
+
|
42
|
+
* add the config bindir as well.
|
43
|
+
merge pull-req by Noah Kantrowitz <noah@coderanger.net>. thanks.
|
44
|
+
|
45
|
+
## 0.5.3 / 2014-10-17
|
46
|
+
|
47
|
+
* make private working methods, closes #18
|
48
|
+
|
49
|
+
## 0.5.2 / 2014-10-16
|
50
|
+
|
51
|
+
* reset gems db
|
52
|
+
|
53
|
+
## 0.5.1 / 2014-10-16
|
54
|
+
|
55
|
+
* move Gemfile process from postinstall to test.
|
56
|
+
|
57
|
+
## 0.5.0 / 2014-10-16
|
58
|
+
|
59
|
+
* enable to specify serverspec version in Gemfile, closes #16
|
60
|
+
* add 'log_switch', '~> 0.3.0', ref: turboladen/tailor#160
|
61
|
+
* drop ruby 1.9.2 test, because mime-types 2.4.2 does not support ruby 1.9.2.
|
62
|
+
|
63
|
+
## 0.4.0 / 2014-10-06
|
64
|
+
|
65
|
+
* add --default-path for RSpec 3, closes #15
|
66
|
+
* bump up version number (0.3: load Gemfile, 0.4: serverspec v2).
|
67
|
+
|
68
|
+
## 0.2.8 / 2014-10-05
|
69
|
+
|
70
|
+
* update for serverspec v2, closes #13
|
71
|
+
|
72
|
+
## 0.2.7 / 2014-09-24
|
73
|
+
|
74
|
+
* support loading Gemfile. closes #12
|
75
|
+
|
76
|
+
## 0.2.6 / 2014-01-25
|
77
|
+
|
78
|
+
* add globbing pattern note for frequency asked test failure.
|
79
|
+
* update links for moving to test-kitchen organization.
|
80
|
+
* update copyright.
|
81
|
+
|
82
|
+
## 0.2.5 / 2013-11-14
|
83
|
+
|
84
|
+
* issue #5: Added --color and --format documentation rspec options
|
85
|
+
merge pull-req by Kannan Manickam <kannan@rightscale.com>. thanks.
|
86
|
+
|
87
|
+
## 0.2.4 / 2013-11-01
|
88
|
+
|
89
|
+
* issue #4: Search all GEM_PATH values for `rspec` bin.
|
90
|
+
merge pull-req by Seth Chisamore <schisamo@opscode.com>. thanks.
|
91
|
+
|
92
|
+
## 0.2.3 / 2013-07-10
|
93
|
+
|
94
|
+
* issue #2: remove tight dependency of serverspec. thanks to rteabeault.
|
95
|
+
|
96
|
+
## 0.2.2 / 2013-07-09
|
97
|
+
|
98
|
+
* issue #2: remove dependency rspec.
|
99
|
+
|
100
|
+
## 0.2.1 / 2013-06-18
|
101
|
+
|
102
|
+
* fix silly exit value.
|
103
|
+
|
104
|
+
## 0.2.0 / 2013-06-18
|
105
|
+
|
106
|
+
* issue #1: do not print full backtrace if serverspec test failure.
|
107
|
+
|
108
|
+
## 0.1.1 / 2013-06-06
|
109
|
+
|
110
|
+
* add cucumber test and fix related things
|
111
|
+
|
112
|
+
## 0.1.0 / 2013-05-22
|
113
|
+
|
114
|
+
* Initial release
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,6 @@
|
|
1
|
+
# <a name="notice"></a> Notice
|
2
|
+
|
3
|
+
You should use [Kitchen::Verifier::Shell](https://github.com/higanworks/kitchen-verifier-shell) + [Serverspec](http://serverspec.org/) instead of Busser::RunnerPlugin::Serverspec.
|
4
|
+
|
5
|
+
* [Official Document](https://github.com/test-kitchen/test-kitchen/pull/741) (This PR has been merged. You can use this with Test Kitchen 1.5.0)
|
6
|
+
* [Cookbook testing by Serverspec with Shell Verifier of Test Kitchen](http://www.creationline.com/en/lab/12161) ([Japanese](http://www.creationline.com/lab/12161))
|
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,32 @@
|
|
1
|
+
# THIS IS A FORK
|
2
|
+
|
3
|
+
Forked from [busser-serverspec@0.5.10](https://github.com/test-kitchen/busser-serverspec)
|
4
|
+
|
5
|
+
# <a name="title"></a> Busser::RunnerPlugin::Serverspec
|
6
|
+
|
7
|
+
A Busser runner plugin for Serverspec for EOL Ruby versions 2.3 and ChefDK 3.0 due to the following breaking change:
|
8
|
+
|
9
|
+
> ## Breaking changes:
|
10
|
+
>
|
11
|
+
> - Drop support for Ruby 2.3, 2.4, 2.5 and RubyGems 2.5, 2.6, 2.7 [#6107](https://github.com/rubygems/rubygems/pull/6107)
|
12
|
+
|
13
|
+
## <a name="installation"></a> Installation and Setup
|
14
|
+
|
15
|
+
Please read the Busser [plugin usage][plugin_usage] page for more details.
|
16
|
+
|
17
|
+
## <a name="usage"></a> Usage
|
18
|
+
|
19
|
+
Please put test files into [COOKBOOK]/test/integration/[SUITES]/serverspec_chefdk30/
|
20
|
+
|
21
|
+
```cookbook
|
22
|
+
`-- test
|
23
|
+
`-- integration
|
24
|
+
`-- default
|
25
|
+
`-- serverspec_chefdk30
|
26
|
+
|-- Gemfile
|
27
|
+
|-- localhost
|
28
|
+
| `-- httpd_spec.rb
|
29
|
+
`-- spec_helper.rb
|
30
|
+
```
|
31
|
+
|
32
|
+
`Gemfile` is optional. You can specify installing Serverspec version and install gems you need.
|
data/Rakefile
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require 'cucumber/rake/task'
|
3
|
+
require 'cane/rake_task'
|
4
|
+
|
5
|
+
Cucumber::Rake::Task.new(:features) do |t|
|
6
|
+
t.cucumber_opts = ['features', '-x', '--format progress']
|
7
|
+
end
|
8
|
+
|
9
|
+
desc "Run all test suites"
|
10
|
+
task :test => [:features]
|
11
|
+
|
12
|
+
desc "Run cane to check quality metrics"
|
13
|
+
Cane::RakeTask.new do |cane|
|
14
|
+
cane.canefile = './.cane'
|
15
|
+
end
|
16
|
+
|
17
|
+
desc "Display LOC stats"
|
18
|
+
task :stats do
|
19
|
+
puts "\n## Production Code Stats"
|
20
|
+
sh "countloc -r lib"
|
21
|
+
puts "\n## Test Code Stats"
|
22
|
+
sh "countloc -r features"
|
23
|
+
end
|
24
|
+
|
25
|
+
desc "Run all quality tasks"
|
26
|
+
task :quality => [:cane, :stats]
|
27
|
+
|
28
|
+
task :default => [:test, :quality]
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'busser/serverspec/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'busser-serverspec_chefdk30'
|
8
|
+
spec.version = Busser::Serverspec::VERSION
|
9
|
+
spec.authors = ['HIGUCHI Daisuke']
|
10
|
+
spec.email = ['d-higuchi@creationline.com']
|
11
|
+
spec.description = %q{A fork for busser-serverspec for supporting EOL Ruby versions 2.3 and ChefDK 3.0}
|
12
|
+
spec.summary = spec.description
|
13
|
+
spec.homepage = 'https://github.com/clemblanco/busser-serverspec_chefdk30'
|
14
|
+
spec.license = 'Apache-2.0'
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = []
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ['lib']
|
20
|
+
spec.required_ruby_version = '>= 2.3.0'
|
21
|
+
|
22
|
+
spec.add_dependency 'busser'
|
23
|
+
spec.add_dependency 'rake'
|
24
|
+
spec.add_dependency 'rspec-core'
|
25
|
+
|
26
|
+
spec.add_development_dependency 'serverspec'
|
27
|
+
|
28
|
+
spec.add_development_dependency 'aruba', '0.6.1'
|
29
|
+
spec.add_development_dependency 'cucumber', '1.3.18'
|
30
|
+
|
31
|
+
spec.add_development_dependency 'cane'
|
32
|
+
spec.add_development_dependency 'log_switch', '~> 0.3.0'
|
33
|
+
spec.add_development_dependency 'countloc'
|
34
|
+
spec.add_development_dependency 'simplecov'
|
35
|
+
end
|
@@ -0,0 +1,16 @@
|
|
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_chefdk30-install"
|
8
|
+
And a sandboxed GEM_HOME directory named "busser-serverspec_chefdk30-gem-home"
|
9
|
+
|
10
|
+
Scenario: Running the postinstall generator
|
11
|
+
When I run `busser plugin install busser-serverspec_chefdk30 --force-postinstall`
|
12
|
+
Then the output should contain:
|
13
|
+
"""
|
14
|
+
Plugin serverspec_chefdk30 already installed
|
15
|
+
-----> Running postinstall for serverspec_chefdk30 plugin
|
16
|
+
"""
|
@@ -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_chefdk30\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_chefdk30
|
3
|
+
As a user of Busser
|
4
|
+
I want my tests to run when the serverspec_chefdk30 runner plugin is installed
|
5
|
+
|
6
|
+
Background:
|
7
|
+
Given a test BUSSER_ROOT directory named "busser-serverspec_chefdk30-test"
|
8
|
+
And a sandboxed GEM_HOME directory named "busser-serverspec_chefdk30-gem-home"
|
9
|
+
When I successfully run `busser plugin install busser-serverspec_chefdk30 --force-postinstall`
|
10
|
+
Given a suite directory named "serverspec_chefdk30"
|
11
|
+
|
12
|
+
Scenario: A passing test suite
|
13
|
+
Given a file in suite "serverspec_chefdk30" 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_chefdk30`
|
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_chefdk30" 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_chefdk30`
|
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::ServerspecChefdk30 < Busser::RunnerPlugin::Base
|
27
|
+
postinstall do
|
28
|
+
install_gem('bundler', '~> 1.16.1')
|
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
|
+
run_ruby_script!("#{runner} #{suite_path('serverspec_chefdk30').to_s}")
|
37
|
+
end
|
38
|
+
|
39
|
+
private
|
40
|
+
|
41
|
+
def run_bundle_install
|
42
|
+
# Referred from busser-shindo
|
43
|
+
gemfile_path = File.join(suite_path, 'serverspec_chefdk30', 'Gemfile')
|
44
|
+
if File.exists?(gemfile_path)
|
45
|
+
# Bundle install local completes quickly if the gems are already found
|
46
|
+
# locally it fails if it needs to talk to the internet. The || below is
|
47
|
+
# the fallback to the internet-enabled version. It's a speed optimization.
|
48
|
+
banner('Bundle Installing..')
|
49
|
+
ENV['PATH'] = [ENV['PATH'], Gem.bindir, RbConfig::CONFIG['bindir']].join(File::PATH_SEPARATOR)
|
50
|
+
bundle_exec = "#{File.join(RbConfig::CONFIG['bindir'], 'ruby')} " +
|
51
|
+
"#{File.join(Gem.bindir, 'bundle')} install --gemfile #{gemfile_path}"
|
52
|
+
run("#{bundle_exec} --local || #{bundle_exec}")
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def install_serverspec
|
57
|
+
Gem::Specification.reset
|
58
|
+
if Array(Gem::Specification.find_all_by_name('serverspec')).size == 0
|
59
|
+
if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.3')
|
60
|
+
raise "Ruby < 2.3 is EOLed and no longer supported"
|
61
|
+
end
|
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.13'
|
25
|
+
end
|
26
|
+
end
|
metadata
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: busser-serverspec_chefdk30
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- HIGUCHI Daisuke
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2023-01-04 00:00:00.000000000 Z
|
@@ -52,20 +52,6 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: bundler
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 2.3.0
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: 2.3.0
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: serverspec
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -171,12 +157,31 @@ email:
|
|
171
157
|
executables: []
|
172
158
|
extensions: []
|
173
159
|
extra_rdoc_files: []
|
174
|
-
files:
|
160
|
+
files:
|
161
|
+
- ".cane"
|
162
|
+
- ".github/dependabot.yml"
|
163
|
+
- ".github/workflows/release.yml"
|
164
|
+
- ".github/workflows/test.yml"
|
165
|
+
- ".gitignore"
|
166
|
+
- CHANGELOG.md
|
167
|
+
- CONTRIBUTING.md
|
168
|
+
- Gemfile
|
169
|
+
- LICENSE
|
170
|
+
- README.md
|
171
|
+
- Rakefile
|
172
|
+
- busser-serverspec_chefdk30.gemspec
|
173
|
+
- features/plugin_install_command.feature
|
174
|
+
- features/plugin_list_command.feature
|
175
|
+
- features/support/env.rb
|
176
|
+
- features/test_command.feature
|
177
|
+
- lib/busser/runner_plugin/serverspec_chefdk30.rb
|
178
|
+
- lib/busser/serverspec/runner.rb
|
179
|
+
- lib/busser/serverspec/version.rb
|
175
180
|
homepage: https://github.com/clemblanco/busser-serverspec_chefdk30
|
176
181
|
licenses:
|
177
182
|
- Apache-2.0
|
178
183
|
metadata: {}
|
179
|
-
post_install_message:
|
184
|
+
post_install_message:
|
180
185
|
rdoc_options: []
|
181
186
|
require_paths:
|
182
187
|
- lib
|
@@ -191,9 +196,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
191
196
|
- !ruby/object:Gem::Version
|
192
197
|
version: '0'
|
193
198
|
requirements: []
|
194
|
-
rubygems_version: 3.3.
|
195
|
-
signing_key:
|
199
|
+
rubygems_version: 3.0.3.1
|
200
|
+
signing_key:
|
196
201
|
specification_version: 4
|
197
202
|
summary: A fork for busser-serverspec for supporting EOL Ruby versions 2.3 and ChefDK
|
198
203
|
3.0
|
199
|
-
test_files:
|
204
|
+
test_files:
|
205
|
+
- features/plugin_install_command.feature
|
206
|
+
- features/plugin_list_command.feature
|
207
|
+
- features/support/env.rb
|
208
|
+
- features/test_command.feature
|