from-scratch 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.
Files changed (174) hide show
  1. checksums.yaml +7 -0
  2. data/.chef/knife.rb +6 -0
  3. data/.gitignore +9 -0
  4. data/.rspec +2 -0
  5. data/.travis.yml +4 -0
  6. data/Berksfile +17 -0
  7. data/Berksfile.lock +19 -0
  8. data/Gemfile +4 -0
  9. data/LICENSE.txt +21 -0
  10. data/README.md +58 -0
  11. data/Rakefile +6 -0
  12. data/Thorfile +5 -0
  13. data/bin/scratchify +6 -0
  14. data/chefignore +101 -0
  15. data/cookbooks/chef_gem/CHANGELOG.md +24 -0
  16. data/cookbooks/chef_gem/README.md +38 -0
  17. data/cookbooks/chef_gem/libraries/chef_gem.rb +72 -0
  18. data/cookbooks/chef_gem/metadata.json +29 -0
  19. data/cookbooks/chef_gem/recipes/default.rb +0 -0
  20. data/cookbooks/java/.gitignore +21 -0
  21. data/cookbooks/java/.kitchen.docker.yml +15 -0
  22. data/cookbooks/java/.kitchen.yml +126 -0
  23. data/cookbooks/java/.travis.yml +6 -0
  24. data/cookbooks/java/Berksfile +10 -0
  25. data/cookbooks/java/CHANGELOG.md +398 -0
  26. data/cookbooks/java/CONTRIBUTING.md +12 -0
  27. data/cookbooks/java/Gemfile +15 -0
  28. data/cookbooks/java/ISSUES.md +43 -0
  29. data/cookbooks/java/LICENSE +201 -0
  30. data/cookbooks/java/README.md +402 -0
  31. data/cookbooks/java/Rakefile +60 -0
  32. data/cookbooks/java/TESTING.md +41 -0
  33. data/cookbooks/java/attributes/default.rb +146 -0
  34. data/cookbooks/java/libraries/helpers.rb +120 -0
  35. data/cookbooks/java/libraries/matchers.rb +5 -0
  36. data/cookbooks/java/metadata.json +69 -0
  37. data/cookbooks/java/providers/alternatives.rb +94 -0
  38. data/cookbooks/java/providers/ark.rb +255 -0
  39. data/cookbooks/java/recipes/default.rb +22 -0
  40. data/cookbooks/java/recipes/default_java_symlink.rb +19 -0
  41. data/cookbooks/java/recipes/homebrew.rb +3 -0
  42. data/cookbooks/java/recipes/ibm.rb +76 -0
  43. data/cookbooks/java/recipes/ibm_tar.rb +70 -0
  44. data/cookbooks/java/recipes/openjdk.rb +74 -0
  45. data/cookbooks/java/recipes/oracle.rb +74 -0
  46. data/cookbooks/java/recipes/oracle_i386.rb +73 -0
  47. data/cookbooks/java/recipes/oracle_jce.rb +75 -0
  48. data/cookbooks/java/recipes/oracle_rpm.rb +60 -0
  49. data/cookbooks/java/recipes/purge_packages.rb +20 -0
  50. data/cookbooks/java/recipes/set_attributes_from_version.rb +55 -0
  51. data/cookbooks/java/recipes/set_java_home.rb +44 -0
  52. data/cookbooks/java/recipes/windows.rb +82 -0
  53. data/cookbooks/java/resources/alternatives.rb +30 -0
  54. data/cookbooks/java/resources/ark.rb +58 -0
  55. data/cookbooks/java/templates/default/ibm_jdk.installer.properties.erb +3 -0
  56. data/cookbooks/java/templates/default/oracle.jinfo.erb +6 -0
  57. data/cookbooks/rvm/.foodcritic +1 -0
  58. data/cookbooks/rvm/.gitignore +7 -0
  59. data/cookbooks/rvm/.kitchen.yml +66 -0
  60. data/cookbooks/rvm/.travis.yml +9 -0
  61. data/cookbooks/rvm/Berksfile +10 -0
  62. data/cookbooks/rvm/CHANGELOG.md +253 -0
  63. data/cookbooks/rvm/CODE_OF_CONDUCT.md +12 -0
  64. data/cookbooks/rvm/CONTRIBUTING.md +26 -0
  65. data/cookbooks/rvm/Gemfile +20 -0
  66. data/cookbooks/rvm/Guardfile +12 -0
  67. data/cookbooks/rvm/README.md +1459 -0
  68. data/cookbooks/rvm/Rakefile +18 -0
  69. data/cookbooks/rvm/attributes/.gitkeep +0 -0
  70. data/cookbooks/rvm/attributes/default.rb +68 -0
  71. data/cookbooks/rvm/attributes/gem_package.rb +23 -0
  72. data/cookbooks/rvm/attributes/vagrant.rb +23 -0
  73. data/cookbooks/rvm/libraries/chef_rvm_environment_helpers.rb +55 -0
  74. data/cookbooks/rvm/libraries/chef_rvm_gemset_helpers.rb +67 -0
  75. data/cookbooks/rvm/libraries/chef_rvm_recipe_helpers.rb +80 -0
  76. data/cookbooks/rvm/libraries/chef_rvm_ruby_helpers.rb +95 -0
  77. data/cookbooks/rvm/libraries/chef_rvm_set_helpers.rb +16 -0
  78. data/cookbooks/rvm/libraries/chef_rvm_shell_helpers.rb +57 -0
  79. data/cookbooks/rvm/libraries/chef_rvm_string_cache.rb +104 -0
  80. data/cookbooks/rvm/libraries/chef_rvm_string_helpers.rb +61 -0
  81. data/cookbooks/rvm/libraries/chef_rvm_version_helpers.rb +45 -0
  82. data/cookbooks/rvm/libraries/gem_package_monkeypatch.rb +34 -0
  83. data/cookbooks/rvm/libraries/provider_rvm_installation.rb +185 -0
  84. data/cookbooks/rvm/libraries/resource_rvm_installation.rb +103 -0
  85. data/cookbooks/rvm/libraries/rvm_chef_user_environment.rb +55 -0
  86. data/cookbooks/rvm/libraries/rvm_rubygems_package.rb +189 -0
  87. data/cookbooks/rvm/libraries/rvm_shell_chef_wrapper.rb +99 -0
  88. data/cookbooks/rvm/metadata.json +51 -0
  89. data/cookbooks/rvm/providers/default_ruby.rb +63 -0
  90. data/cookbooks/rvm/providers/environment.rb +78 -0
  91. data/cookbooks/rvm/providers/gemset.rb +118 -0
  92. data/cookbooks/rvm/providers/global_gem.rb +97 -0
  93. data/cookbooks/rvm/providers/ruby.rb +178 -0
  94. data/cookbooks/rvm/providers/shell.rb +121 -0
  95. data/cookbooks/rvm/providers/wrapper.rb +73 -0
  96. data/cookbooks/rvm/recipes/.gitkeep +0 -0
  97. data/cookbooks/rvm/recipes/default.rb +40 -0
  98. data/cookbooks/rvm/recipes/gem_package.rb +33 -0
  99. data/cookbooks/rvm/recipes/system.rb +37 -0
  100. data/cookbooks/rvm/recipes/system_install.rb +42 -0
  101. data/cookbooks/rvm/recipes/user.rb +43 -0
  102. data/cookbooks/rvm/recipes/user_install.rb +58 -0
  103. data/cookbooks/rvm/recipes/vagrant.rb +37 -0
  104. data/cookbooks/rvm/resources/default_ruby.rb +31 -0
  105. data/cookbooks/rvm/resources/environment.rb +31 -0
  106. data/cookbooks/rvm/resources/gem.rb +37 -0
  107. data/cookbooks/rvm/resources/gemset.rb +32 -0
  108. data/cookbooks/rvm/resources/global_gem.rb +34 -0
  109. data/cookbooks/rvm/resources/ruby.rb +32 -0
  110. data/cookbooks/rvm/resources/shell.rb +41 -0
  111. data/cookbooks/rvm/resources/wrapper.rb +34 -0
  112. data/cookbooks/rvm/templates/default/rvmrc.erb +14 -0
  113. data/cookbooks/rvm/templates/default/vagrant-chef-client-wrapper.erb +23 -0
  114. data/cookbooks/rvm/templates/default/vagrant-chef-solo-wrapper.erb +23 -0
  115. data/cookbooks/rvm/test/integration/data_bags/users/virgil1.json +4 -0
  116. data/cookbooks/rvm/test/integration/data_bags/users/virgil2.json +4 -0
  117. data/cookbooks/rvm/test/integration/data_bags/users/wigglebottom.json +3 -0
  118. data/cookbooks/rvm/test/integration/installs/bats/version_pinning.bats +13 -0
  119. data/cookbooks/rvm/test/integration/rubies/bats/_common.bash +16 -0
  120. data/cookbooks/rvm/test/integration/rubies/bats/verify_1.9.3.bats +9 -0
  121. data/cookbooks/rvm/test/integration/rubies/bats/verify_jruby.bats +12 -0
  122. data/cookbooks/rvm/test/integration/rubies/bats/verify_patch_support.bats +19 -0
  123. data/cookbooks/rvm/test/integration/rubies/bats/verify_ree.bats +9 -0
  124. data/cookbooks/rvm/test/integration/rubies/bats/verify_rubygems_version_support.bats +15 -0
  125. data/cookbooks/rvm/test/integration/stock_system_and_user/bats/system.bats +45 -0
  126. data/cookbooks/rvm/test/unit/libraries/provider_rvm_installation_spec.rb +220 -0
  127. data/cookbooks/rvm/test/unit/libraries/resource_rvm_installation_spec.rb +139 -0
  128. data/cookbooks/rvm/test/unit/spec_helper.rb +23 -0
  129. data/cookbooks/scratchify/.chef/knife.rb +9 -0
  130. data/cookbooks/scratchify/Berksfile +16 -0
  131. data/cookbooks/scratchify/Berksfile.lock +19 -0
  132. data/cookbooks/scratchify/LICENSE.txt +21 -0
  133. data/cookbooks/scratchify/README.md +41 -0
  134. data/cookbooks/scratchify/Thorfile +5 -0
  135. data/cookbooks/scratchify/bin/console +14 -0
  136. data/cookbooks/scratchify/bin/scratchify +6 -0
  137. data/cookbooks/scratchify/bin/setup +7 -0
  138. data/cookbooks/scratchify/chefignore +101 -0
  139. data/cookbooks/scratchify/data_bags/users/deploy.json +6 -0
  140. data/cookbooks/scratchify/environments/.gitkeep +0 -0
  141. data/cookbooks/scratchify/from-scratch.gemspec +36 -0
  142. data/cookbooks/scratchify/lib/from/scratch.rb +31 -0
  143. data/cookbooks/scratchify/lib/from/scratch/interviewer.rb +35 -0
  144. data/cookbooks/scratchify/lib/from/scratch/version.rb +3 -0
  145. data/cookbooks/scratchify/metadata.json +36 -0
  146. data/cookbooks/scratchify/nodes/normfood.ru.json +75 -0
  147. data/cookbooks/scratchify/recipes/default.rb +0 -0
  148. data/cookbooks/scratchify/roles/.gitkeep +0 -0
  149. data/cookbooks/scratchify/spec/from/scratch_spec.rb +11 -0
  150. data/cookbooks/scratchify/spec/spec_helper.rb +2 -0
  151. data/cookbooks/user/.gitignore +5 -0
  152. data/cookbooks/user/.kitchen.yml +46 -0
  153. data/cookbooks/user/.travis.yml +4 -0
  154. data/cookbooks/user/Berksfile +7 -0
  155. data/cookbooks/user/CHANGELOG.md +101 -0
  156. data/cookbooks/user/Gemfile +14 -0
  157. data/cookbooks/user/README.md +447 -0
  158. data/cookbooks/user/Rakefile +21 -0
  159. data/cookbooks/user/attributes/default.rb +50 -0
  160. data/cookbooks/user/libraries/matchers.rb +26 -0
  161. data/cookbooks/user/metadata.json +46 -0
  162. data/cookbooks/user/providers/account.rb +212 -0
  163. data/cookbooks/user/recipes/data_bag.rb +59 -0
  164. data/cookbooks/user/recipes/default.rb +18 -0
  165. data/cookbooks/user/resources/account.rb +41 -0
  166. data/cookbooks/user/templates/default/authorized_keys.erb +7 -0
  167. data/from-scratch.gemspec +33 -0
  168. data/lib/from-scratch.rb +25 -0
  169. data/lib/from-scratch/version.rb +3 -0
  170. data/metadata.rb +15 -0
  171. data/recipes/default.rb +0 -0
  172. data/templates/node.json.erb +31 -0
  173. data/templates/user.json.erb +6 -0
  174. metadata +330 -0
@@ -0,0 +1,37 @@
1
+ #
2
+ # Cookbook Name:: rvm
3
+ # Recipe:: vagrant
4
+ #
5
+ # Copyright 2011, Fletcher Nichol
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
+ template "/usr/local/bin/chef-client" do
21
+ source "vagrant-chef-client-wrapper.erb"
22
+ owner "root"
23
+ group "root"
24
+ mode "0755"
25
+ end
26
+
27
+ template "/usr/local/bin/chef-solo" do
28
+ source "vagrant-chef-solo-wrapper.erb"
29
+ owner "root"
30
+ group "root"
31
+ mode "0755"
32
+ end
33
+
34
+ group "rvm" do
35
+ members ["vagrant"]
36
+ append true
37
+ end
@@ -0,0 +1,31 @@
1
+ #
2
+ # Cookbook Name:: rvm
3
+ # Resource:: default_ruby
4
+ #
5
+ # Author:: Fletcher Nichol <fnichol@nichol.ca>
6
+ #
7
+ # Copyright 2011, Fletcher Nichol
8
+ #
9
+ # Licensed under the Apache License, Version 2.0 (the "License");
10
+ # you may not use this file except in compliance with the License.
11
+ # You may obtain a copy of the License at
12
+ #
13
+ # http://www.apache.org/licenses/LICENSE-2.0
14
+ #
15
+ # Unless required by applicable law or agreed to in writing, software
16
+ # distributed under the License is distributed on an "AS IS" BASIS,
17
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ # See the License for the specific language governing permissions and
19
+ # limitations under the License.
20
+ #
21
+
22
+ actions :create
23
+
24
+ attribute :ruby_string, :kind_of => String, :name_attribute => true
25
+ attribute :user, :kind_of => String
26
+ attribute :patch, :kind_of => String
27
+
28
+ def initialize(*args)
29
+ super
30
+ @action = :create
31
+ end
@@ -0,0 +1,31 @@
1
+ #
2
+ # Cookbook Name:: rvm
3
+ # Resource:: environment
4
+ #
5
+ # Author:: Fletcher Nichol <fnichol@nichol.ca>
6
+ #
7
+ # Copyright 2011, Fletcher Nichol
8
+ #
9
+ # Licensed under the Apache License, Version 2.0 (the "License");
10
+ # you may not use this file except in compliance with the License.
11
+ # You may obtain a copy of the License at
12
+ #
13
+ # http://www.apache.org/licenses/LICENSE-2.0
14
+ #
15
+ # Unless required by applicable law or agreed to in writing, software
16
+ # distributed under the License is distributed on an "AS IS" BASIS,
17
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ # See the License for the specific language governing permissions and
19
+ # limitations under the License.
20
+ #
21
+
22
+ actions :create
23
+
24
+ attribute :ruby_string, :kind_of => String, :name_attribute => true
25
+ attribute :user, :kind_of => String
26
+ attribute :patch, :kind_of => String
27
+
28
+ def initialize(*args)
29
+ super
30
+ @action = :create
31
+ end
@@ -0,0 +1,37 @@
1
+ #
2
+ # Cookbook Name:: rvm
3
+ # Resource:: gem
4
+ #
5
+ # Author:: Fletcher Nichol <fnichol@nichol.ca>
6
+ #
7
+ # Copyright 2011, Fletcher Nichol
8
+ #
9
+ # Licensed under the Apache License, Version 2.0 (the "License");
10
+ # you may not use this file except in compliance with the License.
11
+ # You may obtain a copy of the License at
12
+ #
13
+ # http://www.apache.org/licenses/LICENSE-2.0
14
+ #
15
+ # Unless required by applicable law or agreed to in writing, software
16
+ # distributed under the License is distributed on an "AS IS" BASIS,
17
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ # See the License for the specific language governing permissions and
19
+ # limitations under the License.
20
+ #
21
+
22
+ actions :install, :upgrade, :remove, :purge
23
+
24
+ attribute :package_name, :kind_of => String, :name_attribute => true
25
+ attribute :version, :kind_of => String
26
+ attribute :ruby_string, :kind_of => String, :default => "default"
27
+ attribute :response_file, :kind_of => String
28
+ attribute :source, :kind_of => String
29
+ attribute :options, :kind_of => Hash
30
+ attribute :gem_binary, :kind_of => String
31
+ attribute :user, :kind_of => String
32
+
33
+ def initialize(*args)
34
+ super
35
+ @action = :install
36
+ @provider = Chef::Provider::Package::RVMRubygems
37
+ end
@@ -0,0 +1,32 @@
1
+ #
2
+ # Cookbook Name:: rvm
3
+ # Resource:: gemset
4
+ #
5
+ # Author:: Fletcher Nichol <fnichol@nichol.ca>
6
+ #
7
+ # Copyright 2011, Fletcher Nichol
8
+ #
9
+ # Licensed under the Apache License, Version 2.0 (the "License");
10
+ # you may not use this file except in compliance with the License.
11
+ # You may obtain a copy of the License at
12
+ #
13
+ # http://www.apache.org/licenses/LICENSE-2.0
14
+ #
15
+ # Unless required by applicable law or agreed to in writing, software
16
+ # distributed under the License is distributed on an "AS IS" BASIS,
17
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ # See the License for the specific language governing permissions and
19
+ # limitations under the License.
20
+ #
21
+
22
+ actions :create, :delete, :empty, :update
23
+
24
+ attribute :gemset, :kind_of => String, :name_attribute => true
25
+ attribute :ruby_string, :kind_of => String, :regex => /^[^@]+$/
26
+ attribute :user, :kind_of => String
27
+ attribute :patch, :kind_of => String
28
+
29
+ def initialize(*args)
30
+ super
31
+ @action = :create
32
+ end
@@ -0,0 +1,34 @@
1
+ #
2
+ # Cookbook Name:: rvm
3
+ # Resource:: global_gem
4
+ #
5
+ # Author:: Fletcher Nichol <fnichol@nichol.ca>
6
+ #
7
+ # Copyright 2011, Fletcher Nichol
8
+ #
9
+ # Licensed under the Apache License, Version 2.0 (the "License");
10
+ # you may not use this file except in compliance with the License.
11
+ # You may obtain a copy of the License at
12
+ #
13
+ # http://www.apache.org/licenses/LICENSE-2.0
14
+ #
15
+ # Unless required by applicable law or agreed to in writing, software
16
+ # distributed under the License is distributed on an "AS IS" BASIS,
17
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ # See the License for the specific language governing permissions and
19
+ # limitations under the License.
20
+ #
21
+
22
+ actions :install, :upgrade, :remove, :purge
23
+
24
+ attribute :package_name, :kind_of => String, :name_attribute => true
25
+ attribute :version, :kind_of => String
26
+ attribute :source, :kind_of => String
27
+ attribute :options, :kind_of => Hash
28
+ attribute :gem_binary, :kind_of => String
29
+ attribute :user, :kind_of => String
30
+
31
+ def initialize(*args)
32
+ super
33
+ @action = :install
34
+ end
@@ -0,0 +1,32 @@
1
+ #
2
+ # Cookbook Name:: rvm
3
+ # Resource:: ruby
4
+ #
5
+ # Author:: Fletcher Nichol <fnichol@nichol.ca>
6
+ #
7
+ # Copyright 2011, Fletcher Nichol
8
+ #
9
+ # Licensed under the Apache License, Version 2.0 (the "License");
10
+ # you may not use this file except in compliance with the License.
11
+ # You may obtain a copy of the License at
12
+ #
13
+ # http://www.apache.org/licenses/LICENSE-2.0
14
+ #
15
+ # Unless required by applicable law or agreed to in writing, software
16
+ # distributed under the License is distributed on an "AS IS" BASIS,
17
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ # See the License for the specific language governing permissions and
19
+ # limitations under the License.
20
+ #
21
+
22
+ actions :install, :uninstall, :remove
23
+
24
+ attribute :ruby_string, :kind_of => String, :name_attribute => true
25
+ attribute :user, :kind_of => String
26
+ attribute :patch, :kind_of => String
27
+ attribute :rubygems_version, :kind_of => String
28
+
29
+ def initialize(*args)
30
+ super
31
+ @action = :install
32
+ end
@@ -0,0 +1,41 @@
1
+ #
2
+ # Cookbook Name:: rvm
3
+ # Resource:: shell
4
+ #
5
+ # Author:: Fletcher Nichol <fnichol@nichol.ca>
6
+ #
7
+ # Copyright 2011, Fletcher Nichol
8
+ #
9
+ # Licensed under the Apache License, Version 2.0 (the "License");
10
+ # you may not use this file except in compliance with the License.
11
+ # You may obtain a copy of the License at
12
+ #
13
+ # http://www.apache.org/licenses/LICENSE-2.0
14
+ #
15
+ # Unless required by applicable law or agreed to in writing, software
16
+ # distributed under the License is distributed on an "AS IS" BASIS,
17
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ # See the License for the specific language governing permissions and
19
+ # limitations under the License.
20
+ #
21
+
22
+ actions :run
23
+
24
+ attribute :name, :kind_of => String, :name_attribute => true
25
+ attribute :ruby_string, :kind_of => String, :default => "default"
26
+ attribute :code, :kind_of => String
27
+ attribute :creates, :kind_of => String
28
+ attribute :cwd, :kind_of => String
29
+ attribute :environment, :kind_of => Hash
30
+ attribute :group, :kind_of => String
31
+ attribute :path, :kind_of => Array
32
+ attribute :returns, :kind_of => Array, :default => [ 0 ]
33
+ attribute :timeout, :kind_of => Integer
34
+ attribute :user, :kind_of => String
35
+ attribute :umask, :kind_of => String
36
+ attribute :patch, :kind_of => String
37
+
38
+ def initialize(*args)
39
+ super
40
+ @action = :run
41
+ end
@@ -0,0 +1,34 @@
1
+ #
2
+ # Cookbook Name:: rvm
3
+ # Resource:: wrapper
4
+ #
5
+ # Author:: Fletcher Nichol <fnichol@nichol.ca>
6
+ #
7
+ # Copyright 2011, Fletcher Nichol
8
+ #
9
+ # Licensed under the Apache License, Version 2.0 (the "License");
10
+ # you may not use this file except in compliance with the License.
11
+ # You may obtain a copy of the License at
12
+ #
13
+ # http://www.apache.org/licenses/LICENSE-2.0
14
+ #
15
+ # Unless required by applicable law or agreed to in writing, software
16
+ # distributed under the License is distributed on an "AS IS" BASIS,
17
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ # See the License for the specific language governing permissions and
19
+ # limitations under the License.
20
+ #
21
+
22
+ actions :create
23
+
24
+ attribute :prefix, :kind_of => String, :name_attribute => true
25
+ attribute :ruby_string, :kind_of => String
26
+ attribute :binary, :kind_of => String
27
+ attribute :binaries, :kind_of => Array
28
+ attribute :user, :kind_of => String
29
+ attribute :patch, :kind_of => String
30
+
31
+ def initialize(*args)
32
+ super
33
+ @action = :create
34
+ end
@@ -0,0 +1,14 @@
1
+ # rvm configuration
2
+ #
3
+ # Generated by Chef for <%= @user %>@<%= node['fqdn'] %>
4
+ # Local modifications will be overwritten.
5
+ #
6
+ <% if @user == "root" -%>
7
+ umask u=rwx,g=rwx,o=rx
8
+ <% end -%>
9
+ export rvm_path="<%= @rvm_path %>"
10
+
11
+ <% @rvmrc_env.each_pair do |k,v| -%>
12
+ <% next unless v -%>
13
+ export <%= k %>="<%= v %>"
14
+ <% end -%>
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # RVM-aware chef-client wrapper
4
+ #
5
+ # Generated by Chef for <%= node['fqdn'] %>
6
+ # Local modifications will be overridden
7
+
8
+ if [[ -d "<%= node['rvm']['root_path'] %>" ]] ; then
9
+ export PATH="/bin:<%= node['rvm']['root_path'] %>:$PATH"
10
+ rvm_path='<%= node['rvm']['root_path'] %>'
11
+ export rvm_path
12
+ unset RUBY_VERSION
13
+ unset GEM_HOME
14
+ unset GEM_PATH
15
+ unset MY_RUBY_HOME
16
+ unset IRBRC
17
+ rvm_ruby_string='system'
18
+ export rvm_ruby_string
19
+ unset rvm_gemset_name
20
+ unset MAGLEV_HOME
21
+ fi
22
+
23
+ exec <%= node['rvm']['vagrant']['system_chef_client'] %> "$@"
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # RVM-aware chef-solo wrapper
4
+ #
5
+ # Generated by Chef for <%= node['fqdn'] %>
6
+ # Local modifications will be overridden
7
+
8
+ if [[ -d "<%= node['rvm']['root_path'] %>" ]] ; then
9
+ export PATH="/bin:<%= node['rvm']['root_path'] %>:$PATH"
10
+ rvm_path='<%= node['rvm']['root_path'] %>'
11
+ export rvm_path
12
+ unset RUBY_VERSION
13
+ unset GEM_HOME
14
+ unset GEM_PATH
15
+ unset MY_RUBY_HOME
16
+ unset IRBRC
17
+ rvm_ruby_string='system'
18
+ export rvm_ruby_string
19
+ unset rvm_gemset_name
20
+ unset MAGLEV_HOME
21
+ fi
22
+
23
+ exec <%= node['rvm']['vagrant']['system_chef_solo'] %> "$@"
@@ -0,0 +1,3 @@
1
+ {
2
+ "id": "wigglebottom"
3
+ }
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env bats
2
+
3
+ @test "virgil1 user has rvm-1.19.6" {
4
+ run sudo -u virgil1 -i rvm version
5
+ [ $status -eq 0 ]
6
+ [ "$(echo $output | awk '{print $2}')" = "1.19.6" ]
7
+ }
8
+
9
+ @test "virgil2 user has rvm-1.21.20" {
10
+ run sudo -u virgil2 -i rvm version
11
+ [ $status -eq 0 ]
12
+ [ "$(echo $output | awk '{print $2}')" = "1.21.20" ]
13
+ }
@@ -0,0 +1,16 @@
1
+ setup() {
2
+ source /etc/profile.d/rvm.sh
3
+ }
4
+
5
+ run_nokogiri_openssl_test() {
6
+ local rubie="$1"
7
+ local https_url="https://google.com"
8
+ local requires="require 'nokogiri';"
9
+ local script="$requires puts Nokogiri::HTML(open('$https_url')).css('input')"
10
+
11
+ run rvm $rubie do gem install nokogiri --no-ri --no-rdoc
12
+ [ "$status" -eq 0 ]
13
+
14
+ run rvm $rubie do ruby -rrubygems -ropen-uri -e "$script"
15
+ [ "$status" -eq 0 ]
16
+ }
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env bats
2
+
3
+ rubie="1.9.3"
4
+
5
+ load _common
6
+
7
+ @test "RVM $rubie can use nokogiri with openssl" {
8
+ run_nokogiri_openssl_test $rubie
9
+ }