codestrap 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +20 -0
- data/.travis.yml +4 -0
- data/.yardopts +3 -0
- data/BOILERPLATE.md +151 -0
- data/CODESTRAPFILE.md +28 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +13 -0
- data/README.md +69 -0
- data/Rakefile +51 -0
- data/bin/strap +8 -0
- data/bin/upstrap +8 -0
- data/codestrap.gemspec +37 -0
- data/config/projects/codestrap.rb +22 -0
- data/config/software/codestrap.rb +20 -0
- data/config/software/ruby.rb +247 -0
- data/config/software/zlib.rb +86 -0
- data/features/client.feature +99 -0
- data/features/fixtures/client/home/codestrap/bin/.empty +0 -0
- data/features/fixtures/client/home/codestrap/content/bash.erb +3 -0
- data/features/fixtures/client/home/codestrap/content/gem/dir/file +0 -0
- data/features/fixtures/client/home/codestrap/content/gem/dir/template +3 -0
- data/features/fixtures/client/home/codestrap/content/gem/file +1 -0
- data/features/fixtures/client/home/codestrap/content/gem/template +3 -0
- data/features/fixtures/client/home/codestrap/content/local_remote.erb +1 -0
- data/features/fixtures/client/home/codestrap/content/local_remote/dir/file +0 -0
- data/features/fixtures/client/home/codestrap/content/local_remote/dir/template +3 -0
- data/features/fixtures/client/home/codestrap/content/local_remote/file +1 -0
- data/features/fixtures/client/home/codestrap/content/local_remote/template +3 -0
- data/features/fixtures/client/home/codestrap/objects/local.json +3 -0
- 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 +3 -0
- data/features/fixtures/client/var/lib/codestrap/content/gemremote/dir/file +0 -0
- data/features/fixtures/client/var/lib/codestrap/content/gemremote/dir/template +3 -0
- data/features/fixtures/client/var/lib/codestrap/content/gemremote/file +0 -0
- data/features/fixtures/client/var/lib/codestrap/content/gemremote/template +3 -0
- data/features/fixtures/client/var/lib/codestrap/content/remote_local.erb +1 -0
- 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 +3 -0
- data/features/fixtures/client/var/lib/codestrap/content/remote_local/file +1 -0
- data/features/fixtures/client/var/lib/codestrap/content/remote_local/template +3 -0
- data/features/fixtures/client/var/lib/codestrap/content/remote_remote.erb +1 -0
- 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 +3 -0
- data/features/fixtures/client/var/lib/codestrap/content/remote_remote/file +0 -0
- data/features/fixtures/client/var/lib/codestrap/content/remote_remote/template +3 -0
- data/features/fixtures/client/var/lib/codestrap/objects/remote.json +3 -0
- 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 +3 -0
- data/features/fixtures/server/mixed/var/lib/stub/content/cell.erb +3 -0
- data/features/fixtures/server/mixed/var/lib/stub/content/email.erb +3 -0
- data/features/fixtures/server/mixed/var/lib/stub/content/mobile.erb +3 -0
- data/features/fixtures/server/mixed/var/lib/stub/content/name.erb +3 -0
- data/features/fixtures/server/mixed/var/lib/stub/content/phone.erb +3 -0
- data/features/fixtures/server/mixed/var/lib/stub/content/puppetmodule/Modulefile +12 -0
- data/features/fixtures/server/mixed/var/lib/stub/content/puppetmodule/README +17 -0
- data/features/fixtures/server/mixed/var/lib/stub/content/puppetmodule/manifests/init.pp +42 -0
- data/features/fixtures/server/mixed/var/lib/stub/content/puppetmodule/spec/spec_helper.rb +18 -0
- data/features/fixtures/server/mixed/var/lib/stub/content/puppetmodule/tests/init.pp +13 -0
- data/features/fixtures/server/mixed/var/lib/stub/objects/contact.json +8 -0
- data/features/fixtures/server/mixed/var/lib/stub/objects/shadow/contact.json +8 -0
- 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 +12 -0
- data/features/fixtures/strap/projects/home/user/dir/content/puppetmodule/README +17 -0
- data/features/fixtures/strap/projects/home/user/dir/content/puppetmodule/manifests/:stub:project.name:/subclass.pp +3 -0
- data/features/fixtures/strap/projects/home/user/dir/content/puppetmodule/manifests/init.pp +42 -0
- data/features/fixtures/strap/projects/home/user/dir/content/puppetmodule/spec/spec_helper.rb +18 -0
- data/features/fixtures/strap/projects/home/user/dir/content/puppetmodule/tests/init.pp +13 -0
- data/features/fixtures/strap/projects/home/user/dir/objects/contact.json +8 -0
- data/features/fixtures/strap/projects/home/user/dir/objects/shadow/contact.json +8 -0
- 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 +3 -0
- data/features/fixtures/stub/contact/home/user/dir/content/cell.erb +3 -0
- data/features/fixtures/stub/contact/home/user/dir/content/email.erb +3 -0
- data/features/fixtures/stub/contact/home/user/dir/content/mobile.erb +3 -0
- data/features/fixtures/stub/contact/home/user/dir/content/name.erb +3 -0
- data/features/fixtures/stub/contact/home/user/dir/content/phone.erb +3 -0
- data/features/fixtures/stub/contact/home/user/dir/objects/contact.json +8 -0
- data/features/fixtures/stub/contact/home/user/dir/objects/shadow/contact.json +8 -0
- 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 +3 -0
- data/features/fixtures/stub/date/home/user/stub/content/hour.erb +3 -0
- data/features/fixtures/stub/date/home/user/stub/content/minute.erb +3 -0
- data/features/fixtures/stub/date/home/user/stub/content/month.erb +3 -0
- data/features/fixtures/stub/date/home/user/stub/content/second.erb +3 -0
- data/features/fixtures/stub/date/home/user/stub/content/year.erb +3 -0
- 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 +6 -0
- data/features/fixtures/stub/script/home/user/stub/objects/credentials.rb +11 -0
- data/features/fixtures/stub/script/output/.empty +0 -0
- data/features/logging.feature +39 -0
- data/features/object_scripts.feature +13 -0
- data/features/server.feature +36 -0
- data/features/step_definitions/client_steps.rb +99 -0
- data/features/step_definitions/logging_steps.rb +65 -0
- data/features/step_definitions/object_scripts_steps.rb +26 -0
- data/features/step_definitions/server_steps.rb +112 -0
- data/features/step_definitions/strap_steps.rb +69 -0
- data/features/step_definitions/stub_option_simple_steps.rb +31 -0
- data/features/step_definitions/stub_steps.rb +94 -0
- data/features/strap.feature +34 -0
- data/features/stub.feature +157 -0
- data/features/stub_option_simple.feature +14 -0
- data/features/stub_packages.feature +15 -0
- data/features/support/env.rb +197 -0
- data/lib/codestrap.rb +415 -0
- data/lib/codestrap/cli.rb +76 -0
- data/lib/codestrap/client.rb +179 -0
- data/lib/codestrap/config.rb +199 -0
- data/lib/codestrap/log.rb +56 -0
- data/lib/codestrap/mixin.rb +20 -0
- data/lib/codestrap/namespace.rb +19 -0
- data/lib/codestrap/object/abstract.rb +33 -0
- data/lib/codestrap/object/factory.rb +86 -0
- data/lib/codestrap/object/standard/datetime.rb +24 -0
- data/lib/codestrap/object/standard/files.rb +40 -0
- data/lib/codestrap/object/standard/project.rb +33 -0
- data/lib/codestrap/object/standard/rest.rb +30 -0
- data/lib/codestrap/patch.rb +122 -0
- data/lib/codestrap/server/rest.rb +177 -0
- data/lib/codestrap/server/version.rb +5 -0
- data/lib/codestrap/strap/abstract.rb +135 -0
- data/lib/codestrap/strap/factory.rb +85 -0
- data/lib/codestrap/strap/standard.rb +95 -0
- data/lib/codestrap/stub/abstract.rb +156 -0
- data/lib/codestrap/stub/factory.rb +87 -0
- data/lib/codestrap/stub/standard.rb +23 -0
- data/lib/codestrap/version.rb +3 -0
- data/omnibus.rb +53 -0
- data/package-scripts/codestrap/postinst +25 -0
- data/package-scripts/codestrap/postrm +17 -0
- data/package-scripts/codestrap/preinst +7 -0
- data/package-scripts/codestrap/prerm +15 -0
- data/resources/codestrap/pkg/background.png +0 -0
- data/resources/codestrap/pkg/distribution.xml.erb +22 -0
- data/resources/codestrap/pkg/license.html.erb +202 -0
- data/resources/codestrap/pkg/welcome.html.erb +7 -0
- metadata +466 -0
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
normal-file
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= remote.data %>
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
normal-file
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= local.data %>
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
# data
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= remote.data %>
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,12 @@
|
|
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'
|
@@ -0,0 +1,42 @@
|
|
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
|
+
}
|
@@ -0,0 +1,18 @@
|
|
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
|
@@ -0,0 +1,13 @@
|
|
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
|
@@ -0,0 +1,12 @@
|
|
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'
|
@@ -0,0 +1,42 @@
|
|
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
|
+
}
|
@@ -0,0 +1,18 @@
|
|
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
|
@@ -0,0 +1,13 @@
|
|
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
|
File without changes
|