Browse files

add a cookbook for vim

  • Loading branch information...
1 parent 552d37a commit 40f692d90efee4a82e40e5b9c0690a8bdd78383d @jtimberman jtimberman committed Oct 4, 2010
Showing with 118 additions and 0 deletions.
  1. +39 −0 vim/README.md
  2. +20 −0 vim/attributes/default.rb
  3. +29 −0 vim/metadata.json
  4. +6 −0 vim/metadata.rb
  5. +24 −0 vim/recipes/default.rb
View
39 vim/README.md
@@ -0,0 +1,39 @@
+Description
+===========
+
+Installs vim.
+
+Requirements
+============
+
+`vim` must be a valid package name that installs VIM - Vi IMproved.
+
+Attributes
+==========
+
+* `node[:vim][:extra_packages]` - An array of extra packages related to vim to install (like plugins). Empty array by default.
+
+Usage
+=====
+
+Put `recipe[vim]` in a run list, or `include_recipe 'vim'` to ensure that vim is installed on your systems.
+
+If you would like to install additional vim plugin packages, include their package names in the `node[:vim][:extra_packages]` attribute. Verify that your operating sytem has the package available.
+
+License and Author
+==================
+
+Author:: Joshua Timberman <joshua@opscode.com>
+
+Copyright 2010, Opscode, Inc
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
View
20 vim/attributes/default.rb
@@ -0,0 +1,20 @@
+#
+# Cookbook Name:: vim
+# Attributes:: default
+#
+# Copyright 2010, Opscode, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+default[:vim][:extra_packages] = []
View
29 vim/metadata.json
@@ -0,0 +1,29 @@
+{
+ "name": "vim",
+ "description": "Installs vim and optional extra packages.",
+ "long_description": "Description\n===========\n\nInstalls vim.\n\nRequirements\n============\n\n`vim` must be a valid package name that installs VIM - Vi IMproved.\n\nAttributes\n==========\n\n* `node[:vim][:extra_packages]` - An array of extra packages related to vim to install (like plugins). Empty array by default.\n\nUsage\n=====\n\nPut `recipe[vim]` in a run list, or `include_recipe 'vim'` to ensure that vim is installed on your systems.\n\nIf you would like to install additional vim plugin packages, include their package names in the `node[:vim][:extra_packages]` attribute. Verify that your operating sytem has the package available.\n\nLicense and Author\n==================\n\nAuthor:: Joshua Timberman <joshua@opscode.com>\n\nCopyright 2010, Opscode, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\n",
+ "maintainer": "Opscode, Inc.",
+ "maintainer_email": "cookbooks@opscode.com",
+ "license": "Apache 2.0",
+ "platforms": {
+ },
+ "dependencies": {
+ },
+ "recommendations": {
+ },
+ "suggestions": {
+ },
+ "conflicting": {
+ },
+ "providing": {
+ },
+ "replacing": {
+ },
+ "attributes": {
+ },
+ "groupings": {
+ },
+ "recipes": {
+ },
+ "version": "1.0.0"
+}
View
6 vim/metadata.rb
@@ -0,0 +1,6 @@
+maintainer "Opscode, Inc."
+maintainer_email "cookbooks@opscode.com"
+license "Apache 2.0"
+description "Installs vim and optional extra packages."
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
+version "1.0.0"
View
24 vim/recipes/default.rb
@@ -0,0 +1,24 @@
+#
+# Cookbook Name:: vim
+# Recipe:: default
+#
+# Copyright 2010, Opscode, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+package "vim"
+
+node[:vim][:extra_packages].each do |vimpkg|
+ package vimpkg
+end

0 comments on commit 40f692d

Please sign in to comment.