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
lypanov: anyone experience with unicorn and preload app? i see tons of mysql errors. | |
sevenseacat: im not sure what mysql errors would have to do with unicorn | |
lypanov: sevenseacat: then you don't use it i'm guessing | |
sevenseacat: nope. | |
lypanov: anyone? | |
waseem_: lypanov: What errors? | |
lypanov: Mysql2::Error: Lost connection to MySQL server during query. and lots of other random AR errors. tables not existing etc. | |
lypanov: alas googling is getting me nowhere | |
lypanov: there is an item on the mysql2 gem, closed, but zero real closure on the issue. | |
waseem_: lypanov: Can you connect to MySQL with credentials in yoru database.yml? |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key> | |
<string>Dobdark</string> | |
<key>settings</key> | |
<array> | |
<dict> | |
<key>settings</key> |
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
Practical Object-Oriented Design in Ruby | |
Metaprogramming Ruby | |
Cucumber Recipes | |
Rapid Android Development | |
Hello, Android | |
Retinafy Me | |
Exceptional Ruby | |
Scalable and Modular Architecture for CSS | |
Growing Object-Oriented Software, Guided By Tests | |
Rails Recipes |
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
RSpec::Matchers.define :assign_to do |variable| | |
chain :with do |value| | |
@value = value | |
end | |
match do |response| | |
if @value | |
assigns[variable] == @value | |
else | |
assigns.has_key?(variable) |
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
Capybara.register_driver :phantomjs do |app| | |
Capybara::Selenium::Driver.new(app, browser: :phantomjs) | |
end | |
Capybara.javascript_driver = :phantomjs |
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
Frenzal Rhomb - everything pre-Shut Your Mouth | |
Jorn - everything pre-2006 (in particular, Out To Every Nation) | |
Stratovarius - Infinite | |
Tarot - Crows Fly Black | |
The Living End - everything pre-White Noise | |
Warmen - Japanese Hospitality |
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 'spec_helper' | |
describe GamesController do | |
describe 'POST "create"' do | |
subject(:response) { post :create, params } | |
context 'valid parameters provided' do | |
let(:params) { { game: FactoryGirl.attributes_for(:game) } } | |
specify { expect { subject }.to change(Game, :count).by 1 } |
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
RSpec::Matchers.define :assign_to do |variable| | |
chain :with do |value| | |
@value = value | |
end | |
match do |response| | |
if @value | |
assigns[variable] == @value | |
else | |
assigns.has_key?(variable) |
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
describe SeriesController do | |
describe 'GET "create"' do | |
subject { post :create, series: params } | |
context 'valid parameters provided' do | |
let(:params) { FactoryGirl.attributes_for :series } | |
# Using expect(subject) here leads to an error: | |
# NoMethodError: undefined method `call' for #<ActionController::TestResponse:0x007f03c4c3d470> | |
specify { expect { subject }.to change(Series, :count).by(1) } |
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 Product < ActiveRecord::Base | |
def self.supplied_within_states(*states) | |
# So you can pass either an array or a list of arguments to the method | |
states = states.flatten(1) | |
if states.include? 'all' | |
scoped | |
else | |
# Here be dragons! - RS 2013-05-20 | |
# Ideally this query would be much simpler - something like: |
OlderNewer