-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
36 additions
and
18 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 |
---|---|---|
@@ -1,17 +1,18 @@ | ||
source 'https://rubygems.org' | ||
# -*- encoding: utf-8 -*- | ||
source "https://rubygems.org" | ||
|
||
gemspec | ||
|
||
group :guard do | ||
gem 'guard-minitest' | ||
gem 'guard-rubocop' | ||
gem 'guard-cane' | ||
gem 'guard-yard' | ||
gem "guard-minitest" | ||
gem "guard-rubocop" | ||
gem "guard-cane" | ||
gem "guard-yard" | ||
end | ||
|
||
group :test do | ||
# allow CI to override the version of Chef for matrix testing | ||
gem 'chef', (ENV['CHEF_VERSION'] || '>= 0.10.10') | ||
gem "chef", (ENV["CHEF_VERSION"] || ">= 0.10.10") | ||
|
||
gem 'codeclimate-test-reporter', require: nil | ||
gem "codeclimate-test-reporter", :require => nil | ||
end |
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,23 +1,40 @@ | ||
# -*- encoding: utf-8 -*- | ||
ignore %r{^\.gem/} | ||
|
||
group :red_green_refactor, halt_on_fail: true do | ||
guard :minitest do | ||
watch(%r|^spec/(.*)_spec\.rb|) | ||
watch(%r|^lib/(.*)([^/]+)\.rb|) { |m| "spec/unit/#{m[1]}#{m[2]}_spec.rb" } | ||
watch(%r|^spec/spec_helper\.rb|) { "spec" } | ||
def minitest_opts | ||
{} | ||
end | ||
|
||
def cane_opts | ||
{} | ||
end | ||
|
||
def rubocop_opts | ||
{ :all_on_start => false, :keep_failed => false, :cli => "-r finstyle -D" } | ||
end | ||
|
||
def yard_opts | ||
{ :port => 8808 } | ||
end | ||
|
||
group :red_green_refactor, :halt_on_fail => true do | ||
guard :minitest, minitest_opts do | ||
watch(%r{^spec/(.*)_spec\.rb}) | ||
watch(%r{^lib/(.*)([^/]+)\.rb}) { |m| "spec/unit/#{m[1]}#{m[2]}_spec.rb" } | ||
watch(%r{^spec/spec_helper\.rb}) { "spec" } | ||
end | ||
|
||
guard :cane do | ||
watch(%r|.*\.rb|) | ||
watch('.cane') | ||
guard :cane, cane_opts do | ||
watch(%r{.*\.rb}) | ||
watch(".cane") | ||
end | ||
|
||
guard :rubocop, all_on_start: false, keep_failed: false, cli: "-r finstyle" do | ||
guard :rubocop, rubocop_opts do | ||
watch(%r{.+\.rb$}) | ||
watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) } | ||
end | ||
end | ||
|
||
guard :yard, port: "8808" do | ||
guard :yard, yard_opts do | ||
watch(%r{lib/.+\.rb}) | ||
end |
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