source_finder 2.3.2 → 2.4.0
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3bd7e1099d630f8438986e471408ce11b86678a
|
4
|
+
data.tar.gz: 7cf482806ad50d8aa7d18553be6ecccd2b7a5134
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2aec66197c7a0d2d5985ef92d4ad43c28542580718bd9c2428611bc484f5aea9800cd791cae09fd7c6b6b25c7413d658174f7efd0717bd8cb556aed342690e17
|
7
|
+
data.tar.gz: e42acce8c250f4e054ea82d3d8cd2862dec1fae92d813987a0fcd72a2d94632c1364d7cc2364e6350582e809bef93f55a7e1bc0ce8e1ac8f386e0ee1436769fc
|
@@ -2,6 +2,7 @@ module SourceFinder
|
|
2
2
|
# Globber for Ruby
|
3
3
|
module RubySourceFileGlobber
|
4
4
|
attr_accessor :ruby_dirs_arr, :extra_ruby_files_arr,
|
5
|
+
:ruby_file_extensions_glob,
|
5
6
|
:ruby_file_extensions_arr
|
6
7
|
|
7
8
|
def ruby_dirs_arr
|
@@ -13,11 +14,13 @@ module SourceFinder
|
|
13
14
|
end
|
14
15
|
|
15
16
|
def ruby_file_extensions_arr
|
16
|
-
@
|
17
|
+
make_extensions_arr(@ruby_file_extensions_glob,
|
18
|
+
@ruby_file_extensions_arr,
|
19
|
+
%w(gemspec rake rb))
|
17
20
|
end
|
18
21
|
|
19
22
|
def ruby_file_extensions_glob
|
20
|
-
@ruby_file_extensions_glob
|
23
|
+
@ruby_file_extensions_glob || ruby_file_extensions_arr.join(',')
|
21
24
|
end
|
22
25
|
|
23
26
|
def ruby_files_glob
|
@@ -36,9 +36,8 @@ module SourceFinder
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def exclude_files_arr
|
39
|
-
if @exclude_files_arr
|
40
|
-
|
41
|
-
elsif @source_files_exclude_glob
|
39
|
+
return @exclude_files_arr if @exclude_files_arr
|
40
|
+
if @source_files_exclude_glob
|
42
41
|
exclude_garbage(@globber.glob(@source_files_exclude_glob))
|
43
42
|
else
|
44
43
|
exclude_garbage(@globber.glob(default_source_files_exclude_glob))
|
@@ -106,14 +105,17 @@ module SourceFinder
|
|
106
105
|
arr.size > 0 ? "#{arr.join(',')}," : ''
|
107
106
|
end
|
108
107
|
|
109
|
-
def make_files_glob(extra_source_files_arr,
|
110
|
-
dirs_arr,
|
111
|
-
extensions_glob)
|
108
|
+
def make_files_glob(extra_source_files_arr, dirs_arr, extensions_glob)
|
112
109
|
'{' + arr2glob(extra_source_files_arr) + "{*,.*}.{#{extensions_glob}}," +
|
113
110
|
File.join("{#{dirs_arr.join(',')}}", '**',
|
114
111
|
"{*,.*}.{#{extensions_glob}}") + '}'
|
115
112
|
end
|
116
113
|
|
114
|
+
def make_extensions_arr(glob_var, arr_var, default_arr)
|
115
|
+
fail 'glob already set' if glob_var
|
116
|
+
arr_var || default_arr
|
117
|
+
end
|
118
|
+
|
117
119
|
def emacs_lockfile?(filename)
|
118
120
|
File.basename(filename) =~ /^\.#/
|
119
121
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: source_finder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vince Broz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|