This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Logs calls to require so if a required file is blowing up, you can | |
# see the last require and diagnose. If your app stops booting, can be handy to | |
# find what borked things. | |
require 'logger' | |
class Object | |
def require(file_name) | |
log = Logger.new(File.join(File.dirname(__FILE__), 'required.log')) | |
log.debug("requiring: #{file_name}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Minor update of the code from this link to make it work with Rails 3: | |
# http://feefighters.com/devblog/2008/11/07/testing-for-broken-links-with-rspec/ | |
class HaveValidLinks | |
# Pass in :fragment=>true if the response contains only an HTML fragment | |
def initialize(options={}) | |
@fragment = options[:fragment] | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The invisible proxy allows seamless calling of a method on all objects of an array. | |
# When an array is wrapped (passed into) one of these objects, you can call a function | |
# on all objects in the array with one line. Useful for dsl's and such. | |
class InvisibleProxyToArray | |
instance_methods.each do |m| | |
undef_method(m) unless m =~ /(^__|^nil\\?|object_id|^send)/ | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a total hack to slow down webdriver in Capybara | |
# so you can more easily watch what is happening. | |
# paste this above the top of a Capybara Webdriver RSpec test if you need to debug something in slo-mo | |
require 'selenium-webdriver' | |
module ::Selenium::WebDriver::Remote | |
class Bridge | |
def execute(*args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts "---Starting run---" | |
threads = [] | |
@mutex = Mutex.new | |
thread1_ids = [] | |
thread2_ids = [] | |
o = nil | |
a = nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Model.new.foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"_id": "55b11cb6a098e0004d6837c6", | |
"index": 0, | |
"guid": "24d21841-e3c6-40d3-ba16-c0b29c13ad47", | |
"isActive": true, | |
"balance": "$1,832.43", | |
"picture": "http://placehold.it/32x32", | |
"age": 38, | |
"eyeColor": "brown", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if __FILE__ == $PROGRAM_NAME | |
require 'canis/core/util/app' | |
require 'canis/core/include/layouts/splitlayout' | |
App.new do | |
layout = SplitLayout.new :height => -1, :top_margin => 1, :bottom_margin => 1, :left_margin => 1 | |
@form.layout_manager = layout | |
urls_table = table :print_footer => false, :name => "urls" | |
urls_table.columns = %w{url avg} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"log": { | |
"version": "1.2", | |
"creator": { | |
"name": "WebInspector", | |
"version": "537.1" | |
}, | |
"pages": [ | |
{ | |
"startedDateTime": "2012-08-28T05:14:24.803Z", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gradle build | |
> Task :browserup-proxy-core:test | |
com.browserup.bup.mitmproxy.ChainedProxyAuthTest > testMitmproxyUsesHttpsUpstreamProxy FAILED | |
javax.net.ssl.SSLHandshakeException at ChainedProxyAuthTest.groovy:174 | |
Caused by: sun.security.validator.ValidatorException at ChainedProxyAuthTest.groovy:174 | |
Caused by: sun.security.provider.certpath.SunCertPathBuilderException at ChainedProxyAuthTest.groovy:174 | |
com.browserup.bup.mitmproxy.ChainedProxyAuthTest > testAutoProxyAuthSuccessful FAILED |
OlderNewer