diff --git a/.rspec b/.rspec index 89b89ff..9356066 100644 --- a/.rspec +++ b/.rspec @@ -1,2 +1,3 @@ +--drb --colour ---format=d \ No newline at end of file +--format=d diff --git a/Gemfile b/Gemfile index d643000..692d717 100644 --- a/Gemfile +++ b/Gemfile @@ -41,6 +41,11 @@ group :test, :development do gem "rspec-rails", "~> 2.0" gem 'capybara' gem 'launchy' + gem 'guard', '0.10.0' + gem 'guard-rspec' + gem 'guard-spork' + gem 'libnotify' + gem 'rb-inotify' end gem 'pry-rails' gem 'factory_girl_rails' diff --git a/Gemfile.lock b/Gemfile.lock index 0f24858..9a3c56c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -58,6 +58,14 @@ GEM factory_girl (~> 3.3.0) railties (>= 3.0.0) ffi (1.0.11) + guard (0.10.0) + ffi (>= 0.5.0) + thor (~> 0.14.6) + guard-rspec (0.7.3) + guard (>= 0.10.0) + guard-spork (0.8.0) + guard (>= 0.10.0) + spork (>= 0.8.4) hike (1.2.1) i18n (0.6.0) journey (1.0.3) @@ -67,6 +75,8 @@ GEM json (1.7.3) launchy (2.1.0) addressable (~> 2.2.6) + libnotify (0.7.2) + ffi (~> 1.0.0) libwebsocket (0.1.3) addressable mail (2.4.4) @@ -107,6 +117,8 @@ GEM rdoc (~> 3.4) thor (~> 0.14.6) rake (0.9.2.2) + rb-inotify (0.8.8) + ffi (>= 0.5.0) rdoc (3.12) json (~> 1.4) rspec (2.10.0) @@ -135,6 +147,7 @@ GEM multi_json (~> 1.0) rubyzip slop (2.4.4) + spork (0.9.2) sprockets (2.1.3) hike (~> 1.2) rack (~> 1.0) @@ -159,10 +172,15 @@ DEPENDENCIES capybara coffee-rails (~> 3.2.1) factory_girl_rails + guard (= 0.10.0) + guard-rspec + guard-spork jquery-rails launchy + libnotify pry-rails rails (= 3.2.3) + rb-inotify rspec-rails (~> 2.0) sass-rails (~> 3.2.3) sqlite3 diff --git a/Guardfile b/Guardfile new file mode 100644 index 0000000..e5a04fc --- /dev/null +++ b/Guardfile @@ -0,0 +1,31 @@ +# A sample Guardfile +# More info at https://github.com/guard/guard#readme + +guard 'spork', :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' } do + watch('config/application.rb') + watch('config/environment.rb') + watch(%r{^config/environments/.+\.rb$}) + watch(%r{^config/initializers/.+\.rb$}) + watch('Gemfile') + watch('Gemfile.lock') + watch('spec/spec_helper.rb') { :rspec } + watch('test/test_helper.rb') { :test_unit } + watch(%r{features/support/}) { :cucumber } +end + +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{^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 request specs + watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" } +end + diff --git a/app/assets/javascripts/books.js.coffee b/app/assets/javascripts/books.js.coffee index 7615679..a56ff9c 100644 --- a/app/assets/javascripts/books.js.coffee +++ b/app/assets/javascripts/books.js.coffee @@ -1,3 +1,14 @@ # Place all the behaviors and hooks related to the matching controller here. # All this logic will automatically be available in application.js. # You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ + +count = 0 +$("#add-memo").on("click", () -> + $('#memo').append($('
').addClass('field')).append($('