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 Cucumber | |
module Parser | |
class CityBuilder | |
include Gherkin::Rubify | |
def initialize(file) | |
@file = file | |
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
#!/bin/bash -x | |
rm -f spec_results.html | |
ssh $TEST_SYSTEM "bash --login -c \"cd ~/testsuite/ && rm -f test_results.html && svn up --accept theirs-full && rake spec env=${TEST_SYSTEM} \"" | |
declare test_results=$? | |
scp $TEST_SYSTEM:/home/automateduser/testsuite/test_results.html $WORKSPACE | |
exit $test_results |
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 'yaml' | |
require 'active_support' | |
WINDOWS_PLATFORM = /mswin|win32|mingw/ unless defined?(WINDOWS_PLATFORM) | |
$env = YAML.load_file("#{File.dirname(__FILE__)}/environment.yml") | |
DEFAULT_ENVIRONMENT = "#{RUBY_PLATFORM =~ WINDOWS_PLATFORM ? 'windows_' : ''}default" | |
$default_env = $env[DEFAULT_ENVIRONMENT] |
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 EventsHelper | |
def create_events(events_table) | |
events_table.map_headers! {|header| header.is_a?(Symbol) ? header : header.gsub(/\s/,'_').to_sym } | |
system_time = TimeService.now | |
events_table.hashes.each do |event| | |
event[:name] ||= "Event #{system_time.strftime("%H:%M:%S")}" | |
event[:enabled] ||= true | |
event[:time] ||= system_time |
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 'active_resource' | |
class User | |
DEFAULT_CONTEXT_USER = "Models::Database::User" | |
class << self | |
def method_missing(method,*args,&block) | |
contextual_user = "Models::#{ENV['context']}::User".constantize |
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
$ ruby proxy.rb | |
Proxy Object | |
Customer.create | |
Proxy Object | |
Customer.create | |
Proxy Object | |
Customer.create |
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
C:\Windows\System32\cmd.exe /k "cd c:\users\username\dropbox\git" |
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 'set' | |
class SuperSet | |
def initialize(default) | |
@default = default | |
@hash = Hash.new | |
end | |
def ask(terms) |
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 'happymapper' | |
module Publication | |
def self.included(receiver) | |
receiver.element :featured, Boolean, :tag => 'isFeatured' | |
receiver.element :exclusive, Boolean, :tag => 'isExclusive' | |
receiver.element :sponsored, Boolean, :tag => 'isSponsored' | |
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
# Parses commandline arguments | |
# @param [Array<String>] args the list of arguments | |
# @return [Boolean] whether or not arguments are valid | |
# @since 0.5.6 | |
def parse_arguments(*args) | |
options[:markup] = nil # reset markup | |
# Hack: parse out --no-yardopts, --no-document before parsing files | |
['document', 'yardopts'].each do |file| | |
without, with = args.index("--no-#{file}") || -2, args.index("--#{file}") || -1 |
OlderNewer