busser-goss 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: cad2257c2e6388a40774514a1b84b71b938e7887
4
+ data.tar.gz: e67dc63ee8e1d27a56d4e766f1eb8763d9ae2f3a
5
+ SHA512:
6
+ metadata.gz: 83a919563e0ea39c15aef44c467ef376aeaa3c177f27dd8d772a786176b4f784123dd74511f794f82ea157734f12f3ec0104b4b542313eb36bbbd48b798156c3
7
+ data.tar.gz: 12f8ad5c68f3f1404337492241261d6b6298cd422ded4f36e5391b66009a922e20b4d2edc2de3b805a0ffa6322c9877119d0a70f774409dacaf791878d9332bc
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 / Unreleased
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,16 @@
1
+ Author:: Mathieu Sauve-Frankel (<msf@kisoku.net>)
2
+
3
+
4
+ Copyright (C) 2015, Mathieu Sauve-Frankel
5
+
6
+ Licensed under the Apache License, Version 2.0 (the "License");
7
+ you may not use this file except in compliance with the License.
8
+ You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing, software
13
+ distributed under the License is distributed on an "AS IS" BASIS,
14
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ See the License for the specific language governing permissions and
16
+ limitations under the License.
data/README.md ADDED
@@ -0,0 +1,54 @@
1
+ # <a name="title"></a> Busser::RunnerPlugin::Goss
2
+
3
+ A Busser runner plugin for Goss
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
+ This busser plugin uses the compiled release of goss and is only supported
12
+ on linux-amd64 at the moment. When the goss project releases binaries for
13
+ different platforms, this plugin will be updated.
14
+
15
+ Please put test files into [COOKBOOK]/test/integration/[SUITES]/goss/
16
+
17
+ ```cookbook
18
+ `-- test
19
+ `-- integration
20
+ `-- default
21
+ `-- goss
22
+ `--default_spec.goss
23
+ ```
24
+
25
+
26
+ ## <a name="development"></a> Development
27
+
28
+ * Source hosted at [GitHub][repo]
29
+ * Report issues/questions/feature requests on [GitHub Issues][issues]
30
+
31
+ Pull requests are very welcome! Make sure your patches are well tested.
32
+ Ideally create a topic branch for every separate change you make. For
33
+ example:
34
+
35
+ 1. Fork the repo
36
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
37
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
38
+ 4. Push to the branch (`git push origin my-new-feature`)
39
+ 5. Create new Pull Request
40
+
41
+ ## <a name="authors"></a> Authors
42
+
43
+ Created and maintained by [Mathieu Sauve-Frankel][author] (<msf@kisoku.net>)
44
+
45
+ ## <a name="license"></a> License
46
+
47
+ Apache 2.0 (see [LICENSE][license])
48
+
49
+
50
+ [author]: https://github.com/kisoku
51
+ [issues]: https://github.com/kisoku/busser-goss/issues
52
+ [license]: https://github.com/kisoku/busser-goss/blob/master/LICENSE
53
+ [repo]: https://github.com/kisoku/busser-goss
54
+ [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/goss/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'busser-goss'
8
+ spec.version = Busser::Goss::VERSION
9
+ spec.authors = ['Mathieu Sauve-Frankel']
10
+ spec.email = ['msf@kisoku.net']
11
+ spec.description = %q{A Busser runner plugin for Goss}
12
+ spec.summary = spec.description
13
+ spec.homepage = 'https://github.com/kisoku/busser-goss'
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-goss-install"
8
+
9
+ Scenario: Running the postinstall generator
10
+ When I run `busser plugin install busser-goss --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 /^goss\b/
@@ -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,38 @@
1
+ Feature: Test command
2
+ In order to run tests written with goss
3
+ As a user of Busser
4
+ I want my tests to run when the goss runner plugin is installed
5
+
6
+ Background:
7
+ Given a test BUSSER_ROOT directory named "busser-goss-test"
8
+ When I successfully run `busser plugin install busser-goss --force-postinstall`
9
+ Given a suite directory named "goss"
10
+
11
+ Scenario: A passing test suite
12
+ Given a file in suite "goss" named "default_spec.goss" with:
13
+ """
14
+ {
15
+ "command": {
16
+ "echo hello": {
17
+ "exit-status": "0",
18
+ "stdout": [
19
+ "hello"
20
+ ],
21
+ "stderr": []
22
+ }
23
+ }
24
+ }
25
+ """
26
+ When I run `busser test goss`
27
+ Then the output should contain
28
+ """
29
+ """
30
+ And the exit status should be 0
31
+
32
+ Scenario: A failing test suite
33
+ Given a file in suite "goss" named "default_spec.goss" with:
34
+ """
35
+ """
36
+ When I run `busser test goss`
37
+ Then I should verify some output for the goss plugin
38
+ And the exit status should not be 0
data/goss.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "command": {
3
+ "echo hello": {
4
+ "exit-status": "0",
5
+ "stdout": [
6
+ "hello"
7
+ ],
8
+ "stderr": []
9
+ }
10
+ }
11
+ }
@@ -0,0 +1,26 @@
1
+ # -*- encoding: utf-8 -*-
2
+ #
3
+ # Author:: Mathieu Sauve-Frankel (<msf@kisoku.net>)
4
+ #
5
+ # Copyright (C) 2015, Mathieu Sauve-Frankel
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 Goss
22
+
23
+ # Version string for the Goss Busser runner plugin
24
+ VERSION = '0.1.2'
25
+ end
26
+ end
@@ -0,0 +1,48 @@
1
+ # -*- encoding: utf-8 -*-
2
+ #
3
+ # Author:: Mathieu Sauve-Frankel (<msf@kisoku.net>)
4
+ #
5
+ # Copyright (C) 2015, Mathieu Sauve-Frankel
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 Goss.
22
+ #
23
+ # @author Mathieu Sauve-Frankel (<msf@kisoku.net>)
24
+ #
25
+ class Busser::RunnerPlugin::Goss < Busser::RunnerPlugin::Base
26
+ postinstall do
27
+ version = 'v0.0.7'
28
+ url = "https://github.com/aelsabbahy/goss/releases/download/#{version}/goss-linux-amd64"
29
+ destdir = vendor_path('goss')
30
+
31
+ empty_directory(destdir)
32
+
33
+ src = open(url).binmode
34
+ dst = File.open(File.join(destdir, 'goss'), 'wb')
35
+ IO.copy_stream(src, dst)
36
+
37
+ inside(destdir) do
38
+ chmod('goss', 755)
39
+ end
40
+ end
41
+
42
+ def test
43
+ Dir.glob("#{suite_path("goss")}/*_{test,spec}.{goss,json}").each do |file|
44
+ banner "[goss] #{File.basename(file)}"
45
+ run!("goss -g #{file} validate")
46
+ end
47
+ end
48
+ end
metadata ADDED
@@ -0,0 +1,163 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: busser-goss
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.2
5
+ platform: ruby
6
+ authors:
7
+ - Mathieu Sauve-Frankel
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-10-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: busser
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '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: '1.3'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.3'
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: aruba
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: cane
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: tailor
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: countloc
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ description: A Busser runner plugin for Goss
112
+ email:
113
+ - msf@kisoku.net
114
+ executables: []
115
+ extensions: []
116
+ extra_rdoc_files: []
117
+ files:
118
+ - ".cane"
119
+ - ".gitignore"
120
+ - ".tailor"
121
+ - ".travis.yml"
122
+ - CHANGELOG.md
123
+ - Gemfile
124
+ - LICENSE
125
+ - README.md
126
+ - Rakefile
127
+ - busser-goss.gemspec
128
+ - features/plugin_install_command.feature
129
+ - features/plugin_list_command.feature
130
+ - features/support/env.rb
131
+ - features/test_command.feature
132
+ - goss.json
133
+ - lib/busser/goss/version.rb
134
+ - lib/busser/runner_plugin/goss.rb
135
+ homepage: https://github.com/kisoku/busser-goss
136
+ licenses:
137
+ - Apache 2.0
138
+ metadata: {}
139
+ post_install_message:
140
+ rdoc_options: []
141
+ require_paths:
142
+ - lib
143
+ required_ruby_version: !ruby/object:Gem::Requirement
144
+ requirements:
145
+ - - ">="
146
+ - !ruby/object:Gem::Version
147
+ version: '0'
148
+ required_rubygems_version: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ requirements: []
154
+ rubyforge_project:
155
+ rubygems_version: 2.2.5
156
+ signing_key:
157
+ specification_version: 4
158
+ summary: A Busser runner plugin for Goss
159
+ test_files:
160
+ - features/plugin_install_command.feature
161
+ - features/plugin_list_command.feature
162
+ - features/support/env.rb
163
+ - features/test_command.feature