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
diff --git a/vendor/gems/rspec-1.2.9/lib/spec/runner/formatter/html_formatter.rb b/vendor/gems/rspec-1.2.9/lib/spec/runner/formatter/html_formatter.rb | |
index 2d0c65d..dd86a71 100644 | |
--- a/vendor/gems/rspec-1.2.9/lib/spec/runner/formatter/html_formatter.rb | |
+++ b/vendor/gems/rspec-1.2.9/lib/spec/runner/formatter/html_formatter.rb | |
@@ -56,11 +56,12 @@ module Spec | |
def example_started(example) | |
@example_number += 1 | |
+ @time = Time.now | |
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
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') | |
describe "Something doppelganger" do | |
describe "RailCar" do | |
let(:gateway) { RailCar.new :login => "a", :password => "b" } | |
describe "#commit" do | |
let(:response) { railcar.send :commit, request, {} } | |
describe "response" 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
require 'spec_helper' | |
require 'parslet/rig/rspec' | |
require 'tv_show_parslet' | |
describe TvShowParslet do | |
let(:parser) { described_class.new } | |
def p(string) | |
parse(string, :trace => true) |
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
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') | |
describe "Something doppelganger" do | |
describe "RailCar" do | |
let(:gateway) { RailCar.new :login => "a", :password => "b" } | |
describe "#commit" do | |
let(:response) { railcar.send :commit, request, {} } | |
describe "response" 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
describe FashionSituation do | |
before { @situation = FashionSituation.new(:shirt => false, :shoes => false, :shorts => true) } | |
it "should be inappropriate at a restaurant" do | |
@situation.location = 'restaurant' | |
@situation.should_not be_appropriate | |
end | |
it "should be inappropriate at work" do | |
@situation.location = 'work' | |
@situation.should_not be_appropriate | |
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
// see also https://gist.github.com/1988097 | |
// and http://www.sublimetext.com/docs/commands | |
[ | |
{ "keys": ["alt+command+ctrl+c"], "command": "copy_path"}, | |
{ "keys": ["ctrl+command+v"], "command": "paste"}, | |
{ "keys": ["command+v"], "command": "paste_and_indent"} | |
] |
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
Enumerable.class_eval do | |
def dump_spark_histogram | |
element_count_pairs = self.group_by { |x| x }.to_a.map { |el, els| [el, els.size] } | |
element_count_pairs = element_count_pairs.sort_by(&:first) | |
max_el_len = element_count_pairs.map(&:first).map(&:to_s).map(&:size).max | |
element_count_pairs.each do |el, count| | |
puts("%#{max_el_len}s: #{('=' * count)}" % el) | |
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
# when we can, we do something like this: | |
in_parallel do |hydra| | |
hydra.push client.get_x(:user_id => 1, :id => 2) do |response| | |
@x = response.processed_response if response.success? | |
end | |
hydra.push client.get_y(:user_id => 1, :id => 3) do |response| | |
@y = response.processed_response if response.success? | |
end | |
end # at the end of the block it fires the requests in parallel and ... blocks |
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
# Proposed benefits: | |
# * more verbose, but you can see more clearly all the "stuff" your method is using | |
# * easier to re-use methods, since they're not coupled to instance var names | |
# * less room for concurrency issues, since all state transforms would be in the top methods | |
class User | |
def gender | |
infer_gender | |
@gender | |
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
commit 7e091a06e41070c005b2bbfa6f4b15c91dbfa3d5 | |
Author: Richie Vos <[email protected]> | |
Date: Mon Jun 11 18:16:25 2012 -0500 | |
Deleting the new order object | |
cr=akao | |
diff --git a/app/controllers/admin/transactional_email_controller.rb b/app/controllers/admin/transactional_email_controller.rb | |
index fae3b0f..8142498 100644 |