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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9b52453ef08f59048fe9d23eba2dd17f270cab33
4
- data.tar.gz: 7806ba21b1e19419f5d6356ea49078718871a44a
3
+ metadata.gz: b061d928813a21252004652c2165bd4d1ffa30d6
4
+ data.tar.gz: d7997205acb304ca6702fceb6d893fe1d6289789
5
5
  SHA512:
6
- metadata.gz: cf646ff7130df24e3406c26269ae2eff1524e4a9ae6e726efe146b6d7ef0d4c690bbfe5584b647e4225cfb47acd935a909e81b5d0f72cc1a847f12d496596860
7
- data.tar.gz: 6f399d5232c70cfe2106ba867c6ef61f9af77e4185666ba8908e91fd3c2c4ceba4357766c91a35cf917550a932460bc2d021a4a12b1d8c6638df02e922b6ed11
6
+ metadata.gz: 7f1e87568156e144a79e5bc044a5964b464831228903df43c9c39bbb7f5ad8985de7ae9afbfd1ab8aa908567c0c0804c8d34868ac6f12c2b67a28bc72c5df466
7
+ data.tar.gz: c83b11c2d435b1752411561f6ae38e4f9ffdc29165ef1b1799bb07cf7a9c01fab6c7ae8042baff1b35a89705a1fec863d99bd76f1c11544651a789a6035d9e94
data/CHANGELOG.md ADDED
@@ -0,0 +1,16 @@
1
+ Changes
2
+ ==
3
+ 18 Nov 2013 (1.0.1)
4
+ --
5
+
6
+ FIXES:
7
+ * Fix warnings retrieval and priorities
8
+
9
+ CHANGES:
10
+ * Add alias 'inspect'
11
+
12
+ 15 Nov 2013 (1.0.0)
13
+ --
14
+
15
+ FEATURES:
16
+ * First release
data/Gemfile CHANGED
@@ -1,4 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
- gem 'byebug'
4
+ gem 'byebug'
5
+ gem 'pry-byebug'
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
- ## Credits
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)
@@ -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{This gem verifies that dependencies are updated in regard with a Chef Server and Gitlab}
12
- spec.summary = %q{Chef server and Gitlab dependency checker}
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.status == 'warning-gitlab' }
97
- status = "Status: warning-gitlab (#{ESCLAMATION_MARK})".yellow
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 "i".bold.blue
117
+ return INFO_MARK.bold.blue
118
118
  when /warning-gitlab/
119
119
  return (ESCLAMATION_MARK * 2).bold.light_red
120
120
  else
@@ -25,6 +25,6 @@
25
25
  module KitchenInspector
26
26
  module Inspector
27
27
  # The version string
28
- VERSION = '1.0.0'
28
+ VERSION = '1.0.1'
29
29
  end
30
30
  end
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.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-15 00:00:00.000000000 Z
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: This gem verifies that dependencies are updated in regard with a Chef
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.txt
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: Chef server and Gitlab dependency checker
202
+ summary: Kitchen integrity checker
202
203
  test_files: []