kitchen-inspector 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/Gemfile +2 -1
- data/{LICENSE.txt → LICENSE} +0 -0
- data/README.md +8 -1
- data/kitchen-inspector.gemspec +2 -2
- data/lib/kitchen-inspector/inspector/cli.rb +1 -0
- data/lib/kitchen-inspector/inspector/dependency_inspector.rb +3 -0
- data/lib/kitchen-inspector/inspector/report.rb +6 -6
- data/lib/kitchen-inspector/inspector/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b061d928813a21252004652c2165bd4d1ffa30d6
|
4
|
+
data.tar.gz: d7997205acb304ca6702fceb6d893fe1d6289789
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f1e87568156e144a79e5bc044a5964b464831228903df43c9c39bbb7f5ad8985de7ae9afbfd1ab8aa908567c0c0804c8d34868ac6f12c2b67a28bc72c5df466
|
7
|
+
data.tar.gz: c83b11c2d435b1752411561f6ae38e4f9ffdc29165ef1b1799bb07cf7a9c01fab6c7ae8042baff1b35a89705a1fec863d99bd76f1c11544651a789a6035d9e94
|
data/CHANGELOG.md
ADDED
data/Gemfile
CHANGED
data/{LICENSE.txt → LICENSE}
RENAMED
File without changes
|
data/README.md
CHANGED
@@ -76,5 +76,12 @@ Two display formats are supported: table and json
|
|
76
76
|
+-----------+-------------+-------+--------+--------+-------------+-------------+--------+--------------------+
|
77
77
|
Status: error (✖)
|
78
78
|
|
79
|
-
##
|
79
|
+
## LICENSE
|
80
|
+
|
81
|
+
Author:: Stefano Tortarolo <stefano.tortarolo@gmail.com>
|
82
|
+
|
83
|
+
Copyright:: Copyright (c) 2013
|
84
|
+
License:: MIT License
|
85
|
+
|
86
|
+
## CREDITS
|
80
87
|
This code was heavily inspired by Kannan Manickam's [chef-taste](https://github.com/arangamani/chef-taste)
|
data/kitchen-inspector.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = KitchenInspector::Inspector::VERSION
|
9
9
|
spec.authors = ["Stefano Tortarolo"]
|
10
10
|
spec.email = ["stefano.tortarolo@gmail.com"]
|
11
|
-
spec.description = %q{
|
12
|
-
spec.summary = %q{
|
11
|
+
spec.description = %q{Given an Opscode Chef cookbook, verifies its dependencies against a Chef Server and a Gitlab instance}
|
12
|
+
spec.summary = %q{Kitchen integrity checker}
|
13
13
|
spec.homepage = "https://github.com/astratto/kitchen-inspector"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
@@ -36,6 +36,7 @@ module KitchenInspector
|
|
36
36
|
|
37
37
|
desc 'investigate (COOKBOOK_PATH)', 'Check Gitlab/Chef status of dependent cookbooks'
|
38
38
|
|
39
|
+
map 'inspect' => :investigate
|
39
40
|
def investigate(path=Dir.pwd)
|
40
41
|
dependencies = DependencyInspector.investigate path
|
41
42
|
if dependencies.empty?
|
@@ -49,6 +49,9 @@ module KitchenInspector
|
|
49
49
|
|
50
50
|
def self.investigate(path)
|
51
51
|
raise NotACookbookError, 'Path is not a cookbook' unless File.exists?(File.join(path, 'metadata.rb'))
|
52
|
+
|
53
|
+
require 'pry-byebug'
|
54
|
+
binding.pry
|
52
55
|
ridley = Ridley::Chef::Cookbook::Metadata.from_file(File.join(path, 'metadata.rb'))
|
53
56
|
dependencies =
|
54
57
|
ridley.dependencies.map do |name, version|
|
@@ -29,8 +29,8 @@ module KitchenInspector
|
|
29
29
|
TICK_MARK = "\u2714"
|
30
30
|
# The ASCII code for X mark symbol
|
31
31
|
X_MARK = "\u2716"
|
32
|
-
# The ! symbol
|
33
32
|
ESCLAMATION_MARK = "!"
|
33
|
+
INFO_MARK = "i"
|
34
34
|
|
35
35
|
class Report
|
36
36
|
class << self
|
@@ -91,12 +91,12 @@ module KitchenInspector
|
|
91
91
|
# Show Status
|
92
92
|
if dependencies.any? { |dep| dep.status == 'error' }
|
93
93
|
status = "Status: error (#{X_MARK})".red
|
94
|
+
elsif dependencies.any? { |dep| dep.gitlab_status == 'warning-gitlab' }
|
95
|
+
status = "Status: warning-gitlab (#{ESCLAMATION_MARK})".light_red
|
94
96
|
elsif dependencies.any? { |dep| dep.status == 'warning-req' }
|
95
97
|
status = "Status: warning-req (#{ESCLAMATION_MARK})".yellow
|
96
|
-
elsif dependencies.any? { |dep| dep.
|
97
|
-
status = "Status: warning-
|
98
|
-
elsif dependencies.any? { |dep| dep.status == 'warning-chef' }
|
99
|
-
status = "Status: warning-chef (#{ESCLAMATION_MARK})".yellow
|
98
|
+
elsif dependencies.any? { |dep| dep.chef_status == 'warning-chef' }
|
99
|
+
status = "Status: warning-chef (#{INFO_MARK})".blue
|
100
100
|
else
|
101
101
|
status = "Status: up-to-date (#{TICK_MARK})".green
|
102
102
|
end
|
@@ -114,7 +114,7 @@ module KitchenInspector
|
|
114
114
|
when /warning-req/
|
115
115
|
return ESCLAMATION_MARK.bold.yellow
|
116
116
|
when /warning-chef/
|
117
|
-
return
|
117
|
+
return INFO_MARK.bold.blue
|
118
118
|
when /warning-gitlab/
|
119
119
|
return (ESCLAMATION_MARK * 2).bold.light_red
|
120
120
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-inspector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefano Tortarolo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -150,8 +150,8 @@ dependencies:
|
|
150
150
|
- - '>='
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: 11.0.0
|
153
|
-
description:
|
154
|
-
Server and Gitlab
|
153
|
+
description: Given an Opscode Chef cookbook, verifies its dependencies against a Chef
|
154
|
+
Server and a Gitlab instance
|
155
155
|
email:
|
156
156
|
- stefano.tortarolo@gmail.com
|
157
157
|
executables:
|
@@ -160,9 +160,10 @@ extensions: []
|
|
160
160
|
extra_rdoc_files: []
|
161
161
|
files:
|
162
162
|
- .gitignore
|
163
|
+
- CHANGELOG.md
|
163
164
|
- Gemfile
|
164
165
|
- INFO.md
|
165
|
-
- LICENSE
|
166
|
+
- LICENSE
|
166
167
|
- README.md
|
167
168
|
- Rakefile
|
168
169
|
- bin/kitchen-inspector
|
@@ -198,5 +199,5 @@ rubyforge_project:
|
|
198
199
|
rubygems_version: 2.1.11
|
199
200
|
signing_key:
|
200
201
|
specification_version: 4
|
201
|
-
summary:
|
202
|
+
summary: Kitchen integrity checker
|
202
203
|
test_files: []
|