Skip to content
This repository
Browse code

add livereload gem

upgrade selenium-webdriver.
  • Loading branch information...
commit 785e63ce6e04b0d558a29ff157eebf0ad04a7e76 1 parent 48a1714
authored June 26, 2012
4  Gemfile
@@ -68,6 +68,7 @@ group :development do
68 68
   gem 'rails-dev-boost', git: 'git://github.com/thedarkone/rails-dev-boost.git', require: 'rails_development_boost' # 加快开发时的响应速度
69 69
   gem 'rvm-capistrano', "~> 1.1.0", require: 'capistrano'
70 70
   gem "letter_opener"
  71
+  gem 'guard-livereload'
71 72
 end
72 73
 
73 74
 group :development, :test do
@@ -84,7 +85,8 @@ group :test do
84 85
   # 2.19以前的版本存在问题 # http://bit.ly/Hp3Aru
85 86
   # Selenium::WebDriver::Error::MoveTargetOutOfBoundsError:
86 87
   #        Element cannot be scrolled into view:[object HTMLInputElement]
87  
-  gem "selenium-webdriver", "~> 2.20.0" # 支持travis-ci的firefox11.0版本
  88
+  #gem "selenium-webdriver", "~> 2.20.0" # 支持travis-ci的firefox11.0版本
  89
+  gem "selenium-webdriver", "~> 2.24.0" # 支持travis-ci的firefox13.0版本
88 90
   gem "rspec-rails"
89 91
   gem 'capybara' , ' ~> 1.1.2'
90 92
   gem 'resque_spec' # resque测试
21  Gemfile.lock
@@ -159,8 +159,12 @@ GEM
159 159
       railties (~> 3.1)
160 160
     dragonfly (0.9.8)
161 161
       rack
  162
+    em-websocket (0.3.6)
  163
+      addressable (>= 2.1.1)
  164
+      eventmachine (>= 0.12.9)
162 165
     erubis (2.7.0)
163 166
     escape (0.0.4)
  167
+    eventmachine (0.12.10)
164 168
     execjs (1.2.9)
165 169
       multi_json (~> 1.0)
166 170
     factory_girl (2.1.2)
@@ -178,6 +182,13 @@ GEM
178 182
       i18n (~> 0.4)
179 183
     fssm (0.2.9)
180 184
     github-markup (0.7.0)
  185
+    guard (1.2.1)
  186
+      listen (>= 0.4.2)
  187
+      thor (>= 0.14.6)
  188
+    guard-livereload (1.0.0)
  189
+      em-websocket (>= 0.2.0)
  190
+      guard (>= 1.1.0)
  191
+      multi_json (~> 1.0)
181 192
     haml (3.2.0.alpha.14)
182 193
       tilt
183 194
     haml-rails (0.3.4)
@@ -207,6 +218,10 @@ GEM
207 218
       launchy
208 219
     libv8 (3.3.10.2)
209 220
     liquid (2.3.0)
  221
+    listen (0.4.6)
  222
+      rb-fchange (~> 0.0.5)
  223
+      rb-fsevent (~> 0.9.1)
  224
+      rb-inotify (~> 0.8.8)
210 225
     macaddr (1.5.0)
211 226
       systemu (>= 2.4.0)
212 227
     mail (2.3.3)
@@ -282,6 +297,11 @@ GEM
282 297
       thor (~> 0.14.6)
283 298
     raindrops (0.7.0)
284 299
     rake (0.9.2.2)
  300
+    rb-fchange (0.0.5)
  301
+      ffi
  302
+    rb-fsevent (0.9.1)
  303
+    rb-inotify (0.8.8)
  304
+      ffi (>= 0.5.0)
285 305
     rdoc (3.12)
286 306
       json (~> 1.4)
287 307
     redcarpet (2.0.1)
@@ -409,6 +429,7 @@ DEPENDENCIES
409 429
   factory_girl_rails
410 430
   gollum!
411 431
   grit!
  432
+  guard-livereload
412 433
   haml (~> 3.2.0.alpha.14)
413 434
   haml-rails
414 435
   httparty
59  Guardfile
... ...
@@ -1,37 +1,38 @@
1 1
 # A sample Guardfile
2 2
 # More info at https://github.com/guard/guard#readme
3 3
 
  4
+#guard 'spork', :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' }, :wait => 45 do
  5
+#  watch('config/application.rb')
  6
+#  watch('config/environment.rb')
  7
+#  watch(%r{^config/environments/.+\.rb$})
  8
+#  watch(%r{^config/initializers/.+\.rb$})
  9
+#  watch('spec/spec_helper.rb')
  10
+#  watch(%r{^app/controllers/.+\.rb})
  11
+#  watch(%r{^app/models/.+\.rb})
  12
+#  watch(%r{^app/liquids/.+\.rb})
  13
+#  watch(%r{^app/observers/.+\.rb})
  14
+#end
  15
+
  16
+#guard 'rspec', :cli => "--fail-fast --drb --tag f" do #只跑tag为f的测试,这样就不会造成改一个单元测试的地方,要跑整个file的测试
  17
+#  watch(%r{^spec/.+_spec\.rb})
  18
+#  watch(%r{^lib/(.+)\.rb})     { |m| "spec/lib/#{m[1]}_spec.rb" }
  19
+#  watch('spec/spec_helper.rb') { "spec" }
  20
+#
  21
+#  # Rails example
  22
+#  watch('spec/spec_helper.rb')                       { "spec" }
  23
+#  watch('config/routes.rb')
  24
+#  watch('app/controllers/application_controller.rb') { "spec/controllers" }
  25
+#  watch(%r{^spec/.+_spec\.rb})
  26
+#  watch(%r{^app/(.+)\.rb})                           { |m| "spec/#{m[1]}_spec.rb" }
  27
+#  watch(%r{^lib/(.+)\.rb})                           { |m| "spec/lib/#{m[1]}_spec.rb" }
  28
+#  watch(%r{^app/controllers/(.+)_(controller)\.rb})  { |m| ["spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
  29
+#end
  30
+
4 31
 guard 'livereload' do
5  
-  watch(%r{app/.+\.(erb|haml)})
  32
+  watch(%r{app/views/.+\.(erb|haml|slim)})
6 33
   watch(%r{app/helpers/.+\.rb})
7 34
   watch(%r{public/.+\.(css|js|html)})
8 35
   watch(%r{config/locales/.+\.yml})
  36
+  # Rails Assets Pipeline
  37
+  watch(%r{(app|vendor)/assets/\w+/(.+\.(css|js|html)).*})  { |m| "/assets/#{m[2]}" }
9 38
 end
10  
-
11  
-guard 'spork', :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' }, :wait => 45 do
12  
-  watch('config/application.rb')
13  
-  watch('config/environment.rb')
14  
-  watch(%r{^config/environments/.+\.rb$})
15  
-  watch(%r{^config/initializers/.+\.rb$})
16  
-  watch('spec/spec_helper.rb')
17  
-  watch(%r{^app/controllers/.+\.rb})
18  
-  watch(%r{^app/models/.+\.rb})
19  
-  watch(%r{^app/liquids/.+\.rb})
20  
-  watch(%r{^app/observers/.+\.rb})
21  
-end
22  
-
23  
-guard 'rspec', :cli => "--fail-fast --drb --tag f" do #只跑tag为f的测试,这样就不会造成改一个单元测试的地方,要跑整个file的测试
24  
-  watch(%r{^spec/.+_spec\.rb})
25  
-  watch(%r{^lib/(.+)\.rb})     { |m| "spec/lib/#{m[1]}_spec.rb" }
26  
-  watch('spec/spec_helper.rb') { "spec" }
27  
-
28  
-  # Rails example
29  
-  watch('spec/spec_helper.rb')                       { "spec" }
30  
-  watch('config/routes.rb')
31  
-  watch('app/controllers/application_controller.rb') { "spec/controllers" }
32  
-  watch(%r{^spec/.+_spec\.rb})
33  
-  watch(%r{^app/(.+)\.rb})                           { |m| "spec/#{m[1]}_spec.rb" }
34  
-  watch(%r{^lib/(.+)\.rb})                           { |m| "spec/lib/#{m[1]}_spec.rb" }
35  
-  watch(%r{^app/controllers/(.+)_(controller)\.rb})  { |m| ["spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
36  
-end
37  
-
3  spec/models/kindeditor_spec.rb
@@ -13,8 +13,9 @@
13 13
     end
14 14
 
15 15
     it "should get url" do
  16
+      ActionController::Base.asset_host = "//lvh.me"
16 17
       photo.save
17  
-      photo.url.should eql "http:#{asset_host}#{photo.kindeditor_image.url}"
  18
+      photo.url.should eql "//lvh.me#{photo.kindeditor_image.url}"
18 19
     end
19 20
 
20 21
     context 'shop storage is not idle' do # 容量已经用完

0 notes on commit 785e63c

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