rspec_generate_doc 0.2.1 → 0.2.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/rspec_generate_doc/library_hooks/doc.rb +4 -3
- data/lib/rspec_generate_doc/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1eeb27fe96fb602e09813b75e50d3734fbd83731
|
4
|
+
data.tar.gz: 162ac31e8733c03ccf596d30de0f84264055df1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fe16051daf9c996bf4c32cf1ebc55d2ce27ab7a495baa0482afa6876bba0109082bab2a44387499b5e6f7067181ee9fc339eccf02b8d32ecddca20155350b47
|
7
|
+
data.tar.gz: 7ba6abe7de7690f714b1a41e6d93b616a95c5c96453ad0ac24afe4c8def52f1dcd8524d465753437a0473c86e36a328f29f8cea82495d8e8dc6863d21b4c92c0
|
@@ -5,14 +5,16 @@ require 'rspec_generate_doc/decorators/action'
|
|
5
5
|
module RspecGenerateDoc
|
6
6
|
module LibraryHooks
|
7
7
|
module Doc
|
8
|
+
CORRECT_TYPE = :controller
|
9
|
+
|
8
10
|
::RSpec.configure do |config|
|
9
11
|
config.before(:context) do
|
10
12
|
@actions = []
|
11
|
-
@is_correct_type = self.class.metadata[:type]
|
13
|
+
@is_correct_type = self.class.metadata[:type] != CORRECT_TYPE
|
12
14
|
end
|
13
15
|
|
14
16
|
config.after(:each) do
|
15
|
-
next
|
17
|
+
next if @is_incorrect_type || try(:skip_this) || @skip_this
|
16
18
|
name = self.class.description
|
17
19
|
parent = self.class.parent
|
18
20
|
loop do
|
@@ -21,7 +23,6 @@ module RspecGenerateDoc
|
|
21
23
|
parent = parent.parent
|
22
24
|
end
|
23
25
|
|
24
|
-
next if try(:skip_this) || @skip_this
|
25
26
|
api_params = try(:api_params) || @api_params || {}
|
26
27
|
opntions = try(:api_opntions) || @api_opntions || {}
|
27
28
|
new_action = RspecGenerateDoc.configuration.action_decorator
|