ripper-tags 0.9.1 → 1.0.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 +19 -11
- data/lib/ripper-tags.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f897dfcbd85281509bec2d98a653acc636a38395ebf8feeb0079022a0d4cb1ae
|
4
|
+
data.tar.gz: 48ce48dd1d220cefcba8208300103ea538e58e2f3274fc41c09b33a145722b7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 969bce1d587fe1aad5ea0f3136e7381081adaabdf0537db7e0a60bc7f50b991f2354e7581ae7d0d48791c05d7ab827962790befb181af3beb046adc6601dce32
|
7
|
+
data.tar.gz: 3d3a64d07ac5dcfb1b3cf83524fd6534a661a84217dcfe23e8f9dd90f27a8f92f48d146341b6a64e6f6d24f6bd715e7fe37051ea4e258d939530b590ff2a5410
|
data/lib/ripper-tags/parser.rb
CHANGED
@@ -136,7 +136,7 @@ class Parser < Ripper
|
|
136
136
|
end
|
137
137
|
|
138
138
|
def on_string_add(*args)
|
139
|
-
[args[1], lineno]
|
139
|
+
[args[1], lineno] unless args[0].is_a?(Array) && args[0].include?(:string_embexpr)
|
140
140
|
end
|
141
141
|
|
142
142
|
def on_string_embexpr(*)
|
@@ -291,8 +291,9 @@ class Parser < Ripper
|
|
291
291
|
end
|
292
292
|
|
293
293
|
def on_method_add_block(method, body)
|
294
|
-
|
295
|
-
|
294
|
+
if method.nil?
|
295
|
+
body ? body.last : nil
|
296
|
+
elsif (method[2] == "class_eval" || method[2] == "module_eval") && body
|
296
297
|
[:class_eval, [
|
297
298
|
method[1].is_a?(Array) ? method[1][0] : method[1],
|
298
299
|
method[3]
|
@@ -302,6 +303,8 @@ class Parser < Ripper
|
|
302
303
|
call = method.dup
|
303
304
|
call[4] = body.last
|
304
305
|
call
|
306
|
+
elsif :fcall == method[0] && body
|
307
|
+
body.last
|
305
308
|
else
|
306
309
|
super
|
307
310
|
end
|
@@ -313,8 +316,8 @@ class Parser < Ripper
|
|
313
316
|
end
|
314
317
|
|
315
318
|
def on_delegate(*args)
|
316
|
-
method_names = args.select { |arg| arg.first.is_a?
|
317
|
-
options = args.select { |arg| arg.first.is_a?(Array) && arg.first.first == :assoc }.flatten(1)
|
319
|
+
method_names = args.select { |arg| arg.is_a?(Array) && arg.first.is_a?(String) }
|
320
|
+
options = args.select { |arg| arg.is_a?(Array) && arg.first.is_a?(Array) && arg.first.first == :assoc }.flatten(1)
|
318
321
|
options = Hash[options.map { |_assoc, key, val| [key[0], val[0]] if key }.compact]
|
319
322
|
|
320
323
|
target = options["to:"] || options["to"] # When using hashrocket syntax there is no ':'
|
@@ -544,12 +547,17 @@ end
|
|
544
547
|
end
|
545
548
|
|
546
549
|
def on_call(*args)
|
550
|
+
process(args)
|
547
551
|
end
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
alias
|
553
|
-
alias
|
552
|
+
|
553
|
+
def ignore(*args)
|
554
|
+
end
|
555
|
+
|
556
|
+
alias on_aref_field ignore
|
557
|
+
alias on_field ignore
|
558
|
+
alias on_fcall ignore
|
559
|
+
alias on_args ignore
|
560
|
+
alias on_assoc ignore
|
561
|
+
alias on_! ignore
|
554
562
|
end
|
555
563
|
end
|
data/lib/ripper-tags.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ripper-tags
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mislav Marohnić
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-05-30 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: fast, accurate ctags generator for ruby source code using Ripper
|
15
15
|
email:
|
@@ -51,7 +51,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '0'
|
53
53
|
requirements: []
|
54
|
-
rubygems_version: 3.
|
54
|
+
rubygems_version: 3.4.6
|
55
55
|
signing_key:
|
56
56
|
specification_version: 4
|
57
57
|
summary: ctags generator for ruby code
|