puppet-ghostbuster 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/puppet-ghostbuster/version.rb +1 -1
- data/lib/puppet-ghostbuster.rb +10 -12
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fe3d424e7d8e045262acebbde7420fe8da3e00a6
|
|
4
|
+
data.tar.gz: c7cced00812e60526b634819c5adb054ea8bb444
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 03b601bcf25c8fc053370f4a91f23c94e2422c94406045879617899ec75dc562d6051bb0b6e6e4f7a8dbe90f5579bc2be6e447f99195f3acd472d17c30b824c6
|
|
7
|
+
data.tar.gz: 11bb6306ee9dccc67810af7b8d12c71a2a8584d3830fa4d051fb9ec01d31416191907a9cbe2adcb341a5995d393384714962c5d83afb3c2e2a4488ef5246a8de
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## [0.4.1](https://rubygems.org/gems/puppet-ghostbuster/versions/0.4.1) (2016-05-02)
|
|
4
|
+
[Full Changelog](https://github.com/camptocamp/puppet-ghostbuster/compare/0.4.0...0.4.1)
|
|
5
|
+
|
|
6
|
+
**Fixed bugs:**
|
|
7
|
+
|
|
8
|
+
- Fix unused files detection[\#20](https://github.com/camptocamp/puppet-ghostbuster/pull/20) ([mcanevet](https://github.com/mcanevet))
|
|
9
|
+
|
|
3
10
|
## [0.4.0](https://rubygems.org/gems/puppet-ghostbuster/versions/0.4.0) (2016-04-28)
|
|
4
11
|
[Full Changelog](https://github.com/camptocamp/puppet-ghostbuster/compare/0.3.0...0.4.0)
|
|
5
12
|
|
data/lib/puppet-ghostbuster.rb
CHANGED
|
@@ -147,20 +147,18 @@ class PuppetGhostbuster
|
|
|
147
147
|
next unless File.file?(file)
|
|
148
148
|
module_name, file_name = file.match(/.*\/([^\/]+)\/files\/(.+)$/).captures
|
|
149
149
|
count = 0
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
end
|
|
150
|
+
manifests.each do |manifest|
|
|
151
|
+
if File.symlink?(manifest)
|
|
152
|
+
@@logger.warn " Skipping symlink #{manifest}"
|
|
153
|
+
next
|
|
154
|
+
end
|
|
155
|
+
if match = caller_file.match(/.*\/([^\/]+)\/manifests\/.+$/)
|
|
156
|
+
manifest_module_name = match.captures[0]
|
|
157
|
+
if manifest_module_name == module_name
|
|
158
|
+
count += File.readlines(caller_file).grep(/["']\$\{module_name\}\/#{file_name}["']/).size
|
|
160
159
|
end
|
|
161
|
-
count += File.readlines(caller_file).grep(/#{module_name}\/#{file_name}/).size
|
|
162
|
-
rescue ArgumentError
|
|
163
160
|
end
|
|
161
|
+
count += File.readlines(caller_file).grep(/#{module_name}\/#{file_name}/).size
|
|
164
162
|
end
|
|
165
163
|
@@issues << { :title => "[GhostBuster] File #{module_name}/#{file_name} seems unused", :body => file } if count == 0
|
|
166
164
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: puppet-ghostbuster
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Camptocamp
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-05-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: coveralls
|