source_finder 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/source_finder/option_parser.rb +38 -0
- data/lib/source_finder/source_file_globber.rb +1 -1
- data/lib/source_finder/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1089d8af1edd6c5321df1664cf53c1f4c5c8a9e6
|
4
|
+
data.tar.gz: 7b3affae47870a707a5824bb56814c1fde4d2fa3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43a3acf80e9f96a8e06fafa690b539dd45cc667416cd380cb2cc8b377fbef6d858b0b5131a257af5cc8ec9f80272f02389d54d14c498e1ac24c1a91971078d71
|
7
|
+
data.tar.gz: 497e4661e3a7030ad272877dd0bf9b3a57c98aafab2270d67ab575eb5b7b788291ab3b83a2afa2db900f04d8736418dcc0ee1f5683a57a7261b89e25395e9abe
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module SourceFinder
|
2
|
+
# Brings in command-line options to configure SourceFinder--usable
|
3
|
+
# with the ruby OptionParser class, brought in with 'require
|
4
|
+
# "optparse"'
|
5
|
+
class OptionParser
|
6
|
+
def fresh_globber
|
7
|
+
SourceFinder::SourceFileGlobber.new
|
8
|
+
end
|
9
|
+
|
10
|
+
def default_source_files_glob
|
11
|
+
fresh_globber.source_files_glob
|
12
|
+
end
|
13
|
+
|
14
|
+
def default_source_files_exclude_glob
|
15
|
+
fresh_globber.source_files_exclude_glob
|
16
|
+
end
|
17
|
+
|
18
|
+
def add_glob_option(opts, options)
|
19
|
+
opts.on('-g glob here', '--glob',
|
20
|
+
'Which files to parse - ' \
|
21
|
+
"default is #{default_source_files_glob}") do |v|
|
22
|
+
options[:glob] = v
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def add_exclude_glob_option(opts, options)
|
27
|
+
opts.on('-e glob here', '--exclude-glob',
|
28
|
+
'Files to exclude - default is none') do |v|
|
29
|
+
options[:exclude] = v
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def add_options(opts, options)
|
34
|
+
add_glob_option(opts, options)
|
35
|
+
add_exclude_glob_option(opts, options)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: source_finder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vince Broz
|
@@ -101,6 +101,7 @@ files:
|
|
101
101
|
- circle.yml
|
102
102
|
- coverage/.last_run.json
|
103
103
|
- lib/source_finder.rb
|
104
|
+
- lib/source_finder/option_parser.rb
|
104
105
|
- lib/source_finder/source_file_globber.rb
|
105
106
|
- lib/source_finder/version.rb
|
106
107
|
- lib/tasks/ci.rake
|