colonize 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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 101f5d9ba9dd357b812cd6af23fd0a3cb8b9a7ca
4
+ data.tar.gz: b17628afde163004a7d9cbcff5fb1a8f8e98d1d9
5
+ SHA512:
6
+ metadata.gz: e8eb97e3a6c86ec992c2b3f84f69b6c5bd67c8d831ab689cfb32131aae0bb6937fce3812f1eb0eb938da8b3e0877fd36c52d7d91c493bb270c47afc5b6f63ae5
7
+ data.tar.gz: bfd93966ca1c9b298855e7fafd87659e801937285e9e39d030adcefb248107597111cf114e913d563e07b9b199587038d31fffdb4496f853190e00860bf03b3e
data/.gitignore ADDED
@@ -0,0 +1,22 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ .vagrant
19
+ *.sublime-workspace
20
+ workspace.xml
21
+ .idea
22
+ console.log
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ Colonize
data/Colonyfile ADDED
@@ -0,0 +1,50 @@
1
+ # Copyright (c) 2014 Jan Oetjen <oetjenj@gmail.com>
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining
4
+ # a copy of this software and associated documentation files (the
5
+ # "Software"), to deal in the Software without restriction, including
6
+ # without limitation the rights to use, copy, modify, merge, publish,
7
+ # distribute, sublicense, and/or sell copies of the Software, and to
8
+ # permit persons to whom the Software is furnished to do so, subject to
9
+ # the following conditions:
10
+ #
11
+ # The above copyright notice and this permission notice shall be
12
+ # included in all copies or substantial portions of the Software.
13
+ #
14
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
22
+ ColonizeFILE_API_VERSION = '1'
23
+
24
+ Colonize.configure(ColonizeFILE_API_VERSION) do |c|
25
+
26
+ c.machine :default do |m|
27
+ m.mount_temp
28
+ m.update
29
+ #m.upgrade
30
+
31
+ m.service :apache2 do |s|
32
+ s.install
33
+
34
+ s.user = 'vagrant'
35
+ s.group = 'vagrant'
36
+
37
+ s.template 'apache2/apache2.conf', '/etc/apache2'
38
+ end
39
+
40
+ #m.service :nginx do |s|
41
+ # s.install
42
+ #end
43
+
44
+ m.service :mysql do |s|
45
+ s.install
46
+ end
47
+
48
+ end
49
+
50
+ end
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in colonize.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Jan Oetjen
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # Colonize
2
+
3
+ Colonize is a simple provisioning tool for Vagrant. Since shell scripts can get
4
+ difficult and Colonizeing systems like Puppet, Chef and/or Ansible can be too
5
+ much for simple projects. I decided to write Colonize to cover the
6
+ middleground.
7
+
8
+ Colonize is written in Ruby and uses a Ruby-typical configuration file simply
9
+ because Vagrant already is using Ruby and I think it uneccessary for anyone to
10
+ have to learn another language onöy to configure a simple virtual machine.
11
+
12
+ ## Installation
13
+
14
+ Add this line to your application's Gemfile:
15
+
16
+ gem 'colonize'
17
+
18
+ And then execute:
19
+
20
+ $ bundle
21
+
22
+ Or install it yourself as:
23
+
24
+ $ gem install colonize
25
+
26
+ ## Usage
27
+
28
+ TODO: Write usage instructions here
29
+
30
+ ## Contributing
31
+
32
+ 1. Fork it ( http://github.com/joetjen/colonize/fork )
33
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
34
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
35
+ 4. Push to the branch (`git push origin my-new-feature`)
36
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
data/Vagrantfile ADDED
@@ -0,0 +1,58 @@
1
+ # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
2
+ VAGRANTFILE_API_VERSION = '2'
3
+
4
+ # Virtual Machine hardware settings
5
+ VAGRANT_GUI = ENV['VAGRANT_GUI'] === 'true'
6
+ VAGRANT_MEM = ENV['VAGRANT_MEM'] || '1024'
7
+ VAGRANT_CPU = ENV['VAGRANT_CPU'] || '2'
8
+
9
+ if (VAGRANT_GUI)
10
+ puts "[default] Using #{VAGRANT_CPU} cores; #{VAGRANT_MEM}mb RAM"
11
+ else
12
+ puts "[default] Using #{VAGRANT_CPU} CPU cores; #{VAGRANT_MEM}mb RAM; (headless)"
13
+ end
14
+
15
+ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
16
+ # All Vagrant configuration is done here. The most common configuration
17
+ # options are documented and commented below. For a complete reference,
18
+ # please see the online documentation at vagrantup.com.
19
+
20
+ # Every Vagrant virtual environment requires a box to build off of.
21
+ config.vm.box = 'squeeze64'
22
+
23
+ # Create a forwarded port mapping which allows access to a specific port
24
+ # within the machine from a port on the host machine. In the example below,
25
+ # accessing "localhost:8080" will access port 80 on the guest machine.
26
+ config.vm.network :forwarded_port, guest: 80, host: 3000 # HTTP
27
+
28
+ # If true, then any SSH connections made will enable agent forwarding.
29
+ # Default value: false
30
+ config.ssh.forward_agent = true
31
+
32
+ # Share an additional folder to the guest VM. The first argument is
33
+ # the path on the host to the actual folder. The second argument is
34
+ # the path on the guest to mount the folder. And the optional third
35
+ # argument is a set of non-required options.
36
+ #config.vm.synced_folder "www", "/vagrant_www"
37
+
38
+ # Provider-specific configuration so you can fine-tune various
39
+ # backing providers for Vagrant. These expose provider-specific options.
40
+ config.vm.provider :virtualbox do |vb|
41
+ # Don't boot with headless mode
42
+ vb.gui = VAGRANT_GUI
43
+
44
+ # Use VBoxManage to customize the VM. For example to change memory:
45
+ vb.customize ['modifyvm', :id, '--memory', VAGRANT_MEM]
46
+ vb.customize ['modifyvm', :id, '--cpus', VAGRANT_CPU]
47
+ end
48
+
49
+ config.vm.provider :vmware_fusion do |vm|
50
+ # Don't boot with headless mode
51
+ vm.gui = VAGRANT_GUI
52
+
53
+ # Use VMX customization. For example to change memory:
54
+ vm.vmx['memsize'] = VAGRANT_MEM
55
+ vm.vmx['numvcpus'] = VAGRANT_CPU
56
+ end
57
+
58
+ end
data/bin/colonize ADDED
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # Copyright (c) 2014 Jan Oetjen <oetjenj@gmail.com>
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining
6
+ # a copy of this software and associated documentation files (the
7
+ # "Software"), to deal in the Software without restriction, including
8
+ # without limitation the rights to use, copy, modify, merge, publish,
9
+ # distribute, sublicense, and/or sell copies of the Software, and to
10
+ # permit persons to whom the Software is furnished to do so, subject to
11
+ # the following conditions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be
14
+ # included in all copies or substantial portions of the Software.
15
+ #
16
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ begin
25
+ require 'rubygems'
26
+ gem 'colonize'
27
+ rescue LoadError
28
+ # ignored
29
+ end
30
+
31
+ require 'colonize'
32
+
33
+ Colonize::CLI.run ARGV
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # Copyright (c) 2014 Jan Oetjen <oetjenj@gmail.com>
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining
6
+ # a copy of this software and associated documentation files (the
7
+ # "Software"), to deal in the Software without restriction, including
8
+ # without limitation the rights to use, copy, modify, merge, publish,
9
+ # distribute, sublicense, and/or sell copies of the Software, and to
10
+ # permit persons to whom the Software is furnished to do so, subject to
11
+ # the following conditions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be
14
+ # included in all copies or substantial portions of the Software.
15
+ #
16
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ begin
25
+ require 'rubygems'
26
+ gem 'colonize'
27
+ rescue LoadError
28
+ # ignored
29
+ end
30
+
31
+ require 'colonize'
32
+
33
+ Colonize::CLI::Settle.run ARGV
@@ -0,0 +1,238 @@
1
+ #
2
+ # Based upon the NCSA server configuration files originally by Rob McCool.
3
+ #
4
+ # This is the main Apache server configuration file. It contains the
5
+ # configuration directives that give the server its instructions.
6
+ # See http://httpd.apache.org/docs/2.2/ for detailed information about
7
+ # the directives.
8
+ #
9
+ # Do NOT simply read the instructions in here without understanding
10
+ # what they do. They're here only as hints or reminders. If you are unsure
11
+ # consult the online docs. You have been warned.
12
+ #
13
+ # The configuration directives are grouped into three basic sections:
14
+ # 1. Directives that control the operation of the Apache server process as a
15
+ # whole (the 'global environment').
16
+ # 2. Directives that define the parameters of the 'main' or 'default' server,
17
+ # which responds to requests that aren't handled by a virtual host.
18
+ # These directives also provide default values for the settings
19
+ # of all virtual hosts.
20
+ # 3. Settings for virtual hosts, which allow Web requests to be sent to
21
+ # different IP addresses or hostnames and have them handled by the
22
+ # same Apache server process.
23
+ #
24
+ # Configuration and logfile names: If the filenames you specify for many
25
+ # of the server's control files begin with "/" (or "drive:/" for Win32), the
26
+ # server will use that explicit path. If the filenames do *not* begin
27
+ # with "/", the value of ServerRoot is prepended -- so "foo.log"
28
+ # with ServerRoot set to "/etc/apache2" will be interpreted by the
29
+ # server as "/etc/apache2/foo.log".
30
+ #
31
+
32
+ ### Section 1: Global Environment
33
+ #
34
+ # The directives in this section affect the overall operation of Apache,
35
+ # such as the number of concurrent requests it can handle or where it
36
+ # can find its configuration files.
37
+ #
38
+
39
+ #
40
+ # ServerRoot: The top of the directory tree under which the server's
41
+ # configuration, error, and log files are kept.
42
+ #
43
+ # NOTE! If you intend to place this on an NFS (or otherwise network)
44
+ # mounted filesystem then please read the LockFile documentation (available
45
+ # at <URL:http://httpd.apache.org/docs/2.2/mod/mpm_common.html#lockfile>);
46
+ # you will save yourself a lot of trouble.
47
+ #
48
+ # Do NOT add a slash at the end of the directory path.
49
+ #
50
+ #ServerRoot "/etc/apache2"
51
+
52
+ #
53
+ # The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
54
+ #
55
+ LockFile ${APACHE_LOCK_DIR}/accept.lock
56
+
57
+ #
58
+ # PidFile: The file in which the server should record its process
59
+ # identification number when it starts.
60
+ # This needs to be set in /etc/apache2/envvars
61
+ #
62
+ PidFile ${APACHE_PID_FILE}
63
+
64
+ #
65
+ # Timeout: The number of seconds before receives and sends time out.
66
+ #
67
+ Timeout 300
68
+
69
+ #
70
+ # KeepAlive: Whether or not to allow persistent connections (more than
71
+ # one request per connection). Set to "Off" to deactivate.
72
+ #
73
+ # CHANGE: Jan Oetjen 2013-09-30
74
+ #KeepAlive On
75
+ KeepAlive Off
76
+
77
+ #
78
+ # MaxKeepAliveRequests: The maximum number of requests to allow
79
+ # during a persistent connection. Set to 0 to allow an unlimited amount.
80
+ # We recommend you leave this number high, for maximum performance.
81
+ #
82
+ MaxKeepAliveRequests 100
83
+
84
+ #
85
+ # KeepAliveTimeout: Number of seconds to wait for the next request from the
86
+ # same client on the same connection.
87
+ #
88
+ KeepAliveTimeout 15
89
+
90
+ ##
91
+ ## Server-Pool Size Regulation (MPM specific)
92
+ ##
93
+
94
+ # prefork MPM
95
+ # StartServers: number of server processes to start
96
+ # MinSpareServers: minimum number of server processes which are kept spare
97
+ # MaxSpareServers: maximum number of server processes which are kept spare
98
+ # MaxClients: maximum number of server processes allowed to start
99
+ # MaxRequestsPerChild: maximum number of requests a server process serves
100
+ <IfModule mpm_prefork_module>
101
+ StartServers 5
102
+ MinSpareServers 5
103
+ MaxSpareServers 10
104
+ #MaxClients 150
105
+ MaxClients 75
106
+ MaxRequestsPerChild 0
107
+ </IfModule>
108
+
109
+ # worker MPM
110
+ # StartServers: initial number of server processes to start
111
+ # MaxClients: maximum number of simultaneous client connections
112
+ # MinSpareThreads: minimum number of worker threads which are kept spare
113
+ # MaxSpareThreads: maximum number of worker threads which are kept spare
114
+ # ThreadLimit: ThreadsPerChild can be changed to this maximum value during a
115
+ # graceful restart. ThreadLimit can only be changed by stopping
116
+ # and starting Apache.
117
+ # ThreadsPerChild: constant number of worker threads in each server process
118
+ # MaxRequestsPerChild: maximum number of requests a server process serves
119
+ # CHANGED: Jan Oetjen 2013-09-30
120
+ <IfModule mpm_worker_module>
121
+ StartServers 2
122
+ MinSpareThreads 25
123
+ #MaxSpareThreads 75
124
+ MaxSpareThreads 50
125
+ ThreadLimit 64
126
+ ThreadsPerChild 25
127
+ #MaxClients 150
128
+ MaxClients 75
129
+ MaxRequestsPerChild 0
130
+ </IfModule>
131
+
132
+ # event MPM
133
+ # StartServers: initial number of server processes to start
134
+ # MaxClients: maximum number of simultaneous client connections
135
+ # MinSpareThreads: minimum number of worker threads which are kept spare
136
+ # MaxSpareThreads: maximum number of worker threads which are kept spare
137
+ # ThreadsPerChild: constant number of worker threads in each server process
138
+ # MaxRequestsPerChild: maximum number of requests a server process serves
139
+ # CHANGED: Jan Oetjen 2013-09-30
140
+ <IfModule mpm_event_module>
141
+ StartServers 2
142
+ #MaxClients 150
143
+ MaxClients 75
144
+ MinSpareThreads 25
145
+ MaxSpareThreads 75
146
+ ThreadLimit 64
147
+ ThreadsPerChild 25
148
+ MaxRequestsPerChild 0
149
+ </IfModule>
150
+
151
+ # These need to be set in /etc/apache2/envvars
152
+ User ${APACHE_RUN_USER}
153
+ Group ${APACHE_RUN_GROUP}
154
+
155
+ #
156
+ # AccessFileName: The name of the file to look for in each directory
157
+ # for additional configuration directives. See also the AllowOverride
158
+ # directive.
159
+ #
160
+
161
+ AccessFileName .htaccess
162
+
163
+ #
164
+ # The following lines prevent .htaccess and .htpasswd files from being
165
+ # viewed by Web clients.
166
+ #
167
+ <Files ~ "^\.ht">
168
+ Order allow,deny
169
+ Deny from all
170
+ Satisfy all
171
+ </Files>
172
+
173
+ #
174
+ # DefaultType is the default MIME type the server will use for a document
175
+ # if it cannot otherwise determine one, such as from filename extensions.
176
+ # If your server contains mostly text or HTML documents, "text/plain" is
177
+ # a good value. If most of your content is binary, such as applications
178
+ # or images, you may want to use "application/octet-stream" instead to
179
+ # keep browsers from trying to display binary files as though they are
180
+ # text.
181
+ #
182
+ DefaultType text/plain
183
+
184
+
185
+ #
186
+ # HostnameLookups: Log the names of clients or just their IP addresses
187
+ # e.g., www.apache.org (on) or 204.62.129.132 (off).
188
+ # The default is off because it'd be overall better for the net if people
189
+ # had to knowingly turn this feature on, since enabling it means that
190
+ # each client request will result in AT LEAST one lookup request to the
191
+ # nameserver.
192
+ #
193
+ HostnameLookups Off
194
+
195
+ # ErrorLog: The location of the error log file.
196
+ # If you do not specify an ErrorLog directive within a <VirtualHost>
197
+ # container, error messages relating to that virtual host will be
198
+ # logged here. If you *do* define an error logfile for a <VirtualHost>
199
+ # container, that host's errors will be logged there and not here.
200
+ #
201
+ ErrorLog ${APACHE_LOG_DIR}/error.log
202
+
203
+ #
204
+ # LogLevel: Control the number of messages logged to the error_log.
205
+ # Possible values include: debug, info, notice, warn, error, crit,
206
+ # alert, emerg.
207
+ #
208
+ LogLevel warn
209
+
210
+ # Include module configuration:
211
+ Include mods-enabled/*.load
212
+ Include mods-enabled/*.conf
213
+
214
+ # Include all the user configurations:
215
+ Include httpd.conf
216
+
217
+ # Include ports listing
218
+ Include ports.conf
219
+
220
+ #
221
+ # The following directives define some format nicknames for use with
222
+ # a CustomLog directive (see below).
223
+ # If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i
224
+ #
225
+ LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
226
+ LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
227
+ LogFormat "%h %l %u %t \"%r\" %>s %O" common
228
+ LogFormat "%{Referer}i -> %U" referer
229
+ LogFormat "%{User-agent}i" agent
230
+
231
+ # Include of directories ignores editors' and dpkg's backup files,
232
+ # see README.Debian for details.
233
+
234
+ # Include generic snippets of statements
235
+ Include conf.d/
236
+
237
+ # Include the virtual host configurations:
238
+ Include sites-enabled/
data/colonize.gemspec ADDED
@@ -0,0 +1,46 @@
1
+ # Copyright (c) 2014 Jan Oetjen <oetjenj@gmail.com>
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining
4
+ # a copy of this software and associated documentation files (the
5
+ # "Software"), to deal in the Software without restriction, including
6
+ # without limitation the rights to use, copy, modify, merge, publish,
7
+ # distribute, sublicense, and/or sell copies of the Software, and to
8
+ # permit persons to whom the Software is furnished to do so, subject to
9
+ # the following conditions:
10
+ #
11
+ # The above copyright notice and this permission notice shall be
12
+ # included in all copies or substantial portions of the Software.
13
+ #
14
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
22
+
23
+ lib = File.expand_path('../lib', __FILE__)
24
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
25
+
26
+ require 'colonize/__version'
27
+
28
+ Gem::Specification.new do |spec|
29
+ spec.name = 'colonize'
30
+ spec.version = Colonize::VERSION
31
+ spec.authors = ['Jan Oetjen']
32
+ spec.email = ['oetjenj@gmail.com']
33
+ spec.summary = %q{A simple provisioning system for Vagrant.}
34
+ spec.description = %q{Optional.}
35
+ spec.homepage = ''
36
+ spec.license = 'MIT'
37
+
38
+ spec.files = `git ls-files -z`.split("\x0")
39
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
40
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
41
+ spec.require_paths = ['lib']
42
+
43
+ spec.add_development_dependency 'bundler', '~> 1.5'
44
+ spec.add_development_dependency 'net-ssh'
45
+ spec.add_development_dependency 'quickl'
46
+ end
data/colonize.iml ADDED
@@ -0,0 +1,30 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="FacetManager">
4
+ <facet type="gem" name="Gem">
5
+ <configuration>
6
+ <option name="GEM_APP_ROOT_PATH" value="" />
7
+ <option name="GEM_APP_TEST_PATH" value="" />
8
+ <option name="GEM_APP_LIB_PATH" value="" />
9
+ </configuration>
10
+ </facet>
11
+ </component>
12
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
13
+ <exclude-output />
14
+ <content url="file://$MODULE_DIR$">
15
+ <sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
16
+ <sourceFolder url="file://$MODULE_DIR$/bin" isTestSource="false" />
17
+ <sourceFolder url="file://$MODULE_DIR$/lib" isTestSource="false" />
18
+ </content>
19
+ <orderEntry type="inheritedJdk" />
20
+ <orderEntry type="sourceFolder" forTests="false" />
21
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v1.5.2, RVM: ruby-2.0.0-p353 [colonize]) [gem]" level="application" />
22
+ <orderEntry type="library" scope="PROVIDED" name="net-ssh (v2.8.0, RVM: ruby-2.0.0-p353 [colonize]) [gem]" level="application" />
23
+ <orderEntry type="library" scope="PROVIDED" name="quickl (v0.4.3, RVM: ruby-2.0.0-p353 [colonize]) [gem]" level="application" />
24
+ </component>
25
+ <component name="RModuleSettingsStorage">
26
+ <LOAD_PATH number="1" string0="$MODULE_DIR$/lib" />
27
+ <I18N_FOLDERS number="0" />
28
+ </component>
29
+ </module>
30
+
@@ -0,0 +1,17 @@
1
+ {
2
+ "folders":
3
+ [
4
+ {
5
+ "follow_symlinks": true,
6
+ "path": ".",
7
+ "folder_exclude_patterns": [
8
+ ".idea",
9
+ ".vagrant"
10
+ ],
11
+ "file_exclude_patterns": [
12
+ "*.sublime-workspace",
13
+ "Gemfile.lock"
14
+ ]
15
+ }
16
+ ]
17
+ }
@@ -0,0 +1,42 @@
1
+ # Copyright (c) 2014 Jan Oetjen <oetjenj@gmail.com>
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining
4
+ # a copy of this software and associated documentation files (the
5
+ # "Software"), to deal in the Software without restriction, including
6
+ # without limitation the rights to use, copy, modify, merge, publish,
7
+ # distribute, sublicense, and/or sell copies of the Software, and to
8
+ # permit persons to whom the Software is furnished to do so, subject to
9
+ # the following conditions:
10
+ #
11
+ # The above copyright notice and this permission notice shall be
12
+ # included in all copies or substantial portions of the Software.
13
+ #
14
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
22
+ require 'colonize/config'
23
+
24
+ module Colonize
25
+
26
+ class << self
27
+
28
+ def application
29
+ @application ||= Colonize::Application.new
30
+ end
31
+
32
+ def configure(version)
33
+ fail "Unsopported API Version #{version}" if version != '1'
34
+
35
+ c = Colonize::Config.new version
36
+ yield c if block_given?
37
+ c
38
+ end
39
+
40
+ end
41
+
42
+ end