source_finder 3.1.1 → 3.2
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/langs/groovy.rb +33 -0
- data/lib/source_finder/langs/python.rb +1 -4
- data/lib/source_finder/source_file_globber.rb +8 -7
- data/lib/source_finder/version.rb +3 -1
- metadata +17 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81ceb4abbf60533e77d96b503be6064f002b256c
|
4
|
+
data.tar.gz: cabe4e905ae7e8a7d180917b7621d9423d063b32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddf9f59d4a15be322baecb7e52c7d356920d3cae2b277c0703cf6464e48805d2394aa4ebd22099a01f2f31e7c33be2abe9e492af7af62e10853a7098f701c4c4
|
7
|
+
data.tar.gz: 83de79a8e346a441f7867ef6c41d53d92a05bb890d993e2760ed8e8d0716a9646e9c9e1774463bd8718c8b0e6267d7be3594925858c276dedda33522af8bd641
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module SourceFinder
|
2
|
+
# Globber for JavaScript
|
3
|
+
module GroovySourceFileGlobber
|
4
|
+
attr_writer :groovy_dirs_arr, :extra_groovy_files_arr,
|
5
|
+
:groovy_file_extensions_arr
|
6
|
+
|
7
|
+
def groovy_dirs_arr
|
8
|
+
@groovy_dirs_arr ||= %w(app src var www)
|
9
|
+
end
|
10
|
+
|
11
|
+
def extra_groovy_files_arr
|
12
|
+
@extra_groovy_files_arr ||= []
|
13
|
+
end
|
14
|
+
|
15
|
+
def groovy_file_extensions_arr
|
16
|
+
arr = @groovy_file_extensions_arr if defined? @groovy_file_extensions_arr
|
17
|
+
make_extensions_arr(arr, %w(groovy))
|
18
|
+
end
|
19
|
+
|
20
|
+
def groovy_file_extensions_glob
|
21
|
+
groovy_file_extensions_arr.join(',')
|
22
|
+
end
|
23
|
+
|
24
|
+
def groovy_files_glob
|
25
|
+
make_files_glob(extra_groovy_files_arr, groovy_dirs_arr,
|
26
|
+
groovy_file_extensions_glob)
|
27
|
+
end
|
28
|
+
|
29
|
+
def groovy_files_arr
|
30
|
+
exclude_garbage(@globber.glob(groovy_files_glob) - exclude_files_arr)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -18,10 +18,7 @@ module SourceFinder
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def python_file_extensions_glob
|
21
|
-
|
22
|
-
@python_file_extensions_glob
|
23
|
-
end
|
24
|
-
glob || python_file_extensions_arr.join(',')
|
21
|
+
python_file_extensions_arr.join(',')
|
25
22
|
end
|
26
23
|
|
27
24
|
def python_files_glob
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require_relative 'langs/ruby'
|
2
2
|
require_relative 'langs/js'
|
3
3
|
require_relative 'langs/python'
|
4
|
+
require_relative 'langs/groovy'
|
4
5
|
|
5
6
|
module SourceFinder
|
6
7
|
# Give configuration, finds source file locations by using an
|
@@ -14,6 +15,7 @@ module SourceFinder
|
|
14
15
|
include RubySourceFileGlobber
|
15
16
|
include JsSourceFileGlobber
|
16
17
|
include PythonSourceFileGlobber
|
18
|
+
include GroovySourceFileGlobber
|
17
19
|
|
18
20
|
def initialize(globber: Dir)
|
19
21
|
@globber = globber
|
@@ -24,12 +26,13 @@ module SourceFinder
|
|
24
26
|
|
25
27
|
def source_dirs_arr
|
26
28
|
@source_dirs_arr ||= (ruby_dirs_arr + js_dirs_arr +
|
27
|
-
python_dirs_arr).sort.uniq
|
29
|
+
python_dirs_arr + groovy_dirs_arr).sort.uniq
|
28
30
|
end
|
29
31
|
|
30
32
|
def extra_source_files_arr
|
31
33
|
@extra_source_files_arr ||=
|
32
|
-
(extra_ruby_files_arr + extra_js_files_arr +
|
34
|
+
(extra_ruby_files_arr + extra_js_files_arr +
|
35
|
+
extra_python_files_arr + extra_groovy_files_arr)
|
33
36
|
.concat(%w(Dockerfile)).sort.uniq
|
34
37
|
end
|
35
38
|
|
@@ -39,11 +42,8 @@ module SourceFinder
|
|
39
42
|
|
40
43
|
def exclude_files_arr
|
41
44
|
return @exclude_files_arr if @exclude_files_arr
|
42
|
-
|
43
|
-
|
44
|
-
else
|
45
|
-
exclude_garbage(@globber.glob(default_source_files_exclude_glob))
|
46
|
-
end
|
45
|
+
|
46
|
+
exclude_garbage(@globber.glob(source_files_exclude_glob))
|
47
47
|
end
|
48
48
|
|
49
49
|
def source_files_exclude_glob
|
@@ -65,6 +65,7 @@ module SourceFinder
|
|
65
65
|
exclude_garbage((ruby_file_extensions_arr +
|
66
66
|
js_file_extensions_arr +
|
67
67
|
python_file_extensions_arr +
|
68
|
+
groovy_file_extensions_arr +
|
68
69
|
default_source_file_extensions_arr))
|
69
70
|
end
|
70
71
|
|
@@ -1,4 +1,6 @@
|
|
1
1
|
# SourceFinder finds source and documentation files within a project.
|
2
2
|
module SourceFinder
|
3
|
-
|
3
|
+
# We bump the minor version when new languages or directories are
|
4
|
+
# added; the major version when existing APIs change.
|
5
|
+
VERSION = '3.2'.freeze
|
4
6
|
end
|
metadata
CHANGED
@@ -1,97 +1,97 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: source_finder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: '3.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vince Broz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '10.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: quality
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rubocop
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - "!="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 0.39.0
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - "!="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.39.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: simplecov
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
description:
|
@@ -105,6 +105,7 @@ files:
|
|
105
105
|
- LICENSE.txt
|
106
106
|
- README.md
|
107
107
|
- lib/source_finder.rb
|
108
|
+
- lib/source_finder/langs/groovy.rb
|
108
109
|
- lib/source_finder/langs/js.rb
|
109
110
|
- lib/source_finder/langs/python.rb
|
110
111
|
- lib/source_finder/langs/ruby.rb
|
@@ -122,12 +123,12 @@ require_paths:
|
|
122
123
|
- lib
|
123
124
|
required_ruby_version: !ruby/object:Gem::Requirement
|
124
125
|
requirements:
|
125
|
-
- -
|
126
|
+
- - ">="
|
126
127
|
- !ruby/object:Gem::Version
|
127
128
|
version: '0'
|
128
129
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
130
|
requirements:
|
130
|
-
- -
|
131
|
+
- - ">="
|
131
132
|
- !ruby/object:Gem::Version
|
132
133
|
version: '0'
|
133
134
|
requirements: []
|