Permalink
Browse files

Updated to use Ruby 2.0 in development and added Guard and Pry to dev…

…elopment

Moved development dependencies out of the gemspec and into the Gemfile
  • Loading branch information...
1 parent 4ea9d33 commit 485d69ccd2cb41c9c3d854f0ee2570eeeb5358e3 Evan Light committed Mar 14, 2013
Showing with 61 additions and 7 deletions.
  1. +1 −0 .rvmrc
  2. +14 −0 Gemfile
  3. +46 −0 Guardfile
  4. +0 −7 edr.gemspec
View
1 .rvmrc
@@ -0,0 +1 @@
+rvm use ruby-2.0.0-p0@edr --create
View
14 Gemfile
@@ -2,3 +2,17 @@ source 'https://rubygems.org'
# Specify your gem's dependencies in edr.gemspec
gemspec
+
+gem "rspec"
+gem "rake"
+gem "activerecord", "~> 3.2.8"
+gem "sqlite3", "1.3.6"
+gem "database_cleaner", "~> 0.9.1"
+gem "orm_adapter", "~> 0.4.0"
+gem "pry"
+
+group :guard do
+ gem "guard-rspec", "2.5.1"
+ gem "rb-fsevent", "~> 0.9.3", :require => false
+ gem "terminal-notifier-guard", :require => false
+end
View
@@ -0,0 +1,46 @@
+# A sample Guardfile
+# More info at https://github.com/guard/guard#readme
+
+guard 'rspec' do
+ watch(%r{^spec/.+_spec\.rb$})
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
+ watch('spec/spec_helper.rb') { "spec" }
+
+ # Rails example
+ watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
+ watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
+ watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
+ watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
+ watch('config/routes.rb') { "spec/routing" }
+ watch('app/controllers/application_controller.rb') { "spec/controllers" }
+
+ # Capybara features specs
+ watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/features/#{m[1]}_spec.rb" }
+
+ # Turnip features and steps
+ watch(%r{^spec/acceptance/(.+)\.feature$})
+ watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
+end
+
+
+guard 'rspec' do
+ watch(%r{^spec/.+_spec\.rb$})
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
+ watch('spec/spec_helper.rb') { "spec" }
+
+ # Rails example
+ watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
+ watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
+ watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
+ watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
+ watch('config/routes.rb') { "spec/routing" }
+ watch('app/controllers/application_controller.rb') { "spec/controllers" }
+
+ # Capybara features specs
+ watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/features/#{m[1]}_spec.rb" }
+
+ # Turnip features and steps
+ watch(%r{^spec/acceptance/(.+)\.feature$})
+ watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
+end
+
View
@@ -16,11 +16,4 @@ Gem::Specification.new do |gem|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.require_paths = ["lib"]
-
- gem.add_development_dependency "rspec"
- gem.add_development_dependency "rake"
- gem.add_development_dependency "activerecord", "~> 3.2.8"
- gem.add_development_dependency "sqlite3", "1.3.6"
- gem.add_development_dependency "database_cleaner", "~> 0.9.1"
- gem.add_dependency "orm_adapter", "~> 0.4.0"
end

0 comments on commit 485d69c

Please sign in to comment.