This file contains hidden or 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 Seam | |
class WaitWorker < ::Seam::Worker | |
def initialize | |
handles :wait | |
end | |
def process | |
time_of_last_execution = if effort.history.count == 0 |
This file contains hidden or 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 "visiting the home page" do | |
let(:controller) { HomeController.new } | |
describe "when you are logged in" do | |
let(:user) { User.new(name: Object.new) } | |
before { controller.stubs(:current_user).returns user } | |
it "should show your name" do |
This file contains hidden or 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 public_setters | |
public_methods.select { |m| m =~ /=$/ } | |
.reject { |m| %i(== === !=).include? m } | |
end |
This file contains hidden or 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 Message | |
def initialize value = nil | |
@data = {} | |
if value.is_a? Hash | |
value.each do |k, v| | |
@data[k.to_s.underscore] = v | |
end | |
else | |
self.type = value if value |
This file contains hidden or 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 ElephantController do | |
before { Elephant.delete_all } | |
let(:controller) { ElephantController.new } | |
describe "getting the hungry elephants" do | |
it "should work just fine if I hit the database here, no big deal" do |
This file contains hidden or 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
gem 'kilt-cms' |
This file contains hidden or 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 BagpipeController < ApplicationController | |
def index | |
@bagpipes = Kilt.bagpipes | |
end | |
def view | |
@bagpipe = Kilt.get(params[:id]) | |
end |
This file contains hidden or 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 RecordFinder | |
def initialize username, password | |
@username = username | |
@password = password | |
end | |
end |
This file contains hidden or 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
apt-get -y install build-essential m4 libncurses5-dev libssh-dev unixodbc-dev libgmp3-dev libwxgtk2.8-dev libglu1-mesa-dev fop xsltproc default-jdk | |
apt-get -y install make | |
apt-get -y install libncurses5-dev | |
mkdir -p /src/erlang | |
cd /src/erlang | |
wget http://www.erlang.org/download/otp_src_17.0.tar.gz | |
tar -xvzf otp_src_17.0.tar.gz | |
chmod -R 777 otp_src_17.0 | |
cd otp_src_17.0 | |
./configure |
This file contains hidden or 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
apt-get -y install build-essential m4 libncurses5-dev libssh-dev unixodbc-dev libgmp3-dev libwxgtk2.8-dev libglu1-mesa-dev fop xsltproc default-jdk | |
apt-get -y install make | |
apt-get -y install libncurses5-dev | |
mkdir -p /src/erlang | |
cd /src/erlang | |
wget http://www.erlang.org/download/otp_src_17.0.tar.gz | |
tar -xvzf otp_src_17.0.tar.gz | |
chmod -R 777 otp_src_17.0 | |
cd otp_src_17.0 | |
./configure |
OlderNewer