Skip to content

Instantly share code, notes, and snippets.

View ozzyaaron's full-sized avatar

Aaron Todd ozzyaaron

View GitHub Profile
def self.convert_from(char_enc)
@converter ||= {}
return @converter[char_enc] if @converter[char_enc].present?
if YDD.connection.encoding.eql? "UTF8"
puts "Creating a string converter from #{char_enc} that will ignore non-UTF8 characters."
@converter[char_enc] = Iconv.new('UTF-8//TRANSLIT//IGNORE', char_enc)
end
end
module RR
module Adapters
module RSpec2
include RRMethods
def setup_mocks_for_rspec
RR.reset
end
def verify_mocks_for_rspec
source 'http://rubygems.org'
gem "rails", "~>3.0.7"
gem "mail"
gem "i18n"
# Database
gem "pg"
# Authentication + Authorization
class FixMsfChargeSettings < ActiveRecord::Migration
class ::Setting < ActiveRecord::Base; end
class SettingDefinition < ActiveRecord::Base
has_many :settings
end
class FixMsfChargeSettings < ActiveRecord::Migration
class SettingDefinition < ActiveRecord::Base; end
class Setting < ActiveRecord::Base; end
def self.up
definition = SettingDefinition.find(:first, :conditions => { :key => "msf_rate_amex_diners" })
definition.update_attribute(:setting_type, "string")
definition.settings.each do |setting|
setting.update_attribute(:setting_type, "string")
* == Currently executing `passenger:restart'
* executing "mkdir -p /var/vhosts/sapphire.tfgdev.com.au/releases/20110504030221/tmp && touch /var/vhosts/sapphire.tfgdev.com.au/releases/20110504030221/tmp/restart.txt"
servers: ["broadside.thefrontiergroup.net.au"]
[[email protected]] executing command
command finished in 578ms
triggering after callbacks for `passenger:restart'
* == Currently executing `deploy:hit_it'
Hitting server sapphire.tfgdev.com.au
triggering after callbacks for `deploy'
* == Currently executing `deploy:migrate'
class AppBuilder < Rails::AppBuilder
include Thor::Actions
include Thor::Shell
def app
create_gemfile
system("bundle")
end
def test
class AppBuilder < Rails::AppBuilder
include Thor::Actions
include Thor::Shell
def app
create_gemfile
end
def test
rspec
We couldn’t find that file to show.
We couldn’t find that file to show.