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
| Feature: Managing a cart | |
| In order to purchase an item | |
| As a Shopper | |
| I want to add and remove items to and from my cart | |
| Scenario: Adding an item to my cart | |
| Given I am on the "Baseball Bat" item page | |
| Then I see the add to cart button | |
| When I click the "add to cart" button | |
| Then I am on the cart page |
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
| testing Gist.vim | |
| updating |
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 'rubygems' | |
| require 'mongo_doc' | |
| require 'mustache' | |
| class Person | |
| attr_accessor :name, :age, :interests | |
| def pretty_interests | |
| last = interests.pop | |
| "#{interests.join(", ")} and #{last}" | |
| 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
| # so this is super sexy | |
| require 'rubygems' | |
| require 'mongo_doc' | |
| require 'mustache' | |
| class Person < Mustache | |
| attr_accessor :name, :age, :interests | |
| def pretty_interests | |
| last = interests.pop |
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
| user.plugins.create(:title => "Blog", :position => (user.plugins.maximum(:position) || -1) +1) | |
| # should be | |
| user.plugins.create(:name => "Blog", :position => (user.plugins.maximum(:position) || -1) +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
| Using the default profile... | |
| ........................................F---...........F..... | |
| (::) failed steps (::) | |
| edit_admin_refinery_setting_url failed to generate from {:action=>"edit", :controller=>"admin/refinery_settings"} - you may have ambiguous routes, or you may need to supply additional parameters for this route. content_url has the following required parameters: ["refinery", "settings", :id, "edit"] - are they all satisfied? (ActionController::RoutingError) | |
| ./vendor/plugins/i18n/lib/routing_filter/routing_filter.rb:78:in `generate' | |
| ./vendor/plugins/i18n/lib/i18n_filter.rb:34:in `around_generate' | |
| ./vendor/plugins/i18n/lib/routing_filter/routing_filter/base.rb:20:in `send' | |
| ./vendor/plugins/i18n/lib/routing_filter/routing_filter/base.rb:20:in `run_reverse' |
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
| #! /usr/bin/env ruby | |
| require 'rubygems' | |
| require 'eventmachine' | |
| require 'rbosa' | |
| module MusicServer | |
| def post_init | |
| send_data(currently_playing) | |
| close_connection | |
| 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
| puts "\n--- watchr initialized ---\n\n" | |
| def cmd() 'script/spec '; end | |
| def run_all_specs | |
| system(cmd + 'spec/') | |
| end | |
| def run_spec(spec) | |
| puts "Running #{spec}" |
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
| AUTO_LINK_RE = %r{ | |
| ( https?:// | www\. ) | |
| [^\s<]+ | |
| }x unless const_defined?(:AUTO_LINK_RE) | |
| BRACKETS = { ']' => '[', ')' => '(', '}' => '{' } | |
| # Turns all urls into clickable links. If a block is given, each url | |
| # is yielded and the result is used as the link text. | |
| def auto_link_urls(text, html_options = {}) |
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
| NumberChart.new("4/4") do | |
| line do | |
| measure "1* 5*" #*'s after number indicate the amount of beats to play the chord | |
| measure "4 5**" | |
| measure "1 5**" | |
| measure "4 5", :time_signature => "2/4" # if you need to change the time sig on a meature this is how | |
| end | |
| repeat do | |
| line do | |
| measure "1* 5*" |