grep-interactors 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d2a2e87b1d9c2dae8567e7506cbb3b07d7c078a747e4874455e0842457a05aec
4
- data.tar.gz: ad81aeef6e0da9bdd8f89bb3a216659de4b2a0e99704f91d27f5dcba826efef9
3
+ metadata.gz: 854569c021db02cca1255e15def32b75f97da3a55801784e1c252b4acb63a7fa
4
+ data.tar.gz: 8bc1a8d811b39cc30afb51893c1ef6b372c509239dab479f9a43f5da437446ab
5
5
  SHA512:
6
- metadata.gz: 4de178666a12f3b3803b88a7053b459ffb373c63e0a068a7c01eb040e276a49bf7bfb65114a9dc838cc295a4708f1265c692fcd20b359706b8202c8e1fc140cb
7
- data.tar.gz: 5e6e0839fbcbaf6730b628cbe2b9223f262e10c24d97a1ec7f104b3fdc2b5bdeec6e8b4fccea14af6db7a448df3110fd2354d315a202be4c319e9e4bbc7943fe
6
+ metadata.gz: b75b6d5cd1a205bfb4050d65b0d097c69ec636bdc59d3f0994da3894d2a7ba3f56f2a85d28fb430789313d850acf430ae19e6380680390e786bb54645e36a7c6
7
+ data.tar.gz: abdc2c2b9bd83f71396d776bf269960350c4226c7e64b71bd764e3b229ec89ae79ed9d04a44752d9f17d52ad53ab71c6f3aaaddadef411a01cff08a0b7080b39
@@ -0,0 +1 @@
1
+ 2.7.0
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- grep-interactors (0.1.3)
4
+ grep-interactors (0.1.4)
5
5
  activesupport
6
6
  dry-auto_inject
7
7
 
@@ -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.filter_map do |line, 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]*]*/).filter_map do |constant|
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]
@@ -1,3 +1,3 @@
1
1
  module GrepInteractors
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
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
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.0.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