code_web 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/README.md +15 -1
- data/lib/code_web/cli.rb +1 -1
- data/lib/code_web/code_parser.rb +1 -1
- data/lib/code_web/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70d3e9a62d5dc47a400effe85954445549a8bae3
|
4
|
+
data.tar.gz: ed930e4455fd1b2591408734b62b6780307ea284
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3252938470ec5eb9ee32aed8e52506af68d14c2d81be246d6f8731b4f33cba6c88639a8e5e33d83c10103bd31c283beb2d6de15e3717f8db6981ef70c9d5a8f
|
7
|
+
data.tar.gz: 3a24ab58d66f443c98f5e743c7526d19258eb3e1546405ff353a1b41064e1897f31373134c2a9f667588b10281852abd72136eca619d25a79c3310f06db5ab4c
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [0.0.8] - 2018-08-28
|
10
|
+
- fix html report output
|
11
|
+
|
9
12
|
## [0.0.7] - 2017-06-13
|
10
13
|
- fix `-u` flag
|
11
14
|
- added `--both` to show both github and local filesystem links
|
@@ -27,7 +30,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
27
30
|
- added flags for byebug and pry to allow debugging of issues (sorry not more stable)
|
28
31
|
|
29
32
|
|
30
|
-
[Unreleased]: https://github.com/kbrock/code_web/compare/v0.0.
|
33
|
+
[Unreleased]: https://github.com/kbrock/code_web/compare/v0.0.8...HEAD
|
34
|
+
[0.0.8]: https://github.com/kbrock/code_web/compare/v0.0.7...v0.0.8
|
31
35
|
[0.0.7]: https://github.com/kbrock/code_web/compare/v0.0.6...v0.0.7
|
32
36
|
[0.0.6]: https://github.com/kbrock/code_web/compare/v0.0.5...v0.0.6
|
33
37
|
[0.0.5]: https://github.com/kbrock/code_web/compare/v0.0.4...v0.0.5
|
data/README.md
CHANGED
@@ -1,8 +1,13 @@
|
|
1
1
|
# CodeWeb
|
2
2
|
|
3
|
-
This uses ruby parser to read code and find references.
|
3
|
+
This uses ruby parser to read code with static analysis and find references.
|
4
4
|
Works best when looking for finding static methods that possibly span multiple lines
|
5
5
|
|
6
|
+
It is not smart enough to understand return types.
|
7
|
+
|
8
|
+
For hashes/positional arguments, it displays the hash arguments.
|
9
|
+
It only works when actual hash parameters are passed vs variables or splats.
|
10
|
+
|
6
11
|
It generates an html file with the list of each method and the invocations.
|
7
12
|
Each reference has a url to the place in code where it is found.
|
8
13
|
|
@@ -34,6 +39,14 @@ Or install it yourself as:
|
|
34
39
|
|
35
40
|
$ code_web -p 'miq_queue.rb$=#999' -p 'tools/=#ccc' 'MiqQueue\b' app tools lib -o miq_queue.html
|
36
41
|
|
42
|
+
|
43
|
+
# find calls to User.select
|
44
|
+
$ code_web 'User.select\b' lib -o user_select.html
|
45
|
+
|
46
|
+
|
47
|
+
# generate links pointing to github (instead of local sublime)
|
48
|
+
$ code_web --url https://github.com/ManageIQ/manageiq/blob/master --byebug 'MiqQueue' app lib/vmdb -o miq_queue.html
|
49
|
+
|
37
50
|
## Url handline
|
38
51
|
|
39
52
|
Currently, this generates urls using the textmate file protocol.
|
@@ -75,6 +88,7 @@ ret=`"#{SUBL_BIN_PATH}" "#{subl_file}"`
|
|
75
88
|
exit 0 # the handler has finished successfully
|
76
89
|
```
|
77
90
|
|
91
|
+
I left the debugging statements in there to help you if there are issues
|
78
92
|
|
79
93
|
## Contributing
|
80
94
|
|
data/lib/code_web/cli.rb
CHANGED
@@ -105,7 +105,7 @@ module CodeWeb
|
|
105
105
|
|
106
106
|
def display_results
|
107
107
|
STDOUT.puts "parsed #{files_parsed} files"
|
108
|
-
report_generator.new(method_calls, class_map, arg_regex,
|
108
|
+
report_generator.new(method_calls, class_map, arg_regex, output, :base_url => base_url).report
|
109
109
|
end
|
110
110
|
end
|
111
111
|
end
|
data/lib/code_web/code_parser.rb
CHANGED
@@ -63,7 +63,7 @@ module CodeWeb
|
|
63
63
|
in_context 'yield', true do
|
64
64
|
traverse_nodes(ast, 2..-1)
|
65
65
|
end
|
66
|
-
when :call # object, statement? || const symbol, args
|
66
|
+
when :call, :safe_call # object, statement? || const symbol, args
|
67
67
|
handle_method_call(ast, has_yield)
|
68
68
|
traverse_nodes(ast, 1..-1)
|
69
69
|
else
|
data/lib/code_web/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: code_web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Keenan Brock
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby_parser
|
@@ -122,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
122
|
version: '0'
|
123
123
|
requirements: []
|
124
124
|
rubyforge_project:
|
125
|
-
rubygems_version: 2.
|
125
|
+
rubygems_version: 2.6.13
|
126
126
|
signing_key:
|
127
127
|
specification_version: 4
|
128
128
|
summary: Display methods
|