rspec-apidoc 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rspec/apidoc.rb +3 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6040f8561d338dbd272beab483b66dc6cece9cb9eb297d1ad2e216bd77472bd
4
- data.tar.gz: b1e345058d1989feb9ed811109e49a63c133687a32674a1d28993be59d1c42d1
3
+ metadata.gz: cf1ff0187b5a8c5f96fb7fb0defbe0db044ba5cfff1935c02d4d6117903921d8
4
+ data.tar.gz: 1148d0d99ad0515247f98553e7fe1e4652f62bc0f363f07016e80e7229993753
5
5
  SHA512:
6
- metadata.gz: 8d1dbb5b800742ef654a8c94f72ab995354dc0b3bc833dfed9c4727c62fb605c8a140f02010f8bd80d22ea0773524642bd6f8768f81032dba6bfd0e7a49afd6b
7
- data.tar.gz: 401f81d86c511f435970dbea258d06ad8fa7f23ecd971fbc2f585ad25f04acbf5a7489ca1f25b3ee0d1ac86717559c5e061fe58de5993562495488eacfa8a578
6
+ metadata.gz: 581a39046185cf4ad93da1d5a42c8cb9f15a088971570d2331d3ff57cfd58a54a55cb658ac8cffdad8207598adfa6c281b684e3171d5b74a6fc5e2148d46d13a
7
+ data.tar.gz: 8000c199ef6ddaf9832183d7e1b11984f018d0f20d0126ed8df809319cdd49a063356e6030440986ebe56f563af5c6c135679f838fa58acaeeee1e117f727198
data/lib/rspec/apidoc.rb CHANGED
@@ -85,15 +85,15 @@ module RSpec
85
85
  action_name = spec.request.controller_instance.action_name
86
86
  action_method = spec.request.controller_instance.method(action_name)
87
87
  # Remove any `@param` or `@return` lines
88
- action_comment = \
89
- action_method.comment.gsub(/^#\s?/, '').strip.gsub(/^@.*$/, '').strip
88
+ action_comment = action_method.comment
89
+ .gsub(/^#(\s+)?$/, "\n").gsub(/^#(\s+)?/, '').gsub(/^@.*$/, '')
90
90
  controller_class = spec.request.controller_class
91
91
  controller_comment = nil
92
92
 
93
93
  if action_method.respond_to?(:class_comment)
94
94
  controller_comment = action_method.class_comment.gsub(
95
95
  /.*frozen_string_literal:.*/, ''
96
- ).strip.gsub(/^#\s?/, '').strip.gsub(/^@.*$/, '')
96
+ ).gsub(/^#(\s+)?$/, "\n").gsub(/^#(\s+)?/, '').gsub(/^@.*$/, '')
97
97
  end
98
98
  else
99
99
  action_comment = nil
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-apidoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stas Suscov