code_web 0.0.7 → 0.0.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: db6663f8fa280e0e501e377ba513d3c4db1be267
4
- data.tar.gz: 2d9904670ee7c4b050c099683360d9d989340532
3
+ metadata.gz: 70d3e9a62d5dc47a400effe85954445549a8bae3
4
+ data.tar.gz: ed930e4455fd1b2591408734b62b6780307ea284
5
5
  SHA512:
6
- metadata.gz: c92eac121116f0d1037498d276b691b4f75aa98b894eabb0579d404bb05852953c0d83255f4455158417de4df70b3e7627690a404082f1abfbb996e6d7bba429
7
- data.tar.gz: 1aa905da6a3a5e26a394c4cd6c82c4c391a387403c50c26fbf5a1d207b022294e7e6858ebbfac43af5482e0c7dc2534515e186b75e0a19fc2653a188543bd6e0
6
+ metadata.gz: a3252938470ec5eb9ee32aed8e52506af68d14c2d81be246d6f8731b4f33cba6c88639a8e5e33d83c10103bd31c283beb2d6de15e3717f8db6981ef70c9d5a8f
7
+ data.tar.gz: 3a24ab58d66f443c98f5e743c7526d19258eb3e1546405ff353a1b41064e1897f31373134c2a9f667588b10281852abd72136eca619d25a79c3310f06db5ab4c
@@ -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.7...HEAD
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
 
@@ -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, base_url, output).report
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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module CodeWeb
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
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.7
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: 2017-08-01 00:00:00.000000000 Z
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.5.1
125
+ rubygems_version: 2.6.13
126
126
  signing_key:
127
127
  specification_version: 4
128
128
  summary: Display methods