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 "main/index.html.erb" do | |
before(:each) do | |
@designs = mock("array of design") | |
@designs.stub!(:designs).and_return("test") | |
@d = mock("design") | |
@d.stub!(:name).and_return("test") | |
@d.stub!(:photo).and_return("medium_size.jpg") | |
@designs.stub!(:at).with(0).and_return(@d) | |
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
<story> | |
<id type="integer">3933654</id> | |
<project_id type="integer">30330885</project_id> | |
<story_type>feature</story_type> | |
<url>http://www.pivotaltracker.com/story/show/39654</url> | |
<estimate type="integer">-</estimate> | |
<current_state>unscheduled</current_state> | |
<description>Scenario: | |
In order to announce multiple updates at once, | |
As a customer |
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
{ "_id" : ObjectId("4ee8e90bb9eab0492d000002"), "format" : { "_id" : ObjectId("4ee8e8f9b9eab0492d000001"), "height" : 12, "width" : 8 }, "pages" : 124, "title" : "Kochen" } |
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 "Activity.publish" do | |
it "pushes activity to public newsfeed" do | |
@activity = Activity.publish(:share, {:actor => user, :object => link, :target_object => newsfeed, :receivers => @send_to}) ## @send_to ==> could be replaced with Activity.public_audience ?? | |
@activity.receivers.size.should == 2 | |
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
object = { a: '1', b: '2' } | |
object.sub_scope = { x: '1', y: '2' } | |
Todomvc = | |
init: -> | |
view = new Todomvc.AppView() | |
view.initialize(object) | |
class Todomvc.AppView | |
initialize: (object) -> |
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("rspec-rails", :group => "test") | |
gem("cucumber-rails", :group => "test") | |
gem("spine-rails") | |
gem("eco") | |
gem("mongoid") | |
if yes?("Would you like to install Devise?") | |
gem("devise") | |
generate("devise:install") | |
model_name = ask("What would you like the user model to be called? [user]") |
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 'socket' | |
def local_ip | |
orig, Socket.do_not_reverse_lookup = Socket.do_not_reverse_lookup, true # turn off reverse DNS resolution temporarily | |
UDPSocket.open do |s| | |
s.connect '64.233.187.99', 1 | |
s.addr.last | |
end | |
ensure | |
Socket.do_not_reverse_lookup = orig |
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
f = File.open("./Mini-SurveyWhatMVFrameworkDoYouUseAndWhy.csv") | |
framework_pros = {"Angular" => [], "Backbone" => [], "Ember" => []} | |
framework_cons = {"Angular" => [], "Backbone" => [], "Ember" => []} | |
f.readlines.each do |l| | |
row = l.split(";") | |
if row[0].match(/Angu|angu/) | |
framework_pros["Angular"] << row[1] | |
framework_cons["Angular"] << row[2] | |
elsif row[0].match(/Back/) | |
framework_pros["Backbone"] << row[1] |
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 'vcr' | |
require 'fakeweb' | |
require 'pry' | |
VCR.configure do |c| | |
c.cassette_library_dir = 'fixtures/vcr_cassettes' | |
c.hook_into :fakeweb | |
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
.content { | |
width: 600px; | |
margin: 0 auto 0; | |
margin-bottom: 0; | |
} | |
.sidebar { | |
position: fixed; | |
left: 15px; |
OlderNewer