reqres_rspec 0.0.18 → 0.0.19

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: 83cf44dd4f8288fbef887908a138cce36923a3bf
4
- data.tar.gz: 5aadd68e1fca3c9af61794675e136e0622fe1d7f
3
+ metadata.gz: 7ae933f710a7d0f2d94ede0720c9a23cdfc03fc8
4
+ data.tar.gz: 5642b23a4cdb3b15dfb684a56efd01b93f9c1e73
5
5
  SHA512:
6
- metadata.gz: 615fbc3c9a72d24fa388dae09e6f1d9cba01675752196db5318ead5a981a0db70ac07b674fe5567301f4767dedbe2e984b5a57b3bd0b702818285e3d9a43252a
7
- data.tar.gz: f7254d3347f227dd6af8023c084a38667f14e48622b54dc0f46461cd877e276ba60a18c15351a7ddc691b9cfd05d026fd0fb67447d52095c48f68c8d6801bfd7
6
+ metadata.gz: dc223b883e456fcb6d1a195df35920b8003f00517c0934d37c12553c6880c16a755b61868e2b5d3b28e312ce3a6321098091bd620023c14ead2f5cd62a314ec2
7
+ data.tar.gz: b30f31e8fc315f6b96cf335a731c5ee096629d3c9ac315dd25d75338a5377b9b7374f2956c6ac8f5bf2e503bb1eab8cd3570c57c4e71bd3fd37a80fe7300b762
data/README.md CHANGED
@@ -42,8 +42,8 @@ Documentation will be put into your application's `/doc` folder
42
42
  ```ruby
43
43
  # @description creates Category from given parameters
44
44
  # description text may be multiline
45
- # @params category[title] required String Category title
46
- # @params category[weight] in which order Category will be shown
45
+ # @param category[title] required String Category title
46
+ # @param category[weight] in which order Category will be shown
47
47
  # param text may also be multiline
48
48
  def create
49
49
  category = Category.new(create_category_params)
@@ -57,7 +57,7 @@ Documentation will be put into your application's `/doc` folder
57
57
  ```
58
58
 
59
59
  Description param text is started with `@description` and may be multiline.
60
- Each param text is started with `@params` and first word will be param name, then optionally `required`, then optionally type (`Integer`, `String` etc), and finally param description, which may be multiline as well.
60
+ Each param text is started with `@param` and first word will be param name, then optionally `required`, then optionally type (`Integer`, `String` etc), and finally param description, which may be multiline as well.
61
61
 
62
62
  ### Sample rspec test
63
63
 
@@ -16,7 +16,9 @@ module ReqresRspec
16
16
  # everything that match items from this list will be stripped
17
17
  EXCLUDE_REQUEST_HEADER_PATTERNS = %w[
18
18
  rack.
19
+ ROUTES_
19
20
  action_dispatch
21
+ action_controller.
20
22
  REQUEST_METHOD
21
23
  SERVER_NAME
22
24
  SERVER_PORT
@@ -28,6 +30,10 @@ module ReqresRspec
28
30
  HTTP_USER_AGENT
29
31
  REMOTE_ADDR
30
32
  PATH_INFO
33
+ ORIGINAL_FULLPATH
34
+ ORIGINAL_SCRIPT_NAME
35
+ HTTP_COOKIE
36
+ HTTP_ORIGIN
31
37
  ]
32
38
 
33
39
  def initialize
@@ -179,7 +185,7 @@ module ReqresRspec
179
185
  if line.match /\s*#\s*@description/ # @description blah blah
180
186
  description << line.gsub(/\A\s*#\s*@description/, '').strip
181
187
  comment_lines[(index + 1)..-1].each do |multiline|
182
- if !multiline.match /\s*#\s*@params/
188
+ if !multiline.match /\s*#\s*@param/
183
189
  description << multiline.gsub(/\A\s*#\s*/, '').strip
184
190
  else
185
191
  break
@@ -199,12 +205,12 @@ module ReqresRspec
199
205
  text_params = []
200
206
  has_param = false
201
207
  comment_lines.each do |line|
202
- if line.match /\s*#\s*@params/ # @params id required Integer blah blah
208
+ if line.match /\s*#\s*@param/ # @param id required Integer blah blah
203
209
  has_param = true
204
210
  text_params << ''
205
211
  end
206
212
  if has_param
207
- line = line.gsub(/\A\s*#\s*@params/, '').strip
213
+ line = line.gsub(/\A\s*#\s*@param/, '').strip
208
214
  line = line.gsub(/\A\s*#\s*/, '').strip
209
215
  text_params.last << line
210
216
  end
@@ -1,3 +1,3 @@
1
1
  module ReqresRspec
2
- VERSION = '0.0.18'
2
+ VERSION = '0.0.19'
3
3
  end
@@ -97,7 +97,7 @@
97
97
  <li>
98
98
  <a href="rspec_doc_<%= (@records.index(record) + 1).to_s.rjust(5, '0') %>.html" target="specs">
99
99
  <span class="method <%= record[:request][:method].downcase %>"><%= record[:request][:method] %></span>
100
- <%= record[:description] %><br />
100
+ <%= record[:title] %><br />
101
101
  </a>
102
102
  </li>
103
103
  <% end %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reqres_rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.18
4
+ version: 0.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - rilian