rcodetools 0.7.0.0 → 0.8.0.0
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.
- data/CHANGES +12 -0
- data/README +1 -1
- data/README.emacs +21 -4
- data/README.ja +1 -1
- data/README.xmpfilter +159 -74
- data/Rakefile +3 -37
- data/anything-rcodetools.el +142 -0
- data/bin/rct-complete +1 -1
- data/bin/rct-doc +1 -1
- data/bin/rct-meth-args +33 -2
- data/bin/xmpfilter +5 -1
- data/lib/rcodetools/compat.rb +14 -0
- data/lib/rcodetools/completion.rb +8 -6
- data/lib/rcodetools/fork.rb +15 -8
- data/lib/rcodetools/options.rb +8 -0
- data/lib/rcodetools/xmpfilter.rb +80 -33
- data/lib/rcodetools/xmptestunitfilter.rb +76 -21
- data/lib/ruby_toggle_file.rb +1 -1
- data/rcodetools.el +213 -20
- data/test/test_functional.rb +36 -68
- data/test/test_method_analyzer.rb +28 -20
- data/test/test_ruby_toggle_file.rb +118 -69
- data/test/test_xmpfilter.rb +75 -47
- data/test/test_xmptestunitfilter.rb +12 -11
- metadata +83 -133
- data/test/data/add_markers-input.rb +0 -2
- data/test/data/add_markers-output.rb +0 -2
- data/test/data/bindings-input.rb +0 -26
- data/test/data/bindings-output.rb +0 -31
- data/test/data/completion-input.rb +0 -1
- data/test/data/completion-output.rb +0 -2
- data/test/data/completion_class_info-input.rb +0 -1
- data/test/data/completion_class_info-output.rb +0 -10
- data/test/data/completion_class_info_no_candidates-input.rb +0 -1
- data/test/data/completion_class_info_no_candidates-output.rb +0 -1
- data/test/data/completion_detect_rbtest-input.rb +0 -7
- data/test/data/completion_detect_rbtest-output.rb +0 -2
- data/test/data/completion_detect_rbtest2-input.rb +0 -1
- data/test/data/completion_detect_rbtest2-output.rb +0 -2
- data/test/data/completion_emacs-input.rb +0 -1
- data/test/data/completion_emacs-output.rb +0 -6
- data/test/data/completion_emacs_icicles-input.rb +0 -1
- data/test/data/completion_emacs_icicles-output.rb +0 -6
- data/test/data/completion_in_method-input.rb +0 -3
- data/test/data/completion_in_method-output.rb +0 -1
- data/test/data/completion_in_method-test.rb +0 -6
- data/test/data/completion_rbtest-input.rb +0 -7
- data/test/data/completion_rbtest-output.rb +0 -2
- data/test/data/doc-input.rb +0 -1
- data/test/data/doc-output.rb +0 -1
- data/test/data/doc_detect_rbtest-input.rb +0 -1
- data/test/data/doc_detect_rbtest-output.rb +0 -1
- data/test/data/doc_detect_rbtest2-input.rb +0 -7
- data/test/data/doc_detect_rbtest2-output.rb +0 -1
- data/test/data/doc_rbtest-input.rb +0 -7
- data/test/data/doc_rbtest-output.rb +0 -1
- data/test/data/no_warnings-input.rb +0 -3
- data/test/data/no_warnings-output.rb +0 -4
- data/test/data/refe-input.rb +0 -1
- data/test/data/refe-output.rb +0 -1
- data/test/data/ri-input.rb +0 -1
- data/test/data/ri-output.rb +0 -1
- data/test/data/ri_emacs-input.rb +0 -1
- data/test/data/ri_emacs-output.rb +0 -1
- data/test/data/ri_vim-input.rb +0 -1
- data/test/data/ri_vim-output.rb +0 -1
- data/test/data/rspec-input.rb +0 -48
- data/test/data/rspec-output.rb +0 -52
- data/test/data/rspec_poetry-input.rb +0 -48
- data/test/data/rspec_poetry-output.rb +0 -52
- data/test/data/simple_annotation-input.rb +0 -8
- data/test/data/simple_annotation-output.rb +0 -8
- data/test/data/unit_test-input.rb +0 -50
- data/test/data/unit_test-output.rb +0 -52
- data/test/data/unit_test_detect_rbtest-input.rb +0 -50
- data/test/data/unit_test_detect_rbtest-output.rb +0 -52
- data/test/data/unit_test_detect_rbtest2-input.rb +0 -6
- data/test/data/unit_test_detect_rbtest2-output.rb +0 -6
- data/test/data/unit_test_poetry-input.rb +0 -50
- data/test/data/unit_test_poetry-output.rb +0 -52
- data/test/data/unit_test_rbtest-input.rb +0 -6
- data/test/data/unit_test_rbtest-output.rb +0 -6
- data/test/test_run.rb +0 -45
@@ -5,9 +5,6 @@ require "rcodetools/xmptestunitfilter"
|
|
5
5
|
|
6
6
|
class TestXMPTestUnitFilter < Test::Unit::TestCase
|
7
7
|
include Rcodetools
|
8
|
-
def setup
|
9
|
-
@xmp = XMPTestUnitFilter.new
|
10
|
-
end
|
11
8
|
|
12
9
|
ANNOTATION_VAR_INFERENCE_INPUT = <<EOF
|
13
10
|
arr = []
|
@@ -31,20 +28,22 @@ assert_equal(\"#<struct X foo=\\\"foo\\\", bar=\\\"bar\\\">\", arr.last.inspect)
|
|
31
28
|
EOF
|
32
29
|
|
33
30
|
def test_annotation_var_inference
|
31
|
+
xmp = XMPTestUnitFilter.new
|
34
32
|
assert_equal(ANNOTATION_VAR_INFERENCE_OUTPUT,
|
35
|
-
|
33
|
+
xmp.annotate(ANNOTATION_VAR_INFERENCE_INPUT).join(""))
|
36
34
|
end
|
37
35
|
|
38
36
|
def test_equality_assertions
|
39
|
-
|
37
|
+
xmp = XMPTestUnitFilter.new
|
38
|
+
assert_equal(["a = 1\n", "assert_equal(1, a)"], xmp.annotate("a = 1\na # \=>"))
|
40
39
|
assert_equal(["a = {1,2}\n", "assert_equal({1=>2}, a)"],
|
41
|
-
|
40
|
+
xmp.annotate("a = {1,2}\na # \=>"))
|
42
41
|
assert_equal(["a = [1,2]\n", "assert_equal([1, 2], a)"],
|
43
|
-
|
42
|
+
xmp.annotate("a = [1,2]\na # \=>"))
|
44
43
|
assert_equal(["a = 'foo'\n", "assert_equal(\"foo\", a)"],
|
45
|
-
|
44
|
+
xmp.annotate("a = 'foo'\na # \=>"))
|
46
45
|
assert_equal(["a = 1.0\n", "assert_in_delta(1.0, a, 0.0001)"],
|
47
|
-
|
46
|
+
xmp.annotate("a = 1.0\na # \=>"))
|
48
47
|
end
|
49
48
|
|
50
49
|
def test_raise_assertion
|
@@ -52,12 +51,14 @@ EOF
|
|
52
51
|
class NoGood < Exception; end
|
53
52
|
raise NoGood # \=>
|
54
53
|
EOF
|
54
|
+
xmp = XMPTestUnitFilter.new
|
55
55
|
assert_equal(["class NoGood < Exception; end\n",
|
56
|
-
"assert_raise(NoGood){raise NoGood}\n"],
|
56
|
+
"assert_raise(NoGood){raise NoGood}\n"], xmp.annotate(code))
|
57
57
|
end
|
58
58
|
|
59
59
|
def test_assert_nil
|
60
|
-
|
60
|
+
xmp = XMPTestUnitFilter.new
|
61
|
+
assert_equal(["a = nil\n", "assert_nil(a)"], xmp.annotate("a = nil\na # \=>"))
|
61
62
|
end
|
62
63
|
|
63
64
|
def test_poetry_mode
|
metadata
CHANGED
@@ -1,174 +1,124 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.1
|
3
|
-
specification_version: 1
|
4
2
|
name: rcodetools
|
5
3
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.
|
7
|
-
date: 2007-06-22 00:00:00 +02:00
|
8
|
-
summary: rcodetools is a collection of Ruby code manipulation tools
|
9
|
-
require_paths:
|
10
|
-
- lib
|
11
|
-
email: "\"rubikitch\" <rubikitch@ruby-lang.org>, \"Mauricio Fernandez\" <mfp@acm.org>"
|
12
|
-
homepage: http://eigenclass.org/hiki.rb?rcodetools
|
13
|
-
rubyforge_project:
|
14
|
-
description: "rcodetools is a collection of Ruby code manipulation tools. It includes xmpfilter and editor-independent Ruby development helper tools, as well as emacs and vim interfaces. Currently, rcodetools comprises: * xmpfilter: Automagic Test::Unit assertions/RSpec expectations and code annotations * rct-complete: Accurate method/class/constant etc. completions * rct-doc: Document browsing and code navigator * rct-meth-args: Precise method info (meta-prog. aware) and TAGS generation"
|
15
|
-
autorequire:
|
16
|
-
default_executable:
|
17
|
-
bindir: bin
|
18
|
-
has_rdoc: true
|
19
|
-
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
-
requirements:
|
21
|
-
- - ">"
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 0.0.0
|
24
|
-
version:
|
4
|
+
version: 0.8.0.0
|
25
5
|
platform: ruby
|
26
|
-
signing_key:
|
27
|
-
cert_chain:
|
28
|
-
post_install_message: |+
|
29
|
-
|
30
|
-
==============================================================================
|
31
|
-
|
32
|
-
rcodetools will work better if you use it along with FastRI, an alternative to
|
33
|
-
the standard 'ri' documentation browser which features intelligent searching,
|
34
|
-
better RubyGems integration, vastly improved performance, remote queries via
|
35
|
-
DRb... You can find it at http://eigenclass.org/hiki.rb?fastri and it is also
|
36
|
-
available in RubyGems format:
|
37
|
-
|
38
|
-
gem install fastri
|
39
|
-
|
40
|
-
Read README.emacs and README.vim for information on how to integrate
|
41
|
-
rcodetools in your editor.
|
42
|
-
|
43
|
-
==============================================================================
|
44
|
-
|
45
6
|
authors:
|
46
7
|
- rubikitch and Mauricio Fernandez
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2008-08-03 00:00:00 +02:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description: "rcodetools is a collection of Ruby code manipulation tools. It includes xmpfilter and editor-independent Ruby development helper tools, as well as emacs and vim interfaces. Currently, rcodetools comprises: * xmpfilter: Automagic Test::Unit assertions/RSpec expectations and code annotations * rct-complete: Accurate method/class/constant etc. completions * rct-doc: Document browsing and code navigator * rct-meth-args: Precise method info (meta-prog. aware) and TAGS generation"
|
17
|
+
email: "\"rubikitch\" <rubikitch@ruby-lang.org>, \"Mauricio Fernandez\" <mfp@acm.org>"
|
18
|
+
executables:
|
19
|
+
- rct-complete
|
20
|
+
- rct-doc
|
21
|
+
- xmpfilter
|
22
|
+
- rct-meth-args
|
23
|
+
extensions: []
|
24
|
+
|
25
|
+
extra_rdoc_files:
|
26
|
+
- README
|
47
27
|
files:
|
48
28
|
- bin/rct-complete
|
49
29
|
- bin/rct-doc
|
50
30
|
- bin/xmpfilter
|
51
31
|
- bin/rct-meth-args
|
52
|
-
- lib/method_analyzer.rb
|
53
|
-
- lib/ruby_toggle_file.rb
|
54
|
-
- lib/rcodetools/xmpfilter.rb
|
55
32
|
- lib/rcodetools/fork.rb
|
56
|
-
- lib/rcodetools/options.rb
|
57
|
-
- lib/rcodetools/doc.rb
|
58
33
|
- lib/rcodetools/completion.rb
|
59
|
-
- lib/rcodetools/
|
34
|
+
- lib/rcodetools/compat.rb
|
35
|
+
- lib/rcodetools/doc.rb
|
36
|
+
- lib/rcodetools/options.rb
|
37
|
+
- lib/rcodetools/xmpfilter.rb
|
60
38
|
- lib/rcodetools/xmptestunitfilter.rb
|
39
|
+
- lib/rcodetools/fork_config.rb
|
40
|
+
- lib/method_analyzer.rb
|
41
|
+
- lib/ruby_toggle_file.rb
|
61
42
|
- CHANGES
|
62
43
|
- rcodetools.el
|
63
44
|
- rcodetools.vim
|
64
45
|
- icicles-rcodetools.el
|
46
|
+
- anything-rcodetools.el
|
65
47
|
- README
|
66
|
-
- README.ja
|
67
|
-
- README.emacs
|
68
|
-
- README.vim
|
69
|
-
- README.TDC
|
70
48
|
- README.xmpfilter
|
71
49
|
- README.method_analysis
|
50
|
+
- README.TDC
|
51
|
+
- README.vim
|
52
|
+
- README.emacs
|
53
|
+
- README.ja
|
72
54
|
- THANKS
|
73
55
|
- Rakefile
|
74
56
|
- Rakefile.method_analysis
|
75
57
|
- setup.rb
|
76
|
-
- test/test_functional.rb
|
77
|
-
- test/test_options.rb
|
78
|
-
- test/test_doc.rb
|
79
|
-
- test/test_run.rb
|
80
58
|
- test/test_method_analyzer.rb
|
81
|
-
- test/test_completion.rb
|
82
|
-
- test/test_method_args.rb
|
83
|
-
- test/test_xmptestunitfilter.rb
|
84
|
-
- test/test_xmpfilter.rb
|
85
59
|
- test/test_ruby_toggle_file.rb
|
86
|
-
- test/data/completion_class_info-output.rb
|
87
|
-
- test/data/completion_in_method-test.rb
|
88
|
-
- test/data/bindings-output.rb
|
89
|
-
- test/data/completion_rbtest-output.rb
|
90
|
-
- test/data/ri_vim-output.rb
|
91
60
|
- test/data/method_args.data.rb
|
92
|
-
- test/data/doc_rbtest-output.rb
|
93
61
|
- test/data/method_analyzer-data.rb
|
94
|
-
- test/data/ri_vim-input.rb
|
95
|
-
- test/data/completion_in_method-output.rb
|
96
|
-
- test/data/rspec-output.rb
|
97
|
-
- test/data/unit_test-input.rb
|
98
|
-
- test/data/bindings-input.rb
|
99
|
-
- test/data/doc_detect_rbtest2-input.rb
|
100
|
-
- test/data/simple_annotation-output.rb
|
101
|
-
- test/data/doc_detect_rbtest-input.rb
|
102
|
-
- test/data/ri-input.rb
|
103
|
-
- test/data/rspec_poetry-output.rb
|
104
|
-
- test/data/ri_emacs-input.rb
|
105
|
-
- test/data/ri-output.rb
|
106
|
-
- test/data/refe-input.rb
|
107
|
-
- test/data/rspec-input.rb
|
108
|
-
- test/data/unit_test_poetry-output.rb
|
109
|
-
- test/data/unit_test_detect_rbtest2-output.rb
|
110
|
-
- test/data/doc_detect_rbtest-output.rb
|
111
|
-
- test/data/doc-input.rb
|
112
|
-
- test/data/completion-input.rb
|
113
|
-
- test/data/unit_test_detect_rbtest-input.rb
|
114
|
-
- test/data/unit_test_detect_rbtest-output.rb
|
115
|
-
- test/data/completion_class_info_no_candidates-input.rb
|
116
|
-
- test/data/completion_detect_rbtest2-output.rb
|
117
|
-
- test/data/no_warnings-input.rb
|
118
|
-
- test/data/completion-output.rb
|
119
|
-
- test/data/no_warnings-output.rb
|
120
|
-
- test/data/completion_emacs_icicles-input.rb
|
121
|
-
- test/data/completion_in_method-input.rb
|
122
|
-
- test/data/add_markers-output.rb
|
123
|
-
- test/data/completion_detect_rbtest-output.rb
|
124
|
-
- test/data/completion_class_info-input.rb
|
125
|
-
- test/data/unit_test_poetry-input.rb
|
126
|
-
- test/data/doc_detect_rbtest2-output.rb
|
127
|
-
- test/data/completion_detect_rbtest-input.rb
|
128
|
-
- test/data/unit_test_rbtest-input.rb
|
129
|
-
- test/data/rspec_poetry-input.rb
|
130
|
-
- test/data/completion_emacs-output.rb
|
131
|
-
- test/data/completion_rbtest-input.rb
|
132
|
-
- test/data/completion_class_info_no_candidates-output.rb
|
133
|
-
- test/data/unit_test_rbtest-output.rb
|
134
|
-
- test/data/refe-output.rb
|
135
62
|
- test/data/sample_test_script.rb
|
136
|
-
- test/data/unit_test-output.rb
|
137
|
-
- test/data/completion_detect_rbtest2-input.rb
|
138
|
-
- test/data/simple_annotation-input.rb
|
139
|
-
- test/data/completion_emacs-input.rb
|
140
|
-
- test/data/unit_test_detect_rbtest2-input.rb
|
141
|
-
- test/data/doc_rbtest-input.rb
|
142
|
-
- test/data/completion_emacs_icicles-output.rb
|
143
|
-
- test/data/ri_emacs-output.rb
|
144
|
-
- test/data/doc-output.rb
|
145
|
-
- test/data/add_markers-input.rb
|
146
|
-
test_files:
|
147
|
-
- test/test_functional.rb
|
148
63
|
- test/test_options.rb
|
149
|
-
- test/
|
150
|
-
- test/test_run.rb
|
151
|
-
- test/test_method_analyzer.rb
|
64
|
+
- test/test_xmpfilter.rb
|
152
65
|
- test/test_completion.rb
|
66
|
+
- test/test_functional.rb
|
153
67
|
- test/test_method_args.rb
|
68
|
+
- test/test_doc.rb
|
154
69
|
- test/test_xmptestunitfilter.rb
|
155
|
-
|
156
|
-
|
70
|
+
has_rdoc: true
|
71
|
+
homepage: http://eigenclass.org/hiki.rb?rcodetools
|
72
|
+
post_install_message: |+
|
73
|
+
|
74
|
+
==============================================================================
|
75
|
+
|
76
|
+
rcodetools will work better if you use it along with FastRI, an alternative to
|
77
|
+
the standard 'ri' documentation browser which features intelligent searching,
|
78
|
+
better RubyGems integration, vastly improved performance, remote queries via
|
79
|
+
DRb... You can find it at http://eigenclass.org/hiki.rb?fastri and it is also
|
80
|
+
available in RubyGems format:
|
81
|
+
|
82
|
+
gem install fastri
|
83
|
+
|
84
|
+
Read README.emacs and README.vim for information on how to integrate
|
85
|
+
rcodetools in your editor.
|
86
|
+
|
87
|
+
==============================================================================
|
88
|
+
|
157
89
|
rdoc_options:
|
158
90
|
- --main
|
159
91
|
- README
|
160
92
|
- --title
|
161
93
|
- rcodetools
|
162
|
-
|
163
|
-
-
|
164
|
-
|
165
|
-
|
166
|
-
-
|
167
|
-
-
|
168
|
-
|
169
|
-
|
170
|
-
|
94
|
+
require_paths:
|
95
|
+
- lib
|
96
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
97
|
+
requirements:
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: "0"
|
101
|
+
version:
|
102
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
|
+
requirements:
|
104
|
+
- - ">="
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: "0"
|
107
|
+
version:
|
171
108
|
requirements: []
|
172
109
|
|
173
|
-
|
174
|
-
|
110
|
+
rubyforge_project:
|
111
|
+
rubygems_version: 1.2.0
|
112
|
+
signing_key:
|
113
|
+
specification_version: 2
|
114
|
+
summary: rcodetools is a collection of Ruby code manipulation tools
|
115
|
+
test_files:
|
116
|
+
- test/test_method_analyzer.rb
|
117
|
+
- test/test_ruby_toggle_file.rb
|
118
|
+
- test/test_options.rb
|
119
|
+
- test/test_xmpfilter.rb
|
120
|
+
- test/test_completion.rb
|
121
|
+
- test/test_functional.rb
|
122
|
+
- test/test_method_args.rb
|
123
|
+
- test/test_doc.rb
|
124
|
+
- test/test_xmptestunitfilter.rb
|
data/test/data/bindings-input.rb
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
|
2
|
-
require 'test/unit'
|
3
|
-
|
4
|
-
class TestFoo < Test::Unit::TestCase
|
5
|
-
def setup
|
6
|
-
@o = []
|
7
|
-
end
|
8
|
-
|
9
|
-
def test_foo
|
10
|
-
a = 1
|
11
|
-
b = a
|
12
|
-
b # =>
|
13
|
-
end
|
14
|
-
|
15
|
-
def test_arr
|
16
|
-
last = 1
|
17
|
-
@o << last
|
18
|
-
@o.last # =>
|
19
|
-
end
|
20
|
-
|
21
|
-
def test_bar
|
22
|
-
a = b = c = 1
|
23
|
-
d = a
|
24
|
-
d # =>
|
25
|
-
end
|
26
|
-
end
|
@@ -1,31 +0,0 @@
|
|
1
|
-
|
2
|
-
require 'test/unit'
|
3
|
-
|
4
|
-
class TestFoo < Test::Unit::TestCase
|
5
|
-
def setup
|
6
|
-
@o = []
|
7
|
-
end
|
8
|
-
|
9
|
-
def test_foo
|
10
|
-
a = 1
|
11
|
-
b = a
|
12
|
-
assert_equal a, b
|
13
|
-
assert_equal 1, b
|
14
|
-
end
|
15
|
-
|
16
|
-
def test_arr
|
17
|
-
last = 1
|
18
|
-
@o << last
|
19
|
-
assert_equal last, @o.last
|
20
|
-
assert_equal 1, @o.last
|
21
|
-
end
|
22
|
-
|
23
|
-
def test_bar
|
24
|
-
a = b = c = 1
|
25
|
-
d = a
|
26
|
-
assert_equal a, d
|
27
|
-
assert_equal b, d
|
28
|
-
assert_equal c, d
|
29
|
-
assert_equal 1, d
|
30
|
-
end
|
31
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
Array.new(3).uni
|
@@ -1 +0,0 @@
|
|
1
|
-
Array.new(3).s
|
@@ -1 +0,0 @@
|
|
1
|
-
Array.new(3).nonexisten
|
@@ -1 +0,0 @@
|
|
1
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
Array.new(3).uni
|
@@ -1 +0,0 @@
|
|
1
|
-
Array.new(3).uni
|
@@ -1 +0,0 @@
|
|
1
|
-
1.div
|