inch 0.2.3 → 0.3.0.rc1
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/.simplecov +7 -0
- data/TODOS.md +0 -5
- data/config/defaults.rb +26 -1
- data/inch.gemspec +1 -0
- data/lib/inch.rb +2 -1
- data/lib/inch/api.rb +34 -0
- data/lib/inch/api/filter.rb +17 -0
- data/lib/inch/api/get.rb +30 -0
- data/lib/inch/api/list.rb +10 -0
- data/lib/inch/api/options/base.rb +45 -0
- data/lib/inch/api/options/filter.rb +25 -0
- data/lib/inch/api/options/suggest.rb +36 -0
- data/lib/inch/api/stats.rb +7 -0
- data/lib/inch/api/suggest.rb +110 -0
- data/lib/inch/cli.rb +4 -1
- data/lib/inch/cli/command/base.rb +1 -17
- data/lib/inch/cli/command/base_list.rb +3 -63
- data/lib/inch/cli/command/base_object.rb +6 -28
- data/lib/inch/cli/command/list.rb +3 -2
- data/lib/inch/cli/command/options/base.rb +1 -1
- data/lib/inch/cli/command/options/base_list.rb +4 -2
- data/lib/inch/cli/command/options/suggest.rb +9 -8
- data/lib/inch/cli/command/output/base.rb +9 -11
- data/lib/inch/cli/command/output/list.rb +2 -2
- data/lib/inch/cli/command/output/show.rb +2 -10
- data/lib/inch/cli/command/output/stats.rb +4 -3
- data/lib/inch/cli/command/output/suggest.rb +5 -5
- data/lib/inch/cli/command/stats.rb +4 -3
- data/lib/inch/cli/command/suggest.rb +4 -94
- data/lib/inch/code_object.rb +2 -2
- data/lib/inch/code_object/converter.rb +89 -0
- data/lib/inch/code_object/provider.rb +36 -0
- data/lib/inch/code_object/provider/yard.rb +19 -0
- data/lib/inch/code_object/provider/yard/docstring.rb +106 -0
- data/lib/inch/code_object/provider/yard/nodoc_helper.rb +93 -0
- data/lib/inch/code_object/provider/yard/object.rb +55 -0
- data/lib/inch/code_object/provider/yard/object/base.rb +262 -0
- data/lib/inch/code_object/provider/yard/object/class_object.rb +12 -0
- data/lib/inch/code_object/provider/yard/object/constant_object.rb +12 -0
- data/lib/inch/code_object/provider/yard/object/method_object.rb +126 -0
- data/lib/inch/code_object/provider/yard/object/method_parameter_object.rb +88 -0
- data/lib/inch/code_object/provider/yard/object/module_object.rb +12 -0
- data/lib/inch/code_object/provider/yard/object/namespace_object.rb +47 -0
- data/lib/inch/code_object/provider/yard/parser.rb +54 -0
- data/lib/inch/code_object/proxy.rb +5 -3
- data/lib/inch/code_object/proxy/base.rb +103 -110
- data/lib/inch/code_object/proxy/class_object.rb +0 -1
- data/lib/inch/code_object/proxy/method_object.rb +20 -99
- data/lib/inch/code_object/proxy/method_parameter_object.rb +15 -39
- data/lib/inch/code_object/proxy/namespace_object.rb +7 -18
- data/lib/inch/codebase.rb +19 -0
- data/lib/inch/codebase/objects.rb +73 -0
- data/lib/inch/codebase/objects_filter.rb +61 -0
- data/lib/inch/codebase/proxy.rb +22 -0
- data/lib/inch/config.rb +8 -1
- data/lib/inch/evaluation.rb +5 -7
- data/lib/inch/evaluation/file.rb +1 -1
- data/lib/inch/evaluation/grade.rb +1 -1
- data/lib/inch/evaluation/object_schema.rb +3 -1
- data/lib/inch/evaluation/priority_range.rb +44 -0
- data/lib/inch/evaluation/proxy.rb +25 -0
- data/lib/inch/evaluation/proxy/base.rb +146 -0
- data/lib/inch/evaluation/proxy/class_object.rb +8 -0
- data/lib/inch/evaluation/proxy/constant_object.rb +19 -0
- data/lib/inch/evaluation/proxy/method_object.rb +65 -0
- data/lib/inch/evaluation/proxy/module_object.rb +8 -0
- data/lib/inch/evaluation/proxy/namespace_object.rb +27 -0
- data/lib/inch/evaluation/role/base.rb +19 -0
- data/lib/inch/evaluation/role/constant.rb +16 -0
- data/lib/inch/evaluation/role/method.rb +22 -0
- data/lib/inch/evaluation/role/method_parameter.rb +31 -1
- data/lib/inch/evaluation/role/namespace.rb +15 -0
- data/lib/inch/evaluation/role/object.rb +24 -0
- data/lib/inch/rake/suggest.rb +1 -0
- data/lib/inch/utils/read_write_methods.rb +44 -0
- data/lib/inch/{cli → utils}/weighted_list.rb +1 -1
- data/lib/inch/version.rb +1 -1
- data/test/fixtures/simple/lib/broken.rb +8 -0
- data/test/inch/api/filter_test.rb +51 -0
- data/test/inch/api/get_test.rb +22 -0
- data/test/inch/api/list_test.rb +15 -0
- data/test/inch/api/options/base_test.rb +30 -0
- data/test/inch/api/stats_test.rb +15 -0
- data/test/inch/api/suggest_test.rb +26 -0
- data/test/inch/cli/command/list_test.rb +2 -1
- data/test/inch/code_object/converter_test.rb +29 -0
- data/test/inch/code_object/{docstring_test.rb → provider/yard/docstring_test.rb} +13 -13
- data/test/inch/code_object/{nodoc_helper_test.rb → provider/yard/nodoc_helper_test.rb} +6 -6
- data/test/inch/code_object/provider/yard_test.rb +11 -0
- data/test/inch/code_object/provider_test.rb +9 -0
- data/test/inch/code_object/proxy/method_object_test.rb +22 -22
- data/test/inch/code_object/proxy_test.rb +10 -10
- data/test/inch/codebase/objects_test.rb +28 -0
- data/test/inch/codebase/proxy_test.rb +17 -0
- data/test/inch/evaluation/role/base_test.rb +71 -0
- data/test/inch/{cli → utils}/weighted_list_test.rb +2 -2
- data/test/shared/base_list.rb +73 -0
- data/test/test_helper.rb +0 -95
- metadata +89 -24
- data/lib/inch/code_object/docstring.rb +0 -102
- data/lib/inch/code_object/nodoc_helper.rb +0 -107
- data/lib/inch/evaluation/base.rb +0 -157
- data/lib/inch/evaluation/class_object.rb +0 -6
- data/lib/inch/evaluation/constant_object.rb +0 -33
- data/lib/inch/evaluation/method_object.rb +0 -105
- data/lib/inch/evaluation/module_object.rb +0 -6
- data/lib/inch/evaluation/namespace_object.rb +0 -52
- data/lib/inch/evaluation/read_write_methods.rb +0 -21
- data/lib/inch/source_parser.rb +0 -62
- data/test/inch/source_parser_test.rb +0 -23
@@ -2,48 +2,48 @@ require File.expand_path(File.dirname(__FILE__) + '/../../test_helper')
|
|
2
2
|
|
3
3
|
describe ::Inch::CodeObject::Proxy::Base do
|
4
4
|
before do
|
5
|
-
|
6
|
-
@
|
5
|
+
dir = fixture_path(:code_examples)
|
6
|
+
@codebase = Inch::Codebase.parse(dir, ["lib/**/*.rb"])
|
7
7
|
end
|
8
8
|
|
9
9
|
def test_inspect_gives_original_name
|
10
|
-
m = @
|
10
|
+
m = @codebase.objects.find("Foo::Bar#method_with_code_example")
|
11
11
|
assert_match /Foo::Bar#method_with_code_example/, m.inspect
|
12
12
|
end
|
13
13
|
|
14
14
|
def test_grade_is_not_nil
|
15
|
-
m = @
|
15
|
+
m = @codebase.objects.find("Foo::Bar#method_with_code_example")
|
16
16
|
assert m.grade
|
17
17
|
end
|
18
18
|
|
19
19
|
def test_method_with_code_example
|
20
|
-
m = @
|
20
|
+
m = @codebase.objects.find("Foo::Bar#method_with_code_example")
|
21
21
|
assert m.has_code_example?
|
22
22
|
end
|
23
23
|
|
24
24
|
def test_method_with_code_example2
|
25
|
-
m = @
|
25
|
+
m = @codebase.objects.find("Foo::Bar#method_with_code_example2")
|
26
26
|
assert m.has_code_example?
|
27
27
|
end
|
28
28
|
|
29
29
|
def test_method_with_code_examples
|
30
|
-
m = @
|
30
|
+
m = @codebase.objects.find("Foo::Bar#method_with_one_example")
|
31
31
|
assert m.has_code_example?
|
32
32
|
refute m.has_multiple_code_examples?
|
33
33
|
end
|
34
34
|
|
35
35
|
def test_method_with_code_examples
|
36
|
-
m = @
|
36
|
+
m = @codebase.objects.find("Foo::Bar#method_with_examples")
|
37
37
|
assert m.has_multiple_code_examples?
|
38
38
|
end
|
39
39
|
|
40
40
|
def test_method_with_code_examples
|
41
|
-
m = @
|
41
|
+
m = @codebase.objects.find("Foo::Bar#method_with_tagged_example")
|
42
42
|
assert m.has_multiple_code_examples?
|
43
43
|
end
|
44
44
|
|
45
45
|
def test_method_with_code_examples
|
46
|
-
m = @
|
46
|
+
m = @codebase.objects.find("Foo::Bar#method_with_2tagged_examples")
|
47
47
|
assert m.has_multiple_code_examples?
|
48
48
|
end
|
49
49
|
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../../test_helper')
|
2
|
+
|
3
|
+
describe ::Inch::Codebase::Objects do
|
4
|
+
before do
|
5
|
+
dir = fixture_path(:simple)
|
6
|
+
paths = ["lib/**/*.rb"]
|
7
|
+
@codebase = Inch::Codebase::Proxy.new dir, paths
|
8
|
+
@objects = @codebase.objects
|
9
|
+
end
|
10
|
+
|
11
|
+
it "should parse all objects" do
|
12
|
+
refute @objects.empty?
|
13
|
+
end
|
14
|
+
|
15
|
+
it "should find some objects" do
|
16
|
+
refute_nil @objects.find("Foo")
|
17
|
+
refute_nil @objects.find("Foo::Bar")
|
18
|
+
refute_nil @objects.find("Foo::Bar#method_without_doc")
|
19
|
+
end
|
20
|
+
|
21
|
+
it "should support iteration" do
|
22
|
+
sum = 0
|
23
|
+
@objects.each do |o|
|
24
|
+
sum += 1
|
25
|
+
end
|
26
|
+
assert_equal @objects.size, sum
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../../test_helper')
|
2
|
+
|
3
|
+
describe ::Inch::Codebase::Proxy do
|
4
|
+
it "should parse all objects" do
|
5
|
+
dir = fixture_path(:simple)
|
6
|
+
paths = ["lib/**/*.rb"]
|
7
|
+
@codebase = Inch::Codebase::Proxy.new dir, paths
|
8
|
+
refute_nil @codebase.objects
|
9
|
+
end
|
10
|
+
|
11
|
+
it "should parse all objects" do
|
12
|
+
dir = fixture_path(:simple)
|
13
|
+
paths = ["app/**/*.rb"]
|
14
|
+
@codebase = Inch::Codebase::Proxy.new dir, paths
|
15
|
+
assert @codebase.objects.empty?
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../../../test_helper')
|
2
|
+
|
3
|
+
class MockPrivateRole < ::Inch::Evaluation::Role::Base
|
4
|
+
applicable_if :private?
|
5
|
+
end
|
6
|
+
|
7
|
+
class MockNotPrivateRole < ::Inch::Evaluation::Role::Base
|
8
|
+
applicable_unless :private?
|
9
|
+
end
|
10
|
+
|
11
|
+
class MockPublicRole < ::Inch::Evaluation::Role::Base
|
12
|
+
applicable_if { |o| o.public? }
|
13
|
+
end
|
14
|
+
|
15
|
+
class MockIndifferentRole < ::Inch::Evaluation::Role::Base
|
16
|
+
def self.applicable?(object)
|
17
|
+
true
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
class MockPrivateObject
|
22
|
+
def private?
|
23
|
+
true
|
24
|
+
end
|
25
|
+
|
26
|
+
def public?
|
27
|
+
false
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
class MockPublicObject
|
32
|
+
def private?
|
33
|
+
false
|
34
|
+
end
|
35
|
+
|
36
|
+
def public?
|
37
|
+
true
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe ::Inch::Evaluation::Role::Base do
|
42
|
+
describe ".applicable" do
|
43
|
+
let(:private_object) { MockPrivateObject.new }
|
44
|
+
let(:public_object) { MockPublicObject.new }
|
45
|
+
|
46
|
+
describe ".applicable_if" do
|
47
|
+
it "should work with a symbol" do
|
48
|
+
assert MockPrivateRole.applicable?(private_object)
|
49
|
+
assert !MockPrivateRole.applicable?(public_object)
|
50
|
+
end
|
51
|
+
|
52
|
+
it "should work with a block" do
|
53
|
+
assert MockPublicRole.applicable?(public_object)
|
54
|
+
assert MockNotPrivateRole.applicable?(public_object)
|
55
|
+
assert !MockPublicRole.applicable?(private_object)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
describe ".applicable_unless" do
|
60
|
+
it "should work with a block" do
|
61
|
+
assert MockNotPrivateRole.applicable?(public_object)
|
62
|
+
assert !MockNotPrivateRole.applicable?(private_object)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
it "should work by implementing a class method" do
|
67
|
+
assert MockIndifferentRole.applicable?(private_object)
|
68
|
+
assert MockIndifferentRole.applicable?(public_object)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + '/../../test_helper')
|
2
2
|
|
3
|
-
describe ::Inch::
|
3
|
+
describe ::Inch::Utils::WeightedList do
|
4
4
|
before do
|
5
5
|
@counts = [4, 8, 8]
|
6
6
|
end
|
7
7
|
|
8
8
|
def assert_weighted_list(list, counts, expected)
|
9
|
-
weighted_list = ::Inch::
|
9
|
+
weighted_list = ::Inch::Utils::WeightedList.new(list, counts)
|
10
10
|
# assert_equal expected.map(&:size).inject(:+), weighted_list.to_a.map(&:size).inject(:+)
|
11
11
|
assert_equal expected, weighted_list.to_a, "should be #{expected.map(&:size)}, was #{weighted_list.to_a.map(&:size)}"
|
12
12
|
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
module Shared
|
2
|
+
module BaseList
|
3
|
+
extend Minitest::Spec::DSL
|
4
|
+
|
5
|
+
it "should give error when run with --unknown-switch" do
|
6
|
+
out, err = capture_io do
|
7
|
+
assert_raises(SystemExit) { @command.run("lib/foo.rb", "--unknown-switch") }
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
it "should run with --depth switch" do
|
12
|
+
out, err = capture_io do
|
13
|
+
@command.run("lib/foo.rb", "--depth=2")
|
14
|
+
end
|
15
|
+
refute out.empty?, "there should be some output"
|
16
|
+
assert err.empty?, "there should be no errors"
|
17
|
+
assert_match /\bFoo\b/, out
|
18
|
+
assert_match /\bFoo::Bar\b/, out
|
19
|
+
refute_match /\bFoo::Bar#method_with_full_doc\b/, out
|
20
|
+
refute_match /\bFoo::Bar#method_with_code_example\b/, out
|
21
|
+
end
|
22
|
+
|
23
|
+
it "should run with --only-namespaces switch" do
|
24
|
+
out, err = capture_io do
|
25
|
+
@command.run("lib/foo.rb", "--only-namespaces")
|
26
|
+
end
|
27
|
+
refute out.empty?, "there should be some output"
|
28
|
+
assert err.empty?, "there should be no errors"
|
29
|
+
assert_match /\bFoo\s/, out
|
30
|
+
assert_match /\bFoo::Bar\s/, out
|
31
|
+
refute_match /\bFoo::Bar\./, out
|
32
|
+
refute_match /\bFoo::Bar#/, out
|
33
|
+
end
|
34
|
+
|
35
|
+
it "should run with --no-namespaces switch" do
|
36
|
+
out, err = capture_io do
|
37
|
+
@command.run("lib/foo.rb", "--no-namespaces")
|
38
|
+
end
|
39
|
+
refute out.empty?, "there should be some output"
|
40
|
+
assert err.empty?, "there should be no errors"
|
41
|
+
refute_match /\bFoo\s/, out
|
42
|
+
refute_match /\bFoo::Bar\s/, out
|
43
|
+
assert_match /\bFoo::Bar#/, out
|
44
|
+
end
|
45
|
+
|
46
|
+
|
47
|
+
it "should run with --only-undocumented switch" do
|
48
|
+
skip
|
49
|
+
out, err = capture_io do
|
50
|
+
@command.run("lib/foo.rb", "--all", "--only-undocumented")
|
51
|
+
end
|
52
|
+
refute out.empty?, "there should be some output"
|
53
|
+
assert err.empty?, "there should be no errors"
|
54
|
+
refute_match /\bFoo\s/, out
|
55
|
+
refute_match /\bFoo::Bar#method_with_full_doc\b/, out
|
56
|
+
assert_match /\bFoo::Bar\s/, out
|
57
|
+
assert_match /\bFoo::Bar#method_without_doc\b/, out
|
58
|
+
end
|
59
|
+
|
60
|
+
it "should run with --no-undocumented switch" do
|
61
|
+
skip
|
62
|
+
out, err = capture_io do
|
63
|
+
@command.run("lib/foo.rb", "--all", "--no-undocumented")
|
64
|
+
end
|
65
|
+
refute out.empty?, "there should be some output"
|
66
|
+
assert err.empty?, "there should be no errors"
|
67
|
+
assert_match /\bFoo\s/, out
|
68
|
+
assert_match /\bFoo::Bar#method_with_full_doc\b/, out
|
69
|
+
refute_match /\bFoo::Bar\s/, out
|
70
|
+
refute_match /\bFoo::Bar#method_without_doc\b/, out
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
data/test/test_helper.rb
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
require 'simplecov'
|
2
|
-
SimpleCov.start do
|
3
|
-
add_filter '/test/'
|
4
|
-
|
5
|
-
add_group 'CLI', 'lib/inch/cli'
|
6
|
-
add_group 'Code Objects', 'lib/inch/code_object'
|
7
|
-
add_group 'Evaluation', 'lib/inch/evaluation'
|
8
|
-
end
|
9
2
|
|
10
3
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
11
4
|
|
12
|
-
require 'minitest/spec'
|
13
5
|
require 'minitest/autorun'
|
14
6
|
require 'bundler'
|
15
7
|
Bundler.require
|
@@ -18,90 +10,3 @@ require 'inch'
|
|
18
10
|
def fixture_path(name)
|
19
11
|
File.join(File.dirname(__FILE__), "fixtures", name.to_s)
|
20
12
|
end
|
21
|
-
|
22
|
-
def in_fixture_path(name, &block)
|
23
|
-
old_dir = Dir.pwd
|
24
|
-
Dir.chdir fixture_path(name)
|
25
|
-
yield
|
26
|
-
Dir.chdir old_dir
|
27
|
-
end
|
28
|
-
|
29
|
-
|
30
|
-
module BaseListTests
|
31
|
-
def self.included(other)
|
32
|
-
other.instance_eval do
|
33
|
-
# these tests are added when BaseListTests is included inside a
|
34
|
-
# `describe` block
|
35
|
-
|
36
|
-
it "should give error when run with --unknown-switch" do
|
37
|
-
out, err = capture_io do
|
38
|
-
assert_raises(SystemExit) { @command.run("lib/foo.rb", "--unknown-switch") }
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
it "should run with --depth switch" do
|
43
|
-
out, err = capture_io do
|
44
|
-
@command.run("lib/foo.rb", "--depth=2")
|
45
|
-
end
|
46
|
-
refute out.empty?, "there should be some output"
|
47
|
-
assert err.empty?, "there should be no errors"
|
48
|
-
assert_match /\bFoo\b/, out
|
49
|
-
assert_match /\bFoo::Bar\b/, out
|
50
|
-
refute_match /\bFoo::Bar#method_with_full_doc\b/, out
|
51
|
-
refute_match /\bFoo::Bar#method_with_code_example\b/, out
|
52
|
-
end
|
53
|
-
|
54
|
-
it "should run with --only-namespaces switch" do
|
55
|
-
out, err = capture_io do
|
56
|
-
@command.run("lib/foo.rb", "--only-namespaces")
|
57
|
-
end
|
58
|
-
refute out.empty?, "there should be some output"
|
59
|
-
assert err.empty?, "there should be no errors"
|
60
|
-
assert_match /\bFoo\s/, out
|
61
|
-
assert_match /\bFoo::Bar\s/, out
|
62
|
-
refute_match /\bFoo::Bar\./, out
|
63
|
-
refute_match /\bFoo::Bar#/, out
|
64
|
-
end
|
65
|
-
|
66
|
-
it "should run with --no-namespaces switch" do
|
67
|
-
out, err = capture_io do
|
68
|
-
@command.run("lib/foo.rb", "--no-namespaces")
|
69
|
-
end
|
70
|
-
refute out.empty?, "there should be some output"
|
71
|
-
assert err.empty?, "there should be no errors"
|
72
|
-
refute_match /\bFoo\s/, out
|
73
|
-
refute_match /\bFoo::Bar\s/, out
|
74
|
-
assert_match /\bFoo::Bar#/, out
|
75
|
-
end
|
76
|
-
|
77
|
-
|
78
|
-
it "should run with --only-undocumented switch" do
|
79
|
-
skip
|
80
|
-
out, err = capture_io do
|
81
|
-
@command.run("lib/foo.rb", "--all", "--only-undocumented")
|
82
|
-
end
|
83
|
-
refute out.empty?, "there should be some output"
|
84
|
-
assert err.empty?, "there should be no errors"
|
85
|
-
refute_match /\bFoo\s/, out
|
86
|
-
refute_match /\bFoo::Bar#method_with_full_doc\b/, out
|
87
|
-
assert_match /\bFoo::Bar\s/, out
|
88
|
-
assert_match /\bFoo::Bar#method_without_doc\b/, out
|
89
|
-
end
|
90
|
-
|
91
|
-
it "should run with --no-undocumented switch" do
|
92
|
-
skip
|
93
|
-
out, err = capture_io do
|
94
|
-
@command.run("lib/foo.rb", "--all", "--no-undocumented")
|
95
|
-
end
|
96
|
-
refute out.empty?, "there should be some output"
|
97
|
-
assert err.empty?, "there should be no errors"
|
98
|
-
assert_match /\bFoo\s/, out
|
99
|
-
assert_match /\bFoo::Bar#method_with_full_doc\b/, out
|
100
|
-
refute_match /\bFoo::Bar\s/, out
|
101
|
-
refute_match /\bFoo::Bar#method_without_doc\b/, out
|
102
|
-
end
|
103
|
-
|
104
|
-
|
105
|
-
end
|
106
|
-
end
|
107
|
-
end
|
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
|
+
version: 0.3.0.rc1
|
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-02-
|
11
|
+
date: 2014-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: minitest
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '5.2'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '5.2'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: sparkr
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -105,6 +119,7 @@ files:
|
|
105
119
|
- .gitignore
|
106
120
|
- .ruby-gemset
|
107
121
|
- .ruby-version
|
122
|
+
- .simplecov
|
108
123
|
- .travis.yml
|
109
124
|
- Gemfile
|
110
125
|
- LICENSE
|
@@ -115,6 +130,15 @@ files:
|
|
115
130
|
- config/defaults.rb
|
116
131
|
- inch.gemspec
|
117
132
|
- lib/inch.rb
|
133
|
+
- lib/inch/api.rb
|
134
|
+
- lib/inch/api/filter.rb
|
135
|
+
- lib/inch/api/get.rb
|
136
|
+
- lib/inch/api/list.rb
|
137
|
+
- lib/inch/api/options/base.rb
|
138
|
+
- lib/inch/api/options/filter.rb
|
139
|
+
- lib/inch/api/options/suggest.rb
|
140
|
+
- lib/inch/api/stats.rb
|
141
|
+
- lib/inch/api/suggest.rb
|
118
142
|
- lib/inch/cli.rb
|
119
143
|
- lib/inch/cli/arguments.rb
|
120
144
|
- lib/inch/cli/command.rb
|
@@ -140,11 +164,22 @@ files:
|
|
140
164
|
- lib/inch/cli/command_parser.rb
|
141
165
|
- lib/inch/cli/sparkline_helper.rb
|
142
166
|
- lib/inch/cli/trace_helper.rb
|
143
|
-
- lib/inch/cli/weighted_list.rb
|
144
167
|
- lib/inch/cli/yardopts_helper.rb
|
145
168
|
- lib/inch/code_object.rb
|
146
|
-
- lib/inch/code_object/
|
147
|
-
- lib/inch/code_object/
|
169
|
+
- lib/inch/code_object/converter.rb
|
170
|
+
- lib/inch/code_object/provider.rb
|
171
|
+
- lib/inch/code_object/provider/yard.rb
|
172
|
+
- lib/inch/code_object/provider/yard/docstring.rb
|
173
|
+
- lib/inch/code_object/provider/yard/nodoc_helper.rb
|
174
|
+
- lib/inch/code_object/provider/yard/object.rb
|
175
|
+
- lib/inch/code_object/provider/yard/object/base.rb
|
176
|
+
- lib/inch/code_object/provider/yard/object/class_object.rb
|
177
|
+
- lib/inch/code_object/provider/yard/object/constant_object.rb
|
178
|
+
- lib/inch/code_object/provider/yard/object/method_object.rb
|
179
|
+
- lib/inch/code_object/provider/yard/object/method_parameter_object.rb
|
180
|
+
- lib/inch/code_object/provider/yard/object/module_object.rb
|
181
|
+
- lib/inch/code_object/provider/yard/object/namespace_object.rb
|
182
|
+
- lib/inch/code_object/provider/yard/parser.rb
|
148
183
|
- lib/inch/code_object/proxy.rb
|
149
184
|
- lib/inch/code_object/proxy/base.rb
|
150
185
|
- lib/inch/code_object/proxy/class_object.rb
|
@@ -153,22 +188,27 @@ files:
|
|
153
188
|
- lib/inch/code_object/proxy/method_parameter_object.rb
|
154
189
|
- lib/inch/code_object/proxy/module_object.rb
|
155
190
|
- lib/inch/code_object/proxy/namespace_object.rb
|
191
|
+
- lib/inch/codebase.rb
|
192
|
+
- lib/inch/codebase/objects.rb
|
193
|
+
- lib/inch/codebase/objects_filter.rb
|
194
|
+
- lib/inch/codebase/proxy.rb
|
156
195
|
- lib/inch/config.rb
|
157
196
|
- lib/inch/core_ext.rb
|
158
197
|
- lib/inch/core_ext/string.rb
|
159
198
|
- lib/inch/core_ext/yard.rb
|
160
199
|
- lib/inch/evaluation.rb
|
161
|
-
- lib/inch/evaluation/base.rb
|
162
|
-
- lib/inch/evaluation/class_object.rb
|
163
|
-
- lib/inch/evaluation/constant_object.rb
|
164
200
|
- lib/inch/evaluation/file.rb
|
165
201
|
- lib/inch/evaluation/grade.rb
|
166
202
|
- lib/inch/evaluation/grade_list.rb
|
167
|
-
- lib/inch/evaluation/method_object.rb
|
168
|
-
- lib/inch/evaluation/module_object.rb
|
169
|
-
- lib/inch/evaluation/namespace_object.rb
|
170
203
|
- lib/inch/evaluation/object_schema.rb
|
171
|
-
- lib/inch/evaluation/
|
204
|
+
- lib/inch/evaluation/priority_range.rb
|
205
|
+
- lib/inch/evaluation/proxy.rb
|
206
|
+
- lib/inch/evaluation/proxy/base.rb
|
207
|
+
- lib/inch/evaluation/proxy/class_object.rb
|
208
|
+
- lib/inch/evaluation/proxy/constant_object.rb
|
209
|
+
- lib/inch/evaluation/proxy/method_object.rb
|
210
|
+
- lib/inch/evaluation/proxy/module_object.rb
|
211
|
+
- lib/inch/evaluation/proxy/namespace_object.rb
|
172
212
|
- lib/inch/evaluation/role/base.rb
|
173
213
|
- lib/inch/evaluation/role/constant.rb
|
174
214
|
- lib/inch/evaluation/role/method.rb
|
@@ -178,7 +218,8 @@ files:
|
|
178
218
|
- lib/inch/evaluation/role/object.rb
|
179
219
|
- lib/inch/rake.rb
|
180
220
|
- lib/inch/rake/suggest.rb
|
181
|
-
- lib/inch/
|
221
|
+
- lib/inch/utils/read_write_methods.rb
|
222
|
+
- lib/inch/utils/weighted_list.rb
|
182
223
|
- lib/inch/version.rb
|
183
224
|
- test/fixtures/code_examples/lib/foo.rb
|
184
225
|
- test/fixtures/readme/lib/foo.rb
|
@@ -191,6 +232,12 @@ files:
|
|
191
232
|
- test/fixtures/visibility/lib/foo.rb
|
192
233
|
- test/fixtures/yardopts/.yardopts
|
193
234
|
- test/fixtures/yardopts/foo/bar.rb
|
235
|
+
- test/inch/api/filter_test.rb
|
236
|
+
- test/inch/api/get_test.rb
|
237
|
+
- test/inch/api/list_test.rb
|
238
|
+
- test/inch/api/options/base_test.rb
|
239
|
+
- test/inch/api/stats_test.rb
|
240
|
+
- test/inch/api/suggest_test.rb
|
194
241
|
- test/inch/cli/arguments_test.rb
|
195
242
|
- test/inch/cli/command/base_test.rb
|
196
243
|
- test/inch/cli/command/list_test.rb
|
@@ -202,15 +249,21 @@ files:
|
|
202
249
|
- test/inch/cli/command/suggest_test.rb
|
203
250
|
- test/inch/cli/command_parser_test.rb
|
204
251
|
- test/inch/cli/trace_helper_test.rb
|
205
|
-
- test/inch/cli/weighted_list_test.rb
|
206
252
|
- test/inch/cli/yardopts_helper_test.rb
|
207
|
-
- test/inch/code_object/
|
208
|
-
- test/inch/code_object/
|
253
|
+
- test/inch/code_object/converter_test.rb
|
254
|
+
- test/inch/code_object/provider/yard/docstring_test.rb
|
255
|
+
- test/inch/code_object/provider/yard/nodoc_helper_test.rb
|
256
|
+
- test/inch/code_object/provider/yard_test.rb
|
257
|
+
- test/inch/code_object/provider_test.rb
|
209
258
|
- test/inch/code_object/proxy/method_object_test.rb
|
210
259
|
- test/inch/code_object/proxy_test.rb
|
211
|
-
- test/inch/
|
260
|
+
- test/inch/codebase/objects_test.rb
|
261
|
+
- test/inch/codebase/proxy_test.rb
|
262
|
+
- test/inch/evaluation/role/base_test.rb
|
263
|
+
- test/inch/utils/weighted_list_test.rb
|
212
264
|
- test/integration/stats_options_test.rb
|
213
265
|
- test/integration/visibility_options_test.rb
|
266
|
+
- test/shared/base_list.rb
|
214
267
|
- test/test_helper.rb
|
215
268
|
homepage: http://trivelop.de/inch/
|
216
269
|
licenses:
|
@@ -227,12 +280,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
227
280
|
version: '0'
|
228
281
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
229
282
|
requirements:
|
230
|
-
- - '
|
283
|
+
- - '>'
|
231
284
|
- !ruby/object:Gem::Version
|
232
|
-
version:
|
285
|
+
version: 1.3.1
|
233
286
|
requirements: []
|
234
287
|
rubyforge_project:
|
235
|
-
rubygems_version: 2.0.
|
288
|
+
rubygems_version: 2.0.3
|
236
289
|
signing_key:
|
237
290
|
specification_version: 4
|
238
291
|
summary: Documentation measurement tool for Ruby
|
@@ -248,6 +301,12 @@ test_files:
|
|
248
301
|
- test/fixtures/visibility/lib/foo.rb
|
249
302
|
- test/fixtures/yardopts/.yardopts
|
250
303
|
- test/fixtures/yardopts/foo/bar.rb
|
304
|
+
- test/inch/api/filter_test.rb
|
305
|
+
- test/inch/api/get_test.rb
|
306
|
+
- test/inch/api/list_test.rb
|
307
|
+
- test/inch/api/options/base_test.rb
|
308
|
+
- test/inch/api/stats_test.rb
|
309
|
+
- test/inch/api/suggest_test.rb
|
251
310
|
- test/inch/cli/arguments_test.rb
|
252
311
|
- test/inch/cli/command/base_test.rb
|
253
312
|
- test/inch/cli/command/list_test.rb
|
@@ -259,14 +318,20 @@ test_files:
|
|
259
318
|
- test/inch/cli/command/suggest_test.rb
|
260
319
|
- test/inch/cli/command_parser_test.rb
|
261
320
|
- test/inch/cli/trace_helper_test.rb
|
262
|
-
- test/inch/cli/weighted_list_test.rb
|
263
321
|
- test/inch/cli/yardopts_helper_test.rb
|
264
|
-
- test/inch/code_object/
|
265
|
-
- test/inch/code_object/
|
322
|
+
- test/inch/code_object/converter_test.rb
|
323
|
+
- test/inch/code_object/provider/yard/docstring_test.rb
|
324
|
+
- test/inch/code_object/provider/yard/nodoc_helper_test.rb
|
325
|
+
- test/inch/code_object/provider/yard_test.rb
|
326
|
+
- test/inch/code_object/provider_test.rb
|
266
327
|
- test/inch/code_object/proxy/method_object_test.rb
|
267
328
|
- test/inch/code_object/proxy_test.rb
|
268
|
-
- test/inch/
|
329
|
+
- test/inch/codebase/objects_test.rb
|
330
|
+
- test/inch/codebase/proxy_test.rb
|
331
|
+
- test/inch/evaluation/role/base_test.rb
|
332
|
+
- test/inch/utils/weighted_list_test.rb
|
269
333
|
- test/integration/stats_options_test.rb
|
270
334
|
- test/integration/visibility_options_test.rb
|
335
|
+
- test/shared/base_list.rb
|
271
336
|
- test/test_helper.rb
|
272
337
|
has_rdoc:
|