vagrant-host-ruby-provisioner 0.0.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 +7 -0
- data/.bundle/install.log +12 -0
- data/.git/COMMIT_EDITMSG +1 -0
- data/.git/HEAD +1 -0
- data/.git/ORIG_HEAD +1 -0
- data/.git/config +27 -0
- data/.git/description +1 -0
- data/.git/hooks/applypatch-msg.sample +15 -0
- data/.git/hooks/commit-msg.sample +24 -0
- data/.git/hooks/post-update.sample +8 -0
- data/.git/hooks/pre-applypatch.sample +14 -0
- data/.git/hooks/pre-commit.sample +50 -0
- data/.git/hooks/pre-push.sample +53 -0
- data/.git/hooks/pre-rebase.sample +169 -0
- data/.git/hooks/prepare-commit-msg.sample +36 -0
- data/.git/hooks/update.sample +128 -0
- data/.git/index +0 -0
- data/.git/info/exclude +7 -0
- data/.git/logs/HEAD +18 -0
- data/.git/logs/refs/heads/develop +4 -0
- data/.git/logs/refs/heads/master +4 -0
- data/.git/logs/refs/remotes/origin/develop +3 -0
- data/.git/logs/refs/remotes/origin/master +3 -0
- data/.git/objects/00/385de4f2cdb2e486b6162bbe9ceded2c9de149 +1 -0
- data/.git/objects/03/f4640282277137d9bff1ae8bfd5c50b8f1b79e +0 -0
- data/.git/objects/0d/fac130eb7cd831a6c056873e8d3ae6e93db247 +0 -0
- data/.git/objects/17/6265de4604f414741fe76371e449f593f8e7e0 +0 -0
- data/.git/objects/1d/43f8617a54edcc57b5b02ee1956171da1afd2d +0 -0
- data/.git/objects/1d/55088d625004cf0b00afa24f6d88a1992a4778 +0 -0
- data/.git/objects/1d/5b6a20fb8954dcd21ad80985e9520a252e6443 +0 -0
- data/.git/objects/25/57c3fa0ae631f74274be056151490b240c9a0a +0 -0
- data/.git/objects/30/53454fe8ce25790fb0bb99e085aed05f0920c9 +0 -0
- data/.git/objects/30/779ce66452022e68bebf3f8c6716ad9eef9746 +0 -0
- data/.git/objects/30/b44d51f49285fc5c34905762dfb49992343598 +0 -0
- data/.git/objects/32/fc82fdb3ff19b7afdaa78ce1a6f3a3f30c530c +0 -0
- data/.git/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 +0 -0
- data/.git/objects/55/0d25559ab84450f3bc26d2d2159e0f19e73cd2 +0 -0
- data/.git/objects/55/f27b4e0562bd804d51d0c83cd4385e30ddb7f3 +0 -0
- data/.git/objects/67/a3df946ed797186f1349a38a64dc02be463a20 +0 -0
- data/.git/objects/68/54f995c5a57f12a51148f7253b405a4954a011 +3 -0
- data/.git/objects/74/2a7893188658eaea4c183b85395472b3c90a50 +2 -0
- data/.git/objects/7f/52326cb8789f02f486204842303c65473aff91 +0 -0
- data/.git/objects/80/5263aed3f51ee4f45aa2dfe70f8375c76900c9 +1 -0
- data/.git/objects/83/7a0f9b2ba6864e9c9cfe79fc4e065d025a6977 +2 -0
- data/.git/objects/84/65a30d41d07431151abd14c431740e085b8dd8 +3 -0
- data/.git/objects/87/aece6195369cd5db35a0f63f08a497803ff59c +0 -0
- data/.git/objects/8a/0185b31c54fa56c2c4d68f40b132872fe60cde +0 -0
- data/.git/objects/8c/54268d4e578d8fa7773eacdf5367d422db3e63 +2 -0
- data/.git/objects/8d/e4cc20aa245c38ceed209618adc89ee4f35a9e +0 -0
- data/.git/objects/9e/b9957255bd6dd91bcf94dd08138fef5a819385 +0 -0
- data/.git/objects/a0/3c75b8391d082613b8e060afc753d8e344e033 +1 -0
- data/.git/objects/a6/b93ec58569d60b55136a7ff3f5f576916e303c +0 -0
- data/.git/objects/aa/254936cd0c3b115468fc688267d10a1ca43378 +0 -0
- data/.git/objects/ad/48deb220c14f264ea31ae345163f53434a4a89 +1 -0
- data/.git/objects/ad/b67e5e55e7e83c9bd369b1a48905ad54385aa4 +0 -0
- data/.git/objects/b3/afe9e6b095dad2904d7cc30ac0890495143045 +0 -0
- data/.git/objects/b4/82d4d6bf6c28b1195c0397f64361c9efff3053 +1 -0
- data/.git/objects/cb/4945b0775afb714f0f6f1fe5fc53ad5daf8985 +1 -0
- data/.git/objects/cd/ba5d86517b00e0066b9790ff3f763b23c7fceb +0 -0
- data/.git/objects/df/a83063026d1177200981794e135a1e8843e56a +0 -0
- data/.git/objects/e6/d9282cbc0f6e454fa60414622c725d46e13a14 +0 -0
- data/.git/objects/f2/38b8c3ab87fafb8cd3643b3fe5b89cb19aabfb +0 -0
- data/.git/refs/heads/develop +1 -0
- data/.git/refs/heads/master +1 -0
- data/.git/refs/remotes/origin/develop +1 -0
- data/.git/refs/remotes/origin/master +1 -0
- data/.git/refs/tags/v0.0.1 +1 -0
- data/.git/refs/tags/v0.0.1-hotfix-small-update-001 +1 -0
- data/.git/refs/tags/v0.0.2 +1 -0
- data/.gitignore +4 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +41 -0
- data/LICENSE +9 -0
- data/README.md +43 -0
- data/Rakefile +9 -0
- data/lib/vagrant-host-ruby-provisioner/config.rb +46 -0
- data/lib/vagrant-host-ruby-provisioner/info.rb +9 -0
- data/lib/vagrant-host-ruby-provisioner/plugin.rb +41 -0
- data/lib/vagrant-host-ruby-provisioner/provisioner.rb +21 -0
- data/lib/vagrant-host-ruby-provisioner/version.rb +5 -0
- data/lib/vagrant-host-ruby-provisioner.rb +14 -0
- data/locales/en.rb +15 -0
- data/vagrant-host-ruby-provisioner.gemspec +83 -0
- metadata +167 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
x�αj�0���z�{�����%(�t d��Q'��CdY.���!���
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
x��1n�0���:/��LK���ص'�,q`[�����P���
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
x��Mj�0��u��@���D�R��"��ϨV���N����B.���x��R߶*�x�$���b�a���C�iΘ�N�hG�1�h�V�a�.���"ZK�D;���T��T�)��#�e�.}����}���1���:Ż�^9�*S����yB��H���c���꽎/���y���Bh
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
xK��OR06g�s �.�/J���K*�K�2�Ss�2sR�r���A��
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
x��A� @Qלb.�($�1��3t�b($���&z��~��:hv���a���ё�p t(���'��3���Fѫ/�����Rk��S���W/,�R���C���',�!أET[��]��ԭ��(×T��F%
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
805263aed3f51ee4f45aa2dfe70f8375c76900c9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a6b93ec58569d60b55136a7ff3f5f576916e303c
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
805263aed3f51ee4f45aa2dfe70f8375c76900c9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a6b93ec58569d60b55136a7ff3f5f576916e303c
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
837a0f9b2ba6864e9c9cfe79fc4e065d025a6977
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1d55088d625004cf0b00afa24f6d88a1992a4778
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
8465a30d41d07431151abd14c431740e085b8dd8
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
GIT
|
|
2
|
+
remote: git://github.com/mitchellh/vagrant.git
|
|
3
|
+
revision: a241c9ac5940635b8491c9fc2838ccf1896f79dd
|
|
4
|
+
specs:
|
|
5
|
+
vagrant (1.5.0.dev)
|
|
6
|
+
bundler (~> 1.5.1)
|
|
7
|
+
childprocess (~> 0.3.7)
|
|
8
|
+
erubis (~> 2.7.0)
|
|
9
|
+
i18n (~> 0.6.0)
|
|
10
|
+
log4r (~> 1.1.9, < 1.1.11)
|
|
11
|
+
net-scp (~> 1.1.0)
|
|
12
|
+
net-ssh (>= 2.6.6, < 2.8.0)
|
|
13
|
+
|
|
14
|
+
PATH
|
|
15
|
+
remote: .
|
|
16
|
+
specs:
|
|
17
|
+
vagrant-host-ruby-provisioner (0.0.2)
|
|
18
|
+
bundler (~> 1.5.0)
|
|
19
|
+
i18n (~> 0.6.0)
|
|
20
|
+
|
|
21
|
+
GEM
|
|
22
|
+
remote: https://rubygems.org/
|
|
23
|
+
specs:
|
|
24
|
+
childprocess (0.3.9)
|
|
25
|
+
ffi (~> 1.0, >= 1.0.11)
|
|
26
|
+
erubis (2.7.0)
|
|
27
|
+
ffi (1.9.3)
|
|
28
|
+
i18n (0.6.9)
|
|
29
|
+
log4r (1.1.10)
|
|
30
|
+
net-scp (1.1.2)
|
|
31
|
+
net-ssh (>= 2.6.5)
|
|
32
|
+
net-ssh (2.7.0)
|
|
33
|
+
rake (10.1.1)
|
|
34
|
+
|
|
35
|
+
PLATFORMS
|
|
36
|
+
ruby
|
|
37
|
+
|
|
38
|
+
DEPENDENCIES
|
|
39
|
+
rake (~> 10.1.0)
|
|
40
|
+
vagrant!
|
|
41
|
+
vagrant-host-ruby-provisioner!
|
data/LICENSE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
The MIT License (MIT).
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2014 Jebbit, Incorporated and contributors.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# vagrant-host-ruby-provisioner
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
Vagrant Ruby provisioner for executing Ruby code on the host.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
vagrant plugin install vagrant-host-ruby-provisioner
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
Vagrant.configure '2' do |configure|
|
|
17
|
+
# ...
|
|
18
|
+
|
|
19
|
+
configure.vm.provision :host_ruby do |ruby|
|
|
20
|
+
ruby.routine = lambda { puts 'Hello world!' }
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# ...
|
|
24
|
+
end
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Configuration
|
|
28
|
+
|
|
29
|
+
- `clean`: The cleanup routine to be executed. __Default:__ `lambda {}`.
|
|
30
|
+
- `cwd`: The current working directory. __Default:__ `nil` (which makes it the directory containing "__Vagrantfile__").
|
|
31
|
+
- `routine`: The main routine to be executed. __Required__.
|
|
32
|
+
|
|
33
|
+
## Tests
|
|
34
|
+
|
|
35
|
+
Given the size and scope of this project, I don't see any immediate need for tests. Feel free to disagree :) .
|
|
36
|
+
|
|
37
|
+
## Contributors
|
|
38
|
+
|
|
39
|
+
__[Jonathan Barronville](mailto:jonathan.barronville@jebbit.com "jonathan.barronville@jebbit.com")__
|
|
40
|
+
|
|
41
|
+
## License
|
|
42
|
+
|
|
43
|
+
See "__LICENSE__".
|
data/Rakefile
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
require 'vagrant-host-ruby-provisioner/info'
|
|
2
|
+
|
|
3
|
+
module VagrantPlugins
|
|
4
|
+
module HostRubyProvisioner
|
|
5
|
+
class Config < Vagrant.plugin '2', :config
|
|
6
|
+
attr_accessor :clean
|
|
7
|
+
attr_accessor :cwd
|
|
8
|
+
attr_accessor :routine
|
|
9
|
+
|
|
10
|
+
def initialize
|
|
11
|
+
@clean = UNSET_VALUE
|
|
12
|
+
@cwd = UNSET_VALUE
|
|
13
|
+
@routine = UNSET_VALUE
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def finalize!
|
|
17
|
+
if @clean == UNSET_VALUE
|
|
18
|
+
@clean = lambda {}
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
if @cwd == UNSET_VALUE
|
|
22
|
+
@cwd = nil
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def validate machine
|
|
27
|
+
errors = _detected_errors
|
|
28
|
+
results = {}
|
|
29
|
+
|
|
30
|
+
if @routine == UNSET_VALUE
|
|
31
|
+
errors << (I18n.t :'vagrant_host_ruby_provisioner.config.routine.required')
|
|
32
|
+
elsif ! @routine.lambda?
|
|
33
|
+
errors << (I18n.t :'vagrant_host_ruby_provisioner.config.routine.not_lambda')
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
if ! @clean.lambda?
|
|
37
|
+
errors << (I18n.t :'vagrant_host_ruby_provisioner.config.clean.not_lambda')
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
results[HostRubyProvisioner::INFO[:name]] = errors
|
|
41
|
+
|
|
42
|
+
results
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
module VagrantPlugins
|
|
2
|
+
module HostRubyProvisioner
|
|
3
|
+
INFO = {}
|
|
4
|
+
INFO[:description] = 'Vagrant Ruby provisioner for executing Ruby code on the host.'
|
|
5
|
+
INFO[:license] = 'MIT'
|
|
6
|
+
INFO[:name] = 'Host Ruby Provisioner'
|
|
7
|
+
INFO[:name_full_slug] = 'vagrant-host-ruby-provisioner'
|
|
8
|
+
end
|
|
9
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
begin
|
|
2
|
+
require 'vagrant'
|
|
3
|
+
rescue LoadError
|
|
4
|
+
raise 'The Vagrant host Ruby provisioner must be run within Vagrant.'
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
if Vagrant::VERSION < '1.4.0'
|
|
8
|
+
raise 'The Vagrant host Ruby provisioner is only compatible with Vagrant >= 1.4.0.'
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
require 'vagrant-host-ruby-provisioner/info'
|
|
12
|
+
|
|
13
|
+
module VagrantPlugins
|
|
14
|
+
module HostRubyProvisioner
|
|
15
|
+
class Plugin < Vagrant.plugin '2'
|
|
16
|
+
name HostRubyProvisioner::INFO[:name_full_slug]
|
|
17
|
+
description HostRubyProvisioner::INFO[:description]
|
|
18
|
+
|
|
19
|
+
config :host_ruby, :provisioner do
|
|
20
|
+
require_relative 'config'
|
|
21
|
+
|
|
22
|
+
Config
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
provisioner :host_ruby do
|
|
26
|
+
setup_i18n
|
|
27
|
+
require_relative 'provisioner'
|
|
28
|
+
|
|
29
|
+
Provisioner
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
class << self
|
|
33
|
+
def setup_i18n
|
|
34
|
+
I18n.load_path << (File.expand_path 'locales/en.rb', HostRubyProvisioner.source_root)
|
|
35
|
+
|
|
36
|
+
I18n.reload!
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
module VagrantPlugins
|
|
2
|
+
module HostRubyProvisioner
|
|
3
|
+
class Provisioner < Vagrant.plugin '2', :provisioner
|
|
4
|
+
def _execute_code
|
|
5
|
+
@config.routine.call
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def cleanup
|
|
9
|
+
@config.clean.call
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def provision
|
|
13
|
+
if @config.cwd
|
|
14
|
+
Dir.chdir @config.cwd, &(method :_execute_code)
|
|
15
|
+
else
|
|
16
|
+
_execute_code
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
require 'pathname'
|
|
2
|
+
require 'vagrant-host-ruby-provisioner/plugin'
|
|
3
|
+
|
|
4
|
+
module VagrantPlugins
|
|
5
|
+
module HostRubyProvisioner
|
|
6
|
+
class << self
|
|
7
|
+
attr_reader :source_root
|
|
8
|
+
|
|
9
|
+
def source_root
|
|
10
|
+
Pathname.new File.expand_path '../', (File.dirname __FILE__)
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
data/locales/en.rb
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
en: {
|
|
3
|
+
vagrant_host_ruby_provisioner: {
|
|
4
|
+
config: {
|
|
5
|
+
clean: {
|
|
6
|
+
not_lambda: 'The `clean` configuration provided is not a `lamdba`. You can create a `lambda` like this: `lambda { ... }`.',
|
|
7
|
+
},
|
|
8
|
+
routine: {
|
|
9
|
+
not_lambda: 'The `routine` configuration provided is not a `lamdba`. You can create a `lambda` like this: `lambda { ... }`.',
|
|
10
|
+
required: 'The `routine` configuration is required and was not provided.',
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
($:).unshift File.expand_path 'lib', (File.dirname __FILE__)
|
|
2
|
+
|
|
3
|
+
require 'vagrant-host-ruby-provisioner/info'
|
|
4
|
+
require 'vagrant-host-ruby-provisioner/version'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |spec|
|
|
7
|
+
spec.authors = [
|
|
8
|
+
'Jonathan Barronville',
|
|
9
|
+
]
|
|
10
|
+
|
|
11
|
+
spec.description = VagrantPlugins::HostRubyProvisioner::INFO[:description]
|
|
12
|
+
spec.email = 'jonathan.barronville@jebbit.com'
|
|
13
|
+
spec.homepage = 'https://github.com/jebbit/vagrant-host-ruby-provisioner'
|
|
14
|
+
spec.license = VagrantPlugins::HostRubyProvisioner::INFO[:license]
|
|
15
|
+
spec.name = VagrantPlugins::HostRubyProvisioner::INFO[:name_full_slug]
|
|
16
|
+
spec.platform = Gem::Platform::RUBY
|
|
17
|
+
spec.require_path = 'lib'
|
|
18
|
+
spec.summary = VagrantPlugins::HostRubyProvisioner::INFO[:description]
|
|
19
|
+
spec.version = VagrantPlugins::HostRubyProvisioner::VERSION
|
|
20
|
+
|
|
21
|
+
spec.add_dependency 'bundler', '~> 1.5.0'
|
|
22
|
+
spec.add_dependency 'i18n', '~> 0.6.0'
|
|
23
|
+
spec.add_development_dependency 'rake', '~> 10.1.0'
|
|
24
|
+
|
|
25
|
+
spec.required_rubygems_version = '>= 2.0.0'
|
|
26
|
+
|
|
27
|
+
##################################################
|
|
28
|
+
|
|
29
|
+
# Grab the name of the current directory.
|
|
30
|
+
root_path = File.dirname __FILE__
|
|
31
|
+
|
|
32
|
+
# Change to the current directory and get an array of all the files.
|
|
33
|
+
all_files = Dir.chdir(root_path) { Dir.glob '**/*', File::FNM_DOTMATCH }
|
|
34
|
+
|
|
35
|
+
# Remove the "." and ".." files from the array of all the files.
|
|
36
|
+
all_files.reject! { |file_name| (['.', '..']).include? File.basename file_name }
|
|
37
|
+
|
|
38
|
+
# Construct the ".gitignore" path.
|
|
39
|
+
gitignore_path = File.join root_path, '.gitignore'
|
|
40
|
+
|
|
41
|
+
# Grab the contents of the ".gitignore" file as an array.
|
|
42
|
+
gitignore = IO.readlines gitignore_path
|
|
43
|
+
|
|
44
|
+
# Strip the separator and unnecessary whitespace from each line of the ".gitignore" contents.
|
|
45
|
+
gitignore.map! { |file_line| file_line.chomp.strip }
|
|
46
|
+
|
|
47
|
+
# Remove any blank lines from the ".gitignore" contents.
|
|
48
|
+
gitignore.reject! { |file_line| file_line.empty? }
|
|
49
|
+
|
|
50
|
+
# Remove any lines that start with "#" or "!" from the ".gitignore" contents.
|
|
51
|
+
gitignore.reject! { |file_line| file_line =~ /^(#|!)/ }
|
|
52
|
+
|
|
53
|
+
all_files.reject! do |file_path|
|
|
54
|
+
if File.directory? file_path
|
|
55
|
+
next true
|
|
56
|
+
else
|
|
57
|
+
rejects = false
|
|
58
|
+
|
|
59
|
+
rejects ||= gitignore.any? do |ignore_path_pattern|
|
|
60
|
+
File.fnmatch(
|
|
61
|
+
ignore_path_pattern,
|
|
62
|
+
file_path,
|
|
63
|
+
File::FNM_PATHNAME
|
|
64
|
+
)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
rejects ||= gitignore.any? do |ignore_path_pattern|
|
|
68
|
+
File.fnmatch(
|
|
69
|
+
ignore_path_pattern,
|
|
70
|
+
File.basename(file_path),
|
|
71
|
+
File::FNM_PATHNAME
|
|
72
|
+
)
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
next rejects
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
##################################################
|
|
80
|
+
|
|
81
|
+
spec.executables = (all_files.map { |file| file[/^bin\/(.*)/, 1] }).compact
|
|
82
|
+
spec.files = all_files
|
|
83
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: vagrant-host-ruby-provisioner
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.2
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Jonathan Barronville
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2014-01-12 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: bundler
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ~>
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: 1.5.0
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ~>
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: 1.5.0
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: i18n
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ~>
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: 0.6.0
|
|
34
|
+
type: :runtime
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - ~>
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: 0.6.0
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: rake
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - ~>
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: 10.1.0
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - ~>
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: 10.1.0
|
|
55
|
+
description: Vagrant Ruby provisioner for executing Ruby code on the host.
|
|
56
|
+
email: jonathan.barronville@jebbit.com
|
|
57
|
+
executables: []
|
|
58
|
+
extensions: []
|
|
59
|
+
extra_rdoc_files: []
|
|
60
|
+
files:
|
|
61
|
+
- .bundle/install.log
|
|
62
|
+
- .git/COMMIT_EDITMSG
|
|
63
|
+
- .git/config
|
|
64
|
+
- .git/description
|
|
65
|
+
- .git/HEAD
|
|
66
|
+
- .git/hooks/applypatch-msg.sample
|
|
67
|
+
- .git/hooks/commit-msg.sample
|
|
68
|
+
- .git/hooks/post-update.sample
|
|
69
|
+
- .git/hooks/pre-applypatch.sample
|
|
70
|
+
- .git/hooks/pre-commit.sample
|
|
71
|
+
- .git/hooks/pre-push.sample
|
|
72
|
+
- .git/hooks/pre-rebase.sample
|
|
73
|
+
- .git/hooks/prepare-commit-msg.sample
|
|
74
|
+
- .git/hooks/update.sample
|
|
75
|
+
- .git/index
|
|
76
|
+
- .git/info/exclude
|
|
77
|
+
- .git/logs/HEAD
|
|
78
|
+
- .git/logs/refs/heads/develop
|
|
79
|
+
- .git/logs/refs/heads/master
|
|
80
|
+
- .git/logs/refs/remotes/origin/develop
|
|
81
|
+
- .git/logs/refs/remotes/origin/master
|
|
82
|
+
- .git/objects/00/385de4f2cdb2e486b6162bbe9ceded2c9de149
|
|
83
|
+
- .git/objects/03/f4640282277137d9bff1ae8bfd5c50b8f1b79e
|
|
84
|
+
- .git/objects/0d/fac130eb7cd831a6c056873e8d3ae6e93db247
|
|
85
|
+
- .git/objects/17/6265de4604f414741fe76371e449f593f8e7e0
|
|
86
|
+
- .git/objects/1d/43f8617a54edcc57b5b02ee1956171da1afd2d
|
|
87
|
+
- .git/objects/1d/55088d625004cf0b00afa24f6d88a1992a4778
|
|
88
|
+
- .git/objects/1d/5b6a20fb8954dcd21ad80985e9520a252e6443
|
|
89
|
+
- .git/objects/25/57c3fa0ae631f74274be056151490b240c9a0a
|
|
90
|
+
- .git/objects/30/53454fe8ce25790fb0bb99e085aed05f0920c9
|
|
91
|
+
- .git/objects/30/779ce66452022e68bebf3f8c6716ad9eef9746
|
|
92
|
+
- .git/objects/30/b44d51f49285fc5c34905762dfb49992343598
|
|
93
|
+
- .git/objects/32/fc82fdb3ff19b7afdaa78ce1a6f3a3f30c530c
|
|
94
|
+
- .git/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904
|
|
95
|
+
- .git/objects/55/0d25559ab84450f3bc26d2d2159e0f19e73cd2
|
|
96
|
+
- .git/objects/55/f27b4e0562bd804d51d0c83cd4385e30ddb7f3
|
|
97
|
+
- .git/objects/67/a3df946ed797186f1349a38a64dc02be463a20
|
|
98
|
+
- .git/objects/68/54f995c5a57f12a51148f7253b405a4954a011
|
|
99
|
+
- .git/objects/74/2a7893188658eaea4c183b85395472b3c90a50
|
|
100
|
+
- .git/objects/7f/52326cb8789f02f486204842303c65473aff91
|
|
101
|
+
- .git/objects/80/5263aed3f51ee4f45aa2dfe70f8375c76900c9
|
|
102
|
+
- .git/objects/83/7a0f9b2ba6864e9c9cfe79fc4e065d025a6977
|
|
103
|
+
- .git/objects/84/65a30d41d07431151abd14c431740e085b8dd8
|
|
104
|
+
- .git/objects/87/aece6195369cd5db35a0f63f08a497803ff59c
|
|
105
|
+
- .git/objects/8a/0185b31c54fa56c2c4d68f40b132872fe60cde
|
|
106
|
+
- .git/objects/8c/54268d4e578d8fa7773eacdf5367d422db3e63
|
|
107
|
+
- .git/objects/8d/e4cc20aa245c38ceed209618adc89ee4f35a9e
|
|
108
|
+
- .git/objects/9e/b9957255bd6dd91bcf94dd08138fef5a819385
|
|
109
|
+
- .git/objects/a0/3c75b8391d082613b8e060afc753d8e344e033
|
|
110
|
+
- .git/objects/a6/b93ec58569d60b55136a7ff3f5f576916e303c
|
|
111
|
+
- .git/objects/aa/254936cd0c3b115468fc688267d10a1ca43378
|
|
112
|
+
- .git/objects/ad/48deb220c14f264ea31ae345163f53434a4a89
|
|
113
|
+
- .git/objects/ad/b67e5e55e7e83c9bd369b1a48905ad54385aa4
|
|
114
|
+
- .git/objects/b3/afe9e6b095dad2904d7cc30ac0890495143045
|
|
115
|
+
- .git/objects/b4/82d4d6bf6c28b1195c0397f64361c9efff3053
|
|
116
|
+
- .git/objects/cb/4945b0775afb714f0f6f1fe5fc53ad5daf8985
|
|
117
|
+
- .git/objects/cd/ba5d86517b00e0066b9790ff3f763b23c7fceb
|
|
118
|
+
- .git/objects/df/a83063026d1177200981794e135a1e8843e56a
|
|
119
|
+
- .git/objects/e6/d9282cbc0f6e454fa60414622c725d46e13a14
|
|
120
|
+
- .git/objects/f2/38b8c3ab87fafb8cd3643b3fe5b89cb19aabfb
|
|
121
|
+
- .git/ORIG_HEAD
|
|
122
|
+
- .git/refs/heads/develop
|
|
123
|
+
- .git/refs/heads/master
|
|
124
|
+
- .git/refs/remotes/origin/develop
|
|
125
|
+
- .git/refs/remotes/origin/master
|
|
126
|
+
- .git/refs/tags/v0.0.1
|
|
127
|
+
- .git/refs/tags/v0.0.1-hotfix-small-update-001
|
|
128
|
+
- .git/refs/tags/v0.0.2
|
|
129
|
+
- .gitignore
|
|
130
|
+
- Gemfile
|
|
131
|
+
- Gemfile.lock
|
|
132
|
+
- lib/vagrant-host-ruby-provisioner/config.rb
|
|
133
|
+
- lib/vagrant-host-ruby-provisioner/info.rb
|
|
134
|
+
- lib/vagrant-host-ruby-provisioner/plugin.rb
|
|
135
|
+
- lib/vagrant-host-ruby-provisioner/provisioner.rb
|
|
136
|
+
- lib/vagrant-host-ruby-provisioner/version.rb
|
|
137
|
+
- lib/vagrant-host-ruby-provisioner.rb
|
|
138
|
+
- LICENSE
|
|
139
|
+
- locales/en.rb
|
|
140
|
+
- Rakefile
|
|
141
|
+
- README.md
|
|
142
|
+
- vagrant-host-ruby-provisioner.gemspec
|
|
143
|
+
homepage: https://github.com/jebbit/vagrant-host-ruby-provisioner
|
|
144
|
+
licenses:
|
|
145
|
+
- MIT
|
|
146
|
+
metadata: {}
|
|
147
|
+
post_install_message:
|
|
148
|
+
rdoc_options: []
|
|
149
|
+
require_paths:
|
|
150
|
+
- lib
|
|
151
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
152
|
+
requirements:
|
|
153
|
+
- - '>='
|
|
154
|
+
- !ruby/object:Gem::Version
|
|
155
|
+
version: '0'
|
|
156
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
|
+
requirements:
|
|
158
|
+
- - '>='
|
|
159
|
+
- !ruby/object:Gem::Version
|
|
160
|
+
version: 2.0.0
|
|
161
|
+
requirements: []
|
|
162
|
+
rubyforge_project:
|
|
163
|
+
rubygems_version: 2.0.3
|
|
164
|
+
signing_key:
|
|
165
|
+
specification_version: 4
|
|
166
|
+
summary: Vagrant Ruby provisioner for executing Ruby code on the host.
|
|
167
|
+
test_files: []
|