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
| Server Software: Mongrel | |
| Server Hostname: 127.0.0.1 | |
| Server Port: 3000 | |
| Document Path: / | |
| Document Length: 1335 bytes | |
| Concurrency Level: 20 | |
| Time taken for tests: 382.962628 seconds | |
| Complete requests: 4000 |
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 'simple-daemon' | |
| class Daemon < SimpleDaemon::Base | |
| SimpleDaemon::WorkingDirectory = File.join(File.dirname(__FILE__), '..', 'log') | |
| def self.start | |
| puts "Starting" |
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
| Apple Cider | |
| INGREDIENTS (Nutrition) | |
| 6 cups apple cider | |
| 1/4 cup real maple syrup | |
| 2 cinnamon sticks | |
| 6 whole cloves | |
| 6 whole allspice berries | |
| 1 orange peel, cut into strips | |
| 1 lemon peel, cut into strips |
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 Admin::SearchesController < AdminController | |
| def index | |
| end | |
| def show | |
| @customers = case params[:query] | |
| when 'customer': Search.find_customers(params[:value]) | |
| when 'product': Search.find_customers_from_sku(params[:value]) | |
| 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
| def render_esi(path) | |
| if Rails.env == 'development' | |
| div_id = Digest::MD5.hexdigest(path + rand.to_s) | |
| out = content_tag(:div, :id => div_id) do '' end | |
| out += content_tag(:script, :type => 'text/javascript') do | |
| '$.ajax({ type:"GET", url:"' + path + '", dataType:"html", success:function(html) { $("#' + div_id + '").html(html) | |
| } });' | |
| end | |
| else | |
| '<esi:include src="' + path + '" />' |
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 'rack' | |
| require 'lsapi' | |
| require 'datamapper' | |
| DataMapper.setup( :default, | |
| :adapter => 'mysql', | |
| :host => 'localhost', | |
| :username => 'root', | |
| :password => '', |
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 Deck | |
| ( make | |
| , shuffle | |
| ) where | |
| import System.Random | |
| data Suit = Club | Diamond | Heart | Spade | |
| deriving (Eq, Show, Read, Enum) | |
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 Deck | |
| ( make | |
| , shuffle | |
| ) where | |
| import System.Random | |
| data Suit = Club | Diamond | Heart | Spade | |
| deriving (Eq, Show, Read, Enum) | |
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: Locked articles | |
| In order to view articles | |
| A user that is a basic member | |
| Should only see partial article content | |
| And a user that is at a higher level | |
| Should see full article content | |
| Scenario: Not logged in as a user | |
| Given there is a magazine article "WSOP" | |
| When I go to the magazine article page "WSOP" |
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/ruby | |
| Dir.chdir(ENV['RAILS_ROOT']) | |
| require 'config/boot' | |
| require 'active_support' | |
| require 'action_controller' | |
| require 'fileutils' | |
| options = { |