Skip to content
Browse files

get build passing, better dev setup

  • Loading branch information...
1 parent 6461fb8 commit 27de7ab67674bc9d549ae2da17512d83fe224e70 @rsanheim committed Oct 22, 2011
Showing with 35 additions and 1 deletion.
  1. +8 −0 Gemfile.lock
  2. +21 −0 Guardfile
  3. +1 −1 lib/nachos/config.rb
  4. +3 −0 nachos.gemspec
  5. +2 −0 spec/nachos/cli_spec.rb
View
8 Gemfile.lock
@@ -15,6 +15,10 @@ GEM
i18n (~> 0.4)
fakeweb (1.3.0)
git-hub (1.4.1)
+ guard (0.8.8)
+ thor (~> 0.14.6)
+ guard-rspec (0.5.0)
+ guard (>= 0.8.4)
hashie (0.4.0)
httparty (0.6.1)
crack (= 0.1.8)
@@ -25,6 +29,7 @@ GEM
hashie (~> 0.4.0)
httparty (~> 0.6.1)
rake (0.8.7)
+ rb-fsevent (0.4.3.1)
rspec (2.5.0)
rspec-core (~> 2.5.0)
rspec-expectations (~> 2.5.0)
@@ -41,8 +46,11 @@ PLATFORMS
DEPENDENCIES
faker
fakeweb
+ guard
+ guard-rspec
log_buddy
mocha
nachos!
rake
+ rb-fsevent
rspec (~> 2.4)
View
21 Guardfile
@@ -0,0 +1,21 @@
+# A sample Guardfile
+# More info at https://github.com/guard/guard#readme
+
+guard 'rspec', :version => 2 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{^spec/.+_spec\.rb$})
+ watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_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('spec/spec_helper.rb') { "spec" }
+ watch('config/routes.rb') { "spec/routing" }
+ watch('app/controllers/application_controller.rb') { "spec/controllers" }
+ # Capybara request specs
+ watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
+end
+
View
2 lib/nachos/config.rb
@@ -10,7 +10,7 @@ def config
end
def display_config
- config_exists? ? load_config : "No config found - run nachos config to create one"
+ config_exists? ? load_config : "No config found - run nachos init to create one"
end
def config_exists?
View
3 nachos.gemspec
@@ -25,6 +25,9 @@ Gem::Specification.new do |s|
s.add_development_dependency "fakeweb"
s.add_development_dependency "log_buddy"
s.add_development_dependency "rake"
+ s.add_development_dependency "guard"
+ s.add_development_dependency "guard-rspec"
+ s.add_development_dependency "rb-fsevent" if RUBY_PLATFORM =~ /darwin/
s.add_runtime_dependency "octopussy"
s.add_runtime_dependency "thor"
View
2 spec/nachos/cli_spec.rb
@@ -3,6 +3,8 @@
describe Nachos::CLI do
it "works" do
Nachos::Main.any_instance.stubs(:github_user).returns("johndoe")
+ Nachos::Main.any_instance.stubs(:github_token).returns("xxxx")
+
watched_repos = []
names = %w[zaphod matt aaron]
3.to_i.times do |i|

0 comments on commit 27de7ab

Please sign in to comment.
Something went wrong with that request. Please try again.