Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add livereload gem

upgrade selenium-webdriver.
  • Loading branch information...
commit 785e63ce6e04b0d558a29ff157eebf0ad04a7e76 1 parent 48a1714
@saberma authored
View
4 Gemfile
@@ -68,6 +68,7 @@ group :development do
gem 'rails-dev-boost', git: 'git://github.com/thedarkone/rails-dev-boost.git', require: 'rails_development_boost' # 加快开发时的响应速度
gem 'rvm-capistrano', "~> 1.1.0", require: 'capistrano'
gem "letter_opener"
+ gem 'guard-livereload'
end
group :development, :test do
@@ -84,7 +85,8 @@ group :test do
# 2.19以前的版本存在问题 # http://bit.ly/Hp3Aru
# Selenium::WebDriver::Error::MoveTargetOutOfBoundsError:
# Element cannot be scrolled into view:[object HTMLInputElement]
- gem "selenium-webdriver", "~> 2.20.0" # 支持travis-ci的firefox11.0版本
+ #gem "selenium-webdriver", "~> 2.20.0" # 支持travis-ci的firefox11.0版本
+ gem "selenium-webdriver", "~> 2.24.0" # 支持travis-ci的firefox13.0版本
gem "rspec-rails"
gem 'capybara' , ' ~> 1.1.2'
gem 'resque_spec' # resque测试
View
21 Gemfile.lock
@@ -159,8 +159,12 @@ GEM
railties (~> 3.1)
dragonfly (0.9.8)
rack
+ em-websocket (0.3.6)
+ addressable (>= 2.1.1)
+ eventmachine (>= 0.12.9)
erubis (2.7.0)
escape (0.0.4)
+ eventmachine (0.12.10)
execjs (1.2.9)
multi_json (~> 1.0)
factory_girl (2.1.2)
@@ -178,6 +182,13 @@ GEM
i18n (~> 0.4)
fssm (0.2.9)
github-markup (0.7.0)
+ guard (1.2.1)
+ listen (>= 0.4.2)
+ thor (>= 0.14.6)
+ guard-livereload (1.0.0)
+ em-websocket (>= 0.2.0)
+ guard (>= 1.1.0)
+ multi_json (~> 1.0)
haml (3.2.0.alpha.14)
tilt
haml-rails (0.3.4)
@@ -207,6 +218,10 @@ GEM
launchy
libv8 (3.3.10.2)
liquid (2.3.0)
+ listen (0.4.6)
+ rb-fchange (~> 0.0.5)
+ rb-fsevent (~> 0.9.1)
+ rb-inotify (~> 0.8.8)
macaddr (1.5.0)
systemu (>= 2.4.0)
mail (2.3.3)
@@ -282,6 +297,11 @@ GEM
thor (~> 0.14.6)
raindrops (0.7.0)
rake (0.9.2.2)
+ rb-fchange (0.0.5)
+ ffi
+ rb-fsevent (0.9.1)
+ rb-inotify (0.8.8)
+ ffi (>= 0.5.0)
rdoc (3.12)
json (~> 1.4)
redcarpet (2.0.1)
@@ -409,6 +429,7 @@ DEPENDENCIES
factory_girl_rails
gollum!
grit!
+ guard-livereload
haml (~> 3.2.0.alpha.14)
haml-rails
httparty
View
59 Guardfile
@@ -1,37 +1,38 @@
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
+#guard 'spork', :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' }, :wait => 45 do
+# watch('config/application.rb')
+# watch('config/environment.rb')
+# watch(%r{^config/environments/.+\.rb$})
+# watch(%r{^config/initializers/.+\.rb$})
+# watch('spec/spec_helper.rb')
+# watch(%r{^app/controllers/.+\.rb})
+# watch(%r{^app/models/.+\.rb})
+# watch(%r{^app/liquids/.+\.rb})
+# watch(%r{^app/observers/.+\.rb})
+#end
+
+#guard 'rspec', :cli => "--fail-fast --drb --tag f" do #只跑tag为f的测试,这样就不会造成改一个单元测试的地方,要跑整个file的测试
+# 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('spec/spec_helper.rb') { "spec" }
+# watch('config/routes.rb')
+# watch('app/controllers/application_controller.rb') { "spec/controllers" }
+# 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/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
+#end
+
guard 'livereload' do
- watch(%r{app/.+\.(erb|haml)})
+ watch(%r{app/views/.+\.(erb|haml|slim)})
watch(%r{app/helpers/.+\.rb})
watch(%r{public/.+\.(css|js|html)})
watch(%r{config/locales/.+\.yml})
+ # Rails Assets Pipeline
+ watch(%r{(app|vendor)/assets/\w+/(.+\.(css|js|html)).*}) { |m| "/assets/#{m[2]}" }
end
-
-guard 'spork', :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' }, :wait => 45 do
- watch('config/application.rb')
- watch('config/environment.rb')
- watch(%r{^config/environments/.+\.rb$})
- watch(%r{^config/initializers/.+\.rb$})
- watch('spec/spec_helper.rb')
- watch(%r{^app/controllers/.+\.rb})
- watch(%r{^app/models/.+\.rb})
- watch(%r{^app/liquids/.+\.rb})
- watch(%r{^app/observers/.+\.rb})
-end
-
-guard 'rspec', :cli => "--fail-fast --drb --tag f" do #只跑tag为f的测试,这样就不会造成改一个单元测试的地方,要跑整个file的测试
- 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('spec/spec_helper.rb') { "spec" }
- watch('config/routes.rb')
- watch('app/controllers/application_controller.rb') { "spec/controllers" }
- 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/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
-end
-
View
3  spec/models/kindeditor_spec.rb
@@ -13,8 +13,9 @@
end
it "should get url" do
+ ActionController::Base.asset_host = "//lvh.me"
photo.save
- photo.url.should eql "http:#{asset_host}#{photo.kindeditor_image.url}"
+ photo.url.should eql "//lvh.me#{photo.kindeditor_image.url}"
end
context 'shop storage is not idle' do # 容量已经用完
Please sign in to comment.
Something went wrong with that request. Please try again.