ripper-tags 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ripper-tags/parser.rb +16 -10
- data/lib/ripper-tags.rb +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19f8795f33f82e90834ecd447a2e2b2e131fee20d84bce8eefafd3dab2e895cb
|
4
|
+
data.tar.gz: 7b82c2d73bab29c600db4c8d4ee181ee6fb4885b38f015ee1a8aeddeec5e896e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7433ae47b7c0d9cd2f1621ead9ad63d5af2b82350428abe5c52b614b2bf2f77c698aaa2edd049655db940b6fa1c5703dfefd9ac563c1a8dde1ac00b7825a0d01
|
7
|
+
data.tar.gz: 344aa2dd31ac888b514b66dfff279c2dcaa8a163339e1899074eeafe5a4937caa5a59f82e5880cce8816a522d3fd02abae2a54ad5903fb3af9f5ec4ad372d89e
|
data/lib/ripper-tags/parser.rb
CHANGED
@@ -193,17 +193,21 @@ class Parser < Ripper
|
|
193
193
|
klass = name == access ? nil : 'self'
|
194
194
|
procedure = :def_with_access
|
195
195
|
|
196
|
-
if args[1][0].is_a?(
|
197
|
-
|
198
|
-
|
196
|
+
if args[1][0].is_a?(Array)
|
197
|
+
args[1].inject([]) do |gen, def_args|
|
198
|
+
if def_args[1].is_a?(String)
|
199
|
+
gen << [procedure, klass, def_args[1], access, line]
|
200
|
+
else
|
201
|
+
gen
|
202
|
+
end
|
203
|
+
end
|
204
|
+
elsif args[1][0].is_a?(String)
|
205
|
+
[:redefine_access, klass, args[1][0], access, line]
|
199
206
|
elsif args[1][1] == 'self'
|
200
|
-
|
207
|
+
[procedure, klass, args[1][2], access, line]
|
201
208
|
else
|
202
|
-
|
203
|
-
method_name = args[1][1]
|
209
|
+
[procedure, nil, args[1][1], access, line]
|
204
210
|
end
|
205
|
-
|
206
|
-
[procedure, klass, method_name, access, line]
|
207
211
|
when "module_function"
|
208
212
|
access = "public"
|
209
213
|
klass = "self"
|
@@ -223,11 +227,13 @@ class Parser < Ripper
|
|
223
227
|
when /^[mc]?attr_(accessor|reader|writer)$/
|
224
228
|
gen_reader = $1 != 'writer'
|
225
229
|
gen_writer = $1 != 'reader'
|
226
|
-
|
230
|
+
gen = []
|
231
|
+
args[1..-1].compact.each do |arg|
|
232
|
+
next unless arg[0].is_a?(String)
|
227
233
|
gen << [:def, arg[0], line] if gen_reader
|
228
234
|
gen << [:def, "#{arg[0]}=", line] if gen_writer
|
229
|
-
gen
|
230
235
|
end
|
236
|
+
gen
|
231
237
|
when "has_many", "has_and_belongs_to_many"
|
232
238
|
a = args[1][0]
|
233
239
|
kind = name.to_sym
|
data/lib/ripper-tags.rb
CHANGED
@@ -11,7 +11,7 @@ require 'ripper-tags/vim_append_formatter'
|
|
11
11
|
require 'ripper-tags/json_formatter'
|
12
12
|
|
13
13
|
module RipperTags
|
14
|
-
def self.version() "0.9.
|
14
|
+
def self.version() "0.9.1" end
|
15
15
|
|
16
16
|
FatalError = Class.new(RuntimeError)
|
17
17
|
|
@@ -97,7 +97,7 @@ module RipperTags
|
|
97
97
|
opts.on("--tag-relative[=yes|no|always|never]", "Make file paths relative to the directory of the tag file") do |value|
|
98
98
|
options.tag_relative = value || true
|
99
99
|
end
|
100
|
-
opts.on("-L", "--input-file=FILE", "File to read paths to process
|
100
|
+
opts.on("-L", "--input-file=FILE", "File to read paths to process from (use `-` for stdin)") do |file|
|
101
101
|
options.input_file = file
|
102
102
|
end
|
103
103
|
opts.on("-R", "--recursive", "Descend recursively into subdirectories") do
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ripper-tags
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mislav Marohnić
|
8
8
|
- Aman Gupta
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-05-24 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: fast, accurate ctags generator for ruby source code using Ripper
|
15
15
|
email:
|
@@ -36,7 +36,7 @@ homepage: https://github.com/tmm1/ripper-tags
|
|
36
36
|
licenses:
|
37
37
|
- MIT
|
38
38
|
metadata: {}
|
39
|
-
post_install_message:
|
39
|
+
post_install_message:
|
40
40
|
rdoc_options: []
|
41
41
|
require_paths:
|
42
42
|
- lib
|
@@ -51,8 +51,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '0'
|
53
53
|
requirements: []
|
54
|
-
rubygems_version: 3.
|
55
|
-
signing_key:
|
54
|
+
rubygems_version: 3.3.3
|
55
|
+
signing_key:
|
56
56
|
specification_version: 4
|
57
57
|
summary: ctags generator for ruby code
|
58
58
|
test_files: []
|