Skip to content

Commit

Permalink
more work
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueHotDog committed May 19, 2015
1 parent 8d458db commit e3543fa
Show file tree
Hide file tree
Showing 28 changed files with 1,170 additions and 0 deletions.
56 changes: 56 additions & 0 deletions pm2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
metadata.json
*.gem
*.rbc
.bundle
.config
coverage
InstalledFiles
lib/bundler/man
pkg
rdoc
spec/reports
test/tmp
test/version_tmp
tmp

# Compiled Python files
*.pyc

# Folder view configuration files
.DS_Store
Desktop.ini

# Thumbnail cache files
._*
Thumbs.db

# Files that might appear on external disks
.Spotlight-V100
.Trashes


# YARD artifacts
.yardoc
_yardoc
doc/

# Vagrant
Vagrantfile
.vagrant

# Bundler
Gemfile.lock
bin/*
.bundle/*

.kitchen

*~
*#
\#*#
.#*
.*.sw[a-z]
*.un~
/cookbooks
.kitchen/
.kitchen.local.yml
15 changes: 15 additions & 0 deletions pm2/.kitchen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
driver:
name: vagrant

provisioner:
name: chef_solo

platforms:
- name: centos-6.6

suites:
- name: default
run_list:
- recipe[pm2_application::default]
attributes:
3 changes: 3 additions & 0 deletions pm2/.rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--colour
--format progress
--order rand
23 changes: 23 additions & 0 deletions pm2/.rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
AllCops:
Exclude:
- Guardfile
- 'vendor/**/*'
- '.kitchen/**/*'
LineLength:
Max: 120
HashSyntax:
EnforcedStyle: hash_rockets
Exclude:
- Rakefile
- Berksfile
- 'spec/**/*'
- 'test/**/*'
Style/SingleSpaceBeforeFirstArg:
Enabled: false
Style/WordArray:
Exclude:
- Rakefile
Metrics/MethodLength:
Enabled: false
Lint/Eval:
Enabled: false
8 changes: 8 additions & 0 deletions pm2/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
sudo: false
language: ruby
cache: bundler
bundler_args: --without development kitchen_vagrant
rvm:
- 2.1.3
script:
- bundle exec rake travis
5 changes: 5 additions & 0 deletions pm2/Berksfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source 'https://supermarket.getchef.com'

metadata

cookbook 'pm2_application', path: './test/cookbooks/pm2_application'
33 changes: 33 additions & 0 deletions pm2/Berksfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
DEPENDENCIES
pm2
path: .
metadata: true
pm2_application
path: test/cookbooks/pm2_application

GRAPH
7-zip (1.0.2)
windows (>= 1.2.2)
apt (2.7.0)
ark (0.9.0)
7-zip (>= 0.0.0)
windows (>= 0.0.0)
build-essential (2.2.2)
chef_handler (1.1.6)
homebrew (1.12.0)
build-essential (>= 2.1.2)
nodejs (2.4.0)
apt (>= 0.0.0)
ark (>= 0.0.0)
build-essential (>= 0.0.0)
homebrew (>= 0.0.0)
yum-epel (>= 0.0.0)
pm2 (0.2.0)
nodejs (~> 2.4.0)
pm2_application (0.0.0)
pm2 (>= 0.0.0)
windows (1.36.6)
chef_handler (>= 0.0.0)
yum (3.5.4)
yum-epel (0.6.0)
yum (~> 3.0)
27 changes: 27 additions & 0 deletions pm2/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
source 'https://rubygems.org'

group :development do
gem 'rake'
gem 'rb-fsevent'
gem 'guard', '~> 2.12.0'
gem 'guard-rspec'
gem 'guard-rubocop'
end

group :lint do
gem 'foodcritic', '~> 4.0'
gem 'rubocop', '~> 0.29.0'
end

group :unit do
gem 'berkshelf', '~> 3.2.0'
gem 'chefspec', '~> 4.0.0'
end

group :kitchen_common do
gem 'test-kitchen', '~> 1.3.0'
end

group :kitchen_vagrant do
gem 'kitchen-vagrant', '~> 0.16'
end
25 changes: 25 additions & 0 deletions pm2/Guardfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Guardfile

# TODO: commented because the guard-foodcritic plugin has deps issues
# Foodcritic
#guard :foodcritic, :cookbook_paths => '.', :all_on_start => false, :cli => '--epic-fail any' do
# watch(%r{attributes/.+\.rb$})
# watch(%r{providers/.+\.rb$})
# watch(%r{recipes/.+\.rb$})
# watch(%r{resources/.+\.rb$})
# watch(%r{libraries/.+\.rb$})
# watch('metadata.rb')
#end

# ChefSpec
guard :rspec, cmd: 'bundle exec rspec', all_on_start: true do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^(recipes)/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { 'spec' }
end

# RuboCop
guard :rubocop do
watch(%r{.+\.rb$})
watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
end
21 changes: 21 additions & 0 deletions pm2/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2015 Mindera - Software Craft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit e3543fa

Please sign in to comment.