findyml 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/findyml +3 -11
- data/lib/findyml/version.rb +1 -1
- data/lib/findyml.rb +12 -0
- 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: 964b255cb131f3caf96e5365470ecca91efdbfacead42d4b12bdba79ac461dcd
|
4
|
+
data.tar.gz: 1d6660d1b928dd4936a346f67d3364fcde388b681de188a105bfa8011dab0024
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b12382da9ac27279eda62b894928b23896c4f45dbdbec81203f380b5bb46a4bccac60d940760a572bb564deef2d94621809f55fc09ca84947920d532bc84a18e
|
7
|
+
data.tar.gz: 9888c755fbe23cf6991ece635bbab2b2c7391e9af0790bbed3a8572f9bf3ed09d4ba77b2152f238468a97c6c8f10314c824243fbc0e104804ab6a9aba4d86780
|
data/exe/findyml
CHANGED
@@ -1,17 +1,9 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
|
5
|
-
require "findyml"
|
4
|
+
$0 = "findyml"
|
6
5
|
|
7
|
-
|
8
|
-
when 1
|
9
|
-
[Dir.pwd, ARGV.last]
|
10
|
-
when 2
|
11
|
-
ARGV
|
12
|
-
else
|
13
|
-
puts "Usage: #{$0} [path] query"
|
14
|
-
exit(1)
|
15
|
-
end
|
6
|
+
require "findyml"
|
16
7
|
|
8
|
+
dir, query = Findyml.parse_options
|
17
9
|
Findyml.find_and_print(query, dir)
|
data/lib/findyml/version.rb
CHANGED
data/lib/findyml.rb
CHANGED
@@ -146,6 +146,18 @@ module Findyml
|
|
146
146
|
end
|
147
147
|
end
|
148
148
|
|
149
|
+
def self.parse_options
|
150
|
+
case ARGV.size
|
151
|
+
when 1
|
152
|
+
[Dir.pwd, ARGV.last]
|
153
|
+
when 2
|
154
|
+
ARGV
|
155
|
+
else
|
156
|
+
puts "Usage: #{$0} [path] query"
|
157
|
+
exit(1)
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
149
161
|
def self.find(query_string, dir = Dir.pwd)
|
150
162
|
return to_enum(:find, query_string, dir) unless block_given?
|
151
163
|
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: findyml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danielle Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description:
|
13
|
+
description: Ever wondered where that i18n locale was defined but your project is
|
14
14
|
massive and legacy and has multiple competing inconsistent standards of organisation?
|
15
15
|
Let findyml ease your pain by finding that key for you!
|
16
16
|
email:
|