Skip to content

Instantly share code, notes, and snippets.

module SpreeSite
class Engine < Rails::Engine
def activate
# Add your custom site logic here
end
config.to_prepare &method(:activate).to_proc
end
end
loki:spree[master]$ bundle install
Updating git://github.com/thoughtbot/shoulda.git
Fetching git://github.com/pluginaweek/state_machine.git
0 blocks
Fetching git://github.com/Shopify/active_merchant.git
0 blocks
Fetching git://github.com/schof/searchlogic.git
0 blocks
Updating git://github.com/BDQ/resource_controller.git
Fetching source index from http://gemcutter.org/
Rails Dog is now hiring experienced Ruby/Rails developers for full
time positions. Developers will be working primarily on client work
related to the Spree e-commerce project. This is a great opportunity
to work for a company that is passionate about open source. MS Word
is the only commercial software you are likely to encounter in our
office! Come join our team and help shape the future of e-commerce.
Candidates must be local to the Washington, D.C. Metro Area.
Developers will work on site but can expect flexible scheduling and
the ability to work from home. Our office is located at the
 insert after :cart_item_description do
   %(
     Size: <%= line_item.width %> x <%= line_item.height %>
   )
 end
enable :raise_errors
get '/' do
'Spree patch monitor is online.'
end
post '/' do
payload = JSON.parse(params[:payload])
payload['commits'].each do |commit|
# stdlib
require 'net/http'
require 'net/https'
require 'net/smtp'
require 'socket'
require 'timeout'
require 'xmlrpc/client'
require 'openssl'
require 'cgi'
require 'prawn/layout'
require 'prawn/format'
bill_address = @order.bill_address
ship_address = @order.ship_address
image "#{RAILS_ROOT}/public/images/site/client_logo.jpg", :at => [0,720], :scale => 0.65
image "#{RAILS_ROOT}/public/images/site/invoice_label.png", :at => [300,720], :scale => 0.65
move_down 75
def available?(order)
special_categories = ShippingCategory.find(:all, :conditions => ["name IN ('TV', 'Medium Size TV', 'Oversized TV')"])
order.line_items.each do |line_item|
product = line_item.variant.product
return false if special_categories.include?(product.shipping_category)
end
true
end
source ~/.git_completion.sh
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
}
0: 1
1: 1
2: 1
3: (TESTMODE) This transaction has been approved.
4: 000000
5: P
6: 0
7: 573806002
8:
9: 29.98