Skip to content

Instantly share code, notes, and snippets.

View towski's full-sized avatar

towski towski

  • San Francisco, California
View GitHub Profile
1)
Test::Unit::AssertionFailedError in 'Facebook::InvitationsController get new requires user'
<"http://www.facebook.com/login.php?api_key=72370384b58efc0e53faccb9b9f2bf2f&v=1.0"> expected but was
<"http://www.facebook.com/login.php?api_key=72370384b58efc0e53faccb9b9f2bf2f&v=1.0&next=http%3A%2F%2Fapps.facebook.com%2Fclimate_test%2Finvitations%2Fnew&canvas=true">.
/Users/matt/entp/climate_culture_app/vendor/plugins/facebooker/lib/facebooker/rails/test_helpers.rb:7:in `assert_facebook_redirect_to'
./spec/controllers/facebook/invitations_controller_spec.rb:25:
/Users/matt/entp/climate_culture_app/vendor/plugins/rspec/lib/spec/example/example_methods.rb:40:in `instance_eval'
/Users/matt/entp/climate_culture_app/vendor/plugins/rspec/lib/spec/example/example_methods.rb:40:in `execute'
/Users/matt/entp/climate_culture_app/vendor/plugins/rspec/lib/spec/example/example_methods.rb:37:in `execute'
#to test routes from the console
include ActionController::UrlWriter
#ActiveRecord::Base.set_class_variable("@@logger")
Gem.loaded_specs.keys
/Users/matt/entp/homebrew/bin/pg_ctl -D /Users/matt/entp/homebrew/var/postgres -l /Users/matt/entp/homebrew/var/postgres/server.log start
require 'addressable/template'
require 'net/http'
require 'net/https'
a = Addressable::Template.new("https://api.tenderapp.com/help/categories/12345/discussions{-opt|/|state}{state}{-opt|?|page,user_email}{-join|&|page,user_email}")
url = a.expand("state" => "pending").to_str
url = URI.parse(url)
req = Net::HTTP::Get.new(url.path)
req.basic_auth "towski@entp.com", "pass"
req.add_field("Accept", "application/vnd.tender-v1+json")
class UserAgent
attr_reader :browser, :version, :os
def initialize(browser, version, os)
@browser = browser
@version = version
@os = os
end
def self.parse(uas)
Wrote 104857800 bytes in 20026ms using 1024 byte buffers: 4.993508439029262 mB/s
Wrote 104857800 bytes in 19872ms using 4096 byte buffers: 5.032206119162641 mB/s
Wrote 104857800 bytes in 21407ms using 8192 byte buffers: 4.671369178306161 mB/s
Wrote 104857800 bytes in 19472ms using 16384 byte buffers: 5.135579293344289 mB/s
Wrote 104857800 bytes in 19773ms using 32768 byte buffers: 5.0574015071056495 mB/s
Wrote 104857800 bytes in 19578ms using 65536 byte buffers: 5.10777403207682 mB/s
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug-base19:
ERROR: Failed to build gem native extension.
/Users/towski/.rvm/rubies/ruby-1.9.1-p378/bin/ruby extconf.rb
checking for rb_method_entry_t.body in method.h... no
checking for vm_core.h... no
checking for rb_method_entry_t.body in method.h... no
checking for vm_core.h... yes
checking for iseq.h... yes
@towski
towski / diff
Created November 10, 2010 01:26
diff --git a/vendor/rails/activesupport/lib/active_support/dependencies.rb b/vendor/rails/activesupport/lib/active_support/dependencies.rb
index 2badad5..f95de5d 100644
--- a/vendor/rails/activesupport/lib/active_support/dependencies.rb
+++ b/vendor/rails/activesupport/lib/active_support/dependencies.rb
@@ -411,7 +411,9 @@ module ActiveSupport #:nodoc:
from_mod = Object if from_mod.name.blank?
unless qualified_const_defined?(from_mod.name) && from_mod.name.constantize.object_id == from_mod.object_id
- raise ArgumentError, "A copy of #{from_mod} has been removed from the module tree but is still active!"
+ # assume we should just use the new constant instead of the old
require 'benchmark'
string = <<-EOF
/Users/towski/engineering/kongregate/vendor/gems/stopdropandrew-activemerchant-1.4.2/lib
/Users/towski/engineering/kongregate/vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3
/Users/towski/engineering/kongregate/test/mocks/test
/Users/towski/engineering/kongregate/app/controllers/
/Users/towski/engineering/kongregate/app
/Users/towski/engineering/kongregate/app/models
/Users/towski/engineering/kongregate/app/controllers
java -XstartOnFirstThread -d32 -client -Xmx500m -Xss1024k -jar /Users/towski/.selenium/assets/selenium-2.0b3/selenium-server-standalone-2.0b3.jar
11:34:47.952 INFO - Java: Apple Inc. 17.1-b03-307
11:34:47.954 INFO - OS: Mac OS X 10.6.5 i386
11:34:47.961 INFO - v2.0 [b3], with Core v2.0 [b3]
11:34:48.101 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
11:34:48.103 INFO - Version Jetty/5.1.x
11:34:48.104 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
11:34:48.104 INFO - Started HttpContext[/selenium-server,/selenium-server]
11:34:48.105 INFO - Started HttpContext[/,/]
11:34:48.257 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@949f69
@towski
towski / sql timeout
Created March 28, 2012 05:30
sql timeout
# ActiveRecord::Base.connection.timeout(20, []) do |connection|
# worrisome sql
# end
module ActiveRecord
class TimeoutError < ActiveRecordError
def initialize(message = nil)
super(message)
end
end