Skip to content

Commit

Permalink
Upgrade Poltergeist version and adds a user agent
Browse files Browse the repository at this point in the history
  • Loading branch information
Almog Kurtser committed Dec 3, 2013
1 parent 74c6113 commit 72e8050
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ gem 'haml'
gem 'addressable', require: 'addressable/uri'
gem 'builder'
gem 'capybara'
gem 'poltergeist', require: 'capybara/poltergeist'
gem 'poltergeist', "1.4.1", require: 'capybara/poltergeist'
gem 'thin'
gem 'sinatra-contrib'
15 changes: 8 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ GEM
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
cliver (0.2.2)
coderay (1.0.9)
columnize (0.3.6)
daemons (1.1.9)
Expand All @@ -20,21 +21,20 @@ GEM
debugger-linecache (1.2.0)
debugger-ruby_core_source (1.2.3)
eventmachine (1.0.3)
faye-websocket (0.4.7)
eventmachine (>= 0.12.0)
haml (4.0.3)
tilt
http_parser.rb (0.5.3)
logger (1.2.8)
method_source (0.8.1)
mime-types (1.23)
mini_portile (0.5.1)
multi_json (1.8.2)
nokogiri (1.6.0)
mini_portile (~> 0.5.0)
poltergeist (1.3.0)
poltergeist (1.4.1)
capybara (~> 2.1.0)
faye-websocket (>= 0.4.4, < 0.5.0)
http_parser.rb (~> 0.5.3)
cliver (~> 0.2.1)
multi_json (~> 1.0)
websocket-driver (>= 0.2.0)
pry (0.9.12.2)
coderay (~> 1.0.5)
method_source (~> 0.8)
Expand Down Expand Up @@ -64,6 +64,7 @@ GEM
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
tilt (1.4.1)
websocket-driver (0.3.1)
xpath (2.0.0)
nokogiri (~> 1.3)

Expand All @@ -76,7 +77,7 @@ DEPENDENCIES
capybara
haml
logger
poltergeist
poltergeist (= 1.4.1)
pry
pry-debugger
sinatra
Expand Down
4 changes: 3 additions & 1 deletion apartment_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Capybara.register_driver :poltergeist do |app|
options = {
phantomjs_options: ["--disk-cache=true", "--load-images=false"],
phantomjs_options: ["--disk-cache=true", "--load-images=false"],#, "--ignore-host='(google.com|google-analytics.com)'"],
js_errors: false
}

Expand All @@ -19,6 +19,8 @@
Capybara.configure do |config|
config.ignore_hidden_elements = true
config.visible_text_only = true
config.page.driver.add_headers( "User-Agent" =>
"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1" )
end

configure :development do
Expand Down

0 comments on commit 72e8050

Please sign in to comment.