codestrap 0.1.0 → 0.2.0
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/CHANGELOG.md +21 -0
- data/README.md +2 -2
- data/codestrap.gemspec +11 -2
- data/lib/codestrap.rb +96 -0
- data/lib/codestrap/cli.rb +11 -1
- data/lib/codestrap/config.rb +18 -8
- data/lib/codestrap/version.rb +1 -1
- metadata +47 -222
- data/.gitignore +0 -20
- data/.travis.yml +0 -4
- data/Gemfile +0 -6
- data/LICENSE.txt +0 -13
- data/Rakefile +0 -51
- data/config/projects/codestrap.rb +0 -22
- data/config/software/codestrap.rb +0 -20
- data/config/software/ruby.rb +0 -247
- data/config/software/zlib.rb +0 -86
- data/features/client.feature +0 -99
- data/features/fixtures/client/home/codestrap/bin/.empty +0 -0
- data/features/fixtures/client/home/codestrap/content/bash.erb +0 -3
- data/features/fixtures/client/home/codestrap/content/gem/dir/file +0 -0
- data/features/fixtures/client/home/codestrap/content/gem/dir/template +0 -3
- data/features/fixtures/client/home/codestrap/content/gem/file +0 -1
- data/features/fixtures/client/home/codestrap/content/gem/template +0 -3
- data/features/fixtures/client/home/codestrap/content/local_remote.erb +0 -1
- data/features/fixtures/client/home/codestrap/content/local_remote/dir/file +0 -0
- data/features/fixtures/client/home/codestrap/content/local_remote/dir/template +0 -3
- data/features/fixtures/client/home/codestrap/content/local_remote/file +0 -1
- data/features/fixtures/client/home/codestrap/content/local_remote/template +0 -3
- data/features/fixtures/client/home/codestrap/objects/local.json +0 -3
- data/features/fixtures/client/output/.empty +0 -0
- data/features/fixtures/client/var/lib/codestrap/bin/.empty +0 -0
- data/features/fixtures/client/var/lib/codestrap/content/bashremote.erb +0 -3
- data/features/fixtures/client/var/lib/codestrap/content/gemremote/dir/file +0 -0
- data/features/fixtures/client/var/lib/codestrap/content/gemremote/dir/template +0 -3
- data/features/fixtures/client/var/lib/codestrap/content/gemremote/file +0 -0
- data/features/fixtures/client/var/lib/codestrap/content/gemremote/template +0 -3
- data/features/fixtures/client/var/lib/codestrap/content/remote_local.erb +0 -1
- data/features/fixtures/client/var/lib/codestrap/content/remote_local/dir/file +0 -0
- data/features/fixtures/client/var/lib/codestrap/content/remote_local/dir/template +0 -3
- data/features/fixtures/client/var/lib/codestrap/content/remote_local/file +0 -1
- data/features/fixtures/client/var/lib/codestrap/content/remote_local/template +0 -3
- data/features/fixtures/client/var/lib/codestrap/content/remote_remote.erb +0 -1
- data/features/fixtures/client/var/lib/codestrap/content/remote_remote/dir/file +0 -0
- data/features/fixtures/client/var/lib/codestrap/content/remote_remote/dir/template +0 -3
- data/features/fixtures/client/var/lib/codestrap/content/remote_remote/file +0 -0
- data/features/fixtures/client/var/lib/codestrap/content/remote_remote/template +0 -3
- data/features/fixtures/client/var/lib/codestrap/objects/remote.json +0 -3
- data/features/fixtures/logging/home/logging/codestrap/bin/stubdirectory/.empty +0 -0
- data/features/fixtures/logging/home/logging/codestrap/bin/stubnotlink +0 -0
- data/features/fixtures/logging/home/logging/codestrap/content/.empty +0 -0
- data/features/fixtures/logging/home/logging/codestrap/objects/.empty +0 -0
- data/features/fixtures/server/mixed/var/lib/stub/content/address.erb +0 -3
- data/features/fixtures/server/mixed/var/lib/stub/content/cell.erb +0 -3
- data/features/fixtures/server/mixed/var/lib/stub/content/email.erb +0 -3
- data/features/fixtures/server/mixed/var/lib/stub/content/mobile.erb +0 -3
- data/features/fixtures/server/mixed/var/lib/stub/content/name.erb +0 -3
- data/features/fixtures/server/mixed/var/lib/stub/content/phone.erb +0 -3
- data/features/fixtures/server/mixed/var/lib/stub/content/puppetmodule/Modulefile +0 -12
- data/features/fixtures/server/mixed/var/lib/stub/content/puppetmodule/README +0 -17
- data/features/fixtures/server/mixed/var/lib/stub/content/puppetmodule/manifests/init.pp +0 -42
- data/features/fixtures/server/mixed/var/lib/stub/content/puppetmodule/spec/spec_helper.rb +0 -18
- data/features/fixtures/server/mixed/var/lib/stub/content/puppetmodule/tests/init.pp +0 -13
- data/features/fixtures/server/mixed/var/lib/stub/objects/contact.json +0 -8
- data/features/fixtures/server/mixed/var/lib/stub/objects/shadow/contact.json +0 -8
- data/features/fixtures/strap/projects/etc/.empty +0 -0
- data/features/fixtures/strap/projects/home/user/dir/bin/.empty +0 -0
- data/features/fixtures/strap/projects/home/user/dir/content/puppetmodule/Modulefile +0 -12
- data/features/fixtures/strap/projects/home/user/dir/content/puppetmodule/README +0 -17
- data/features/fixtures/strap/projects/home/user/dir/content/puppetmodule/manifests/:stub:project.name:/subclass.pp +0 -3
- data/features/fixtures/strap/projects/home/user/dir/content/puppetmodule/manifests/init.pp +0 -42
- data/features/fixtures/strap/projects/home/user/dir/content/puppetmodule/spec/spec_helper.rb +0 -18
- data/features/fixtures/strap/projects/home/user/dir/content/puppetmodule/tests/init.pp +0 -13
- data/features/fixtures/strap/projects/home/user/dir/objects/contact.json +0 -8
- data/features/fixtures/strap/projects/home/user/dir/objects/shadow/contact.json +0 -8
- data/features/fixtures/strap/projects/output/.empty +0 -0
- data/features/fixtures/stub/contact/etc/.empty +0 -0
- data/features/fixtures/stub/contact/home/user/dir/bin/.empty +0 -0
- data/features/fixtures/stub/contact/home/user/dir/content/address.erb +0 -3
- data/features/fixtures/stub/contact/home/user/dir/content/cell.erb +0 -3
- data/features/fixtures/stub/contact/home/user/dir/content/email.erb +0 -3
- data/features/fixtures/stub/contact/home/user/dir/content/mobile.erb +0 -3
- data/features/fixtures/stub/contact/home/user/dir/content/name.erb +0 -3
- data/features/fixtures/stub/contact/home/user/dir/content/phone.erb +0 -3
- data/features/fixtures/stub/contact/home/user/dir/objects/contact.json +0 -8
- data/features/fixtures/stub/contact/home/user/dir/objects/shadow/contact.json +0 -8
- data/features/fixtures/stub/contact/output/.empty +0 -0
- data/features/fixtures/stub/date/etc/.empty +0 -0
- data/features/fixtures/stub/date/home/user/stub/bin/.empty +0 -0
- data/features/fixtures/stub/date/home/user/stub/content/day.erb +0 -3
- data/features/fixtures/stub/date/home/user/stub/content/hour.erb +0 -3
- data/features/fixtures/stub/date/home/user/stub/content/minute.erb +0 -3
- data/features/fixtures/stub/date/home/user/stub/content/month.erb +0 -3
- data/features/fixtures/stub/date/home/user/stub/content/second.erb +0 -3
- data/features/fixtures/stub/date/home/user/stub/content/year.erb +0 -3
- data/features/fixtures/stub/date/home/user/stub/objects/.empty +0 -0
- data/features/fixtures/stub/date/output/.empty +0 -0
- data/features/fixtures/stub/script/etc/.empty +0 -0
- data/features/fixtures/stub/script/home/user/stub/bin/.empty +0 -0
- data/features/fixtures/stub/script/home/user/stub/content/credentials.erb +0 -6
- data/features/fixtures/stub/script/home/user/stub/objects/credentials.rb +0 -11
- data/features/fixtures/stub/script/output/.empty +0 -0
- data/features/logging.feature +0 -39
- data/features/object_scripts.feature +0 -13
- data/features/server.feature +0 -36
- data/features/step_definitions/client_steps.rb +0 -99
- data/features/step_definitions/logging_steps.rb +0 -65
- data/features/step_definitions/object_scripts_steps.rb +0 -26
- data/features/step_definitions/server_steps.rb +0 -112
- data/features/step_definitions/strap_steps.rb +0 -69
- data/features/step_definitions/stub_option_simple_steps.rb +0 -31
- data/features/step_definitions/stub_steps.rb +0 -94
- data/features/strap.feature +0 -34
- data/features/stub.feature +0 -157
- data/features/stub_option_simple.feature +0 -14
- data/features/stub_packages.feature +0 -15
- data/features/support/env.rb +0 -197
- data/omnibus.rb +0 -53
- data/package-scripts/codestrap/postinst +0 -25
- data/package-scripts/codestrap/postrm +0 -17
- data/package-scripts/codestrap/preinst +0 -7
- data/package-scripts/codestrap/prerm +0 -15
- data/resources/codestrap/pkg/background.png +0 -0
- data/resources/codestrap/pkg/distribution.xml.erb +0 -22
- data/resources/codestrap/pkg/license.html.erb +0 -202
- data/resources/codestrap/pkg/welcome.html.erb +0 -7
data/features/client.feature
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
Feature: Client uses remote codestraps and boilerplates
|
|
2
|
-
In order to use remote codestraps and boilerplates
|
|
3
|
-
as a user
|
|
4
|
-
I want a client command that will support this functionality
|
|
5
|
-
|
|
6
|
-
Scenario Outline: Use remote codestrap or boilerplate
|
|
7
|
-
Given client tmp directory
|
|
8
|
-
And client fixtures file "fixtures.yaml" with:
|
|
9
|
-
"""
|
|
10
|
-
links: client/home/codestrap/bin
|
|
11
|
-
codestrapfile: |
|
|
12
|
-
Codestrapfile.config do |conf|
|
|
13
|
-
conf.server.base = ['client/var/lib/codestrap']
|
|
14
|
-
conf.local.base = ['client/home/codestrap']
|
|
15
|
-
conf.local.urls = 'http://127.0.0.1:4567/rest/capability.json'
|
|
16
|
-
end
|
|
17
|
-
commands:
|
|
18
|
-
stubbash:
|
|
19
|
-
output: client/output/bashscript
|
|
20
|
-
test:
|
|
21
|
-
client/output/bashscript:
|
|
22
|
-
local-data: 'true'
|
|
23
|
-
strapgem:
|
|
24
|
-
output: client/output/gem
|
|
25
|
-
test:
|
|
26
|
-
client/output/gem/template:
|
|
27
|
-
local-data: 'true'
|
|
28
|
-
client/output/gem/dir/template:
|
|
29
|
-
local-data: 'true'
|
|
30
|
-
stubbashremote:
|
|
31
|
-
output: client/output/bashscriptremote
|
|
32
|
-
test:
|
|
33
|
-
client/output/bashscriptremote:
|
|
34
|
-
remote-data: 'true'
|
|
35
|
-
strapgemremote:
|
|
36
|
-
output: client/output/gemremote
|
|
37
|
-
test:
|
|
38
|
-
client/output/gemremote/template:
|
|
39
|
-
remote-data: 'true'
|
|
40
|
-
client/output/gemremote/dir/template:
|
|
41
|
-
remote-data: 'true'
|
|
42
|
-
stubremote_local:
|
|
43
|
-
output: client/output/file_remote_local
|
|
44
|
-
test:
|
|
45
|
-
client/output/file_remote_local:
|
|
46
|
-
local-data: 'true'
|
|
47
|
-
strapremote_local:
|
|
48
|
-
output: client/output/dir_remote_local
|
|
49
|
-
test:
|
|
50
|
-
client/output/dir_remote_local/template:
|
|
51
|
-
local-data: 'true'
|
|
52
|
-
client/output/dir_remote_local/dir/template:
|
|
53
|
-
local-data: 'true'
|
|
54
|
-
stubremote_remote:
|
|
55
|
-
output: client/output/file_remote_remote
|
|
56
|
-
test:
|
|
57
|
-
client/output/file_remote_remote:
|
|
58
|
-
remote-data: 'true'
|
|
59
|
-
strapremote_remote:
|
|
60
|
-
output: client/output/dir_remote_remote
|
|
61
|
-
test:
|
|
62
|
-
client/output/dir_remote_remote/template:
|
|
63
|
-
remote-data: 'true'
|
|
64
|
-
client/output/dir_remote_remote/dir/template:
|
|
65
|
-
remote-data: 'true'
|
|
66
|
-
stublocal_remote:
|
|
67
|
-
output: client/output/file_local_remote
|
|
68
|
-
test:
|
|
69
|
-
client/output/file_local_remote:
|
|
70
|
-
remote-data: 'true'
|
|
71
|
-
straplocal_remote:
|
|
72
|
-
output: client/output/dir_local_remote
|
|
73
|
-
test:
|
|
74
|
-
client/output/dir_local_remote/template:
|
|
75
|
-
remote-data: 'true'
|
|
76
|
-
client/output/dir_local_remote/dir/template:
|
|
77
|
-
remote-data: 'true'
|
|
78
|
-
"""
|
|
79
|
-
And client fixture "<command>"
|
|
80
|
-
And client generate command is called
|
|
81
|
-
Then client runs "stub output"
|
|
82
|
-
And client runs "strap output"
|
|
83
|
-
And client stub exit code is 0
|
|
84
|
-
And client strap exit code is 0
|
|
85
|
-
And client stub has the correct interpolated values
|
|
86
|
-
And client boilerplate has the correct interpolated values
|
|
87
|
-
Examples:
|
|
88
|
-
| command |
|
|
89
|
-
| stubbash |
|
|
90
|
-
| strapgem |
|
|
91
|
-
| stubbashremote |
|
|
92
|
-
| strapgemremote |
|
|
93
|
-
| stubremote_local |
|
|
94
|
-
| strapremote_local |
|
|
95
|
-
| stubremote_remote |
|
|
96
|
-
| strapremote_remote |
|
|
97
|
-
| stublocal_remote |
|
|
98
|
-
| straplocal_remote |
|
|
99
|
-
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
normal-file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<%= remote.data %>
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
normal-file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<%= local.data %>
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# data
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<%= remote.data %>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# strap:erb
|
|
2
|
-
name 'dexterp/foobar'
|
|
3
|
-
version '0.1.0'
|
|
4
|
-
source 'UNKNOWN'
|
|
5
|
-
author '<%= contact.name %>'
|
|
6
|
-
license 'Apache License, Version 2.0'
|
|
7
|
-
summary 'UNKNOWN'
|
|
8
|
-
description 'UNKNOWN'
|
|
9
|
-
project_page 'UNKNOWN'
|
|
10
|
-
|
|
11
|
-
## Add dependencies, if any:
|
|
12
|
-
# dependency 'username/name', '>= 1.2.0'
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# strap:erb
|
|
2
|
-
# == Class: foobar
|
|
3
|
-
#
|
|
4
|
-
# Full description of class foobar here.
|
|
5
|
-
#
|
|
6
|
-
# === Parameters
|
|
7
|
-
#
|
|
8
|
-
# Document parameters here.
|
|
9
|
-
#
|
|
10
|
-
# [*sample_parameter*]
|
|
11
|
-
# Explanation of what this parameter affects and what it defaults to.
|
|
12
|
-
# e.g. "Specify one or more upstream ntp servers as an array."
|
|
13
|
-
#
|
|
14
|
-
# === Variables
|
|
15
|
-
#
|
|
16
|
-
# Here you should define a list of variables that this module would require.
|
|
17
|
-
#
|
|
18
|
-
# [*sample_variable*]
|
|
19
|
-
# Explanation of how this variable affects the funtion of this class and if
|
|
20
|
-
# it has a default. e.g. "The parameter enc_ntp_servers must be set by the
|
|
21
|
-
# External Node Classifier as a comma separated list of hostnames." (Note,
|
|
22
|
-
# global variables should be avoided in favor of class parameters as
|
|
23
|
-
# of Puppet 2.6.)
|
|
24
|
-
#
|
|
25
|
-
# === Examples
|
|
26
|
-
#
|
|
27
|
-
# class { foobar:
|
|
28
|
-
# servers => [ 'pool.ntp.org', 'ntp.local.company.com' ],
|
|
29
|
-
# }
|
|
30
|
-
#
|
|
31
|
-
# === Authors
|
|
32
|
-
#
|
|
33
|
-
# <%= contact.name %> <%= contact.email %>
|
|
34
|
-
#
|
|
35
|
-
# === Copyright
|
|
36
|
-
#
|
|
37
|
-
# Copyright 2014 Your name here, unless otherwise noted.
|
|
38
|
-
#
|
|
39
|
-
class foobar {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
## strap:erb
|
|
2
|
-
#dir = File.expand_path(File.dirname(__FILE__))
|
|
3
|
-
#$LOAD_PATH.unshift File.join(dir, 'lib')
|
|
4
|
-
#
|
|
5
|
-
#require 'mocha'
|
|
6
|
-
#require 'puppet'
|
|
7
|
-
#require 'rspec'
|
|
8
|
-
#require 'spec/autorun'
|
|
9
|
-
#
|
|
10
|
-
#Spec::Runner.configure do |config|
|
|
11
|
-
# config.mock_with :mocha
|
|
12
|
-
#end
|
|
13
|
-
#
|
|
14
|
-
## We need this because the RAL uses 'should' as a method. This
|
|
15
|
-
## allows us the same behaviour but with a different method name.
|
|
16
|
-
#class Object
|
|
17
|
-
# alias :must :should
|
|
18
|
-
#end
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# strap:erb
|
|
2
|
-
# The baseline for module testing used by Puppet Labs is that each manifest
|
|
3
|
-
# should have a corresponding test manifest that declares that class or defined
|
|
4
|
-
# type.
|
|
5
|
-
#
|
|
6
|
-
# Tests are then run by using puppet apply --noop (to check for compilation
|
|
7
|
-
# errors and view a log of events) or by fully applying the test in a virtual
|
|
8
|
-
# environment (to compare the resulting system state to the desired state).
|
|
9
|
-
#
|
|
10
|
-
# Learn more about module testing here:
|
|
11
|
-
# http://docs.puppetlabs.com/guides/tests_smoke.html
|
|
12
|
-
#
|
|
13
|
-
include foobar
|
|
File without changes
|
|
File without changes
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# strap:erb
|
|
2
|
-
name 'dexterp/foobar'
|
|
3
|
-
version '0.1.0'
|
|
4
|
-
source 'UNKNOWN'
|
|
5
|
-
author '<%= contact.name %>'
|
|
6
|
-
license 'Apache License, Version 2.0'
|
|
7
|
-
summary 'UNKNOWN'
|
|
8
|
-
description 'UNKNOWN'
|
|
9
|
-
project_page 'UNKNOWN'
|
|
10
|
-
|
|
11
|
-
## Add dependencies, if any:
|
|
12
|
-
# dependency 'username/name', '>= 1.2.0'
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# strap:erb
|
|
2
|
-
# == Class: foobar
|
|
3
|
-
#
|
|
4
|
-
# Full description of class foobar here.
|
|
5
|
-
#
|
|
6
|
-
# === Parameters
|
|
7
|
-
#
|
|
8
|
-
# Document parameters here.
|
|
9
|
-
#
|
|
10
|
-
# [*sample_parameter*]
|
|
11
|
-
# Explanation of what this parameter affects and what it defaults to.
|
|
12
|
-
# e.g. "Specify one or more upstream ntp servers as an array."
|
|
13
|
-
#
|
|
14
|
-
# === Variables
|
|
15
|
-
#
|
|
16
|
-
# Here you should define a list of variables that this module would require.
|
|
17
|
-
#
|
|
18
|
-
# [*sample_variable*]
|
|
19
|
-
# Explanation of how this variable affects the funtion of this class and if
|
|
20
|
-
# it has a default. e.g. "The parameter enc_ntp_servers must be set by the
|
|
21
|
-
# External Node Classifier as a comma separated list of hostnames." (Note,
|
|
22
|
-
# global variables should be avoided in favor of class parameters as
|
|
23
|
-
# of Puppet 2.6.)
|
|
24
|
-
#
|
|
25
|
-
# === Examples
|
|
26
|
-
#
|
|
27
|
-
# class { foobar:
|
|
28
|
-
# servers => [ 'pool.ntp.org', 'ntp.local.company.com' ],
|
|
29
|
-
# }
|
|
30
|
-
#
|
|
31
|
-
# === Authors
|
|
32
|
-
#
|
|
33
|
-
# <%= contact.name %> <%= contact.email %>
|
|
34
|
-
#
|
|
35
|
-
# === Copyright
|
|
36
|
-
#
|
|
37
|
-
# Copyright 2014 Your name here, unless otherwise noted.
|
|
38
|
-
#
|
|
39
|
-
class foobar {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|