vault-tree 0.1.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.
- data/.gitignore +26 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +43 -0
- data/LICENSE.txt +22 -0
- data/README.md +118 -0
- data/Rakefile +17 -0
- data/VagrantFile +30 -0
- data/features/core.feature +44 -0
- data/features/exceptions.feature +41 -0
- data/features/steps/core.steps.rb +168 -0
- data/features/steps/exceptions.steps.rb +103 -0
- data/features/support/env.rb +1 -0
- data/features/world.rb +3 -0
- data/lib/vault-tree.rb +7 -0
- data/lib/vault-tree/config/dependencies.rb +4 -0
- data/lib/vault-tree/config/lib.rb +2 -0
- data/lib/vault-tree/config/path_helpers.rb +49 -0
- data/lib/vault-tree/config/string.rb +25 -0
- data/lib/vault-tree/contract/close_validator.rb +35 -0
- data/lib/vault-tree/contract/contract.rb +85 -0
- data/lib/vault-tree/contract/contract_presenter.rb +27 -0
- data/lib/vault-tree/contract/doorman.rb +112 -0
- data/lib/vault-tree/contract/null_vault.rb +16 -0
- data/lib/vault-tree/contract/open_validator.rb +20 -0
- data/lib/vault-tree/contract/vault.rb +96 -0
- data/lib/vault-tree/exceptions/empty_vault.rb +8 -0
- data/lib/vault-tree/exceptions/fill_attempt_master_password.rb +6 -0
- data/lib/vault-tree/exceptions/invalid_signature.rb +0 -0
- data/lib/vault-tree/exceptions/malformed_json.rb +0 -0
- data/lib/vault-tree/exceptions/missing_external_data.rb +6 -0
- data/lib/vault-tree/exceptions/missing_partner_decryption_key.rb +6 -0
- data/lib/vault-tree/exceptions/missing_passphrase.rb +6 -0
- data/lib/vault-tree/exceptions/non_unique_vault_id.rb +0 -0
- data/lib/vault-tree/exceptions/unsupported_keyword.rb +6 -0
- data/lib/vault-tree/exceptions/vault_does_not_exist.rb +6 -0
- data/lib/vault-tree/exceptions/vault_tree_exception.rb +6 -0
- data/lib/vault-tree/keywords/decryption_key.rb +14 -0
- data/lib/vault-tree/keywords/external_data.rb +13 -0
- data/lib/vault-tree/keywords/keyword.rb +19 -0
- data/lib/vault-tree/keywords/keyword_interpreter.rb +45 -0
- data/lib/vault-tree/keywords/master_passphrase.rb +9 -0
- data/lib/vault-tree/keywords/public_encryption_key.rb +27 -0
- data/lib/vault-tree/keywords/random_number.rb +9 -0
- data/lib/vault-tree/keywords/shared_key.rb +24 -0
- data/lib/vault-tree/keywords/unlocked.rb +9 -0
- data/lib/vault-tree/keywords/vault_contents.rb +13 -0
- data/lib/vault-tree/lock_smith/asymmetric_cipher.rb +31 -0
- data/lib/vault-tree/lock_smith/crypto_hash.rb +11 -0
- data/lib/vault-tree/lock_smith/digital_signature.rb +32 -0
- data/lib/vault-tree/lock_smith/encryption_key_pair.rb +25 -0
- data/lib/vault-tree/lock_smith/null_vault.rb +4 -0
- data/lib/vault-tree/lock_smith/random_number.rb +11 -0
- data/lib/vault-tree/lock_smith/shared_key_pair.rb +12 -0
- data/lib/vault-tree/lock_smith/signing_key_pair.rb +25 -0
- data/lib/vault-tree/lock_smith/symmetric_cipher.rb +25 -0
- data/lib/vault-tree/util/json.rb +16 -0
- data/lib/vault-tree/version.rb +3 -0
- data/spec/app/locksmith/asymmetric_cipher_spec.rb +25 -0
- data/spec/app/locksmith/signing_key_pair_spec.rb +22 -0
- data/spec/spec_helper.rb +5 -0
- data/spec/support/fixtures/blank_simple_test_contract.json +14 -0
- data/spec/support/fixtures/broken_contract.json +55 -0
- data/spec/support/fixtures/one_two_three-0.5.0.EXP.json +105 -0
- data/spec/support/fixtures/reference_contract.1.0.0.json +227 -0
- data/spec/support/fixtures/simple_test_contract.json +14 -0
- data/support/cookbooks/ark/.gitignore +12 -0
- data/support/cookbooks/ark/.kitchen.yml +34 -0
- data/support/cookbooks/ark/.travis.yml +6 -0
- data/support/cookbooks/ark/Berksfile +9 -0
- data/support/cookbooks/ark/CHANGELOG.md +87 -0
- data/support/cookbooks/ark/CONTRIBUTING.md +257 -0
- data/support/cookbooks/ark/README.md +301 -0
- data/support/cookbooks/ark/Rakefile +36 -0
- data/support/cookbooks/ark/TESTING.md +25 -0
- data/support/cookbooks/ark/Toftfile +15 -0
- data/support/cookbooks/ark/attributes/default.rb +6 -0
- data/support/cookbooks/ark/chefignore +96 -0
- data/support/cookbooks/ark/files/default/foo.tar.gz +0 -0
- data/support/cookbooks/ark/files/default/foo.tbz +0 -0
- data/support/cookbooks/ark/files/default/foo.tgz +0 -0
- data/support/cookbooks/ark/files/default/foo.zip +0 -0
- data/support/cookbooks/ark/files/default/tests/minitest/default_test.rb +0 -0
- data/support/cookbooks/ark/files/default/tests/minitest/support/helpers.rb +0 -0
- data/support/cookbooks/ark/files/default/tests/minitest/test_test.rb +94 -0
- data/support/cookbooks/ark/libraries/default.rb +167 -0
- data/support/cookbooks/ark/metadata.rb +13 -0
- data/support/cookbooks/ark/providers/default.rb +370 -0
- data/support/cookbooks/ark/recipes/default.rb +31 -0
- data/support/cookbooks/ark/recipes/test.rb +138 -0
- data/support/cookbooks/ark/resources/default.rb +54 -0
- data/support/cookbooks/ark/templates/default/add_to_path.sh.erb +1 -0
- data/support/cookbooks/ark/test/support/Gemfile +4 -0
- data/support/cookbooks/build-essential/README.md +24 -0
- data/support/cookbooks/build-essential/metadata.rb +10 -0
- data/support/cookbooks/build-essential/recipes/default.rb +45 -0
- data/support/cookbooks/chruby/.gitignore +15 -0
- data/support/cookbooks/chruby/.kitchen.yml +26 -0
- data/support/cookbooks/chruby/.ruby_version +1 -0
- data/support/cookbooks/chruby/Berksfile +3 -0
- data/support/cookbooks/chruby/Gemfile +7 -0
- data/support/cookbooks/chruby/LICENSE +14 -0
- data/support/cookbooks/chruby/README.md +92 -0
- data/support/cookbooks/chruby/Rakefile +7 -0
- data/support/cookbooks/chruby/Thorfile +6 -0
- data/support/cookbooks/chruby/Vagrantfile +86 -0
- data/support/cookbooks/chruby/attributes/default.rb +10 -0
- data/support/cookbooks/chruby/chefignore +96 -0
- data/support/cookbooks/chruby/metadata.rb +11 -0
- data/support/cookbooks/chruby/recipes/default.rb +43 -0
- data/support/cookbooks/chruby/recipes/system.rb +25 -0
- data/support/cookbooks/chruby/templates/default/chruby.sh.erb +22 -0
- data/support/cookbooks/chruby/test/integration/default/bash/embedded_test.sh +1 -0
- data/support/cookbooks/git/.gitignore +14 -0
- data/support/cookbooks/git/.kitchen.yml +46 -0
- data/support/cookbooks/git/Berksfile +8 -0
- data/support/cookbooks/git/CHANGELOG.md +87 -0
- data/support/cookbooks/git/CONTRIBUTING +29 -0
- data/support/cookbooks/git/Gemfile +3 -0
- data/support/cookbooks/git/LICENSE +201 -0
- data/support/cookbooks/git/README.md +115 -0
- data/support/cookbooks/git/TESTING.md +25 -0
- data/support/cookbooks/git/attributes/default.rb +40 -0
- data/support/cookbooks/git/metadata.rb +35 -0
- data/support/cookbooks/git/recipes/default.rb +53 -0
- data/support/cookbooks/git/recipes/server.rb +58 -0
- data/support/cookbooks/git/recipes/source.rb +49 -0
- data/support/cookbooks/git/recipes/windows.rb +37 -0
- data/support/cookbooks/git/templates/default/git-xinetd.d.erb +10 -0
- data/support/cookbooks/git/templates/default/sv-git-daemon-log-run.erb +2 -0
- data/support/cookbooks/git/templates/default/sv-git-daemon-run.erb +3 -0
- data/support/cookbooks/install_ruby/README.md +3 -0
- data/support/cookbooks/install_ruby/metadata.rb +10 -0
- data/support/cookbooks/install_ruby/recipes/default.rb +14 -0
- data/support/cookbooks/ruby_build/.gitignore +6 -0
- data/support/cookbooks/ruby_build/.kitchen.yml +31 -0
- data/support/cookbooks/ruby_build/.travis.yml +4 -0
- data/support/cookbooks/ruby_build/Berksfile +10 -0
- data/support/cookbooks/ruby_build/CHANGELOG.md +72 -0
- data/support/cookbooks/ruby_build/Gemfile +14 -0
- data/support/cookbooks/ruby_build/README.md +338 -0
- data/support/cookbooks/ruby_build/Rakefile +21 -0
- data/support/cookbooks/ruby_build/attributes/default.rb +67 -0
- data/support/cookbooks/ruby_build/chefignore +53 -0
- data/support/cookbooks/ruby_build/libraries/ruby_build_recipe_helpers.rb +40 -0
- data/support/cookbooks/ruby_build/metadata.rb +18 -0
- data/support/cookbooks/ruby_build/providers/ruby.rb +88 -0
- data/support/cookbooks/ruby_build/recipes/default.rb +69 -0
- data/support/cookbooks/ruby_build/resources/ruby.rb +33 -0
- data/support/cookbooks/ruby_build/test/cookbooks/alltherubies/metadata.rb +10 -0
- data/support/cookbooks/ruby_build/test/cookbooks/alltherubies/recipes/default.rb +59 -0
- data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/_verify_tests.bash +33 -0
- data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_1.8.7.bats +29 -0
- data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_1.9.2.bats +18 -0
- data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_1.9.3.bats +18 -0
- data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_2.0.0.bats +18 -0
- data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_jruby.bats +20 -0
- data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_rbx.bats +18 -0
- data/support/cookbooks/ruby_build/test/integration/alltherubies/bats/verify_ree.bats +19 -0
- data/support/cookbooks/ruby_build/test/integration/installation/bats/installation.bats +6 -0
- data/support/scripts/libsodium_ubuntu.sh +80 -0
- data/support/tasks/.gitkeep +0 -0
- data/support/tasks/libsodium_install.rb +57 -0
- data/vault-tree.gemspec +26 -0
- metadata +305 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Cookbook Name:: ark
|
|
3
|
+
# Resource:: Ark
|
|
4
|
+
#
|
|
5
|
+
# Author:: Bryan W. Berry <bryan.berry@gmail.com>
|
|
6
|
+
# Copyright 2012, Bryan W. Berry
|
|
7
|
+
#
|
|
8
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
# you may not use this file except in compliance with the License.
|
|
10
|
+
# You may obtain a copy of the License at
|
|
11
|
+
#
|
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
#
|
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
# See the License for the specific language governing permissions and
|
|
18
|
+
# limitations under the License.
|
|
19
|
+
#
|
|
20
|
+
|
|
21
|
+
def initialize(name, run_context=nil)
|
|
22
|
+
super
|
|
23
|
+
@resource_name = :ark
|
|
24
|
+
@allowed_actions.push(:install, :dump, :cherry_pick, :put, :install_with_make, :configure, :setup_py_build, :setup_py_install, :setup_py, :unzip)
|
|
25
|
+
@action = :install
|
|
26
|
+
@provider = Chef::Provider::Ark
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
attr_accessor :path, :release_file, :prefix_bin, :prefix_root, :home_dir, :extension, :version
|
|
30
|
+
|
|
31
|
+
attribute :owner, :kind_of => String, :default => 'root'
|
|
32
|
+
attribute :group, :kind_of => [String, Fixnum], :default => 0
|
|
33
|
+
attribute :url, :kind_of => String, :required => true
|
|
34
|
+
attribute :path, :kind_of => String, :default => nil
|
|
35
|
+
attribute :full_path, :kind_of => String, :default => nil
|
|
36
|
+
attribute :append_env_path, :kind_of => [TrueClass, FalseClass], :default => false
|
|
37
|
+
attribute :checksum, :regex => /^[a-zA-Z0-9]{64}$/, :default => nil
|
|
38
|
+
attribute :has_binaries, :kind_of => Array, :default => []
|
|
39
|
+
attribute :creates, :kind_of => String, :default => nil
|
|
40
|
+
attribute :release_file, :kind_of => String, :default => ''
|
|
41
|
+
attribute :strip_leading_dir, :kind_of => [TrueClass, FalseClass], :default => true
|
|
42
|
+
attribute :mode, :kind_of => Fixnum, :default => 0755
|
|
43
|
+
attribute :prefix_root, :kind_of => String, :default => nil
|
|
44
|
+
attribute :prefix_home, :kind_of => String, :default => nil
|
|
45
|
+
attribute :prefix_bin, :kind_of => String, :default => nil
|
|
46
|
+
attribute :version, :kind_of => String, :default => nil
|
|
47
|
+
attribute :home_dir, :kind_of => String, :default => nil
|
|
48
|
+
attribute :environment, :kind_of => Hash, :default => {}
|
|
49
|
+
attribute :autoconf_opts, :kind_of => Array, :default => []
|
|
50
|
+
attribute :make_opts, :kind_of => Array, :default => []
|
|
51
|
+
attribute :home_dir, :kind_of => String, :default => nil
|
|
52
|
+
attribute :autoconf_opts, :kind_of => Array, :default => []
|
|
53
|
+
attribute :extension, :kind_of => String
|
|
54
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export PATH=<%= @directory -%>:$PATH
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
DESCRIPTION
|
|
2
|
+
===========
|
|
3
|
+
|
|
4
|
+
Installs packages required for compiling C software from source.
|
|
5
|
+
|
|
6
|
+
LICENSE AND AUTHOR
|
|
7
|
+
==================
|
|
8
|
+
|
|
9
|
+
Author:: Joshua Timberman (<joshua@opscode.com>)
|
|
10
|
+
Author:: Seth Chisamore (<schisamo@opscode.com>)
|
|
11
|
+
|
|
12
|
+
Copyright 2009-2011, Opscode, Inc.
|
|
13
|
+
|
|
14
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
15
|
+
you may not use this file except in compliance with the License.
|
|
16
|
+
You may obtain a copy of the License at
|
|
17
|
+
|
|
18
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
19
|
+
|
|
20
|
+
Unless required by applicable law or agreed to in writing, software
|
|
21
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
22
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
23
|
+
See the License for the specific language governing permissions and
|
|
24
|
+
limitations under the License.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
maintainer "Opscode, Inc."
|
|
2
|
+
maintainer_email "cookbooks@opscode.com"
|
|
3
|
+
license "Apache 2.0"
|
|
4
|
+
description "Installs C compiler / build tools"
|
|
5
|
+
version "1.0.0"
|
|
6
|
+
recipe "build-essential", "Installs C compiler and build tools on Linux"
|
|
7
|
+
|
|
8
|
+
%w{ fedora redhat centos ubuntu debian }.each do |os|
|
|
9
|
+
supports os
|
|
10
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Cookbook Name:: build-essential
|
|
3
|
+
# Recipe:: default
|
|
4
|
+
#
|
|
5
|
+
# Copyright 2008-2009, Opscode, Inc.
|
|
6
|
+
#
|
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
# you may not use this file except in compliance with the License.
|
|
9
|
+
# You may obtain a copy of the License at
|
|
10
|
+
#
|
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
#
|
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
# See the License for the specific language governing permissions and
|
|
17
|
+
# limitations under the License.
|
|
18
|
+
#
|
|
19
|
+
|
|
20
|
+
case node['platform']
|
|
21
|
+
when "ubuntu","debian"
|
|
22
|
+
%w{build-essential binutils-doc}.each do |pkg|
|
|
23
|
+
package pkg do
|
|
24
|
+
action :install
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
when "centos","redhat","fedora"
|
|
28
|
+
%w{gcc gcc-c++ kernel-devel make}.each do |pkg|
|
|
29
|
+
package pkg do
|
|
30
|
+
action :install
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
package "autoconf" do
|
|
36
|
+
action :install
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
package "flex" do
|
|
40
|
+
action :install
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
package "bison" do
|
|
44
|
+
action :install
|
|
45
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
driver_plugin: vagrant
|
|
3
|
+
|
|
4
|
+
platforms:
|
|
5
|
+
- name: ubuntu-12.04
|
|
6
|
+
driver_config:
|
|
7
|
+
box: canonical-ubuntu-12.04
|
|
8
|
+
box_url: http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box
|
|
9
|
+
require_chef_omnibus: true
|
|
10
|
+
- name: ubuntu-10.04
|
|
11
|
+
driver_config:
|
|
12
|
+
box: opscode-ubuntu-10.04
|
|
13
|
+
box_url: http://opscode-vm.s3.amazonaws.com/vagrant/opscode_ubuntu-10.04_chef-11.2.0.box
|
|
14
|
+
- name: centos-6.3
|
|
15
|
+
driver_config:
|
|
16
|
+
box: opscode-centos-6.3
|
|
17
|
+
box_url: http://opscode-vm.s3.amazonaws.com/vagrant/opscode_centos-6.3_chef-11.2.0.box
|
|
18
|
+
- name: centos-5.8
|
|
19
|
+
driver_config:
|
|
20
|
+
box: opscode-centos-5.8
|
|
21
|
+
box_url: http://opscode-vm.s3.amazonaws.com/vagrant/opscode_centos-5.8_chef-11.2.0.box
|
|
22
|
+
|
|
23
|
+
suites:
|
|
24
|
+
- name: default
|
|
25
|
+
run_list: ["recipe[chruby]"]
|
|
26
|
+
attributes: {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.9.3-p432
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Copyright (C) 2013 Atalanta Systems Ltd
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
|
14
|
+
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# chruby cookbook
|
|
2
|
+
|
|
3
|
+
Installs the Chruby utility for changing between Ruby versions.
|
|
4
|
+
Chruby is a vastly simplified rbenv - it's about 90 lines of code, and
|
|
5
|
+
very easy to understand.
|
|
6
|
+
|
|
7
|
+
# Requirements
|
|
8
|
+
|
|
9
|
+
- Depends on the `ark` cookbook and the `ruby-build` cookbook.
|
|
10
|
+
- Tested on:
|
|
11
|
+
- CentOS 6.3 and 6.4
|
|
12
|
+
- CentOS 5.8
|
|
13
|
+
- Ubuntu 12.04
|
|
14
|
+
- Ubuntu 10.04
|
|
15
|
+
|
|
16
|
+
# Usage
|
|
17
|
+
|
|
18
|
+
Include the `chruby` recipe in your run list. This will make the
|
|
19
|
+
chruby tool available to every shell, and make the embedded Ruby from
|
|
20
|
+
the Omnibus install available for use.
|
|
21
|
+
|
|
22
|
+
Chruby uses `ruby-build` to make Ruby versions available on the OS.
|
|
23
|
+
|
|
24
|
+
The version to build are defined in the node attribute `node['chruby']['rubies']`
|
|
25
|
+
|
|
26
|
+
This is a hash of Ruby versions, with a boolean flag, specifying whether the version should be installed.
|
|
27
|
+
|
|
28
|
+
For example, the cookbook default says:
|
|
29
|
+
|
|
30
|
+
default['chruby']['rubies'] = {'1.9.3-p392' => true}
|
|
31
|
+
|
|
32
|
+
If you want to disable this, set the value to false in a role or a wrapper cookbook. For a role:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
default_attributes(
|
|
36
|
+
"chruby" => {
|
|
37
|
+
"rubies" => {
|
|
38
|
+
"1.9.3-p392" => false,
|
|
39
|
+
"1.9.3-p429" => true
|
|
40
|
+
},
|
|
41
|
+
"default" => "1.9.3-p429"
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
For a wrapper cookbook:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
node.set['chruby']['rubies'] = { "1.9.3-p392" => false, "1.9.3-p429" => true }
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
These Ruby versions are installed using the LWRP provided by the `ruby_build` cookbook.
|
|
53
|
+
|
|
54
|
+
Ensure you set an explicit dependency on the `chruby` cookbook if you are using a wrapper cookbook.
|
|
55
|
+
|
|
56
|
+
# Attributes
|
|
57
|
+
|
|
58
|
+
- `node['chruby']['version']` - the version of Chruby to install. Default is 0.3.4.
|
|
59
|
+
- TODO: `node['chruby']['gpg_check']` - run the GPG check to verify the release was not tampered with.
|
|
60
|
+
- `node['chruby']['use_rvm_rubies']` - make Rubies installed using RVM available to chruby.
|
|
61
|
+
- `node['chruby']['use_rbenv_rubies']` - make Rubies installed using Rbenv available to chruby.
|
|
62
|
+
- `node['chruby']['auto_switch']` - enable automatic switching between Ruby versions per https://github.com/postmodern/chruby#auto-switching
|
|
63
|
+
- `node['chruby']['rubies']` - an hash of Rubies / Booleans values to install using the `ruby-build` LWRP, and make available to chruby.
|
|
64
|
+
- `node['chruby']['default']` - specify the default Ruby version for every shell.
|
|
65
|
+
|
|
66
|
+
# Recipes
|
|
67
|
+
|
|
68
|
+
## Default
|
|
69
|
+
|
|
70
|
+
Installs the chruby utility, and makes it available to every shell. If Chef was installed with the Omnibus installer, make embedded Ruby available as an option for usage.
|
|
71
|
+
|
|
72
|
+
## System
|
|
73
|
+
|
|
74
|
+
Builds and makes available the Ruby versions listed in the `node['chruby']['rubies']` attribute, using the `ruby-build` LWRP.
|
|
75
|
+
|
|
76
|
+
# Author and License
|
|
77
|
+
|
|
78
|
+
- Author: Stephen Nelson-Smith (LordCope) - Atalanta Systems Ltd (<cookbooks@atalanta-systems.com>)
|
|
79
|
+
|
|
80
|
+
Copyright 2013, Atalanta Systems Ltd
|
|
81
|
+
|
|
82
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
83
|
+
you may not use this file except in compliance with the License.
|
|
84
|
+
You may obtain a copy of the License at
|
|
85
|
+
|
|
86
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
87
|
+
|
|
88
|
+
Unless required by applicable law or agreed to in writing, software
|
|
89
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
90
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
91
|
+
See the License for the specific language governing permissions and
|
|
92
|
+
limitations under the License.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# -*- mode: ruby -*-
|
|
2
|
+
# vi: set ft=ruby :
|
|
3
|
+
|
|
4
|
+
Vagrant.configure("2") do |config|
|
|
5
|
+
# All Vagrant configuration is done here. The most common configuration
|
|
6
|
+
# options are documented and commented below. For a complete reference,
|
|
7
|
+
# please see the online documentation at vagrantup.com.
|
|
8
|
+
|
|
9
|
+
config.vm.hostname = "chruby-berkshelf"
|
|
10
|
+
|
|
11
|
+
# Every Vagrant virtual environment requires a box to build off of.
|
|
12
|
+
config.vm.box = "Berkshelf-CentOS-6.3-x86_64-minimal"
|
|
13
|
+
|
|
14
|
+
# The url from where the 'config.vm.box' box will be fetched if it
|
|
15
|
+
# doesn't already exist on the user's system.
|
|
16
|
+
config.vm.box_url = "https://dl.dropbox.com/u/31081437/Berkshelf-CentOS-6.3-x86_64-minimal.box"
|
|
17
|
+
|
|
18
|
+
# Assign this VM to a host-only network IP, allowing you to access it
|
|
19
|
+
# via the IP. Host-only networks can talk to the host machine as well as
|
|
20
|
+
# any other machines on the same network, but cannot be accessed (through this
|
|
21
|
+
# network interface) by any external networks.
|
|
22
|
+
config.vm.network :private_network, ip: "33.33.33.10"
|
|
23
|
+
|
|
24
|
+
# Create a public network, which generally matched to bridged network.
|
|
25
|
+
# Bridged networks make the machine appear as another physical device on
|
|
26
|
+
# your network.
|
|
27
|
+
|
|
28
|
+
# config.vm.network :public_network
|
|
29
|
+
|
|
30
|
+
# Create a forwarded port mapping which allows access to a specific port
|
|
31
|
+
# within the machine from a port on the host machine. In the example below,
|
|
32
|
+
# accessing "localhost:8080" will access port 80 on the guest machine.
|
|
33
|
+
|
|
34
|
+
# Share an additional folder to the guest VM. The first argument is
|
|
35
|
+
# the path on the host to the actual folder. The second argument is
|
|
36
|
+
# the path on the guest to mount the folder. And the optional third
|
|
37
|
+
# argument is a set of non-required options.
|
|
38
|
+
# config.vm.synced_folder "../data", "/vagrant_data"
|
|
39
|
+
|
|
40
|
+
# Provider-specific configuration so you can fine-tune various
|
|
41
|
+
# backing providers for Vagrant. These expose provider-specific options.
|
|
42
|
+
# Example for VirtualBox:
|
|
43
|
+
#
|
|
44
|
+
# config.vm.provider :virtualbox do |vb|
|
|
45
|
+
# # Don't boot with headless mode
|
|
46
|
+
# vb.gui = true
|
|
47
|
+
#
|
|
48
|
+
# # Use VBoxManage to customize the VM. For example to change memory:
|
|
49
|
+
# vb.customize ["modifyvm", :id, "--memory", "1024"]
|
|
50
|
+
# end
|
|
51
|
+
#
|
|
52
|
+
# View the documentation for the provider you're using for more
|
|
53
|
+
# information on available options.
|
|
54
|
+
|
|
55
|
+
config.ssh.max_tries = 40
|
|
56
|
+
config.ssh.timeout = 120
|
|
57
|
+
|
|
58
|
+
# The path to the Berksfile to use with Vagrant Berkshelf
|
|
59
|
+
# config.berkshelf.berksfile_path = "./Berksfile"
|
|
60
|
+
|
|
61
|
+
# Enabling the Berkshelf plugin. To enable this globally, add this configuration
|
|
62
|
+
# option to your ~/.vagrant.d/Vagrantfile file
|
|
63
|
+
config.berkshelf.enabled = true
|
|
64
|
+
|
|
65
|
+
# An array of symbols representing groups of cookbook described in the Vagrantfile
|
|
66
|
+
# to exclusively install and copy to Vagrant's shelf.
|
|
67
|
+
# config.berkshelf.only = []
|
|
68
|
+
|
|
69
|
+
# An array of symbols representing groups of cookbook described in the Vagrantfile
|
|
70
|
+
# to skip installing and copying to Vagrant's shelf.
|
|
71
|
+
# config.berkshelf.except = []
|
|
72
|
+
|
|
73
|
+
config.vm.provision :chef_solo do |chef|
|
|
74
|
+
chef.json = {
|
|
75
|
+
:mysql => {
|
|
76
|
+
:server_root_password => 'rootpass',
|
|
77
|
+
:server_debian_password => 'debpass',
|
|
78
|
+
:server_repl_password => 'replpass'
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
chef.run_list = [
|
|
83
|
+
"recipe[chruby::default]"
|
|
84
|
+
]
|
|
85
|
+
end
|
|
86
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
default['chruby']['version'] = '0.3.4'
|
|
2
|
+
default['chruby']['gpg_check'] = false
|
|
3
|
+
default['chruby']['use_rvm_rubies'] = false
|
|
4
|
+
default['chruby']['use_rbenv_rubies'] = false
|
|
5
|
+
default['chruby']['auto_switch'] = true
|
|
6
|
+
default['chruby']['rubies'] = {'1.9.3-p392' => true}
|
|
7
|
+
default['chruby']['default'] = 'embedded'
|
|
8
|
+
default['chruby']['user_rubies'] = {}
|
|
9
|
+
default['chruby']['sh_dir'] = "/etc/profile.d"
|
|
10
|
+
default['chruby']['sh_name'] = 'chruby.sh'
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Put files/directories that should be ignored in this file when uploading
|
|
2
|
+
# or sharing to the community site.
|
|
3
|
+
# Lines that start with '# ' are comments.
|
|
4
|
+
|
|
5
|
+
# OS generated files #
|
|
6
|
+
######################
|
|
7
|
+
.DS_Store
|
|
8
|
+
Icon?
|
|
9
|
+
nohup.out
|
|
10
|
+
ehthumbs.db
|
|
11
|
+
Thumbs.db
|
|
12
|
+
|
|
13
|
+
# SASS #
|
|
14
|
+
########
|
|
15
|
+
.sass-cache
|
|
16
|
+
|
|
17
|
+
# EDITORS #
|
|
18
|
+
###########
|
|
19
|
+
\#*
|
|
20
|
+
.#*
|
|
21
|
+
*~
|
|
22
|
+
*.sw[a-z]
|
|
23
|
+
*.bak
|
|
24
|
+
REVISION
|
|
25
|
+
TAGS*
|
|
26
|
+
tmtags
|
|
27
|
+
*_flymake.*
|
|
28
|
+
*_flymake
|
|
29
|
+
*.tmproj
|
|
30
|
+
.project
|
|
31
|
+
.settings
|
|
32
|
+
mkmf.log
|
|
33
|
+
|
|
34
|
+
## COMPILED ##
|
|
35
|
+
##############
|
|
36
|
+
a.out
|
|
37
|
+
*.o
|
|
38
|
+
*.pyc
|
|
39
|
+
*.so
|
|
40
|
+
*.com
|
|
41
|
+
*.class
|
|
42
|
+
*.dll
|
|
43
|
+
*.exe
|
|
44
|
+
*/rdoc/
|
|
45
|
+
|
|
46
|
+
# Testing #
|
|
47
|
+
###########
|
|
48
|
+
.watchr
|
|
49
|
+
.rspec
|
|
50
|
+
spec/*
|
|
51
|
+
spec/fixtures/*
|
|
52
|
+
test/*
|
|
53
|
+
features/*
|
|
54
|
+
Guardfile
|
|
55
|
+
Procfile
|
|
56
|
+
|
|
57
|
+
# SCM #
|
|
58
|
+
#######
|
|
59
|
+
.git
|
|
60
|
+
*/.git
|
|
61
|
+
.gitignore
|
|
62
|
+
.gitmodules
|
|
63
|
+
.gitconfig
|
|
64
|
+
.gitattributes
|
|
65
|
+
.svn
|
|
66
|
+
*/.bzr/*
|
|
67
|
+
*/.hg/*
|
|
68
|
+
*/.svn/*
|
|
69
|
+
|
|
70
|
+
# Berkshelf #
|
|
71
|
+
#############
|
|
72
|
+
Berksfile
|
|
73
|
+
Berksfile.lock
|
|
74
|
+
cookbooks/*
|
|
75
|
+
tmp
|
|
76
|
+
|
|
77
|
+
# Cookbooks #
|
|
78
|
+
#############
|
|
79
|
+
CONTRIBUTING
|
|
80
|
+
CHANGELOG*
|
|
81
|
+
|
|
82
|
+
# Strainer #
|
|
83
|
+
############
|
|
84
|
+
Colanderfile
|
|
85
|
+
Strainerfile
|
|
86
|
+
.colander
|
|
87
|
+
.strainer
|
|
88
|
+
|
|
89
|
+
# Vagrant #
|
|
90
|
+
###########
|
|
91
|
+
.vagrant
|
|
92
|
+
Vagrantfile
|
|
93
|
+
|
|
94
|
+
# Travis #
|
|
95
|
+
##########
|
|
96
|
+
.travis.yml
|