Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

trying to get headless working on travis ci

  • Loading branch information...
commit dff468c92d34894c0ef1670498ab5cb50e915ac2 1 parent a4755d6
Travis Berry authored
View
1  .travis.yml
@@ -6,4 +6,5 @@ before_script:
- "mysql -e 'create database animal_test;'"
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
+ - sleep 3 # give xvfb some time to start
script: bundle exec rake db:drop db:create db:migrate travis
View
2  Gemfile
@@ -63,7 +63,7 @@ group :test do
gem 'database_cleaner'
gem 'launchy'
gem 'email_spec'
- gem 'headless'
+ #gem 'headless'
end
# Use unicorn as the web server
View
2  Gemfile.lock
@@ -169,7 +169,6 @@ GEM
json (>= 1.4.6)
git (1.2.5)
gravatar_image_tag (1.0.0)
- headless (0.2.2)
hike (1.2.1)
hirb (0.5.0)
home_run (1.0.6)
@@ -382,7 +381,6 @@ DEPENDENCIES
email_spec
factory_girl_rails
gravatar_image_tag
- headless
home_run
jqplot-rails!
jquery-rails
View
24 app/assets/javascripts/application.js
@@ -16,26 +16,10 @@
//= require bar-chart
//= require bootstrap
//= require_self
-// by https://github.com/irae
-(function(document,navigator,standalone) {
- // prevents links from apps from oppening in mobile safari
- // this javascript must be the first script in your <head>
- if ((standalone in navigator) && navigator[standalone]) {
- var curnode, location=document.location, stop=/^(a|html)$/i;
- document.addEventListener('click', function(e) {
- curnode=e.target;
- while (!(stop).test(curnode.nodeName)) {
- curnode=curnode.parentNode;
- }
- // Condidions to do this only on links to your own app
- // if you want all links, use if('href' in curnode) instead.
- if('href' in curnode && ( curnode.href.indexOf('http') || ~curnode.href.indexOf(location.host) ) ) {
- e.preventDefault();
- location.href = curnode.href;
- }
- },false);
- }
-})(document,window.navigator,'standalone');
+
+//prevent ipad webapps opening in safari
+var iWebkit;if(!iWebkit){iWebkit=window.onload=function(){function fullscreen(){var a=document.getElementsByTagName("a");for(var i=0;i<a.length;i++){if(a[i].className.match("noeffect")){}else{a[i].onclick=function(){window.location=this.getAttribute("href");return false}}}}function hideURLbar(){window.scrollTo(0,0.9)}iWebkit.init=function(){fullscreen();hideURLbar()};iWebkit.init()}}
+
$(function(){
if(window.location.pathname === "/"){
View
21 features/support/env.rb
@@ -5,6 +5,7 @@
# files.
require 'cucumber/rails'
+require 'capybara'
# Capybara defaults to XPath selectors rather than Webrat's default of CSS3. In
# order to ease the transition to Capybara we set the default here. If you'd
@@ -58,13 +59,13 @@
Cucumber::Rails::Database.javascript_strategy = :truncation
-if ENV['HEADLESS'] == 'true'
- require 'headless'
-
- headless = Headless.new
- headless.start
-
- at_exit do
- headless.destroy
- end
-end
+# if ENV['HEADLESS'] == 'true'
+# require 'headless'
+#
+# headless = Headless.new
+# headless.start
+#
+# at_exit do
+# headless.destroy
+# end
+# end
Please sign in to comment.
Something went wrong with that request. Please try again.