inch 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 59bee612ede489407c91b02db9f32296bddcac2f
4
- data.tar.gz: 855ca0e1f24b9c3014479238454d0a5e4378021b
3
+ metadata.gz: ef6e8adf9c15caf207085b29dfd1645055779b1d
4
+ data.tar.gz: 742b78011452c52a063b5bdfb753704b8cff4a13
5
5
  SHA512:
6
- metadata.gz: 97c6be81a2121af032aa58da92a87df06e1d4e0d9d242d0d8358a38d3499ebe99fa2eb7aa999ca75feb35149eba4a971287bcb04ea74e4729287e225b2b7b4b5
7
- data.tar.gz: 9f18030b6109d9aa63ec09e2393d61d8f492df236ca24fb2445cdacde4e8c4ea2a69062de618a7e75794ca6aed38af1e565a1e85cd019cd8c640c50e06b6b941
6
+ metadata.gz: 06175a21a0890883b2385cb667d2b6e3520508c42bd0e7567e3463be0bca921497d595f87c5ab7cfd64f5eee41edc18c38c4dc98047048715624f32a7711fee1
7
+ data.tar.gz: f8b9a873aa09601d5346aded469c0e11612ad1553e3c646a5d4bc8fe0b19484160517df21f7dbe8e18be44c124df405a385bc5f7e43d89fa0841ae37df6f6846
data/.travis.yml CHANGED
@@ -2,7 +2,7 @@ language: ruby
2
2
  rvm:
3
3
  - 1.9.3
4
4
  - 2.0.0
5
- - 2.1.0
5
+ - 2.1
6
6
  - ruby-head
7
7
  - jruby-head
8
8
  - jruby-19mode
data/CHANGELOG.md CHANGED
@@ -1,15 +1,25 @@
1
1
  # Changelog
2
2
 
3
3
 
4
+ ## 0.4.6
5
+
6
+ - Do not count @yield tag if it is auto-assigned via YARD
7
+
8
+
9
+ ## 0.4.5
10
+
11
+ - Fixes a warning regarding re-initialized constants related to require_relative (thanks @jfelchner)
12
+
13
+
4
14
  ## 0.4.4
5
15
 
6
- - Fixes some bugs introduced in 0.4.3 concerning documentation that is
16
+ - Fixes some bugs introduced in 0.4.3 concerning documentation that is
7
17
  auto-generated by YARD and should not be recognized by Inch
8
18
 
9
19
 
10
20
  ## 0.4.3
11
21
 
12
- - Fixed a bug where the 'show' command did not properly recognize overloaded
22
+ - Fixes a bug where the 'show' command did not properly recognize overloaded
13
23
  method signatures
14
24
 
15
25
 
@@ -18,6 +18,7 @@ module Inch
18
18
 
19
19
  # Tags considered by wrapper methods like {#has_code_example?}
20
20
  CONSIDERED_YARD_TAGS = %w(api example param private return since)
21
+ AUTO_GENERATED_TAG_NAMES = %w(raise yield)
21
22
 
22
23
  # convenient shortcuts to (YARD) code object
23
24
  def_delegators :object, :type, :namespace, :source, :source_type, :group, :dynamic, :visibility
@@ -266,7 +267,7 @@ module Inch
266
267
  # YARD tags that are not already covered by other wrapper methods
267
268
  def unconsidered_tags
268
269
  @unconsidered_tags ||= tags.reject do |tag|
269
- (tag.tag_name == "raise" && tag.text.empty?) ||
270
+ auto_generated_tag?(tag) ||
270
271
  CONSIDERED_YARD_TAGS.include?(tag.tag_name)
271
272
  end
272
273
  end
@@ -289,6 +290,10 @@ module Inch
289
290
  tag(:private) || (parent && parent.private_tag)
290
291
  end
291
292
 
293
+ def auto_generated_tag?(tag)
294
+ tag.text.to_s.empty? &&
295
+ AUTO_GENERATED_TAG_NAMES.include?(tag.tag_name)
296
+ end
292
297
  end
293
298
  end
294
299
  end
data/lib/inch/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Inch
2
- VERSION = "0.4.5"
2
+ VERSION = "0.4.6"
3
3
  end
@@ -28,6 +28,10 @@ module InchTest
28
28
  def block_method(&block)
29
29
  end
30
30
 
31
+ def yielding_method
32
+ yield true if block_given?
33
+ end
34
+
31
35
  def question_mark_method?
32
36
  if true
33
37
  bang_method!
@@ -24,6 +24,12 @@ describe ::Inch::CodeObject::Proxy::MethodObject do
24
24
  assert m.undocumented?
25
25
  end
26
26
 
27
+ def test_yielding_method
28
+ m = @objects.find("InchTest#yielding_method")
29
+ assert_equal 0, m.score
30
+ assert m.undocumented?
31
+ end
32
+
27
33
  def test_tagged_as_private
28
34
  %w( InchTest#method_with_private_tag
29
35
  InchTest#private_method_with_tomdoc).each do |fullname|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - René Föhring
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-02 00:00:00.000000000 Z
11
+ date: 2014-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler