grep-interactors 0.1.1 → 0.1.2

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: 13371cc60413f745df6dd14ec5c45539f3ee7dccaedb70f5401ccf4f8f59fe7c
4
- data.tar.gz: 7e4a2b69cd84b721af0079e86429e37af818f07215ebe66a04b47f2a967b9116
3
+ metadata.gz: 1d6a1bc71641b2b1683ca2c35892ebb15f365c38ac9e150e9ea8e696d7818363
4
+ data.tar.gz: 33221ec7aadb4f246e9aae9076ece6216d73874348a2a6ddf0611946031bad68
5
5
  SHA512:
6
- metadata.gz: 8d51cbd7df7831c63eadff494bb6c2d2024a23afe55fa1d05691afb8b47c3ad801dad6cdb45fba8b281e2761f0ef7fcf9223481c836455482d569319e4c032f3
7
- data.tar.gz: 5a484354429f6bd957540788d93ce26060ef6c75aaf931cd098a5dd63091628cb7c814745c713c69cbc0a37568b21ba711764abe58b0d2ad45622255f9663ddf
6
+ metadata.gz: 42bb60b9ebeff22d5d10211c8b1b21684ca5df34177f003f51efbae55ede72c96d3cdc60042e3ea8e96fedbb459c0c205f25086d213b56229517f15e96276835
7
+ data.tar.gz: 28b0964bc7f7eb48c0fd8ad7236f8e806ad167164252a433e99847cc6fe78a0b96d8f61b03fc91aaa596f4cddf75de0c4f097525ced92f96ae6504ae56c46e3d
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- grep-interactors (0.1.1)
4
+ grep-interactors (0.1.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -26,11 +26,11 @@ Or install it yourself as:
26
26
 
27
27
  ## How to run
28
28
  ```bash
29
- $ grep-interactors terminal_app interactors_path file_path keyword
29
+ $ grep-interactors interactors_path file_path keyword
30
30
  ```
31
31
  eg
32
32
  ```bash
33
- $ grep-interactors terminal_app.rb /home/stanislav_lemm/Projects/solaris/app/interactors/ /home/stanislav_lemm/Projects/solaris/app/interactors/agreements/create.rb agreement
33
+ $ grep-interactors /home/stanislav_lemm/Projects/solaris/app/interactors/ /home/stanislav_lemm/Projects/solaris/app/interactors/agreements/create.rb agreement
34
34
  ```
35
35
  _Works only with absolute path for now_
36
36
 
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'cli'
4
+
5
+ Cli.call(ARGV[0], ARGV[1], ARGV[2])
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'cli'
4
+
5
+ Cli.call(ARGV[0], ARGV[1], ARGV[2])
@@ -1,9 +1,8 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "grep-interactors"
3
- spec.version = "0.1.1"
3
+ spec.version = "0.1.2"
4
4
  spec.authors = ["ArslanZamanov"]
5
5
  spec.email = ["arslan.zamanov@flatstack.com"]
6
- spec.executables << 'grep'
7
6
 
8
7
  spec.summary = "Recursive Grep keyword in called interactors inside requested interactor"
9
8
  spec.description = "WIP"
@@ -23,5 +22,6 @@ Gem::Specification.new do |spec|
23
22
  end
24
23
  spec.bindir = "exe"
25
24
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
+
26
26
  spec.require_paths = ["lib"]
27
27
  end
@@ -0,0 +1,9 @@
1
+ require_relative "grep_interactors"
2
+
3
+ class Cli
4
+ def self.call(interactors_path, file_path, query, out = STDOUT)
5
+ out << GrepInteractors.call(interactors_path, file_path, query).join("\n")
6
+ out << "\n"
7
+ exit 0
8
+ end
9
+ end
metadata CHANGED
@@ -1,20 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grep-interactors
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ArslanZamanov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-09-17 00:00:00.000000000 Z
11
+ date: 2020-09-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: WIP
14
14
  email:
15
15
  - arslan.zamanov@flatstack.com
16
16
  executables:
17
- - grep
17
+ - grep-interactors
18
18
  extensions: []
19
19
  extra_rdoc_files: []
20
20
  files:
@@ -27,10 +27,11 @@ files:
27
27
  - README.md
28
28
  - Rakefile
29
29
  - bin/console
30
- - bin/grep
30
+ - bin/grep-interactors
31
31
  - bin/setup
32
- - exe/grep
32
+ - exe/grep-interactors
33
33
  - grep-interactors.gemspec
34
+ - lib/cli.rb
34
35
  - lib/grep_in_paths.rb
35
36
  - lib/grep_interactors.rb
36
37
  - lib/parser.rb
data/bin/grep DELETED
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'grep_interactors'
4
-
5
- puts GrepInteractors.call(ARGV[0], ARGV[1], ARGV[2])
data/exe/grep DELETED
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'grep_interactors'
4
-
5
- puts GrepInteractors.call(ARGV[0], ARGV[1], ARGV[2])