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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 393480d782a4377bff2f3bc136dd42f15f53b58f
4
- data.tar.gz: b24eaefca193b234de042c71ba1eea7078dbfd65
3
+ metadata.gz: 1eeb27fe96fb602e09813b75e50d3734fbd83731
4
+ data.tar.gz: 162ac31e8733c03ccf596d30de0f84264055df1b
5
5
  SHA512:
6
- metadata.gz: c5742b4ae980d70133fec01db870867c0cd414b2d0a4f7c45262b8b59f51251f9b2d21e43d62b86baae31716108380077be42642698600c67b4a1f40254e1477
7
- data.tar.gz: 3e54b73e6ad0ccf4239732cdc692fb03d83f3a3aaa97eae900c1d77bcdd37ee77ac20346e7f3331a8d0cc3d5d95ebda2dff130d727fb8a2cc2f91105b846ecb1
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] == :controller
13
+ @is_correct_type = self.class.metadata[:type] != CORRECT_TYPE
12
14
  end
13
15
 
14
16
  config.after(:each) do
15
- next unless @is_correct_type
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
@@ -1,3 +1,3 @@
1
1
  module RspecGenerateDoc
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec_generate_doc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Kutyavin