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
michaelguterl@carini ~/code/tmp/serialized_attributes[master]$ VERSION=3.0.4 ruby test/serialized_attributes_test.rb | |
Loaded suite test/serialized_attributes_test | |
Started | |
.................................E...........E.............................. | |
Finished in 0.197731 seconds. | |
1) Error: | |
test_attempts_to_re-encode_data_when_saving(SerializedAttributeWithSerializedDataTestWithActiveSupportJson): | |
ActiveRecord::ConnectionNotEstablished: ActiveRecord::ConnectionNotEstablished | |
/Users/michaelguterl/.rvm/gems/ree-1.8.7-2010.02/gems/activerecord-3.0.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:317:in `retrieve_connection' |
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
require 'uri' | |
require 'psych' | |
require 'net/http' | |
require 'meme' # Install meme_generator | |
module Campfire | |
class API | |
attr_reader :uri, :token, :pass |
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
module Sunspot | |
class ResqueSessionProxy < Sunspot::SessionProxy::AbstractSessionProxy | |
attr_reader :original_session | |
delegate :config, :delete_dirty?, :dirty?, | |
:new_search, :search, | |
:new_more_like_this, :more_like_this, | |
:remove, :remove!, |
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
class Object | |
def inspect | |
raise "inspect called, check backtrace for source" | |
end | |
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
module Kernel | |
alias_method :puts_without_check, :puts | |
def puts(*args) | |
args.each do |arg| | |
raise "puts called, check the backtrace for the source" if arg.to_s =~ /Class:/ | |
end | |
puts_without_check(*args) | |
end | |
alias_method :print_without_check, :print |
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
Mailer.should deliver(:job_application).with(@job.id, @user.id) |
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
module Report | |
class EmployerApplicationReport | |
attr_accessor :job, :archived | |
def initialize(options = {}) | |
options ||= {} | |
options.reverse_merge!(:archived => false) | |
options.each do |k, v| |
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
#!/bin/bash | |
git clone https://github.com/nz/sunspot.git | |
cd sunspot/sunspot | |
git co geohash_neighbors | |
bundle | |
bundle exec spec lib/sunspot/query/geo.rb | |
# F |
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
{ | |
"2010-11-12": [{ | |
"60-69": "10", | |
"20-29": "0", | |
"80-89": "29", | |
"70-79": "18", | |
"40-49": "26", | |
"30-39": "14", | |
"50-59": "6", | |
"10-19": "25", |
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
require 'pp' | |
require 'request_log_analyzer' | |
file_format = RequestLogAnalyzer::FileFormat.load('rails', :all) | |
parser = RequestLogAnalyzer::Source::LogParser.new(file_format, :source_files => 'production.log.1') | |
parser.each_request do |request| | |
if ['Staff:ResumeSearchLicensesController', 'Staff::JobPostingLicensesController'].include?(request[:controller]) && request[:action] == 'create' | |
pp request[:params] | |
end |