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 '[clojure.core.async :as a]) | |
(defn fill-pool | |
[pool n] | |
(doseq [_ (range n)] | |
(a/>!! pool 6))) | |
(defmacro with-client-from-pool | |
[[client-binding pool] & body] | |
`(let [~client-binding (a/<!! ~pool)] |
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 'sinatra' | |
get '/' do | |
<<HTML | |
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title></title> | |
</head> |
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
# Activate the gem you are reporting the issue against. | |
gem 'activerecord', '4.1.0' | |
require 'active_record' | |
require 'minitest/autorun' | |
require 'logger' | |
# Ensure backward compatibility with Minitest 4 | |
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test) | |
# This connection will do for database-independent bug reports. |
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
# Activate the gem you are reporting the issue against. | |
gem 'activerecord', '4.1.0' | |
require 'active_record' | |
require 'minitest/autorun' | |
require 'logger' | |
# Ensure backward compatibility with Minitest 4 | |
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test) | |
# This connection will do for database-independent bug reports. |
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
== CreateCopywritings: migrating ============================================= | |
-- create_table(:copywriting_phrases) | |
-> 0.0015s | |
-- add_index(:copywriting_phrases, [:name, :scope]) | |
-> 0.0005s | |
== CreateCopywritings: migrated (0.0021s) ==================================== | |
== CreateCopywritingTranslationTable: migrating ============================== | |
-- rename_column("copywriting_phrase_translations", :copywriting_phrase_id, :refinery_copywriting_phrase_id) | |
rake aborted! |
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
def normalized_experiments | |
if @experiments.nil? | |
nil | |
else | |
experiment_config = {} | |
@experiments.keys.each do | name | | |
experiment_config[name] = {} | |
end | |
@experiments.each do | experiment_name, settings| | |
experiment_config[experiment_name][:alternatives] = normalize_alternatives(settings[:alternatives]) if settings[:alternatives] |
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 CookieStepHelper | |
class Cookies | |
def Cookies.for(session) | |
case session.driver | |
when Capybara::Driver::Selenium | |
SeleniumCookies.new(session.driver) | |
when Capybara::Driver::RackTest | |
RackTestCookies.new(session.driver) | |
when Capybara::Webkit::Driver |
NewerOlder