diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cbccf1e --- /dev/null +++ b/.gitignore @@ -0,0 +1,20 @@ +*~ +*# +.#* +\#*# +.*.sw[a-z] +*.un~ +pkg/ + +# Berkshelf +.vagrant +/cookbooks +Berksfile.lock + +# Bundler +Gemfile.lock +bin/* +.bundle/* + +.kitchen/ +.kitchen.local.yml diff --git a/.kitchen.yml b/.kitchen.yml new file mode 100644 index 0000000..b040c71 --- /dev/null +++ b/.kitchen.yml @@ -0,0 +1,27 @@ +--- +driver: + name: vagrant + +provisioner: + name: chef_zero + +platforms: + - name: centos-6.6 + +suites: + - name: default + run_list: + - recipe[forever::default] + attributes: + - name: source + run_list: + - recipe[forever::default] + attributes: + nodejs: + install_method: source + - name: binary + run_list: + - recipe[forever::default] + attributes: + nodejs: + install_method: binary diff --git a/Berksfile b/Berksfile new file mode 100644 index 0000000..f75ea11 --- /dev/null +++ b/Berksfile @@ -0,0 +1,6 @@ +source "https://supermarket.chef.io" + +metadata + +cookbook 'nodejs', '~> 2.2.0' + diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..19e399d --- /dev/null +++ b/Gemfile @@ -0,0 +1,18 @@ +source 'https://rubygems.org' + +gem 'berkshelf' + +# Uncomment these lines if you want to live on the Edge: +# +# group :development do +# gem "berkshelf", github: "berkshelf/berkshelf" +# gem "vagrant", github: "mitchellh/vagrant", tag: "v1.6.3" +# end +# +# group :plugins do +# gem "vagrant-berkshelf", github: "berkshelf/vagrant-berkshelf" +# gem "vagrant-omnibus", github: "schisamo/vagrant-omnibus" +# end + +gem "test-kitchen" +gem "kitchen-vagrant" diff --git a/Rakefile b/Rakefile index eab0130..78c2975 100644 --- a/Rakefile +++ b/Rakefile @@ -1 +1,8 @@ require 'emeril/rake' + +begin + require "kitchen/rake_tasks" + Kitchen::RakeTasks.new +rescue LoadError + puts ">>>>> Kitchen gem not loaded, omitting tasks" unless ENV["CI"] +end diff --git a/chefignore b/chefignore new file mode 100644 index 0000000..138a808 --- /dev/null +++ b/chefignore @@ -0,0 +1,94 @@ +# Put files/directories that should be ignored in this file when uploading +# or sharing to the community site. +# Lines that start with '# ' are comments. + +# OS generated files # +###################### +.DS_Store +Icon? +nohup.out +ehthumbs.db +Thumbs.db + +# SASS # +######## +.sass-cache + +# EDITORS # +########### +\#* +.#* +*~ +*.sw[a-z] +*.bak +REVISION +TAGS* +tmtags +*_flymake.* +*_flymake +*.tmproj +.project +.settings +mkmf.log + +## COMPILED ## +############## +a.out +*.o +*.pyc +*.so +*.com +*.class +*.dll +*.exe +*/rdoc/ + +# Testing # +########### +.watchr +.rspec +spec/* +spec/fixtures/* +test/* +features/* +Guardfile +Procfile + +# SCM # +####### +.git +*/.git +.gitignore +.gitmodules +.gitconfig +.gitattributes +.svn +*/.bzr/* +*/.hg/* +*/.svn/* + +# Berkshelf # +############# +cookbooks/* +tmp + +# Cookbooks # +############# +CONTRIBUTING +CHANGELOG* + +# Strainer # +############ +Colanderfile +Strainerfile +.colander +.strainer + +# Vagrant # +########### +.vagrant +Vagrantfile + +# Travis # +########## +.travis.yml diff --git a/metadata.rb b/metadata.rb index 03c26ae..6e8312f 100644 --- a/metadata.rb +++ b/metadata.rb @@ -9,4 +9,5 @@ supports "redhat" supports "centos" -depends "npm" \ No newline at end of file +depends "nodejs" + diff --git a/recipes/default.rb b/recipes/default.rb index df4ba43..76d73cf 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -1 +1,4 @@ -npm_package "forever" \ No newline at end of file +include_recipe "nodejs::default" + +nodejs_npm "forever" +