busser-serverspec 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.

Potentially problematic release.


This version of busser-serverspec might be problematic. Click here for more details.

data/.cane ADDED
File without changes
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/.tailor ADDED
@@ -0,0 +1,4 @@
1
+ Tailor.config do |config|
2
+ config.formatters "text"
3
+ config.file_set 'lib/**/*.rb'
4
+ end
data/.travis.yml ADDED
@@ -0,0 +1,11 @@
1
+ language: ruby
2
+
3
+ rvm:
4
+ - 2.0.0
5
+ - 1.9.3
6
+ - 1.9.2
7
+ - ruby-head
8
+
9
+ matrix:
10
+ allow_failures:
11
+ - rvm: ruby-head
data/CHANGELOG.md ADDED
@@ -0,0 +1,3 @@
1
+ ## 0.1.0 / 2013-05-22
2
+
3
+ * Initial release
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,15 @@
1
+ Author:: HIGUCHI Daisuke (<d-higuchi@creationline.com>)
2
+
3
+ Copyright (C) 2013, 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,51 @@
1
+ # <a name="title"></a> Busser::RunnerPlugin::Serverspec
2
+
3
+ A Busser runner plugin for Serverspec
4
+
5
+ ## <a name="installation"></a> Installation and Setup
6
+
7
+ Please read the Busser [plugin usage][plugin_usage] page for more details.
8
+
9
+ ## <a name="usage"></a> Usage
10
+
11
+ Please put test files into *cookbook*/test/integration/*suites*/serverspec/
12
+
13
+ ```*cookbook*
14
+ `-- test
15
+ `-- integration
16
+ `-- default
17
+ `-- serverspec
18
+ |-- localhost
19
+ | `-- httpd_spec.rb
20
+ `-- spec_helper.rb
21
+ ```
22
+
23
+ ## <a name="development"></a> Development
24
+
25
+ * Source hosted at [GitHub][repo]
26
+ * Report issues/questions/feature requests on [GitHub Issues][issues]
27
+
28
+ Pull requests are very welcome! Make sure your patches are well tested.
29
+ Ideally create a topic branch for every separate change you make. For
30
+ example:
31
+
32
+ 1. Fork the repo
33
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
34
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
35
+ 4. Push to the branch (`git push origin my-new-feature`)
36
+ 5. Create new Pull Request
37
+
38
+ ## <a name="authors"></a> Authors
39
+
40
+ Created and maintained by [HIGUCHI Daisuke][author] (<d-higuchi@creationline.com>)
41
+
42
+ ## <a name="license"></a> License
43
+
44
+ Apache 2.0 (see [LICENSE][license])
45
+
46
+
47
+ [author]: https://github.com/cl-lab-k
48
+ [issues]: https://github.com/cl-lab-k/busser-serverspec/issues
49
+ [license]: https://github.com/cl-lab-k/busser-serverspec/blob/master/LICENSE
50
+ [repo]: https://github.com/cl-lab-k/busser-serverspec
51
+ [plugin_usage]: http://docs.kitchen-ci.org/busser/plugin-usage
data/Rakefile ADDED
@@ -0,0 +1,31 @@
1
+ require "bundler/gem_tasks"
2
+ require 'cucumber/rake/task'
3
+ require 'cane/rake_task'
4
+ require 'tailor/rake_task'
5
+
6
+ Cucumber::Rake::Task.new(:features) do |t|
7
+ t.cucumber_opts = ['features', '-x', '--format progress']
8
+ end
9
+
10
+ desc "Run all test suites"
11
+ task :test => [:features]
12
+
13
+ desc "Run cane to check quality metrics"
14
+ Cane::RakeTask.new do |cane|
15
+ cane.canefile = './.cane'
16
+ end
17
+
18
+ Tailor::RakeTask.new
19
+
20
+ desc "Display LOC stats"
21
+ task :stats do
22
+ puts "\n## Production Code Stats"
23
+ sh "countloc -r lib"
24
+ puts "\n## Test Code Stats"
25
+ sh "countloc -r features"
26
+ end
27
+
28
+ desc "Run all quality tasks"
29
+ task :quality => [:cane, :tailor, :stats]
30
+
31
+ task :default => [:test, :quality]
@@ -0,0 +1,30 @@
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'
8
+ spec.version = Busser::Serverspec::VERSION
9
+ spec.authors = ['HIGUCHI Daisuke']
10
+ spec.email = ['d-higuchi@creationline.com']
11
+ spec.description = %q{A Busser runner plugin for Serverspec}
12
+ spec.summary = spec.description
13
+ spec.homepage = 'https://github.com/cl-lab-k/busser-serverspec'
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
+
21
+ spec.add_dependency 'busser'
22
+
23
+ spec.add_development_dependency 'bundler', '~> 1.3'
24
+ spec.add_development_dependency 'rake'
25
+ spec.add_development_dependency 'aruba'
26
+
27
+ spec.add_development_dependency 'cane'
28
+ spec.add_development_dependency 'tailor'
29
+ spec.add_development_dependency 'countloc'
30
+ end
@@ -0,0 +1,11 @@
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
+
9
+ Scenario: Running the postinstall generator
10
+ When I run `busser plugin install busser-serverspec --force-postinstall`
11
+ Then 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,13 @@
1
+ require 'aruba/cucumber'
2
+ require 'busser/cucumber'
3
+
4
+ Before do
5
+ @aruba_timeout_seconds = 20
6
+ end
7
+
8
+ After do |s|
9
+ # Tell Cucumber to quit after this scenario is done - if it failed.
10
+ # This is useful to inspect the 'tmp/aruba' directory before any other
11
+ # steps are executed and clear it out.
12
+ Cucumber.wants_to_quit = true if s.failed?
13
+ end
@@ -0,0 +1,31 @@
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
+ When I successfully run `busser plugin install busser-serverspec --force-postinstall`
9
+ Given a suite directory named "serverspec"
10
+
11
+ Scenario: A passing test suite
12
+ Given a file in suite "serverspec" named "<YOUR_FILE>" with:
13
+ """
14
+ TEST FILE CONTENT
15
+
16
+ A good test might be a simple passing statement
17
+ """
18
+ When I run `busser test serverspec`
19
+ Then I should verify some output for the serverspec plugin
20
+ And the exit status should be 0
21
+
22
+ Scenario: A failing test suite
23
+ Given a file in suite "serverspec" named "<YOUR_FILE>" with:
24
+ """
25
+ TEST FILE CONTENT
26
+
27
+ A good test might be a failing test case, raised exception, etc.
28
+ """
29
+ When I run `busser test serverspec`
30
+ Then I should verify some output for the serverspec plugin
31
+ And the exit status should not be 0
@@ -0,0 +1,35 @@
1
+ # -*- encoding: utf-8 -*-
2
+ #
3
+ # Author:: HIGUCHI Daisuke (<d-higuchi@creationline.com>)
4
+ #
5
+ # Copyright (C) 2013, 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
+
21
+ # A Busser runner plugin for Serverspec.
22
+ #
23
+ # @author HIGUCHI Daisuke <d-higuchi@creationline.com>
24
+ #
25
+ class Busser::RunnerPlugin::Serverspec < Busser::RunnerPlugin::Base
26
+ postinstall do
27
+ install_gem("serverspec", "< 0.5")
28
+ end
29
+
30
+ def test
31
+ runner = File.join(File.dirname(__FILE__), %w{.. serverspec runner.rb})
32
+
33
+ run_ruby_script!("#{runner} #{suite_path('serverspec').to_s}")
34
+ end
35
+ end
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env ruby
2
+ # -*- encoding: utf-8 -*-
3
+ #
4
+ # Author:: HIGUCHI Daisuke (<d-higuchi@creationline.com>)
5
+ #
6
+ # Copyright (C) 2013, 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
+ t.rspec_path = RbConfig::CONFIG['bindir'] + '/rspec'
28
+ t.ruby_opts = [ "-I#{base_path}" ]
29
+ t.pattern = "#{base_path}/**/*_spec.rb"
30
+ end
31
+ Rake::Task["spec"].invoke
@@ -0,0 +1,26 @@
1
+ # -*- encoding: utf-8 -*-
2
+ #
3
+ # Author:: HIGUCHI Daisuke (<d-higuchi@creationline.com>)
4
+ #
5
+ # Copyright (C) 2013, 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.1.0"
25
+ end
26
+ end
metadata ADDED
@@ -0,0 +1,179 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: busser-serverspec
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - HIGUCHI Daisuke
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-05-22 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: busser
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: bundler
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: '1.3'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '1.3'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rake
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: aruba
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ name: cane
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ - !ruby/object:Gem::Dependency
95
+ name: tailor
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ - !ruby/object:Gem::Dependency
111
+ name: countloc
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ description: A Busser runner plugin for Serverspec
127
+ email:
128
+ - d-higuchi@creationline.com
129
+ executables: []
130
+ extensions: []
131
+ extra_rdoc_files: []
132
+ files:
133
+ - .cane
134
+ - .gitignore
135
+ - .tailor
136
+ - .travis.yml
137
+ - CHANGELOG.md
138
+ - Gemfile
139
+ - LICENSE
140
+ - README.md
141
+ - Rakefile
142
+ - busser-serverspec.gemspec
143
+ - features/plugin_install_command.feature
144
+ - features/plugin_list_command.feature
145
+ - features/support/env.rb
146
+ - features/test_command.feature
147
+ - lib/busser/runner_plugin/serverspec.rb
148
+ - lib/busser/serverspec/runner.rb
149
+ - lib/busser/serverspec/version.rb
150
+ homepage: https://github.com/cl-lab-k/busser-serverspec
151
+ licenses:
152
+ - Apache 2.0
153
+ post_install_message:
154
+ rdoc_options: []
155
+ require_paths:
156
+ - lib
157
+ required_ruby_version: !ruby/object:Gem::Requirement
158
+ none: false
159
+ requirements:
160
+ - - ! '>='
161
+ - !ruby/object:Gem::Version
162
+ version: '0'
163
+ required_rubygems_version: !ruby/object:Gem::Requirement
164
+ none: false
165
+ requirements:
166
+ - - ! '>='
167
+ - !ruby/object:Gem::Version
168
+ version: '0'
169
+ requirements: []
170
+ rubyforge_project:
171
+ rubygems_version: 1.8.23
172
+ signing_key:
173
+ specification_version: 3
174
+ summary: A Busser runner plugin for Serverspec
175
+ test_files:
176
+ - features/plugin_install_command.feature
177
+ - features/plugin_list_command.feature
178
+ - features/support/env.rb
179
+ - features/test_command.feature