Skip to content
Browse files

Import vim version 1.0.2

  • Loading branch information...
1 parent 11d597f commit 9a7beb8c7bf79c9df83141193c910e79748dd932 Jenkins CI committed May 8, 2012
View
50 cookbooks/vim/README.md
@@ -0,0 +1,50 @@
+Description
+===========
+
+Installs vim.
+
+Requirements
+============
+
+## Platform:
+
+* Ubuntu/Debian
+* Red Hat/CentOS/Fedora/Scientific
+* ArchLinux
+
+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.
+
+Changes
+=======
+
+## v1.0.2:
+
+* Fixes COOK-598 (RHEL platforms support).
+
+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 cookbooks/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
36 cookbooks/vim/metadata.json
@@ -0,0 +1,36 @@
+{
+ "name": "vim",
+ "description": "Installs vim and optional extra packages.",
+ "long_description": "Description\n===========\n\nInstalls vim.\n\nRequirements\n============\n\n## Platform:\n\n* Ubuntu/Debian\n* Red Hat/CentOS/Fedora/Scientific\n* ArchLinux\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\nChanges\n=======\n\n## v1.0.2:\n\n* Fixes COOK-598 (RHEL platforms support).\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": {
+ "debian": ">= 0.0.0",
+ "ubuntu": ">= 0.0.0",
+ "arch": ">= 0.0.0",
+ "redhat": ">= 0.0.0",
+ "centos": ">= 0.0.0",
+ "fedora": ">= 0.0.0",
+ "scientific": ">= 0.0.0"
+ },
+ "dependencies": {
+ },
+ "recommendations": {
+ },
+ "suggestions": {
+ },
+ "conflicting": {
+ },
+ "providing": {
+ },
+ "replacing": {
+ },
+ "attributes": {
+ },
+ "groupings": {
+ },
+ "recipes": {
+ },
+ "version": "1.0.2"
+}
View
11 cookbooks/vim/metadata.rb
@@ -0,0 +1,11 @@
+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.2"
+
+%w{debian ubuntu arch redhat centos fedora scientific}.each do |os|
+ supports os
+end
+
View
35 cookbooks/vim/recipes/default.rb
@@ -0,0 +1,35 @@
+#
+# 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.
+#
+
+# There is no vim package on RHEL/CentOS derivatives
+# * vim-minimal gives you /bin/vi
+# * vim-enhanced gives you /usr/bin/vim
+vim_base_pkgs = value_for_platform(
+ ["ubuntu", "debian", "arch"] => { "default" => ["vim"] },
+ ["redhat", "centos", "fedora", "scientific"] => { "default" => ["vim-minimal","vim-enhanced"] },
+ "default" => ["vim"]
+)
+
+vim_base_pkgs.each do |vim_base_pkg|
+ package vim_base_pkg
+end
+
+node[:vim][:extra_packages].each do |vimpkg|
+ package vimpkg
+end

0 comments on commit 9a7beb8

Please sign in to comment.
Something went wrong with that request. Please try again.