busser-bash 0.1.3 → 0.1.4

This diff has not been reviewed by any users.
Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 329ad00a5948f67b5fb5d9998bf9de183f0cd562
4
+ data.tar.gz: d3bcadaff3d19585af8e1efc0b2aa40eb1a3b1c8
5
+ SHA512:
6
+ metadata.gz: 3b278c954321d6a8ed8f0090b6d6436ed74a10f430731aebcd39c3ef105e6a4313dd49989e3bd5b94f4504698473e82f12be5000c506bb4bdbd617ccb3abf0c0
7
+ data.tar.gz: 6a85d0de0fc5176d554c309743cc3d53643c35e9d7efd02982bdc772d7de4d44ff239c0cf5b1ab9d1da3716d28ea5d2a8ae6ae501c7ca64729faffff25efd6cf
@@ -0,0 +1,3 @@
1
+ Style/ClassAndModuleChildren:
2
+ Exclude:
3
+ - lib/busser/runner_plugin/bash.rb
data/.simplecov CHANGED
@@ -1,4 +1,4 @@
1
- SimpleCov.adapters.define 'gem' do
1
+ SimpleCov.profiles.define 'gem' do
2
2
  command_name 'Specs'
3
3
 
4
4
  add_filter '.gem/'
@@ -1,19 +1,34 @@
1
1
  language: ruby
2
2
 
3
3
  rvm:
4
- - 2.0.0
5
- - 1.9.3
6
- - 1.9.2
7
- - ruby-head
4
+ - 2.1
5
+ - 2.0.0
6
+ - 1.9.3
7
+ - ruby-head
8
8
 
9
9
  env:
10
- - RUBYGEMS_VERSION=2.0.3
11
- - RUBYGEMS_VERSION=1.8.25
10
+ - RUBYGEMS_VERSION=
11
+ - RUBYGEMS_VERSION=2.2.2
12
+ - RUBYGEMS_VERSION=2.1.11
13
+ - RUBYGEMS_VERSION=2.0.14
14
+ - RUBYGEMS_VERSION=1.8.29
15
+
16
+ bundler_args: --without guard
12
17
 
13
18
  before_install:
14
- - gem update --system $RUBYGEMS_VERSION
15
- - gem --version
19
+ - if [ -n "$RUBYGEMS_VERSION" ]; then gem update --system $RUBYGEMS_VERSION; fi
20
+ - gem --version
16
21
 
17
22
  matrix:
23
+ exclude:
24
+ - rvm: 2.1
25
+ env: RUBYGEMS_VERSION=1.8.29
26
+ - rvm: 2.0.0
27
+ env: RUBYGEMS_VERSION=1.8.29
28
+ - rvm: ruby-head
29
+ env: RUBYGEMS_VERSION=1.8.29
18
30
  allow_failures:
19
- - rvm: ruby-head
31
+ - rvm: ruby-head
32
+
33
+ notifications:
34
+ irc: "chat.freenode.net#kitchenci"
@@ -1,3 +1,10 @@
1
+ ## 0.1.4 / 2014-10-11
2
+
3
+ ### Improvements
4
+
5
+ * Update testing dependencies, freshen TravisCI build matrix, add style and complexity support. ([@fnichol][])
6
+
7
+
1
8
  ## 0.1.3 / 2013-04-23
2
9
 
3
10
  ### Bug fixes
@@ -21,4 +28,4 @@
21
28
  * Initial release
22
29
 
23
30
  <!--- The following link definition list is generated by PimpMyChangelog --->
24
- [@fnichol]: https://github.com/fnichol
31
+ [@fnichol]: https://github.com/fnichol
data/Gemfile CHANGED
@@ -1,9 +1,10 @@
1
- source 'https://rubygems.org'
1
+ # -*- encoding: utf-8 -*-
2
+ source "https://rubygems.org"
2
3
 
3
4
  gemspec
4
5
 
5
- group :development do
6
- gem 'rb-inotify', :require => false
7
- gem 'rb-fsevent', :require => false
8
- gem 'rb-fchange', :require => false
6
+ group :guard do
7
+ gem "guard-cucumber"
8
+ gem "guard-cane"
9
+ gem "guard-rubocop"
9
10
  end
data/Guardfile CHANGED
@@ -1,12 +1,26 @@
1
- guard 'cucumber' do
2
- watch(%r{^features/.+\.feature$})
3
- watch(%r{^features/support/.+$}) { 'features' }
4
- watch(%r{^features/step_definitions/(.+)_steps\.rb$}) do |m|
5
- Dir[File.join("**/#{m[1]}.feature")][0] || 'features'
6
- end
1
+ # -*- encoding: utf-8 -*-
2
+ ignore %r{^\.gem/}
3
+
4
+ def rubocop_opts
5
+ { :all_on_start => false, :keep_failed => false, :cli => "-r finstyle -D" }
7
6
  end
8
7
 
9
- guard 'cane' do
10
- watch(%r|.*\.rb|)
11
- watch('.cane')
8
+ group :red_green_refactor, :halt_on_fail => true do
9
+ guard :cucumber do
10
+ watch(%r{^features/.+\.feature$})
11
+ watch(%r{^features/support/.+$}) { "features" }
12
+ watch(%r{^features/step_definitions/(.+)_steps\.rb$}) do |m|
13
+ Dir[File.join("**/#{m[1]}.feature")][0] || "features"
14
+ end
15
+ end
16
+
17
+ guard :rubocop, rubocop_opts do
18
+ watch(%r{.+\.rb$})
19
+ watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
20
+ end
21
+
22
+ guard :cane do
23
+ watch(%r{.*\.rb})
24
+ watch(".cane")
25
+ end
12
26
  end
data/README.md CHANGED
@@ -1,7 +1,9 @@
1
1
  # <a name="title"></a> Busser::RunnerPlugin::Bash
2
2
 
3
- [![Build Status](https://travis-ci.org/fnichol/busser-bash.png?branch=master)](https://travis-ci.org/fnichol/busser-bash)
4
- [![Code Climate](https://codeclimate.com/github/fnichol/busser-bash.png)](https://codeclimate.com/github/fnichol/busser-bash)
3
+ [![Gem Version](https://badge.fury.io/rb/busser-bash.png)](http://badge.fury.io/rb/busser-bash)
4
+ [![Build Status](https://travis-ci.org/test-kitchen/busser-bash.png?branch=master)](https://travis-ci.org/test-kitchen/busser-bash)
5
+ [![Code Climate](https://codeclimate.com/github/test-kitchen/busser-bash.png)](https://codeclimate.com/github/test-kitchen/busser-bash)
6
+ [![Dependency Status](https://gemnasium.com/test-kitchen/busser-bash.svg)](https://gemnasium.com/test-kitchen/busser-bash)
5
7
 
6
8
  A Busser runner plugin for testing bash scripts
7
9
 
@@ -11,7 +13,21 @@ Please read the Busser [plugin usage][plugin_usage] page for more details.
11
13
 
12
14
  ## <a name="usage"></a> Usage
13
15
 
14
- **TODO:** Write documentation explaining the structure/format of testing files.
16
+ Please put test files into [COOKBOOK]/test/integration/[SUITES]/bash/
17
+
18
+ ```cookbook
19
+ `-- test
20
+ `-- integration
21
+ `-- default
22
+ `-- bash
23
+ `--my_test.sh
24
+ ```
25
+
26
+ The exit code of the script is used as indicator for failure or success.
27
+
28
+ ### <a name="note"></a> Note
29
+
30
+ Globbing pattern to match files is `"bash/*_{test,spec}.{sh,bash}"`.
15
31
 
16
32
  ## <a name="development"></a> Development
17
33
 
data/Rakefile CHANGED
@@ -1,22 +1,27 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  require "bundler/gem_tasks"
2
- require 'cucumber/rake/task'
3
- require 'cane/rake_task'
4
- require 'tailor/rake_task'
5
4
 
5
+ require "cucumber/rake/task"
6
6
  Cucumber::Rake::Task.new(:features) do |t|
7
- t.cucumber_opts = ['features', '-x', '--format progress']
7
+ t.cucumber_opts = ["features", "-x", "--format progress"]
8
8
  end
9
9
 
10
10
  desc "Run all test suites"
11
11
  task :test => [:features]
12
12
 
13
+ require "finstyle"
14
+ require "rubocop/rake_task"
15
+ RuboCop::RakeTask.new(:style) do |task|
16
+ task.options << "--display-cop-names"
17
+ end
18
+
19
+ require "cane/rake_task"
13
20
  desc "Run cane to check quality metrics"
14
21
  Cane::RakeTask.new do |cane|
15
- cane.canefile = './.cane'
22
+ cane.canefile = "./.cane"
16
23
  end
17
24
 
18
- Tailor::RakeTask.new
19
-
20
25
  desc "Display LOC stats"
21
26
  task :stats do
22
27
  puts "\n## Production Code Stats"
@@ -26,6 +31,6 @@ task :stats do
26
31
  end
27
32
 
28
33
  desc "Run all quality tasks"
29
- task :quality => [:cane, :tailor, :stats]
34
+ task :quality => [:cane, :style, :stats]
30
35
 
31
36
  task :default => [:test, :quality]
@@ -1,33 +1,35 @@
1
1
  # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
2
+ lib = File.expand_path("../lib", __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'busser/bash/version'
4
+ require "busser/bash/version"
5
+ require "English"
5
6
 
6
- Gem::Specification.new do |spec|
7
- spec.name = "busser-bash"
8
- spec.version = Busser::Bash::VERSION
9
- spec.authors = ["Fletcher Nichol"]
10
- spec.email = ["fnichol@nichol.ca"]
11
- spec.description = %q{A Busser runner plugin for testing bash scripts}
12
- spec.summary = spec.description
13
- spec.homepage = "https://github.com/fnichol/busser-bash"
14
- spec.license = 'Apache 2.0'
7
+ Gem::Specification.new do |gem|
8
+ gem.name = "busser-bash"
9
+ gem.version = Busser::Bash::VERSION
10
+ gem.authors = ["Fletcher Nichol"]
11
+ gem.email = ["fnichol@nichol.ca"]
12
+ gem.description = "A Busser runner plugin for testing bash scripts"
13
+ gem.summary = gem.description
14
+ gem.homepage = "https://github.com/test-kitchen/busser-bash"
15
+ gem.license = "Apache 2.0"
15
16
 
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"]
17
+ gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
18
+ gem.executables = []
19
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
20
+ gem.require_paths = ["lib"]
20
21
 
21
- spec.add_dependency 'busser', '>= 0.2.0'
22
+ gem.add_dependency "busser", ">= 0.2.0"
22
23
 
23
- spec.add_development_dependency 'bundler', '~> 1.3'
24
- spec.add_development_dependency 'rake'
25
- spec.add_development_dependency 'aruba'
26
- spec.add_development_dependency 'guard-cucumber'
24
+ gem.add_development_dependency "aruba"
25
+ gem.add_development_dependency "bundler", "~> 1.3"
26
+ gem.add_development_dependency "countloc"
27
+ gem.add_development_dependency "rake"
28
+ gem.add_development_dependency "simplecov"
27
29
 
28
- spec.add_development_dependency 'cane'
29
- spec.add_development_dependency 'guard-cane'
30
- spec.add_development_dependency 'tailor'
31
- spec.add_development_dependency 'simplecov'
32
- spec.add_development_dependency 'countloc'
30
+ # style and complexity libraries are tightly version pinned as newer releases
31
+ # may introduce new and undesireable style choices which would be immediately
32
+ # enforced in CI
33
+ gem.add_development_dependency "finstyle", "1.2.0"
34
+ gem.add_development_dependency "cane", "2.6.2"
33
35
  end
@@ -1,5 +1,12 @@
1
- require 'aruba/cucumber'
2
- require 'busser/cucumber'
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ require "aruba/cucumber"
4
+ require "busser/cucumber"
5
+
6
+ if ENV["COVERAGE"]
7
+ require "simplecov"
8
+ SimpleCov.command_name "features"
9
+ end
3
10
 
4
11
  Before do
5
12
  @aruba_timeout_seconds = 10
@@ -21,6 +21,6 @@ module Busser
21
21
  module Bash
22
22
 
23
23
  # Version string for the Bash Busser runner plugin
24
- VERSION = "0.1.3"
24
+ VERSION = "0.1.4"
25
25
  end
26
26
  end
@@ -16,7 +16,7 @@
16
16
  # See the License for the specific language governing permissions and
17
17
  # limitations under the License.
18
18
 
19
- require 'busser/runner_plugin'
19
+ require "busser/runner_plugin"
20
20
 
21
21
  # A Busser runner plugin for Bash.
22
22
  #
@@ -25,7 +25,7 @@ require 'busser/runner_plugin'
25
25
  class Busser::RunnerPlugin::Bash < Busser::RunnerPlugin::Base
26
26
 
27
27
  def test
28
- Dir.glob("#{suite_path('bash')}/*_{test,spec}.{sh,bash}").each do |file|
28
+ Dir.glob("#{suite_path("bash")}/*_{test,spec}.{sh,bash}").each do |file|
29
29
  banner "[bash] #{File.basename(file)}"
30
30
  run!("bash #{file}")
31
31
  end
metadata CHANGED
@@ -1,176 +1,127 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: busser-bash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
5
- prerelease:
4
+ version: 0.1.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Fletcher Nichol
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-04-23 00:00:00.000000000 Z
11
+ date: 2014-10-11 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: busser
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: 0.2.0
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: 0.2.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
27
  - !ruby/object:Gem::Dependency
63
28
  name: aruba
64
29
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
30
  requirements:
67
- - - ! '>='
31
+ - - ">="
68
32
  - !ruby/object:Gem::Version
69
33
  version: '0'
70
34
  type: :development
71
35
  prerelease: false
72
36
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
37
  requirements:
75
- - - ! '>='
38
+ - - ">="
76
39
  - !ruby/object:Gem::Version
77
40
  version: '0'
78
41
  - !ruby/object:Gem::Dependency
79
- name: guard-cucumber
42
+ name: bundler
80
43
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
44
  requirements:
83
- - - ! '>='
45
+ - - "~>"
84
46
  - !ruby/object:Gem::Version
85
- version: '0'
47
+ version: '1.3'
86
48
  type: :development
87
49
  prerelease: false
88
50
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
51
  requirements:
91
- - - ! '>='
52
+ - - "~>"
92
53
  - !ruby/object:Gem::Version
93
- version: '0'
54
+ version: '1.3'
94
55
  - !ruby/object:Gem::Dependency
95
- name: cane
56
+ name: countloc
96
57
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
58
  requirements:
99
- - - ! '>='
59
+ - - ">="
100
60
  - !ruby/object:Gem::Version
101
61
  version: '0'
102
62
  type: :development
103
63
  prerelease: false
104
64
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
65
  requirements:
107
- - - ! '>='
66
+ - - ">="
108
67
  - !ruby/object:Gem::Version
109
68
  version: '0'
110
69
  - !ruby/object:Gem::Dependency
111
- name: guard-cane
70
+ name: rake
112
71
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
72
  requirements:
115
- - - ! '>='
73
+ - - ">="
116
74
  - !ruby/object:Gem::Version
117
75
  version: '0'
118
76
  type: :development
119
77
  prerelease: false
120
78
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
79
  requirements:
123
- - - ! '>='
80
+ - - ">="
124
81
  - !ruby/object:Gem::Version
125
82
  version: '0'
126
83
  - !ruby/object:Gem::Dependency
127
- name: tailor
84
+ name: simplecov
128
85
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
86
  requirements:
131
- - - ! '>='
87
+ - - ">="
132
88
  - !ruby/object:Gem::Version
133
89
  version: '0'
134
90
  type: :development
135
91
  prerelease: false
136
92
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
93
  requirements:
139
- - - ! '>='
94
+ - - ">="
140
95
  - !ruby/object:Gem::Version
141
96
  version: '0'
142
97
  - !ruby/object:Gem::Dependency
143
- name: simplecov
98
+ name: finstyle
144
99
  requirement: !ruby/object:Gem::Requirement
145
- none: false
146
100
  requirements:
147
- - - ! '>='
101
+ - - '='
148
102
  - !ruby/object:Gem::Version
149
- version: '0'
103
+ version: 1.2.0
150
104
  type: :development
151
105
  prerelease: false
152
106
  version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
107
  requirements:
155
- - - ! '>='
108
+ - - '='
156
109
  - !ruby/object:Gem::Version
157
- version: '0'
110
+ version: 1.2.0
158
111
  - !ruby/object:Gem::Dependency
159
- name: countloc
112
+ name: cane
160
113
  requirement: !ruby/object:Gem::Requirement
161
- none: false
162
114
  requirements:
163
- - - ! '>='
115
+ - - '='
164
116
  - !ruby/object:Gem::Version
165
- version: '0'
117
+ version: 2.6.2
166
118
  type: :development
167
119
  prerelease: false
168
120
  version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
121
  requirements:
171
- - - ! '>='
122
+ - - '='
172
123
  - !ruby/object:Gem::Version
173
- version: '0'
124
+ version: 2.6.2
174
125
  description: A Busser runner plugin for testing bash scripts
175
126
  email:
176
127
  - fnichol@nichol.ca
@@ -178,11 +129,11 @@ executables: []
178
129
  extensions: []
179
130
  extra_rdoc_files: []
180
131
  files:
181
- - .cane
182
- - .gitignore
183
- - .simplecov
184
- - .tailor
185
- - .travis.yml
132
+ - ".cane"
133
+ - ".gitignore"
134
+ - ".rubocop.yml"
135
+ - ".simplecov"
136
+ - ".travis.yml"
186
137
  - CHANGELOG.md
187
138
  - Gemfile
188
139
  - Guardfile
@@ -196,36 +147,29 @@ files:
196
147
  - features/test_command.feature
197
148
  - lib/busser/bash/version.rb
198
149
  - lib/busser/runner_plugin/bash.rb
199
- homepage: https://github.com/fnichol/busser-bash
150
+ homepage: https://github.com/test-kitchen/busser-bash
200
151
  licenses:
201
152
  - Apache 2.0
153
+ metadata: {}
202
154
  post_install_message:
203
155
  rdoc_options: []
204
156
  require_paths:
205
157
  - lib
206
158
  required_ruby_version: !ruby/object:Gem::Requirement
207
- none: false
208
159
  requirements:
209
- - - ! '>='
160
+ - - ">="
210
161
  - !ruby/object:Gem::Version
211
162
  version: '0'
212
- segments:
213
- - 0
214
- hash: -1106955864181339155
215
163
  required_rubygems_version: !ruby/object:Gem::Requirement
216
- none: false
217
164
  requirements:
218
- - - ! '>='
165
+ - - ">="
219
166
  - !ruby/object:Gem::Version
220
167
  version: '0'
221
- segments:
222
- - 0
223
- hash: -1106955864181339155
224
168
  requirements: []
225
169
  rubyforge_project:
226
- rubygems_version: 1.8.24
170
+ rubygems_version: 2.2.2
227
171
  signing_key:
228
- specification_version: 3
172
+ specification_version: 4
229
173
  summary: A Busser runner plugin for testing bash scripts
230
174
  test_files:
231
175
  - features/plugin_install_command.feature
data/.tailor DELETED
@@ -1,4 +0,0 @@
1
- Tailor.config do |config|
2
- config.formatters "text"
3
- config.file_set 'lib/**/*.rb'
4
- end