Added poltergeist and a small JS fix.
This commit is contained in:
parent
817ee8b0e5
commit
4c5d6c92d0
3
Gemfile
3
Gemfile
@ -36,6 +36,7 @@ group :test do
|
||||
# gem 'growl-glue'
|
||||
|
||||
gem 'cucumber-rails', :require => false
|
||||
gem 'poltergeist'
|
||||
gem 'rspec-rails', '~> 2.8.0'
|
||||
gem 'shoulda-matchers'
|
||||
|
||||
@ -50,4 +51,4 @@ group :test do
|
||||
gem 'json_spec'
|
||||
|
||||
gem 'database_cleaner'
|
||||
end
|
||||
end
|
||||
|
11
Gemfile.lock
11
Gemfile.lock
@ -147,6 +147,7 @@ GEM
|
||||
rack
|
||||
ejs (1.0.0)
|
||||
erubis (2.7.0)
|
||||
eventmachine (0.12.10)
|
||||
excon (0.13.4)
|
||||
execjs (1.4.0)
|
||||
multi_json (~> 1.0)
|
||||
@ -155,6 +156,8 @@ GEM
|
||||
factory_girl_rails (1.6.0)
|
||||
factory_girl (~> 2.5.0)
|
||||
railties (>= 3.0.0)
|
||||
faye-websocket (0.4.5)
|
||||
eventmachine (>= 0.12.0)
|
||||
ffi (1.0.11)
|
||||
flash_cookie_session (1.1.3)
|
||||
rails (~> 3.0)
|
||||
@ -177,6 +180,7 @@ GEM
|
||||
haml (3.1.6)
|
||||
highline (1.6.12)
|
||||
hike (1.2.1)
|
||||
http_parser.rb (0.5.3)
|
||||
httparty (0.8.3)
|
||||
multi_json (~> 1.0)
|
||||
multi_xml
|
||||
@ -230,6 +234,12 @@ GEM
|
||||
pickle (0.4.10)
|
||||
cucumber (>= 0.8)
|
||||
rake
|
||||
poltergeist (0.6.0)
|
||||
capybara (~> 1.0)
|
||||
childprocess (~> 0.3)
|
||||
faye-websocket (~> 0.4, >= 0.4.4)
|
||||
http_parser.rb (~> 0.5.3)
|
||||
multi_json (~> 1.0)
|
||||
polyglot (0.3.3)
|
||||
rack (1.4.1)
|
||||
rack-cache (1.2)
|
||||
@ -336,6 +346,7 @@ DEPENDENCIES
|
||||
locomotive_cms!
|
||||
mocha (= 0.9.12)
|
||||
pickle
|
||||
poltergeist
|
||||
rspec-cells
|
||||
rspec-rails (~> 2.8.0)
|
||||
sass-rails (~> 3.2.4)
|
||||
|
@ -57,15 +57,16 @@ class Locomotive.Views.CurrentSite.EditView extends Locomotive.Views.Shared.Form
|
||||
@$('#site_memberships_input').append(@memberships_view.render().el)
|
||||
|
||||
enable_liquid_editing: ->
|
||||
input = @$('#site_robots_txt')
|
||||
@editor = CodeMirror.fromTextArea input.get()[0],
|
||||
mode: 'liquid'
|
||||
autoMatchParens: false
|
||||
lineNumbers: false
|
||||
passDelay: 50
|
||||
tabMode: 'shift'
|
||||
theme: 'default'
|
||||
onChange: (editor) => @model.set(robots_txt: editor.getValue())
|
||||
if($('#site_robots_txt').length)
|
||||
input = @$('#site_robots_txt')
|
||||
@editor = CodeMirror.fromTextArea input.get()[0],
|
||||
mode: 'liquid'
|
||||
autoMatchParens: false
|
||||
lineNumbers: false
|
||||
passDelay: 50
|
||||
tabMode: 'shift'
|
||||
theme: 'default'
|
||||
onChange: (editor) => @model.set(robots_txt: editor.getValue())
|
||||
|
||||
save: (event) ->
|
||||
if @model.includes_domain(window.location.host)
|
||||
|
@ -18,6 +18,7 @@ require 'capybara'
|
||||
require 'capybara/rails'
|
||||
require 'capybara/cucumber'
|
||||
require 'capybara/session'
|
||||
require 'capybara/poltergeist'
|
||||
|
||||
require 'json_spec/cucumber'
|
||||
|
||||
@ -44,7 +45,7 @@ end
|
||||
|
||||
Capybara.default_wait_time = 5
|
||||
|
||||
# Capybara.javascript_driver = :rack_test
|
||||
Capybara.javascript_driver = :poltergeist
|
||||
|
||||
# Stop endless errors like
|
||||
# ~/.rvm/gems/ruby-1.9.2-p0@global/gems/rack-1.2.1/lib/rack/utils.rb:16:
|
||||
|
Loading…
Reference in New Issue
Block a user