inch 0.5.0.rc5 → 0.5.0.rc6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +0 -6
- data/.rubocop_todo.yml +40 -34
- data/Gemfile +3 -3
- data/Rakefile +10 -6
- data/bin/inch +5 -5
- data/config/base.rb +4 -4
- data/config/nodejs.rb +44 -1
- data/config/ruby.rb +1 -1
- data/inch.gemspec +17 -17
- data/lib/inch.rb +13 -13
- data/lib/inch/api.rb +10 -10
- data/lib/inch/api/compare.rb +2 -2
- data/lib/inch/api/compare/code_objects.rb +1 -1
- data/lib/inch/api/diff.rb +1 -1
- data/lib/inch/api/options/suggest.rb +1 -1
- data/lib/inch/api/suggest.rb +1 -1
- data/lib/inch/cli.rb +6 -6
- data/lib/inch/cli/command.rb +15 -15
- data/lib/inch/cli/command/base.rb +5 -3
- data/lib/inch/cli/command/base_list.rb +0 -1
- data/lib/inch/cli/command/console.rb +5 -5
- data/lib/inch/cli/command/diff.rb +6 -6
- data/lib/inch/cli/command/inspect.rb +5 -5
- data/lib/inch/cli/command/list.rb +4 -4
- data/lib/inch/cli/command/options/base.rb +17 -15
- data/lib/inch/cli/command/options/base_list.rb +17 -17
- data/lib/inch/cli/command/options/base_object.rb +1 -1
- data/lib/inch/cli/command/options/console.rb +13 -13
- data/lib/inch/cli/command/options/diff.rb +19 -19
- data/lib/inch/cli/command/options/inspect.rb +5 -5
- data/lib/inch/cli/command/options/list.rb +7 -7
- data/lib/inch/cli/command/options/show.rb +5 -5
- data/lib/inch/cli/command/options/stats.rb +2 -2
- data/lib/inch/cli/command/options/suggest.rb +12 -12
- data/lib/inch/cli/command/output/base.rb +1 -1
- data/lib/inch/cli/command/output/diff.rb +9 -9
- data/lib/inch/cli/command/output/inspect.rb +13 -13
- data/lib/inch/cli/command/output/list.rb +1 -1
- data/lib/inch/cli/command/output/show.rb +4 -4
- data/lib/inch/cli/command/output/stats.rb +14 -14
- data/lib/inch/cli/command/output/suggest.rb +14 -14
- data/lib/inch/cli/command/show.rb +4 -4
- data/lib/inch/cli/command/stats.rb +4 -4
- data/lib/inch/cli/command/suggest.rb +4 -4
- data/lib/inch/cli/command_parser.rb +4 -4
- data/lib/inch/cli/sparkline_helper.rb +1 -1
- data/lib/inch/cli/trace_helper.rb +1 -1
- data/lib/inch/cli/yardopts_helper.rb +1 -1
- data/lib/inch/code_object.rb +3 -3
- data/lib/inch/code_object/provider.rb +3 -3
- data/lib/inch/code_object/proxy.rb +3 -4
- data/lib/inch/codebase.rb +5 -5
- data/lib/inch/codebase/object.rb +2 -1
- data/lib/inch/codebase/serializer.rb +2 -2
- data/lib/inch/config.rb +6 -6
- data/lib/inch/config/codebase.rb +5 -5
- data/lib/inch/core_ext.rb +1 -1
- data/lib/inch/core_ext/string.rb +1 -1
- data/lib/inch/evaluation.rb +8 -8
- data/lib/inch/evaluation/proxy.rb +2 -3
- data/lib/inch/evaluation/role.rb +1 -1
- data/lib/inch/language/elixir/code_object/base.rb +6 -4
- data/lib/inch/language/elixir/evaluation/base.rb +2 -1
- data/lib/inch/language/elixir/evaluation/function_object.rb +1 -1
- data/lib/inch/language/elixir/import.rb +14 -14
- data/lib/inch/language/elixir/provider/reader.rb +1 -1
- data/lib/inch/language/elixir/provider/reader/docstring.rb +13 -0
- data/lib/inch/language/elixir/provider/reader/object.rb +5 -5
- data/lib/inch/language/elixir/provider/reader/object/base.rb +13 -5
- data/lib/inch/language/elixir/provider/reader/object/function_object.rb +1 -1
- data/lib/inch/language/elixir/provider/reader/parser.rb +21 -7
- data/lib/inch/language/elixir/roles/base.rb +3 -3
- data/lib/inch/language/elixir/roles/function.rb +2 -1
- data/lib/inch/language/elixir/roles/object.rb +1 -1
- data/lib/inch/language/nodejs/code_object/base.rb +199 -0
- data/lib/inch/language/nodejs/code_object/function_object.rb +74 -0
- data/lib/inch/language/nodejs/code_object/member_object.rb +11 -0
- data/lib/inch/language/nodejs/code_object/module_object.rb +23 -0
- data/lib/inch/language/nodejs/evaluation/base.rb +29 -0
- data/lib/inch/language/nodejs/evaluation/function_object.rb +31 -0
- data/lib/inch/language/nodejs/evaluation/member_object.rb +11 -0
- data/lib/inch/language/nodejs/evaluation/module_object.rb +27 -0
- data/lib/inch/language/nodejs/import.rb +17 -1
- data/lib/inch/language/nodejs/provider/jsdoc.rb +1 -1
- data/lib/inch/language/nodejs/provider/jsdoc/docstring.rb +13 -0
- data/lib/inch/language/nodejs/provider/jsdoc/object.rb +16 -8
- data/lib/inch/language/nodejs/provider/jsdoc/object/base.rb +82 -45
- data/lib/inch/language/nodejs/provider/jsdoc/object/function_object.rb +18 -0
- data/lib/inch/language/nodejs/provider/jsdoc/object/member_object.rb +15 -0
- data/lib/inch/language/nodejs/provider/jsdoc/object/module_object.rb +22 -0
- data/lib/inch/language/nodejs/provider/jsdoc/parser.rb +9 -10
- data/lib/inch/language/nodejs/roles/base.rb +32 -0
- data/lib/inch/language/nodejs/roles/function.rb +113 -0
- data/lib/inch/language/nodejs/roles/member.rb +13 -0
- data/lib/inch/language/nodejs/roles/module.rb +64 -0
- data/lib/inch/language/nodejs/roles/object.rb +76 -0
- data/lib/inch/language/ruby/code_object/base.rb +6 -4
- data/lib/inch/language/ruby/evaluation/base.rb +2 -1
- data/lib/inch/language/ruby/evaluation/method_object.rb +2 -1
- data/lib/inch/language/ruby/import.rb +24 -24
- data/lib/inch/language/ruby/provider/yard.rb +10 -10
- data/lib/inch/language/ruby/provider/yard/nodoc_helper.rb +2 -2
- data/lib/inch/language/ruby/provider/yard/object.rb +9 -9
- data/lib/inch/language/ruby/provider/yard/object/base.rb +25 -28
- data/lib/inch/language/ruby/provider/yard/object/method_object.rb +4 -3
- data/lib/inch/language/ruby/provider/yard/object/method_parameter_object.rb +4 -3
- data/lib/inch/language/ruby/provider/yard/object/method_signature.rb +2 -2
- data/lib/inch/language/ruby/provider/yard/object/namespace_object.rb +2 -1
- data/lib/inch/language/ruby/provider/yard/parser.rb +2 -2
- data/lib/inch/language/ruby/roles/base.rb +1 -1
- data/lib/inch/language/ruby/roles/method.rb +2 -1
- data/lib/inch/language/ruby/roles/method_parameter.rb +1 -1
- data/lib/inch/language/ruby/roles/missing.rb +2 -2
- data/lib/inch/language/ruby/roles/object.rb +6 -6
- data/lib/inch/rake.rb +2 -2
- data/lib/inch/rake/suggest.rb +5 -5
- data/lib/inch/utils/code_location.rb +12 -0
- data/lib/inch/utils/read_write_methods.rb +2 -2
- data/lib/inch/utils/ui.rb +8 -8
- data/lib/inch/version.rb +1 -1
- data/test/fixtures/elixir/simple/all.json +321 -0
- data/test/integration/api/compare/codebases.rb +6 -6
- data/test/integration/cli/command/console_test.rb +13 -13
- data/test/integration/cli/command/diff_test.rb +12 -14
- data/test/integration/cli/command/inspect_test.rb +30 -30
- data/test/integration/cli/command/list_test.rb +34 -34
- data/test/integration/cli/command/show_test.rb +26 -26
- data/test/integration/cli/command/stats_test.rb +23 -23
- data/test/integration/cli/command/suggest_test.rb +58 -49
- data/test/integration/stats_options_test.rb +9 -9
- data/test/integration/visibility_options_test.rb +49 -45
- data/test/shared/base_list.rb +41 -41
- data/test/test_helper.rb +18 -10
- data/test/unit/api/filter_test.rb +9 -9
- data/test/unit/api/get_test.rb +6 -6
- data/test/unit/api/list_test.rb +3 -3
- data/test/unit/api/options/base_test.rb +6 -6
- data/test/unit/api/stats_test.rb +3 -3
- data/test/unit/api/suggest_test.rb +4 -4
- data/test/unit/cli/arguments_test.rb +25 -25
- data/test/unit/cli/command/base_test.rb +3 -3
- data/test/unit/cli/command/options/base_list_test.rb +14 -14
- data/test/unit/cli/command/options/base_object_test.rb +6 -6
- data/test/unit/cli/command/options/base_test.rb +3 -3
- data/test/unit/cli/command_parser_test.rb +29 -29
- data/test/unit/cli/trace_helper_test.rb +2 -2
- data/test/unit/cli/yardopts_helper_test.rb +35 -35
- data/test/unit/code_object/converter_test.rb +3 -3
- data/test/unit/code_object/provider_test.rb +2 -2
- data/test/unit/code_object/proxy_test.rb +11 -11
- data/test/unit/codebase/objects_test.rb +8 -8
- data/test/unit/codebase/proxy_test.rb +5 -5
- data/test/unit/config/codebase_test.rb +3 -3
- data/test/unit/config_test.rb +4 -4
- data/test/unit/evaluation/role_test.rb +8 -8
- data/test/unit/language/elixir/code_object/function_object_test.rb +35 -0
- data/test/unit/language/ruby/code_object/method_object_test.rb +128 -126
- data/test/unit/language/ruby/provider/yard/docstring_test.rb +27 -23
- data/test/unit/language/ruby/provider/yard/nodoc_helper_test.rb +21 -20
- data/test/unit/language/ruby/provider/yard/object/method_object_test.rb +20 -17
- data/test/unit/language/ruby/provider/yard_test.rb +4 -4
- data/test/unit/utils/buffered_ui_test.rb +20 -20
- data/test/unit/utils/ui_test.rb +20 -20
- data/test/unit/utils/weighted_list_test.rb +7 -7
- metadata +25 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4da0938bb922b49c4e2ee392f2db88c6f595801
|
4
|
+
data.tar.gz: f194abcef2bdd725e022e785f2a210443681d2ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c350116143d6e69ae97387b14b35b5fd9616d984c60b83a148b2f534f33e2b848dc5bef0d4a596ee39d7841d840e6c49274ca16a0b9f083c6366a0c3151d83f1
|
7
|
+
data.tar.gz: 80c6b9ffea8dd775b836a27fdea8e496421e9ebedd2185df4d95c4055d0a58c1c453bc26bb74b2fc66941510dd658c592d52a1bbf930cef59325e0cfb337d48c
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -1,50 +1,60 @@
|
|
1
1
|
# This configuration was generated by `rubocop --auto-gen-config`
|
2
|
-
# on 2014-08-
|
2
|
+
# on 2014-08-31 11:34:00 +0200 using RuboCop version 0.25.0.
|
3
3
|
# The point is for the user to remove these configuration records
|
4
4
|
# one by one as the offenses are removed from the code base.
|
5
5
|
# Note that changes in the inspected code, or installation of new
|
6
6
|
# versions of RuboCop, may require this file to be generated again.
|
7
7
|
|
8
|
-
# Offense count:
|
8
|
+
# Offense count: 34
|
9
9
|
Lint/AmbiguousOperator:
|
10
10
|
Enabled: false
|
11
11
|
|
12
|
-
# Offense count: 87
|
13
|
-
Lint/AmbiguousRegexpLiteral:
|
14
|
-
Enabled: false
|
15
|
-
|
16
12
|
# Offense count: 1
|
17
13
|
Lint/Debugger:
|
18
14
|
Enabled: false
|
19
15
|
|
20
|
-
# Offense count:
|
16
|
+
# Offense count: 16
|
17
|
+
Lint/SpaceBeforeFirstArg:
|
18
|
+
Enabled: false
|
19
|
+
|
20
|
+
# Offense count: 9
|
21
21
|
# Cop supports --auto-correct.
|
22
22
|
Lint/UnusedMethodArgument:
|
23
23
|
Enabled: false
|
24
24
|
|
25
|
+
# Offense count: 7
|
26
|
+
# Configuration parameters: CountComments.
|
27
|
+
Metrics/ClassLength:
|
28
|
+
Max: 197
|
29
|
+
|
30
|
+
# Offense count: 2
|
31
|
+
Metrics/CyclomaticComplexity:
|
32
|
+
Max: 7
|
33
|
+
|
34
|
+
# Offense count: 1
|
35
|
+
# Configuration parameters: AllowURI.
|
36
|
+
Metrics/LineLength:
|
37
|
+
Max: 81
|
38
|
+
|
39
|
+
# Offense count: 27
|
40
|
+
# Configuration parameters: CountComments.
|
41
|
+
Metrics/MethodLength:
|
42
|
+
Max: 34
|
43
|
+
|
44
|
+
# Offense count: 2
|
45
|
+
Metrics/PerceivedComplexity:
|
46
|
+
Max: 10
|
47
|
+
|
25
48
|
# Offense count: 5
|
26
49
|
Style/AccessorMethodName:
|
27
50
|
Enabled: false
|
28
51
|
|
29
|
-
# Offense count: 3
|
30
|
-
Style/AsciiComments:
|
31
|
-
Enabled: false
|
32
|
-
|
33
52
|
# Offense count: 1
|
34
53
|
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
35
54
|
Style/ClassAndModuleChildren:
|
36
55
|
Enabled: false
|
37
56
|
|
38
|
-
# Offense count:
|
39
|
-
# Configuration parameters: CountComments.
|
40
|
-
Style/ClassLength:
|
41
|
-
Max: 195
|
42
|
-
|
43
|
-
# Offense count: 2
|
44
|
-
Style/CyclomaticComplexity:
|
45
|
-
Max: 7
|
46
|
-
|
47
|
-
# Offense count: 85
|
57
|
+
# Offense count: 87
|
48
58
|
Style/Documentation:
|
49
59
|
Enabled: false
|
50
60
|
|
@@ -57,22 +67,18 @@ Style/DoubleNegation:
|
|
57
67
|
Style/GuardClause:
|
58
68
|
Enabled: false
|
59
69
|
|
70
|
+
# Offense count: 1
|
71
|
+
# Cop supports --auto-correct.
|
72
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
73
|
+
Style/HashSyntax:
|
74
|
+
Enabled: false
|
75
|
+
|
60
76
|
# Offense count: 1
|
61
77
|
# Configuration parameters: MaxLineLength.
|
62
78
|
Style/IfUnlessModifier:
|
63
79
|
Enabled: false
|
64
80
|
|
65
|
-
# Offense count:
|
66
|
-
# Configuration parameters: AllowURI.
|
67
|
-
Style/LineLength:
|
68
|
-
Max: 111
|
69
|
-
|
70
|
-
# Offense count: 23
|
71
|
-
# Configuration parameters: CountComments.
|
72
|
-
Style/MethodLength:
|
73
|
-
Max: 34
|
74
|
-
|
75
|
-
# Offense count: 22
|
81
|
+
# Offense count: 43
|
76
82
|
# Configuration parameters: NamePrefixBlacklist.
|
77
83
|
Style/PredicateName:
|
78
84
|
Enabled: false
|
@@ -82,12 +88,12 @@ Style/PredicateName:
|
|
82
88
|
Style/SingleLineBlockParams:
|
83
89
|
Enabled: false
|
84
90
|
|
85
|
-
# Offense count:
|
91
|
+
# Offense count: 82
|
86
92
|
# Cop supports --auto-correct.
|
87
93
|
Style/SingleSpaceBeforeFirstArg:
|
88
94
|
Enabled: false
|
89
95
|
|
90
|
-
# Offense count:
|
96
|
+
# Offense count: 4
|
91
97
|
# Cop supports --auto-correct.
|
92
98
|
# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, Whitelist.
|
93
99
|
Style/TrivialAccessors:
|
data/Gemfile
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
source
|
1
|
+
source 'https://rubygems.org'
|
2
2
|
|
3
3
|
# Specify your gem's dependencies in inch.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
6
|
group :test do
|
7
|
-
gem
|
8
|
-
gem
|
7
|
+
gem 'simplecov', require: false
|
8
|
+
gem 'rubocop', '~> 0.25.0', require: false
|
9
9
|
end
|
data/Rakefile
CHANGED
@@ -1,21 +1,25 @@
|
|
1
|
-
require
|
1
|
+
require 'bundler/gem_tasks'
|
2
2
|
|
3
|
-
require
|
3
|
+
require 'rake/testtask'
|
4
4
|
|
5
5
|
Rake::TestTask.new do |t|
|
6
|
-
t.pattern =
|
6
|
+
t.pattern = 'test/**/*_test.rb'
|
7
7
|
end
|
8
8
|
|
9
9
|
Rake::TestTask.new(:"test:unit") do |t|
|
10
|
-
t.pattern =
|
10
|
+
t.pattern = 'test/unit/**/*_test.rb'
|
11
|
+
end
|
12
|
+
|
13
|
+
Rake::TestTask.new(:"test:elixir") do |t|
|
14
|
+
t.pattern = 'test/unit/language/elixir/**/*_test.rb'
|
11
15
|
end
|
12
16
|
|
13
17
|
Rake::TestTask.new(:"test:ruby") do |t|
|
14
|
-
t.pattern =
|
18
|
+
t.pattern = 'test/unit/language/ruby/**/*_test.rb'
|
15
19
|
end
|
16
20
|
|
17
21
|
Rake::TestTask.new(:"test:integration") do |t|
|
18
|
-
t.pattern =
|
22
|
+
t.pattern = 'test/integration/**/*_test.rb'
|
19
23
|
end
|
20
24
|
|
21
25
|
task default: :test
|
data/bin/inch
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
# hit Control + C to stop
|
4
|
-
Signal.trap(
|
5
|
-
warn
|
4
|
+
Signal.trap('INT') do
|
5
|
+
warn ' cancelled by user (INT)'
|
6
6
|
exit 1
|
7
7
|
end
|
8
8
|
|
@@ -12,12 +12,12 @@ def find_lib_path
|
|
12
12
|
while File.symlink?(path)
|
13
13
|
path = File.expand_path(File.readlink(path), File.dirname(path))
|
14
14
|
end
|
15
|
-
File.join(File.dirname(File.expand_path(path)),
|
15
|
+
File.join(File.dirname(File.expand_path(path)), '..', 'lib')
|
16
16
|
end
|
17
17
|
|
18
18
|
$LOAD_PATH.unshift(find_lib_path)
|
19
19
|
|
20
|
-
require
|
21
|
-
require
|
20
|
+
require 'inch'
|
21
|
+
require 'inch/cli'
|
22
22
|
|
23
23
|
Inch::CLI::CommandParser.run(*ARGV)
|
data/config/base.rb
CHANGED
@@ -2,25 +2,25 @@ Inch::Config.base do
|
|
2
2
|
evaluation do
|
3
3
|
grade(:A) do
|
4
4
|
scores 80..100
|
5
|
-
label
|
5
|
+
label 'Seems really good'
|
6
6
|
color :green
|
7
7
|
end
|
8
8
|
|
9
9
|
grade(:B) do
|
10
10
|
scores 50...80
|
11
|
-
label
|
11
|
+
label 'Proper documentation present'
|
12
12
|
color :yellow
|
13
13
|
end
|
14
14
|
|
15
15
|
grade(:C) do
|
16
16
|
scores 1...50
|
17
|
-
label
|
17
|
+
label 'Needs work'
|
18
18
|
color :red
|
19
19
|
end
|
20
20
|
|
21
21
|
grade(:U) do
|
22
22
|
scores 0..0
|
23
|
-
label
|
23
|
+
label 'Undocumented'
|
24
24
|
color :color141
|
25
25
|
bg_color :color105
|
26
26
|
end
|
data/config/nodejs.rb
CHANGED
@@ -4,7 +4,50 @@
|
|
4
4
|
Inch::Config.register(:nodejs) do
|
5
5
|
codebase do
|
6
6
|
object_provider :JSDoc
|
7
|
-
include_files [
|
7
|
+
include_files ['src/**/*.js']
|
8
8
|
exclude_files []
|
9
9
|
end
|
10
|
+
|
11
|
+
evaluation do
|
12
|
+
schema(:MemberObject) do
|
13
|
+
docstring 1.0
|
14
|
+
|
15
|
+
# optional:
|
16
|
+
code_example_single 0.1
|
17
|
+
code_example_multi 0.2
|
18
|
+
unconsidered_tag 0.2
|
19
|
+
end
|
20
|
+
|
21
|
+
schema(:ModuleObject) do
|
22
|
+
docstring 1.0
|
23
|
+
|
24
|
+
# optional:
|
25
|
+
code_example_single 0.1
|
26
|
+
code_example_multi 0.2
|
27
|
+
unconsidered_tag 0.2
|
28
|
+
end
|
29
|
+
|
30
|
+
schema(:FunctionObject) do
|
31
|
+
docstring 0.5
|
32
|
+
parameters 0.4
|
33
|
+
return_type 0.1
|
34
|
+
return_description 0.3
|
35
|
+
|
36
|
+
if object.questioning_name?
|
37
|
+
parameters parameters + return_type
|
38
|
+
return_type 0.0
|
39
|
+
end
|
40
|
+
|
41
|
+
if !object.has_parameters? || object.setter?
|
42
|
+
return_description docstring + parameters
|
43
|
+
docstring docstring + parameters
|
44
|
+
parameters 0.0
|
45
|
+
end
|
46
|
+
|
47
|
+
# optional:
|
48
|
+
code_example_single 0.1
|
49
|
+
code_example_multi 0.25
|
50
|
+
unconsidered_tag 0.2
|
51
|
+
end
|
52
|
+
end
|
10
53
|
end
|
data/config/ruby.rb
CHANGED
data/inch.gemspec
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
# coding: utf-8
|
2
|
-
lib = File.expand_path(
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require
|
4
|
+
require 'inch/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
7
|
+
spec.name = 'inch'
|
8
8
|
spec.version = Inch::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
11
|
-
spec.summary =
|
12
|
-
spec.description =
|
13
|
-
spec.homepage =
|
14
|
-
spec.license =
|
9
|
+
spec.authors = ['René Föhring']
|
10
|
+
spec.email = ['rf@bamaru.de']
|
11
|
+
spec.summary = 'Documentation measurement tool for Ruby'
|
12
|
+
spec.description = 'Documentation measurement tool for Ruby, based on YARD.'
|
13
|
+
spec.homepage = 'http://trivelop.de/inch/'
|
14
|
+
spec.license = 'MIT'
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
17
17
|
spec.executables = spec.files.grep(/^bin\//) { |f| File.basename(f) }
|
18
18
|
spec.test_files = spec.files.grep(/^(test|spec|features)\//)
|
19
|
-
spec.require_paths = [
|
19
|
+
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_development_dependency
|
22
|
-
spec.add_development_dependency
|
23
|
-
spec.add_development_dependency
|
21
|
+
spec.add_development_dependency 'bundler', '~> 1.5'
|
22
|
+
spec.add_development_dependency 'rake'
|
23
|
+
spec.add_development_dependency 'minitest', '~> 5.2'
|
24
24
|
|
25
|
-
spec.add_dependency
|
26
|
-
spec.add_dependency
|
27
|
-
spec.add_dependency
|
28
|
-
spec.add_dependency
|
25
|
+
spec.add_dependency 'pry'
|
26
|
+
spec.add_dependency 'sparkr', '>= 0.2.0'
|
27
|
+
spec.add_dependency 'term-ansicolor'
|
28
|
+
spec.add_dependency 'yard', '~> 0.8.7'
|
29
29
|
end
|
data/lib/inch.rb
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
require
|
1
|
+
require 'inch/version'
|
2
2
|
|
3
3
|
module Inch
|
4
4
|
end
|
5
5
|
|
6
|
-
require
|
6
|
+
require 'forwardable'
|
7
7
|
|
8
|
-
require
|
9
|
-
require
|
10
|
-
require
|
11
|
-
require
|
12
|
-
require
|
8
|
+
require 'inch/api'
|
9
|
+
require 'inch/core_ext'
|
10
|
+
require 'inch/codebase'
|
11
|
+
require 'inch/code_object'
|
12
|
+
require 'inch/evaluation'
|
13
13
|
|
14
|
-
require
|
14
|
+
require 'inch/language'
|
15
15
|
|
16
|
-
require
|
17
|
-
require File.join(File.dirname(__FILE__),
|
18
|
-
require File.join(File.dirname(__FILE__),
|
19
|
-
require File.join(File.dirname(__FILE__),
|
20
|
-
require File.join(File.dirname(__FILE__),
|
16
|
+
require 'inch/config'
|
17
|
+
require File.join(File.dirname(__FILE__), '..', 'config', 'base.rb')
|
18
|
+
require File.join(File.dirname(__FILE__), '..', 'config', 'ruby.rb')
|
19
|
+
require File.join(File.dirname(__FILE__), '..', 'config', 'nodejs.rb')
|
20
|
+
require File.join(File.dirname(__FILE__), '..', 'config', 'elixir.rb')
|
data/lib/inch/api.rb
CHANGED
@@ -23,14 +23,14 @@ module Inch
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
require
|
27
|
-
require
|
28
|
-
require
|
26
|
+
require 'inch/api/options/base'
|
27
|
+
require 'inch/api/options/filter'
|
28
|
+
require 'inch/api/options/suggest'
|
29
29
|
|
30
|
-
require
|
31
|
-
require
|
32
|
-
require
|
33
|
-
require
|
34
|
-
require
|
35
|
-
require
|
36
|
-
require
|
30
|
+
require 'inch/api/compare'
|
31
|
+
require 'inch/api/filter'
|
32
|
+
require 'inch/api/get'
|
33
|
+
require 'inch/api/list'
|
34
|
+
require 'inch/api/suggest'
|
35
|
+
require 'inch/api/stats'
|
36
|
+
require 'inch/api/diff'
|
data/lib/inch/api/compare.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require 'inch/api/compare/code_objects'
|
2
|
+
require 'inch/api/compare/codebases'
|
@@ -7,7 +7,7 @@ module Inch
|
|
7
7
|
def initialize(object1, object2)
|
8
8
|
@before, @after = object1, object2
|
9
9
|
if @before.object_id == @after.object_id
|
10
|
-
fail
|
10
|
+
fail '@before and @after are identical ruby objects. this is bad.'
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
data/lib/inch/api/diff.rb
CHANGED