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
new_input = $('<input type="hidden">', { | |
name: "job_" + pickup + '[]', | |
text: $("#element").val + 'order : ' + index | |
}); |
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 Waypoint < ActiveRecord::Base | |
belongs_to :address | |
belongs_to :job | |
# validates_presence_of :location_name, :if => proc { | wp | wp.friendly_name.nil? || (wp.friendly_name.blank? && wp.friendly_name.empty?)} | |
validates_presence_of :suburb_name | |
# Street is a composite class because that allows for .accessing |
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 ChangeTypeOfWaypointKeys < ActiveRecord::Migration | |
def up | |
#the damn migration wasn't running, so am dropping altogether | |
change_table :waypoints do |t| | |
t.remove :street_key, :suburb_key, :designation_key | |
t.string :street_key, :suburb_ley, :designation_key | |
end | |
end | |
def down |
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
task "cut_gem" do | |
version:bump:patch | |
end | |
rule /^version:bump:.*/ do |t| | |
sh "git status | grep 'nothing to commit'" # ensure we are not dirty | |
index = ['major', 'minor','patch'].index(t.name.split(':').last) | |
file = 'lib/GEM_NAME/version.rb' |
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 "MTDataStone" | |
class BookingRehydrator | |
@fleet_map = { | |
:sydney => :sydney, | |
:brisbane => nil | |
} | |
def self.rehydrate |
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:\jruby\jruby-1.7.0.preview1\bin\jruby.exe --1.9 -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:/Projects/MTDataStone/test/unit/place_test.rb | |
Testing started at 2:52 PM ... | |
Checking #<Place:0x25343815> == #<Place:0x74dfdc8> | |
Responds | |
Checking #<Place:0x25343815> == ENV | |
Checking #<Place:0x74dfdc8> == ENV | |
Checking #<Place:0x25343815> == ENV | |
Checking #<Place:0x74dfdc8> == ENV | |
Checking #<Place:0x25343815> == ENV | |
Checking #<Place:0x74dfdc8> == ENV |
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 MTData | |
module CityNamespaceMixin | |
def self.included(base) | |
base.establish_connection "mtdata" | |
base.table_name = "#{$CITY_NAME}].[dbo].[Place" | |
end | |
end | |
class Perth | |
$CITY_NAME = "Perth" |
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
@selenium = Sauce::Selenium2.new(:"selenium-version" => "2.3.0", :job_name => "CCQ - TEST") |
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
# Where you create your WebDriver object, set a "name" key-value pair to name a test: | |
Capybara.register_driver :selenium do |app| | |
require 'selenium-webdriver' | |
capabilities = Selenium::WebDriver::Remote::Capabilities.firefox | |
capabilities[:name] = "Some Sort Of Test" | |
Capybara::Selenium::Driver.new(app, { | |
:url => "http://username:[email protected]:80/wd/hub", |
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
# Include this in spec_helper when you're running remotely | |
Capybara.register_driver :selenium do |app| | |
require 'selenium-webdriver' | |
capabilities = Selenium::WebDriver::Remote::Capabilities.firefox | |
Capybara::Selenium::Driver.new(app, { | |
:url => "https://sauce_username:[email protected]:80/wd/hub", | |
:browser => :remote, |