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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 24167ff7d45f6430782e0a071dde14d82c123152a4fc80015de958636a09af66
4
- data.tar.gz: cbd75aa4977eda3ee732361e41af67383cfe34dda933390e2dce3d4ebd44a92d
3
+ metadata.gz: 964b255cb131f3caf96e5365470ecca91efdbfacead42d4b12bdba79ac461dcd
4
+ data.tar.gz: 1d6660d1b928dd4936a346f67d3364fcde388b681de188a105bfa8011dab0024
5
5
  SHA512:
6
- metadata.gz: 80fc4923eafba7bce45ace925a9c3f1becd25cbe1da00b7c219a1f90fb50074eb93642a7b260b18c7eb7c803058d8026b4b552ec196de8b68c6bd32a028fbe1d
7
- data.tar.gz: 95c2d6dedf85c7313f5f9e7871740f83b1265e763eb2bc494c66231bf37dca5ce10935ab2e0dc4e08cb65bb2f6da6a8e7774c8568289dfd54e23b94f289e19be
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
- require "bundler/setup"
5
- require "findyml"
4
+ $0 = "findyml"
6
5
 
7
- dir, query = case ARGV.size
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Findyml
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
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.0
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-09-21 00:00:00.000000000 Z
11
+ date: 2023-10-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: Even wondered where that i18n locale was defined but your project is
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: