forked from atomic-penguin/cookbook-gitlab-deprecated
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Missing bracket * Change single-quote variable to symbol notation * install python and symlink redis-cli so hooks work * HTTPS options for nginx * Ubuntu/Debian platform compatibility fixes * [FC035](http://acrmp.github.com/foodcritic/#FC035): Template uses node attribute directly Signed-off-by: Eric G. Wolfe <[email protected]>
- Loading branch information
Eric G. Wolfe
committed
Aug 26, 2012
1 parent
1afbc93
commit f942512
Showing
17 changed files
with
106 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
metadata.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,19 @@ | ||
#!/usr/bin/env rake | ||
require 'rake/testtask' | ||
|
||
Rake::TestTask.new do |t| | ||
t.libs.push "lib" | ||
t.test_files = FileList['test/**/*_spec.rb'] | ||
t.verbose = true | ||
end | ||
|
||
desc "Runs foodcritic linter" | ||
task :foodcritic do | ||
if Gem::Version.new("1.9.2") <= Gem::Version.new(RUBY_VERSION.dup) | ||
sandbox = File.join(File.dirname(__FILE__), %w{tmp foodcritic cookbook}) | ||
prepare_foodcritic_sandbox(sandbox) | ||
|
||
sh "foodcritic --epic-fail any #{File.dirname(sandbox)}" | ||
sh "foodcritic --epic-fail any ." | ||
else | ||
puts "WARN: foodcritic run is skipped as Ruby #{RUBY_VERSION} is < 1.9.2." | ||
end | ||
end | ||
|
||
task :default => 'foodcritic' | ||
|
||
private | ||
|
||
def prepare_foodcritic_sandbox(sandbox) | ||
files = %w{*.md *.rb attributes definitions files providers | ||
recipes resources templates} | ||
|
||
rm_rf sandbox | ||
mkdir_p sandbox | ||
cp_r Dir.glob("{#{files.join(',')}}"), sandbox | ||
puts "\n\n" | ||
end | ||
task :default => [ 'test', 'foodcritic' ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Put files/directories that should be ignored in this file. | ||
# Lines that start with '# ' are comments. | ||
|
||
# gitignore | ||
\.gitignore | ||
|
||
# emacs | ||
*~ | ||
|
||
# vim | ||
*.sw[a-z] | ||
|
||
# subversion | ||
*/.svn/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/bin/bash | ||
# Generated by Chef for <%= node["fqdn"] %> | ||
# Generated by Chef for <%= @fqdn %> | ||
# Local modifications will be overwritten. | ||
RUBY_DIR="/usr/local/ruby/<%= node['gitlab']['install_ruby'] %>" | ||
RUBY_DIR="/usr/local/ruby/<%= @install_ruby %>" | ||
if ! echo ${PATH} | /bin/grep -q $RUBY_DIR/bin ; then | ||
PATH=$RUBY_DIR/bin:${PATH} | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<%= node['gitlab']['public_key'] %> | ||
<%= @public_key %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Generated by Chef for <%= node['fqdn'] %> | ||
# Generated by Chef for <%= @fqdn %> | ||
# Local modifications will be overwritten. | ||
NoHostAuthenticationForLocalhost <%= node['gitlab']['trust_local_sshkeys'] -%> | ||
NoHostAuthenticationForLocalhost <%= @trust_local_sshkeys -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
source "https://rubygems.org" | ||
|
||
gem 'rake' | ||
gem 'foodcritic', :platforms => :ruby_19 | ||
gem 'foodcritic' |