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
feature "widget management" do | |
include AuthenticationSteps | |
include WidgetSteps | |
background do | |
i_log_in_as_a_user | |
end | |
scenario "creating a new widget" do |
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
feature "widget management" do | |
background do | |
@user = Fabricate(:user) | |
visit auth_login_path | |
fill_in "Username", with: @user.username | |
fill_in "Password", with: "password" | |
click_button "Log In" | |
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
require 'gosu' | |
class Window < Gosu::Window | |
def initialize | |
super(800, 600, true) # go fullscreen if possible | |
end | |
def button_down(button) | |
close if button == Gosu::KbEscape | |
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
require 'redis' | |
require 'sinatra/base' | |
class SSE < Sinatra::Base | |
def send_message(json) | |
"id: #{Time.now}\n" + | |
"data: #{json}" + | |
"\r\n\n" | |
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
use Rack::Static, :root => "public" | |
run lambda { |env| | |
[200, {'Content-Type' => 'text/html'}, | |
File.open('public/index.html', File::RDONLY) | |
] | |
} |
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
/Users/andrew/.rvm/gems/ruby-1.9.3-p194/gems/faye-websocket-0.4.6/lib/faye/adapters/thin.rb:26:in `<top (required)>': cannot load such file -- thin/connection (LoadError) | |
from /Users/andrew/.rvm/gems/ruby-1.9.3-p194/gems/faye-websocket-0.4.6/lib/faye/websocket.rb:66:in `require' | |
from /Users/andrew/.rvm/gems/ruby-1.9.3-p194/gems/faye-websocket-0.4.6/lib/faye/websocket.rb:66:in `load_adapter' | |
from /Users/andrew/.rvm/gems/ruby-1.9.3-p194/gems/faye-websocket-0.4.6/lib/faye/websocket.rb:214:in `block in <top (required)>' | |
from /Users/andrew/.rvm/gems/ruby-1.9.3-p194/gems/faye-websocket-0.4.6/lib/faye/websocket.rb:212:in `each' | |
from /Users/andrew/.rvm/gems/ruby-1.9.3-p194/gems/faye-websocket-0.4.6/lib/faye/websocket.rb:212:in `<top (required)>' | |
from /Users/andrew/.rvm/gems/ruby-1.9.3-p194/gems/faye-0.8.6/lib/faye.rb:7:in `require' | |
from /Users/andrew/.rvm/gems/ruby-1.9.3-p194/gems/faye-0.8.6/lib/faye.rb:7:in `<top (required)>' |
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
2012-10-16 16:42:22 [ERROR] [Faye::RackAdapter] undefined method `call' for nil:NilClass | |
Backtrace: | |
/Users/andrew/.rvm/gems/ruby-1.9.3-p194/gems/faye-0.8.6/lib/faye/adapters/rack_adapter.rb:121:in `block in handle_request' | |
/Users/andrew/.rvm/gems/ruby-1.9.3-p194/gems/faye-0.8.6/lib/faye/protocol/server.rb:46:in `call' | |
/Users/andrew/.rvm/gems/ruby-1.9.3-p194/gems/faye-0.8.6/lib/faye/protocol/server.rb:46:in `block in process' | |
/Users/andrew/.rvm/gems/ruby-1.9.3-p194/gems/faye-0.8.6/lib/faye/protocol/server.rb:58:in `call' | |
/Users/andrew/.rvm/gems/ruby-1.9.3-p194/gems/faye-0.8.6/lib/faye/protocol/server.rb:58:in `block (3 levels) in process' | |
/Users/andrew/.rvm/gems/ruby-1.9.3-p194/gems/faye-0.8.6/lib/faye/protocol/extensible.rb:23:in `call' | |
/Users/andrew/.rvm/gems/ruby-1.9.3-p194/gems/faye-0.8.6/lib/faye/protocol/extensible.rb:23:in `pipe_through_extensions' | |
/Users/andrew/.rvm/gems/ruby-1.9.3-p194/gems/faye-0.8.6/lib/faye/protocol/server.rb:55:in `block (2 levels) in process' |
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
<?php | |
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap | |
{ | |
protected function _initCustomRoutes() | |
{ | |
$router = Zend_Controller_Front::getInstance()->getRouter(); | |
$route = new Mylib_Controller_Router_Route_Redirect('old/route/*', array('controller'=>'content', 'action'=>'index')); | |
$router->addRoute('old_route', $route); | |
} |
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
$ brew install -v redis | |
==> Downloading http://redis.googlecode.com/files/redis-2.4.8.tar.gz | |
File already downloaded in /Users/andrew/Library/Caches/Homebrew | |
/usr/bin/tar xf /Users/andrew/Library/Caches/Homebrew/redis-2.4.8.tar.gz | |
==> make -C src | |
make -C src | |
MAKE hiredis | |
CC ae.o | |
CC anet.o | |
CC redis-benchmark.o |
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 'simplecov' | |
SimpleCov.start | |
require 'my_gem' | |
require 'rspec/mocks' | |
RSpec.configure do |config| | |
config.mock_framework = :rspec | |
end |