busser 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +8 -2
- data/CHANGELOG.md +13 -0
- data/Gemfile +5 -0
- data/busser.gemspec +2 -0
- data/features/plugin_create_command.feature +72 -0
- data/features/plugin_install_command.feature +3 -2
- data/lib/busser.rb +10 -1
- data/lib/busser/chef_apply.rb +108 -0
- data/lib/busser/chef_ext.rb +52 -0
- data/lib/busser/command/plugin.rb +5 -0
- data/lib/busser/command/plugin_create.rb +174 -0
- data/lib/busser/command/plugin_install.rb +11 -51
- data/lib/busser/command/test.rb +24 -0
- data/lib/busser/cucumber.rb +10 -0
- data/lib/busser/helpers.rb +11 -0
- data/lib/busser/rubygems.rb +78 -0
- data/lib/busser/runner_plugin/dummy.rb +16 -2
- data/lib/busser/version.rb +1 -1
- data/spec/busser/helpers_spec.rb +39 -5
- data/templates/plugin/CHANGELOG.md.erb +3 -0
- data/templates/plugin/Gemfile.erb +3 -0
- data/templates/plugin/README.md.erb +41 -0
- data/templates/plugin/Rakefile.erb +31 -0
- data/templates/plugin/features_env.rb.erb +13 -0
- data/templates/plugin/features_plugin_install_command.feature.erb +11 -0
- data/templates/plugin/features_plugin_list_command.feature.erb +8 -0
- data/templates/plugin/features_test_command.feature.erb +31 -0
- data/templates/plugin/gemspec.erb +30 -0
- data/templates/plugin/gitignore.erb +17 -0
- data/templates/plugin/license_apachev2.erb +15 -0
- data/templates/plugin/license_lgplv3.erb +16 -0
- data/templates/plugin/license_mit.erb +22 -0
- data/templates/plugin/license_reserved.erb +5 -0
- data/templates/plugin/runner_plugin.rb.erb +16 -0
- data/templates/plugin/tailor.erb +4 -0
- data/templates/plugin/travis.yml.erb +11 -0
- data/templates/plugin/version.rb.erb +12 -0
- metadata +43 -3
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'aruba/cucumber'
|
2
|
+
require 'busser/cucumber'
|
3
|
+
|
4
|
+
Before do
|
5
|
+
@aruba_timeout_seconds = 10
|
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,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 "<%= config[:gem_name] %>-install"
|
8
|
+
|
9
|
+
Scenario: Running the postinstall generator
|
10
|
+
When I run `busser plugin install <%= config[:gem_name] %> --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 /^<%= config[:name] %>\b/
|
@@ -0,0 +1,31 @@
|
|
1
|
+
Feature: Test command
|
2
|
+
In order to run tests written with <%= config[:name] %>
|
3
|
+
As a user of Busser
|
4
|
+
I want my tests to run when the <%= config[:name] %> runner plugin is installed
|
5
|
+
|
6
|
+
Background:
|
7
|
+
Given a test BUSSER_ROOT directory named "<%= config[:gem_name] %>-test"
|
8
|
+
When I successfully run `busser plugin install <%= config[:gem_name] %> --force-postinstall`
|
9
|
+
Given a suite directory named "<%= config[:name] %>"
|
10
|
+
|
11
|
+
Scenario: A passing test suite
|
12
|
+
Given a file in suite "<%= config[:name] %>" 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 <%= config[:name] %>`
|
19
|
+
Then I should verify some output for the <%= config[:name] %> plugin
|
20
|
+
And the exit status should be 0
|
21
|
+
|
22
|
+
Scenario: A failing test suite
|
23
|
+
Given a file in suite "<%= config[:name] %>" 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 <%= config[:name] %>`
|
30
|
+
Then I should verify some output for the <%= config[:name] %> plugin
|
31
|
+
And the exit status should not be 0
|
@@ -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/<%= config[:name] %>/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = '<%= config[:gem_name] %>'
|
8
|
+
spec.version = Busser::<%= config[:klass_name] %>::VERSION
|
9
|
+
spec.authors = ['<%= config[:author] %>']
|
10
|
+
spec.email = ['<%= config[:email] %>']
|
11
|
+
spec.description = %q{<%= config[:klass_name] %> runner plugin for Busser}
|
12
|
+
spec.summary = spec.description
|
13
|
+
spec.homepage = ''
|
14
|
+
spec.license = '<%= config[:license_string] %>'
|
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,15 @@
|
|
1
|
+
Author:: <%= config[:author] %> (<<%= config[:email] %>>)
|
2
|
+
|
3
|
+
Copyright (C) <%= config[:year] %>, <%= config[:author] %>
|
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.
|
@@ -0,0 +1,16 @@
|
|
1
|
+
Author:: <%= config[:author] %> (<<%= config[:email] %>>)
|
2
|
+
|
3
|
+
Copyright (C) <%= config[:year] %> <%= config[:author] %>
|
4
|
+
|
5
|
+
This program is free software: you can redistribute it and/or modify
|
6
|
+
it under the terms of the GNU General Public License as published by
|
7
|
+
the Free Software Foundation, either version 3 of the License, or
|
8
|
+
(at your option) any later version.
|
9
|
+
|
10
|
+
This program is distributed in the hope that it will be useful,
|
11
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
+
GNU General Public License for more details.
|
14
|
+
|
15
|
+
You should have received a copy of the GNU General Public License
|
16
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
@@ -0,0 +1,22 @@
|
|
1
|
+
Author:: <%= config[:author] %> (<<%= config[:email] %>>)
|
2
|
+
|
3
|
+
Copyright (c) <%= config[:year] %>, <%= config[:author] %>
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
#
|
3
|
+
<%= license_comment %>
|
4
|
+
|
5
|
+
require 'busser/runner_plugin'
|
6
|
+
|
7
|
+
# <%= config[:klass_name] %> runner plugin for Busser
|
8
|
+
#
|
9
|
+
# @author <%= config[:author] %> <<%= config[:email] %>>
|
10
|
+
#
|
11
|
+
class Busser::RunnerPlugin::<%= config[:klass_name] %> < Busser::RunnerPlugin::Base
|
12
|
+
|
13
|
+
def test
|
14
|
+
# your implementation here
|
15
|
+
end
|
16
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: busser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-04-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
@@ -27,6 +27,22 @@ dependencies:
|
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: chef
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
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: '0'
|
30
46
|
- !ruby/object:Gem::Dependency
|
31
47
|
name: bundler
|
32
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -258,15 +274,19 @@ files:
|
|
258
274
|
- busser.gemspec
|
259
275
|
- features/deserialize_command.feature
|
260
276
|
- features/files/base64.txt
|
277
|
+
- features/plugin_create_command.feature
|
261
278
|
- features/plugin_install_command.feature
|
262
279
|
- features/setup_command.feature
|
263
280
|
- features/suite_cleanup_command.feature
|
264
281
|
- features/suite_path_command.feature
|
265
282
|
- features/support/env.rb
|
266
283
|
- lib/busser.rb
|
284
|
+
- lib/busser/chef_apply.rb
|
285
|
+
- lib/busser/chef_ext.rb
|
267
286
|
- lib/busser/cli.rb
|
268
287
|
- lib/busser/command/deserialize.rb
|
269
288
|
- lib/busser/command/plugin.rb
|
289
|
+
- lib/busser/command/plugin_create.rb
|
270
290
|
- lib/busser/command/plugin_install.rb
|
271
291
|
- lib/busser/command/plugin_list.rb
|
272
292
|
- lib/busser/command/setup.rb
|
@@ -278,6 +298,7 @@ files:
|
|
278
298
|
- lib/busser/cucumber/hooks.rb
|
279
299
|
- lib/busser/helpers.rb
|
280
300
|
- lib/busser/plugin.rb
|
301
|
+
- lib/busser/rubygems.rb
|
281
302
|
- lib/busser/runner_plugin.rb
|
282
303
|
- lib/busser/runner_plugin/dummy.rb
|
283
304
|
- lib/busser/thor.rb
|
@@ -285,6 +306,24 @@ files:
|
|
285
306
|
- lib/busser/version.rb
|
286
307
|
- spec/busser/helpers_spec.rb
|
287
308
|
- spec/spec_helper.rb
|
309
|
+
- templates/plugin/CHANGELOG.md.erb
|
310
|
+
- templates/plugin/Gemfile.erb
|
311
|
+
- templates/plugin/README.md.erb
|
312
|
+
- templates/plugin/Rakefile.erb
|
313
|
+
- templates/plugin/features_env.rb.erb
|
314
|
+
- templates/plugin/features_plugin_install_command.feature.erb
|
315
|
+
- templates/plugin/features_plugin_list_command.feature.erb
|
316
|
+
- templates/plugin/features_test_command.feature.erb
|
317
|
+
- templates/plugin/gemspec.erb
|
318
|
+
- templates/plugin/gitignore.erb
|
319
|
+
- templates/plugin/license_apachev2.erb
|
320
|
+
- templates/plugin/license_lgplv3.erb
|
321
|
+
- templates/plugin/license_mit.erb
|
322
|
+
- templates/plugin/license_reserved.erb
|
323
|
+
- templates/plugin/runner_plugin.rb.erb
|
324
|
+
- templates/plugin/tailor.erb
|
325
|
+
- templates/plugin/travis.yml.erb
|
326
|
+
- templates/plugin/version.rb.erb
|
288
327
|
homepage: https://github.com/fnichol/busser
|
289
328
|
licenses:
|
290
329
|
- Apache 2.0
|
@@ -306,7 +345,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
306
345
|
version: '0'
|
307
346
|
segments:
|
308
347
|
- 0
|
309
|
-
hash: -
|
348
|
+
hash: -1092429557824524753
|
310
349
|
requirements: []
|
311
350
|
rubyforge_project:
|
312
351
|
rubygems_version: 1.8.24
|
@@ -316,6 +355,7 @@ summary: Kitchen Busser - Runs tests for projects in test-kitchen
|
|
316
355
|
test_files:
|
317
356
|
- features/deserialize_command.feature
|
318
357
|
- features/files/base64.txt
|
358
|
+
- features/plugin_create_command.feature
|
319
359
|
- features/plugin_install_command.feature
|
320
360
|
- features/setup_command.feature
|
321
361
|
- features/suite_cleanup_command.feature
|