cuke-api-docs 0.0.1 → 0.0.2
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.
- checksums.yaml +4 -4
- data/lib/cucumber/formatter/api_docs.rb +13 -7
- data/lib/cuke-api-docs/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8d99295d9e513be8363bfc96888afbdbbd2d359a
|
|
4
|
+
data.tar.gz: 35ace1ff4facbadacc57cab3fed2b46510121ad8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1f3e5b97c786e659b97a2e7d1a3b39efffb80a08c6f56302a89d4b5bf20070ad10d3960d60df6851b1aeeec120e3de77f6758e036e4f486ae740ec4e72806050
|
|
7
|
+
data.tar.gz: 623363075ea0c9769061b73c550c3ba855862c7b91f51b8d342b9a10909ab4a91e65d1454070d1f7a7b3630a0f46a0c14d1e67051cabe42ca14848e7ce1a97b4
|
|
@@ -123,7 +123,7 @@ module Cucumber
|
|
|
123
123
|
@example.code = matches[1]
|
|
124
124
|
elsif matches = step.name.match(/Content-Type is (.*)$/)
|
|
125
125
|
@example.content_type = matches[1]
|
|
126
|
-
elsif matches = step.name.match(/the JSON response at "(.*?)" should include
|
|
126
|
+
elsif matches = step.name.match(/the JSON response at "(.*?)" should include( keys)*:/)
|
|
127
127
|
key = matches[1]
|
|
128
128
|
|
|
129
129
|
if step.multiline_arg.respond_to? :rows
|
|
@@ -171,6 +171,12 @@ module Cucumber
|
|
|
171
171
|
end
|
|
172
172
|
|
|
173
173
|
value = case key_two
|
|
174
|
+
when keys.last
|
|
175
|
+
if current[key_one].is_a?(Hash)
|
|
176
|
+
current[key_one].merge(key_two => terminal_value)
|
|
177
|
+
else
|
|
178
|
+
{key_two => terminal_value}
|
|
179
|
+
end
|
|
174
180
|
when /^\d+$/
|
|
175
181
|
if current[key_one].is_a?(Array)
|
|
176
182
|
current[key_one]
|
|
@@ -178,11 +184,7 @@ module Cucumber
|
|
|
178
184
|
[]
|
|
179
185
|
end
|
|
180
186
|
else
|
|
181
|
-
|
|
182
|
-
current[key_one].merge(key_two => terminal_value)
|
|
183
|
-
else
|
|
184
|
-
{key_two => terminal_value}
|
|
185
|
-
end
|
|
187
|
+
current[key_one] || {}
|
|
186
188
|
end
|
|
187
189
|
|
|
188
190
|
current[key_one] = value
|
|
@@ -256,7 +258,11 @@ module Cucumber
|
|
|
256
258
|
end
|
|
257
259
|
|
|
258
260
|
div class: "panel-body" do
|
|
259
|
-
div
|
|
261
|
+
div do
|
|
262
|
+
endpoint.description.split(/\n/).each do |line|
|
|
263
|
+
div line
|
|
264
|
+
end
|
|
265
|
+
end
|
|
260
266
|
|
|
261
267
|
h3 "Parameters"
|
|
262
268
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cuke-api-docs
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bruz Marzolf
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2015-06-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: arbre
|
|
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
144
144
|
version: '0'
|
|
145
145
|
requirements: []
|
|
146
146
|
rubyforge_project:
|
|
147
|
-
rubygems_version: 2.4.
|
|
147
|
+
rubygems_version: 2.4.6
|
|
148
148
|
signing_key:
|
|
149
149
|
specification_version: 4
|
|
150
150
|
summary: Cucumber formatter that produces HTML API documentation
|