busser-bats 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env bash
2
+ set -e
3
+
4
+ encode_name() {
5
+ local name="$1"
6
+ local result="test_"
7
+
8
+ if [[ ! "$name" =~ [^[:alnum:]\ _-] ]]; then
9
+ name="${name//_/-5f}"
10
+ name="${name//-/-2d}"
11
+ name="${name// /_}"
12
+ result+="$name"
13
+ else
14
+ local length="${#name}"
15
+ local char i
16
+
17
+ for ((i=0; i<length; i++)); do
18
+ char="${name:$i:1}"
19
+ if [ "$char" = " " ]; then
20
+ result+="_"
21
+ elif [[ "$char" =~ [[:alnum:]] ]]; then
22
+ result+="$char"
23
+ else
24
+ result+="$(printf -- "-%02x" \'"$char")"
25
+ fi
26
+ done
27
+ fi
28
+
29
+ echo "$result"
30
+ }
31
+
32
+ tests=()
33
+ index=0
34
+
35
+ while IFS= read -r line; do
36
+ index=$(($index + 1))
37
+ quoted_name="$(expr "$line" : ' *@test *\([^ ].*\) *{ *$' || true)"
38
+
39
+ if [ -n "$quoted_name" ]; then
40
+ name="$(eval echo "$quoted_name")"
41
+ encoded_name="$(encode_name "$name")"
42
+ tests["${#tests[@]}"]="$encoded_name"
43
+ echo "${encoded_name}() { bats_test_begin ${quoted_name} ${index}"
44
+ else
45
+ printf "%s\n" "$line"
46
+ fi
47
+ done
48
+
49
+ for test_name in "${tests[@]}"; do
50
+ echo "bats_test_function ${test_name}"
51
+ done
metadata CHANGED
@@ -1,126 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: busser-bats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
5
- prerelease:
4
+ version: 0.2.0
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-10 00:00:00.000000000 Z
11
+ date: 2014-03-23 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'
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'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: bundler
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ~>
31
+ - - "~>"
36
32
  - !ruby/object:Gem::Version
37
33
  version: '1.3'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ~>
38
+ - - "~>"
44
39
  - !ruby/object:Gem::Version
45
40
  version: '1.3'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rake
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - ">="
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - ">="
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: aruba
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - ">="
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - ">="
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: cane
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - ">="
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - ">="
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: tailor
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - ">="
100
88
  - !ruby/object:Gem::Version
101
89
  version: '0'
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - ">="
108
95
  - !ruby/object:Gem::Version
109
96
  version: '0'
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: countloc
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
- - - ! '>='
101
+ - - ">="
116
102
  - !ruby/object:Gem::Version
117
103
  version: '0'
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
- - - ! '>='
108
+ - - ">="
124
109
  - !ruby/object:Gem::Version
125
110
  version: '0'
126
111
  description: A Busser runner plugin for Bats
@@ -130,10 +115,10 @@ executables: []
130
115
  extensions: []
131
116
  extra_rdoc_files: []
132
117
  files:
133
- - .cane
134
- - .gitignore
135
- - .tailor
136
- - .travis.yml
118
+ - ".cane"
119
+ - ".gitignore"
120
+ - ".tailor"
121
+ - ".travis.yml"
137
122
  - CHANGELOG.md
138
123
  - Gemfile
139
124
  - LICENSE
@@ -146,36 +131,40 @@ files:
146
131
  - features/test_command.feature
147
132
  - lib/busser/bats/version.rb
148
133
  - lib/busser/runner_plugin/bats.rb
149
- homepage: https://github.com/fnichol/busser-bats
134
+ - vendor/bats/.gitattributes
135
+ - vendor/bats/LICENSE
136
+ - vendor/bats/README.md
137
+ - vendor/bats/VERSION.txt
138
+ - vendor/bats/bin/bats
139
+ - vendor/bats/install.sh
140
+ - vendor/bats/libexec/bats
141
+ - vendor/bats/libexec/bats-exec-suite
142
+ - vendor/bats/libexec/bats-exec-test
143
+ - vendor/bats/libexec/bats-format-tap-stream
144
+ - vendor/bats/libexec/bats-preprocess
145
+ homepage: https://github.com/test-kitchen/busser-bats
150
146
  licenses:
151
147
  - Apache 2.0
148
+ metadata: {}
152
149
  post_install_message:
153
150
  rdoc_options: []
154
151
  require_paths:
155
152
  - lib
156
153
  required_ruby_version: !ruby/object:Gem::Requirement
157
- none: false
158
154
  requirements:
159
- - - ! '>='
155
+ - - ">="
160
156
  - !ruby/object:Gem::Version
161
157
  version: '0'
162
- segments:
163
- - 0
164
- hash: 419996198291776117
165
158
  required_rubygems_version: !ruby/object:Gem::Requirement
166
- none: false
167
159
  requirements:
168
- - - ! '>='
160
+ - - ">="
169
161
  - !ruby/object:Gem::Version
170
162
  version: '0'
171
- segments:
172
- - 0
173
- hash: 419996198291776117
174
163
  requirements: []
175
164
  rubyforge_project:
176
- rubygems_version: 1.8.24
165
+ rubygems_version: 2.2.2
177
166
  signing_key:
178
- specification_version: 3
167
+ specification_version: 4
179
168
  summary: A Busser runner plugin for Bats
180
169
  test_files:
181
170
  - features/plugin_install_command.feature