puppet-ghostbuster 0.1.3 → 0.1.4
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/.travis.yml +17 -0
- data/CHANGELOG.md +46 -9
- data/README.md +30 -11
- data/Rakefile +12 -0
- data/lib/puppet-ghostbuster.rb +3 -3
- data/lib/puppet-ghostbuster/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7b579b4499665c5db163e7c2cb469603e8e0e362
|
|
4
|
+
data.tar.gz: ec051b24ab214822780ad550bf54934bcb0052d7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d03e288aad69715ea653e4da1f982a41b37c00967cb620de86cc54dc1e9246c95153ec83f15bf63e48813094af10da59ae039a8b7a958783d518bfc8c761a2a0
|
|
7
|
+
data.tar.gz: 4bc48d3b1d4711ffed45c9bff1c2ec4ba572e6b38732bce5eea9f9df9a495a0ce3a40c42c510d75e4f7f372170b2483f9b3fce3774a70b105fb5d2422c12e9ea
|
data/.travis.yml
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
language: ruby
|
|
2
|
+
sudo: false
|
|
3
|
+
cache: bundler
|
|
4
|
+
rvm:
|
|
5
|
+
- 2.1.5
|
|
6
|
+
matrix:
|
|
7
|
+
fast_finish: true
|
|
8
|
+
deploy:
|
|
9
|
+
provider: rubygems
|
|
10
|
+
api_key:
|
|
11
|
+
secure: HR9PryqDCSGRJlhjdZHpNLMV5FD6oiJ46WzOebYeIGjZRH64vvV2XmxarH/UZpQLRC1x8V0SJV7ju1f727n3Mp2D36kVLxGkn3QbKL4QFDXdRfCKF+jmckzYM5aAxMl/bbNXegdcNOC0eUODzXyMQffd1c1wvlvxSGRCKBD05ug=
|
|
12
|
+
gem: puppet-ghostbuster
|
|
13
|
+
on:
|
|
14
|
+
tags: true
|
|
15
|
+
repo: camptocamp/puppet-ghostbuster
|
|
16
|
+
notifications:
|
|
17
|
+
email: false
|
data/CHANGELOG.md
CHANGED
|
@@ -1,21 +1,58 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
## [0.1.
|
|
3
|
+
## [0.1.4](https://rubygems.org/gems/puppet-ghostbuster/versions/0.1.4) (2015-09-14)
|
|
4
|
+
[Full Changelog](https://github.com/camptocamp/puppet-ghostbuster/compare/0.1.3...0.1.4)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
**Implemented enhancements:**
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
- Setup automatic releases on Travis CI [\#9](https://github.com/camptocamp/puppet-ghostbuster/issues/9)
|
|
8
9
|
|
|
9
10
|
**Fixed bugs:**
|
|
10
11
|
|
|
11
|
-
- Skip
|
|
12
|
+
- Skip symlink files [\#10](https://github.com/camptocamp/puppet-ghostbuster/issues/10)
|
|
13
|
+
- Search for files in all subfolders [\#8](https://github.com/camptocamp/puppet-ghostbuster/pull/8) ([roman-mueller](https://github.com/roman-mueller))
|
|
12
14
|
|
|
13
|
-
## [0.1.
|
|
15
|
+
## [0.1.3](https://rubygems.org/gems/puppet-ghostbuster/versions/0.1.3) (2015-04-23)
|
|
16
|
+
[Full Changelog](https://github.com/camptocamp/puppet-ghostbuster/compare/0.1.2...0.1.3)
|
|
14
17
|
|
|
15
|
-
**
|
|
18
|
+
**Implemented enhancements:**
|
|
19
|
+
|
|
20
|
+
- add @@logger and log level option [\#5](https://github.com/camptocamp/puppet-ghostbuster/pull/5) ([saimonn](https://github.com/saimonn))
|
|
21
|
+
|
|
22
|
+
## [0.1.2](https://rubygems.org/gems/puppet-ghostbuster/versions/0.1.2) (2015-04-23)
|
|
23
|
+
[Full Changelog](https://github.com/camptocamp/puppet-ghostbuster/compare/0.1.1...0.1.2)
|
|
24
|
+
|
|
25
|
+
## [0.1.1](https://rubygems.org/gems/puppet-ghostbuster/versions/0.1.1) (2015-04-23)
|
|
26
|
+
[Full Changelog](https://github.com/camptocamp/puppet-ghostbuster/compare/0.1.0...0.1.1)
|
|
27
|
+
|
|
28
|
+
**Closed issues:**
|
|
29
|
+
|
|
30
|
+
- Add support for non SSL [\#3](https://github.com/camptocamp/puppet-ghostbuster/issues/3)
|
|
31
|
+
|
|
32
|
+
## [0.1.0](https://rubygems.org/gems/puppet-ghostbuster/versions/0.1.0) (2015-04-22)
|
|
33
|
+
[Full Changelog](https://github.com/camptocamp/puppet-ghostbuster/compare/0.0.6...0.1.0)
|
|
34
|
+
|
|
35
|
+
**Implemented enhancements:**
|
|
36
|
+
|
|
37
|
+
- Options/parser [\#2](https://github.com/camptocamp/puppet-ghostbuster/pull/2) ([saimonn](https://github.com/saimonn))
|
|
38
|
+
|
|
39
|
+
## [0.0.6](https://rubygems.org/gems/puppet-ghostbuster/versions/0.0.6) (2015-04-22)
|
|
40
|
+
[Full Changelog](https://github.com/camptocamp/puppet-ghostbuster/compare/0.0.5...0.0.6)
|
|
41
|
+
|
|
42
|
+
## [0.0.5](https://rubygems.org/gems/puppet-ghostbuster/versions/0.0.5) (2015-04-22)
|
|
43
|
+
[Full Changelog](https://github.com/camptocamp/puppet-ghostbuster/compare/0.0.4...0.0.5)
|
|
44
|
+
|
|
45
|
+
**Implemented enhancements:**
|
|
46
|
+
|
|
47
|
+
- Manage templates [\#1](https://github.com/camptocamp/puppet-ghostbuster/pull/1) ([mcanevet](https://github.com/mcanevet))
|
|
48
|
+
|
|
49
|
+
## [0.0.4](https://rubygems.org/gems/puppet-ghostbuster/versions/0.0.4) (2015-04-21)
|
|
50
|
+
[Full Changelog](https://github.com/camptocamp/puppet-ghostbuster/compare/0.0.2...0.0.4)
|
|
51
|
+
|
|
52
|
+
## [0.0.2](https://rubygems.org/gems/puppet-ghostbuster/versions/0.0.2) (2015-04-21)
|
|
53
|
+
[Full Changelog](https://github.com/camptocamp/puppet-ghostbuster/compare/0.0.1...0.0.2)
|
|
16
54
|
|
|
17
|
-
-
|
|
55
|
+
## [0.0.1](https://rubygems.org/gems/puppet-ghostbuster/versions/0.0.1) (2015-04-21)
|
|
18
56
|
|
|
19
|
-
## [0.1.0](https://github.com/camptocamp/puppet-ghostbuster/releases/tag/0.1.0) (2015-04-22)
|
|
20
57
|
|
|
21
|
-
|
|
58
|
+
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
data/README.md
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
puppet-ghostbuster
|
|
2
2
|
==================
|
|
3
3
|
|
|
4
|
+
[](https://travis-ci.org/camptocamp/puppet-ghostbuster)
|
|
4
5
|
[](https://rubygems.org/gems/puppet-ghostbuster)
|
|
5
6
|
[](https://rubygems.org/gems/puppet-ghostbuster)
|
|
7
|
+
[](https://gemnasium.com/camptocamp/puppet-ghostbuster)
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
When you have dead puppet code hanging around ...
|
|
10
|
+
*Who you gonna call ?*
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
|
|
13
|
+
This gems helps puppet users to find dead code by displaying unused classes, defined resources, template and files.
|
|
10
14
|
|
|
11
15
|
|
|
12
16
|
Usage
|
|
@@ -17,22 +21,37 @@ If you want to read default options and private key from puppet configuration, t
|
|
|
17
21
|
sudo bundle exec puppet-ghostbuster
|
|
18
22
|
```
|
|
19
23
|
|
|
24
|
+
You can add preconnect command with ``-p`` and server url with ``-s``.
|
|
25
|
+
|
|
26
|
+
``-h`` or ``--help`` for full options.
|
|
27
|
+
|
|
20
28
|
Example output
|
|
21
29
|
--------------
|
|
22
30
|
```
|
|
23
|
-
$ bundle exec puppet-ghostbuster
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
$ bundle exec puppet-ghostbuster -s https://puppetdburl:8081
|
|
32
|
+
Class Foo::Install not used
|
|
33
|
+
Class Foo::Service not used
|
|
34
|
+
Class Foo not used
|
|
35
|
+
...
|
|
36
|
+
Define Bar::Baz not used
|
|
37
|
+
...
|
|
38
|
+
Template ./modulename/templates/foo.erb not used
|
|
39
|
+
Template ./modulename/templates/bar.erb not used
|
|
40
|
+
Template ./modulename/templates/baz.erb not used
|
|
41
|
+
...
|
|
42
|
+
File ./foo/files/bar.txt not used
|
|
43
|
+
File ./foo/files/baz.txt not used
|
|
44
|
+
...
|
|
30
45
|
```
|
|
31
|
-
Wow, we don't seems to use Lightty anymore. Let's do some cleanup.
|
|
32
46
|
|
|
33
47
|
How It Works
|
|
34
48
|
------------
|
|
35
|
-
|
|
49
|
+
To find unused classes:
|
|
50
|
+
1. It search puppet code recursively starting (by default) from current directory.
|
|
36
51
|
2. For each .pp file found, it extract the class name
|
|
37
52
|
3. Query puppetdb (using cache) to find matching class in catalogs
|
|
38
53
|
4. Display the number of class, followed by the class name.
|
|
54
|
+
|
|
55
|
+
Same method applies to find unused defines.
|
|
56
|
+
|
|
57
|
+
To find template and files, it has to loop twice, so this step can be longer.
|
data/Rakefile
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
begin
|
|
2
|
+
require 'rspec/core/rake_task'
|
|
3
|
+
RSpec::Core::RakeTask.new(:spec)
|
|
4
|
+
rescue LoadError
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
require 'github_changelog_generator/task'
|
|
8
|
+
require 'puppet-ghostbuster/version'
|
|
9
|
+
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
|
|
10
|
+
config.future_release = PuppetGhostbuster::VERSION
|
|
11
|
+
config.release_url = "https://rubygems.org/gems/puppet-ghostbuster/versions/%s"
|
|
12
|
+
end
|
data/lib/puppet-ghostbuster.rb
CHANGED
|
@@ -12,15 +12,15 @@ class PuppetGhostbuster
|
|
|
12
12
|
attr_accessor :path
|
|
13
13
|
|
|
14
14
|
def manifests
|
|
15
|
-
Dir["#{path}/**/manifests
|
|
15
|
+
Dir["#{path}/**/manifests/**/*.pp"]
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
def templates
|
|
19
|
-
Dir["#{path}/**/templates
|
|
19
|
+
Dir["#{path}/**/templates/**/*"]
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
def files
|
|
23
|
-
Dir["#{path}/**/files
|
|
23
|
+
Dir["#{path}/**/files/**/*"]
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
def self.configuration
|
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.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Camptocamp
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-09-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|
|
@@ -60,10 +60,12 @@ extensions: []
|
|
|
60
60
|
extra_rdoc_files: []
|
|
61
61
|
files:
|
|
62
62
|
- ".gitignore"
|
|
63
|
+
- ".travis.yml"
|
|
63
64
|
- CHANGELOG.md
|
|
64
65
|
- Gemfile
|
|
65
66
|
- LICENSE
|
|
66
67
|
- README.md
|
|
68
|
+
- Rakefile
|
|
67
69
|
- bin/puppet-ghostbuster
|
|
68
70
|
- lib/puppet-ghostbuster.rb
|
|
69
71
|
- lib/puppet-ghostbuster/bin.rb
|
|
@@ -96,3 +98,4 @@ signing_key:
|
|
|
96
98
|
specification_version: 4
|
|
97
99
|
summary: Dead code detector for Puppet
|
|
98
100
|
test_files: []
|
|
101
|
+
has_rdoc:
|