reagan 0.8.1 → 0.8.2
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/.gitignore +5 -0
- data/.rubocop.yml +3 -1
- data/.travis.yml +8 -0
- data/Gemfile +6 -2
- data/bin/reagan +1 -1
- data/lib/config.rb +17 -4
- data/reagan.gemspec +2 -1
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7eb97fa712f2fce7de36576bdf54675b9ce31096
|
4
|
+
data.tar.gz: 516b0b9d1bae8c38a964361b8739f2a1c8301d2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da189f2e45bae76d189c552725361d81311c4681be7c67b5b9ac717615b796393bde0002adbbcd39e83b918d6c29af450930d72f89210911b67b2362d3655669
|
7
|
+
data.tar.gz: 08cad4868acceff00afbf192b4a355c37f1c685be97391ade08e8ceab01335ddb78bf9d1ff61abe9477e66b271742e895e3c85761ffc724ab306fe1f48d760c3
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/bin/reagan
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
#
|
3
3
|
# Author:: Tim Smith (<tim@cozy.co>)
|
4
|
-
# Copyright:: Copyright (c)
|
4
|
+
# Copyright:: Copyright (c) 2015 Tim Smith
|
5
5
|
# License:: Apache License, Version 2.0
|
6
6
|
#
|
7
7
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
data/lib/config.rb
CHANGED
@@ -38,15 +38,15 @@ module Reagan
|
|
38
38
|
flags = { :pull => nil, :override_cookbooks => nil, :config => '/etc/reagan.yml', :print_config => false }
|
39
39
|
OptionParser.new do |opts|
|
40
40
|
opts.banner = 'Usage: reagan [options]'
|
41
|
-
opts.on('-o', '--override cb1,cb2', 'Comma separated list of cookbooks to test') do |cookbooks|
|
42
|
-
flags[:override_cookbooks] = cookbooks
|
41
|
+
opts.on('-o', '--override cb1,cb2', Array, 'Comma separated list of cookbooks to test') do |cookbooks|
|
42
|
+
flags[:override_cookbooks] = cookbooks
|
43
43
|
end
|
44
|
-
|
44
|
+
|
45
45
|
opts.on('-p', '--print', 'Print the config options that will be used') do |config|
|
46
46
|
flags[:print_config] = config
|
47
47
|
end
|
48
48
|
|
49
|
-
opts.on('-p', '--pull_num 123', 'Github pull number to test') do |pull|
|
49
|
+
opts.on('-p', '--pull_num 123', Integer, 'Github pull number to test') do |pull|
|
50
50
|
flags[:pull] = pull
|
51
51
|
end
|
52
52
|
|
@@ -70,6 +70,19 @@ module Reagan
|
|
70
70
|
puts "ERROR: Reagan config at #{@flags[:config]} does not contain any configuration data"
|
71
71
|
exit 1
|
72
72
|
end
|
73
|
+
|
74
|
+
# if not workstation was set try to use the Jenkins workspace variable
|
75
|
+
unless config['jenkins'] && config['jenkins']['workspace_dir']
|
76
|
+
workspace = ENV['WORKSPACE']
|
77
|
+
if workspace
|
78
|
+
config['jenkins'] = {}
|
79
|
+
config['jenkins']['workspace_dir'] = workspace
|
80
|
+
else
|
81
|
+
puts 'Jenkins workspace not defined and $WORKSPACE empty. Exiting'
|
82
|
+
exit
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
73
86
|
config
|
74
87
|
rescue Errno::ENOENT
|
75
88
|
puts "ERROR: Cannot load Reagan config file at #{@flags[:config]}"
|
data/reagan.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'reagan'
|
3
|
-
s.version = '0.8.
|
3
|
+
s.version = '0.8.2'
|
4
4
|
s.date = Date.today.to_s
|
5
5
|
s.platform = Gem::Platform::RUBY
|
6
6
|
s.extra_rdoc_files = ['README.md', 'LICENSE']
|
@@ -16,6 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.add_dependency 'chef', '>= 11.0'
|
17
17
|
s.add_dependency 'ridley', '~> 4.0'
|
18
18
|
s.add_development_dependency 'rake', '~> 10.0'
|
19
|
+
s.add_development_dependency 'rubocop', '~> 0.28.0'
|
19
20
|
|
20
21
|
s.files = `git ls-files -z`.split("\x0")
|
21
22
|
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reagan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '10.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.28.0
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.28.0
|
69
83
|
description: Trust But Verify - Ruby build script for Jenkins that automates the testing
|
70
84
|
of Chef cookbooks
|
71
85
|
email: tim@cozy.co
|
@@ -77,6 +91,7 @@ extra_rdoc_files:
|
|
77
91
|
files:
|
78
92
|
- .gitignore
|
79
93
|
- .rubocop.yml
|
94
|
+
- .travis.yml
|
80
95
|
- Gemfile
|
81
96
|
- LICENSE
|
82
97
|
- README.md
|