This file contains 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
namespace :deploy | |
namespace :assets do | |
desc "precompile and sync assets to app servers" | |
task :sync do | |
on roles(:app), in: :parallel do |role| | |
run_locally do | |
execute "rsync -avr -e ssh ./public/assets/ #{role.username}@#{role.hostname}:#{release_path}/public/assets" | |
end | |
end | |
end |
This file contains 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
AccountSerializer = ActiveModelSerializer.extend | |
attrs: | |
defaultPreferences: | |
serialize: false | |
subscribed: | |
serialize: false | |
cancelled: | |
serialize: false | |
defaultPreferences: | |
serialize: false |
This file contains 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
$('a.some_class').bind 'click', (e) -> | |
e.preventDefault(); | |
$.get $(this).attr('href'), (data) -> | |
$.fancybox | |
content: $(data).find('#main_content_wrapper') |
This file contains 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
# Rather than going nuclear and downgrading Xcode or using some other big GCC installer, | |
# this worked for me... | |
# From https://github.com/mxcl/homebrew/wiki/Custom-GCC-and-cross-compilers | |
brew install https://raw.github.com/Homebrew/homebrew-dupes/master/apple-gcc42.rb | |
# Path may vary slightly... | |
export CC=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 | |
# If you've attempted to install REE previously and it failed... |
This file contains 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 'spec_helper' | |
def product_attributes | |
{ | |
:name => "Test Product", | |
:description => "hello world", | |
:sku => "my_sku", | |
:price => 100, | |
:on_hand => 10, | |
:deleted_at => nil, |
This file contains 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
context "#build_source" do | |
let(:payment_method) { Factory(:bogus_payment_method) } | |
it "should build the payment's source" do | |
params = { :amount => 100, :payment_method_id => payment_method.id, | |
:source_attributes => {:year=>"2012", :month =>"1", :number => '1234567890123',:verification_value => '123'}} | |
payment = Spree::Payment.new(params) | |
payment.should be_valid | |
payment.source.should_not be_nil |
This file contains 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
<message xmlns="urn:ULGNEWCART"><request requestID="addToCart" userID="STS" cartID="Q301-740" description="Coupon (U14925568)" qty="1" cardCode="1022" siteType="CELLARS" priceEachEX="-20.00" cartType="shopping" taxEach="0.00" lineNumber="" prodID="VOUCHER"/></message> |
This file contains 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
<message xmlns="urn:ULGNEWCART"> | |
<request prodID="" requestID="addToCart" description="Shipping" userID="STS" cartID="Q301-716" qty="1" cardCode="1022" siteType="CELLARS" priceEachEX="10.00" cartType="shopping" taxEach="0.00" lineNumber=""/> | |
</message> | |
This file contains 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
newdoorventures $ DEBUG=true ey deploy | |
Token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
Request GET https://cloud.engineyard.com/api/v2/apps | |
EY::API::RequestFailed 408 Request Timeout <html> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
<title>Request timed out</title> | |
<link rel="stylesheet" href="http://assets.engineyard.com/stylesheets/master.css" type="text/css" media="screen" charset="utf-8" /> | |
<style type="text/css"> |
This file contains 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
#making .irbrc posted at http://www.tech-angels.fr/post/963080350/improve-irb-and-fix-it-on-mac-os-x | |
#work with rails3 | |
require 'rubygems' | |
#rails3: be sure to include wirble and hirb in your Gemfile | |
require 'wirble' | |
require 'hirb' | |
Wirble.init | |
Wirble.colorize | |
# hirb (active record output format in table) |
NewerOlder