reqres_rspec 0.0.17 → 0.0.18

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6b5dd26a50824b90ccea0113b89523538ab4f7a0
4
- data.tar.gz: b5ea2f0ccc2177745f663e0dccb84c46a85f930b
3
+ metadata.gz: 83cf44dd4f8288fbef887908a138cce36923a3bf
4
+ data.tar.gz: 5aadd68e1fca3c9af61794675e136e0622fe1d7f
5
5
  SHA512:
6
- metadata.gz: 4fa6a1af0c18f9d30dab0c8ecd9e0a82ae4a1a334641054c10ea008655cf51464f2a7de07df241acd86bb0e0408f07eaa7e614f604347810678153cf35c0b6c1
7
- data.tar.gz: 35cc9d584184bc9564213350a56224a0485522db9d5f62771435e98cdcdfad2dd02dfc738618f95fd254300c4c060c8179336e1eaac1bb27da1bce00d826a348
6
+ metadata.gz: 615fbc3c9a72d24fa388dae09e6f1d9cba01675752196db5318ead5a981a0db70ac07b674fe5567301f4767dedbe2e984b5a57b3bd0b702818285e3d9a43252a
7
+ data.tar.gz: f7254d3347f227dd6af8023c084a38667f14e48622b54dc0f46461cd877e276ba60a18c15351a7ddc691b9cfd05d026fd0fb67447d52095c48f68c8d6801bfd7
@@ -60,7 +60,7 @@ module ReqresRspec
60
60
  self.records << {
61
61
  group: section, # Top level example group
62
62
  title: spec.class.example.full_description,
63
- description: spec.class.description,
63
+ description: description,
64
64
  params: params,
65
65
  request_path: get_symbolized_path(request),
66
66
  request: {
@@ -89,7 +89,7 @@ module ReqresRspec
89
89
  self.records.sort!{ |x,y| x[:request_path] <=> y[:request_path] }
90
90
  end
91
91
 
92
- private
92
+ private
93
93
 
94
94
  # read and cleanup response headers
95
95
  # returns Hash
@@ -197,13 +197,16 @@ module ReqresRspec
197
197
  comment_lines = get_action_comments(controller, action)
198
198
 
199
199
  text_params = []
200
- last_new_param_index = nil
201
- comment_lines.each_with_index do |line, index|
200
+ has_param = false
201
+ comment_lines.each do |line|
202
202
  if line.match /\s*#\s*@params/ # @params id required Integer blah blah
203
- last_new_param_index = index
204
- text_params << line.gsub(/\A\s*#\s*@params/, '').strip
205
- elsif last_new_param_index && last_new_param_index == index - 1
206
- text_params.last << " #{line.gsub(/\A\s*#\s*/, '').strip}"
203
+ has_param = true
204
+ text_params << ''
205
+ end
206
+ if has_param
207
+ line = line.gsub(/\A\s*#\s*@params/, '').strip
208
+ line = line.gsub(/\A\s*#\s*/, '').strip
209
+ text_params.last << line
207
210
  end
208
211
  end
209
212
 
@@ -1,3 +1,3 @@
1
1
  module ReqresRspec
2
- VERSION = '0.0.17'
2
+ VERSION = '0.0.18'
3
3
  end
data/lib/reqres_rspec.rb CHANGED
@@ -29,5 +29,5 @@ if defined?(RSpec) && ENV['REQRES_RSPEC'] == '1'
29
29
  end
30
30
  end
31
31
  else
32
- puts "\nNOTICE: ReqresRspec is disabled. run `REQRES_RSPEC=1 bundle exec rspec`\n"
32
+ puts "\nNOTICE: ReqresRspec is disabled. run `REQRES_RSPEC=1 bundle exec rspec --order=defined`\n"
33
33
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reqres_rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17
4
+ version: 0.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - rilian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-20 00:00:00.000000000 Z
11
+ date: 2014-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coderay