cardboard 0.0.0 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -1
- data/Gemfile.lock +37 -11
- data/README.md +45 -1
- data/bin/cardboard +13 -0
- data/cardboard.gemspec +5 -7
- data/libexec/bootstrap +8 -0
- data/libexec/cibuild +8 -0
- data/libexec/lint +7 -0
- data/libexec/specs +5 -0
- data/libexec/syntax +32 -0
- data/script/bootstrap +1 -1
- metadata +87 -93
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -2,8 +2,7 @@ PATH
|
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
4
|
cardboard (0.0.0)
|
5
|
-
|
6
|
-
puppet (~> 3.0)
|
5
|
+
boxen (~> 0.6)
|
7
6
|
puppet-lint (~> 0.3)
|
8
7
|
puppetlabs_spec_helper (~> 0.3)
|
9
8
|
rspec-puppet (~> 0.1)
|
@@ -11,35 +10,62 @@ PATH
|
|
11
10
|
GEM
|
12
11
|
remote: http://rubygems.org/
|
13
12
|
specs:
|
13
|
+
addressable (2.3.2)
|
14
|
+
ansi (1.4.3)
|
15
|
+
boxen (0.6.0)
|
16
|
+
ansi (~> 1.4)
|
17
|
+
hiera (~> 1.0.0)
|
18
|
+
highline (~> 1.6)
|
19
|
+
json_pure (~> 1.7)
|
20
|
+
librarian-puppet (~> 0.9)
|
21
|
+
octokit (~> 1.15)
|
22
|
+
puppet (~> 3.0)
|
14
23
|
diff-lcs (1.1.3)
|
15
|
-
facter (1.6.
|
24
|
+
facter (1.6.17)
|
25
|
+
faraday (0.8.4)
|
26
|
+
multipart-post (~> 1.1)
|
27
|
+
faraday_middleware (0.9.0)
|
28
|
+
faraday (>= 0.7.4, < 0.9)
|
29
|
+
hashie (1.2.0)
|
16
30
|
hiera (1.0.0)
|
17
|
-
|
31
|
+
highline (1.6.15)
|
32
|
+
json (1.7.6)
|
33
|
+
json_pure (1.7.6)
|
18
34
|
librarian-puppet (0.9.7)
|
19
35
|
json
|
20
36
|
puppet
|
21
37
|
thor (~> 0.15)
|
22
38
|
metaclass (0.0.1)
|
23
|
-
mocha (0.13.
|
39
|
+
mocha (0.13.1)
|
24
40
|
metaclass (~> 0.0.1)
|
25
|
-
|
41
|
+
multi_json (1.5.0)
|
42
|
+
multipart-post (1.1.5)
|
43
|
+
netrc (0.7.7)
|
44
|
+
octokit (1.22.0)
|
45
|
+
addressable (~> 2.2)
|
46
|
+
faraday (~> 0.8)
|
47
|
+
faraday_middleware (~> 0.9)
|
48
|
+
hashie (~> 1.2)
|
49
|
+
multi_json (~> 1.3)
|
50
|
+
netrc (~> 0.7.7)
|
51
|
+
puppet (3.0.2)
|
26
52
|
facter (~> 1.6.11)
|
27
53
|
hiera (~> 1.0.0)
|
28
54
|
puppet-lint (0.3.2)
|
29
|
-
puppetlabs_spec_helper (0.
|
55
|
+
puppetlabs_spec_helper (0.4.0)
|
30
56
|
mocha (>= 0.10.5)
|
31
57
|
rake
|
32
58
|
rspec (>= 2.9.0)
|
33
59
|
rspec-puppet (>= 0.1.1)
|
34
|
-
rake (10.0.
|
60
|
+
rake (10.0.3)
|
35
61
|
rspec (2.12.0)
|
36
62
|
rspec-core (~> 2.12.0)
|
37
63
|
rspec-expectations (~> 2.12.0)
|
38
64
|
rspec-mocks (~> 2.12.0)
|
39
|
-
rspec-core (2.12.
|
40
|
-
rspec-expectations (2.12.
|
65
|
+
rspec-core (2.12.2)
|
66
|
+
rspec-expectations (2.12.1)
|
41
67
|
diff-lcs (~> 1.1.3)
|
42
|
-
rspec-mocks (2.12.
|
68
|
+
rspec-mocks (2.12.1)
|
43
69
|
rspec-puppet (0.1.5)
|
44
70
|
rspec
|
45
71
|
thor (0.16.0)
|
data/README.md
CHANGED
@@ -1,3 +1,47 @@
|
|
1
1
|
# Cardboard Boxen
|
2
2
|
|
3
|
-
Development tools for Boxen's puppet
|
3
|
+
Development tools for Boxen's puppet module projects. This `cardboard`
|
4
|
+
RubyGem contains shared development behavior for and is a dependency
|
5
|
+
of each of the `boxen/puppet-*` module projects.
|
6
|
+
|
7
|
+
To make porting easy and interfaces simple, none of Cardboard's
|
8
|
+
commands are called directly. Instead, shims in a module project's
|
9
|
+
`scripts/` directory delegate to Cardboard's `libexec/` commands after
|
10
|
+
making sure all dependencies are up-to-date.
|
11
|
+
|
12
|
+
## Available Commands
|
13
|
+
|
14
|
+
### `bootstrap`
|
15
|
+
|
16
|
+
Called before any other command, `bootstrap` makes sure any Puppet
|
17
|
+
modules needed to run specs are available. It only runs if
|
18
|
+
`spec/fixtures/Puppetfile` exists.
|
19
|
+
|
20
|
+
### `cibuild`
|
21
|
+
|
22
|
+
FIX: Runs `script/syntax`, `script/lint`, and `script/specs` if they
|
23
|
+
exist.
|
24
|
+
|
25
|
+
### `lint`
|
26
|
+
|
27
|
+
Runs `puppet-lint` on all `.pp` files in `manifests/`.
|
28
|
+
|
29
|
+
### `specs`
|
30
|
+
|
31
|
+
Runs all specs under `spec/`.
|
32
|
+
|
33
|
+
### `syntax`
|
34
|
+
|
35
|
+
Validates the syntax of all Puppet and Ruby files.
|
36
|
+
|
37
|
+
## Using Cardboard in Your Boxen Modules
|
38
|
+
|
39
|
+
It's probably best to follow the structure of
|
40
|
+
[Boxen's template puppet module][template]. You can generate a stub
|
41
|
+
from this template by running `boxen --new-module <module-name>`
|
42
|
+
anywhere Boxen is installed.
|
43
|
+
|
44
|
+
[template]: https://github.com/boxen/puppet-template
|
45
|
+
|
46
|
+
Boxen's template makes Cardboard commands available via shims, so
|
47
|
+
`script/cibuild` will run Cardboard's `libexec/cibuild` command.
|
data/bin/cardboard
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# A proxy for libexec.
|
3
|
+
|
4
|
+
require "pathname"
|
5
|
+
|
6
|
+
libexec = Pathname.new(__FILE__).realpath + "../../libexec"
|
7
|
+
script = libexec + ARGV.pop
|
8
|
+
|
9
|
+
unless script.executable?
|
10
|
+
abort "cardboard: Unknown script: #{script}"
|
11
|
+
end
|
12
|
+
|
13
|
+
exec script.to_s, *ARGV
|
data/cardboard.gemspec
CHANGED
@@ -1,21 +1,19 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
|
3
1
|
Gem::Specification.new do |gem|
|
4
2
|
gem.name = "cardboard"
|
5
|
-
gem.version = "0.
|
3
|
+
gem.version = "0.1.0"
|
6
4
|
gem.authors = ["John Barnette", "Will Farrington"]
|
7
5
|
gem.email = ["jbarnette@github.com", "wfarr@github.com"]
|
8
6
|
gem.description = "Development tools for Boxen's puppet modules."
|
9
|
-
gem.summary = "
|
7
|
+
gem.summary = "Development dependencies for the ecosystem."
|
10
8
|
gem.homepage = "https://github.com/boxen/cardboard"
|
11
9
|
|
10
|
+
gem.executables = ["cardboard"]
|
12
11
|
gem.files = `git ls-files`.split $/
|
13
12
|
gem.test_files = gem.files.grep /^test/
|
14
13
|
gem.require_paths = ["lib"]
|
15
14
|
|
16
|
-
gem.add_dependency "
|
17
|
-
gem.add_dependency "puppet", "~> 3.0"
|
15
|
+
gem.add_dependency "boxen", "~> 0.8"
|
18
16
|
gem.add_dependency "puppet-lint", "~> 0.3"
|
19
|
-
gem.add_dependency "puppetlabs_spec_helper", "~> 0.
|
17
|
+
gem.add_dependency "puppetlabs_spec_helper", "~> 0.4"
|
20
18
|
gem.add_dependency "rspec-puppet", "~> 0.1"
|
21
19
|
end
|
data/libexec/bootstrap
ADDED
data/libexec/cibuild
ADDED
data/libexec/lint
ADDED
data/libexec/specs
ADDED
data/libexec/syntax
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
# Check the syntax of all Puppet and Ruby files.
|
3
|
+
|
4
|
+
set -e
|
5
|
+
|
6
|
+
puppets=`find manifests -name '*.pp' -print 2>/dev/null`
|
7
|
+
rubies=`find lib spec -name '*.rb' -not -path 'spec/fixtures/*' -print 2>/dev/null`
|
8
|
+
templates=`find templates -type f -print 2>/dev/null`
|
9
|
+
|
10
|
+
for puppet in $puppets; do
|
11
|
+
/bin/echo -n "${puppet}: "
|
12
|
+
.bundle/binstubs/puppet parser validate $puppet && echo "Syntax OK"
|
13
|
+
if [ $? -ne 0 ]; then
|
14
|
+
exit 1
|
15
|
+
fi
|
16
|
+
done
|
17
|
+
|
18
|
+
for ruby in $rubies; do
|
19
|
+
/bin/echo -n "${ruby}: "
|
20
|
+
ruby -wc $ruby
|
21
|
+
if [ $? -ne 0 ]; then
|
22
|
+
exit 1
|
23
|
+
fi
|
24
|
+
done
|
25
|
+
|
26
|
+
for template in $templates; do
|
27
|
+
/bin/echo -n "${template}: "
|
28
|
+
erb -P -x -T '-' ${template} | ruby -wc
|
29
|
+
if [ $? -ne 0 ]; then
|
30
|
+
exit 1
|
31
|
+
fi
|
32
|
+
done
|
data/script/bootstrap
CHANGED
metadata
CHANGED
@@ -1,135 +1,129 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: cardboard
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
version: 0.1.0
|
6
10
|
platform: ruby
|
7
|
-
authors:
|
11
|
+
authors:
|
8
12
|
- John Barnette
|
9
13
|
- Will Farrington
|
10
14
|
autorequire:
|
11
15
|
bindir: bin
|
12
16
|
cert_chain: []
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
requirements:
|
20
|
-
- - ~>
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '0.9'
|
23
|
-
type: :runtime
|
17
|
+
|
18
|
+
date: 2013-02-13 00:00:00 -08:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: boxen
|
24
23
|
prerelease: false
|
25
|
-
|
26
|
-
|
27
|
-
requirements:
|
28
|
-
- - ~>
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
version: '0.9'
|
31
|
-
- !ruby/object:Gem::Dependency
|
32
|
-
name: puppet
|
33
|
-
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
|
-
requirements:
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
36
26
|
- - ~>
|
37
|
-
- !ruby/object:Gem::Version
|
38
|
-
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
segments:
|
29
|
+
- 0
|
30
|
+
- 8
|
31
|
+
version: "0.8"
|
39
32
|
type: :runtime
|
40
|
-
|
41
|
-
|
42
|
-
none: false
|
43
|
-
requirements:
|
44
|
-
- - ~>
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: '3.0'
|
47
|
-
- !ruby/object:Gem::Dependency
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
48
35
|
name: puppet-lint
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
|
-
requirements:
|
52
|
-
- - ~>
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0.3'
|
55
|
-
type: :runtime
|
56
36
|
prerelease: false
|
57
|
-
|
58
|
-
|
59
|
-
requirements:
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
60
39
|
- - ~>
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
|
63
|
-
-
|
64
|
-
|
65
|
-
|
66
|
-
none: false
|
67
|
-
requirements:
|
68
|
-
- - ~>
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
version: '0.3'
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 0
|
43
|
+
- 3
|
44
|
+
version: "0.3"
|
71
45
|
type: :runtime
|
46
|
+
version_requirements: *id002
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: puppetlabs_spec_helper
|
72
49
|
prerelease: false
|
73
|
-
|
74
|
-
|
75
|
-
requirements:
|
50
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
76
52
|
- - ~>
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
|
79
|
-
-
|
80
|
-
|
81
|
-
|
82
|
-
none: false
|
83
|
-
requirements:
|
84
|
-
- - ~>
|
85
|
-
- !ruby/object:Gem::Version
|
86
|
-
version: '0.1'
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
segments:
|
55
|
+
- 0
|
56
|
+
- 4
|
57
|
+
version: "0.4"
|
87
58
|
type: :runtime
|
59
|
+
version_requirements: *id003
|
60
|
+
- !ruby/object:Gem::Dependency
|
61
|
+
name: rspec-puppet
|
88
62
|
prerelease: false
|
89
|
-
|
90
|
-
|
91
|
-
requirements:
|
63
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
92
65
|
- - ~>
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
segments:
|
68
|
+
- 0
|
69
|
+
- 1
|
70
|
+
version: "0.1"
|
71
|
+
type: :runtime
|
72
|
+
version_requirements: *id004
|
95
73
|
description: Development tools for Boxen's puppet modules.
|
96
|
-
email:
|
74
|
+
email:
|
97
75
|
- jbarnette@github.com
|
98
76
|
- wfarr@github.com
|
99
|
-
executables:
|
77
|
+
executables:
|
78
|
+
- cardboard
|
100
79
|
extensions: []
|
80
|
+
|
101
81
|
extra_rdoc_files: []
|
102
|
-
|
82
|
+
|
83
|
+
files:
|
103
84
|
- .gitignore
|
104
85
|
- Gemfile
|
105
86
|
- Gemfile.lock
|
106
87
|
- LICENSE
|
107
88
|
- README.md
|
89
|
+
- bin/cardboard
|
108
90
|
- cardboard.gemspec
|
91
|
+
- libexec/bootstrap
|
92
|
+
- libexec/cibuild
|
93
|
+
- libexec/lint
|
94
|
+
- libexec/specs
|
95
|
+
- libexec/syntax
|
109
96
|
- script/bootstrap
|
110
97
|
- script/release
|
98
|
+
has_rdoc: true
|
111
99
|
homepage: https://github.com/boxen/cardboard
|
112
100
|
licenses: []
|
101
|
+
|
113
102
|
post_install_message:
|
114
103
|
rdoc_options: []
|
115
|
-
|
104
|
+
|
105
|
+
require_paths:
|
116
106
|
- lib
|
117
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
requirements:
|
126
|
-
- -
|
127
|
-
- !ruby/object:Gem::Version
|
128
|
-
|
107
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
segments:
|
112
|
+
- 0
|
113
|
+
version: "0"
|
114
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
segments:
|
119
|
+
- 0
|
120
|
+
version: "0"
|
129
121
|
requirements: []
|
122
|
+
|
130
123
|
rubyforge_project:
|
131
|
-
rubygems_version: 1.
|
124
|
+
rubygems_version: 1.3.6
|
132
125
|
signing_key:
|
133
126
|
specification_version: 3
|
134
|
-
summary:
|
127
|
+
summary: Development dependencies for the ecosystem.
|
135
128
|
test_files: []
|
129
|
+
|