grep-interactors 0.1.4 → 0.1.5
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 +4 -4
- data/.ruby-version +1 -0
- data/Gemfile.lock +1 -1
- data/lib/grep_interactors/grep_in_paths.rb +2 -4
- data/lib/grep_interactors/parser.rb +2 -2
- data/lib/grep_interactors/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 854569c021db02cca1255e15def32b75f97da3a55801784e1c252b4acb63a7fa
|
4
|
+
data.tar.gz: 8bc1a8d811b39cc30afb51893c1ef6b372c509239dab479f9a43f5da437446ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b75b6d5cd1a205bfb4050d65b0d097c69ec636bdc59d3f0994da3894d2a7ba3f56f2a85d28fb430789313d850acf430ae19e6380680390e786bb54645e36a7c6
|
7
|
+
data.tar.gz: abdc2c2b9bd83f71396d776bf269960350c4226c7e64b71bd764e3b229ec89ae79ed9d04a44752d9f17d52ad53ab71c6f3aaaddadef411a01cff08a0b7080b39
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.7.0
|
data/Gemfile.lock
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'byebug'
|
2
|
-
|
3
1
|
module GrepInteractors
|
4
2
|
class GrepInPaths
|
5
3
|
include Import["string_matcher"]
|
@@ -8,9 +6,9 @@ module GrepInteractors
|
|
8
6
|
file_paths.reduce([]) do |accum, file_path|
|
9
7
|
lines = File.open(file_path).readlines
|
10
8
|
|
11
|
-
accum + lines.each_with_index.
|
9
|
+
accum + lines.each_with_index.map do |line, index|
|
12
10
|
("#{file_path}:#{index + 1}") if string_matcher.match?(line, query)
|
13
|
-
end
|
11
|
+
end.compact
|
14
12
|
end.flatten
|
15
13
|
end
|
16
14
|
end
|
@@ -25,9 +25,9 @@ module GrepInteractors
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def parse_interactors(file_path)
|
28
|
-
interactors = File.read(file_path).scan(/[A-Z][a-z]*[::[A-Z][a-z]*]*/).
|
28
|
+
interactors = File.read(file_path).scan(/[A-Z][a-z]*[::[A-Z][a-z]*]*/).map do |constant|
|
29
29
|
get_full_class_name(constant, file_path)
|
30
|
-
end
|
30
|
+
end.compact
|
31
31
|
current_class = get_class_name_by_path(file_path)
|
32
32
|
|
33
33
|
interactors - [current_class]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grep-interactors
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ArslanZamanov
|
@@ -50,6 +50,7 @@ extra_rdoc_files: []
|
|
50
50
|
files:
|
51
51
|
- ".gitignore"
|
52
52
|
- ".rspec"
|
53
|
+
- ".ruby-version"
|
53
54
|
- ".travis.yml"
|
54
55
|
- Gemfile
|
55
56
|
- Gemfile.lock
|
@@ -91,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
92
|
- !ruby/object:Gem::Version
|
92
93
|
version: '0'
|
93
94
|
requirements: []
|
94
|
-
rubygems_version: 3.
|
95
|
+
rubygems_version: 3.1.2
|
95
96
|
signing_key:
|
96
97
|
specification_version: 4
|
97
98
|
summary: Recursive Grep keyword in called interactors inside requested interactor
|