Skip to content

Instantly share code, notes, and snippets.

View BDQ's full-sized avatar
💥

Brian Quinn BDQ

💥
View GitHub Profile
//set hook frame positions
var show_frames = false;
var frame_level = 0;
function show_hook_frames(){
$jQ.each($("[data-hook]"), function(i, hook){
$jQ(hook).popover('disable');
});
if(show_frames){
@BDQ
BDQ / deploy.rb
Created December 1, 2011 13:39
Capistrano Recipe for Spree 0.70.0 - Single Server
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) # Add RVM's lib directory to the load path.
require "rvm/capistrano" # Load RVM's capistrano plugin.
require "bundler/capistrano"
load 'deploy/assets'
set :application, "YOUR_APP_NAME"
set :user, 'spree'
set :group, 'www-data'
set :domain, "#{application}.spreeworks.com"
S3_CREDENTIALS = {:access_key_id => ENV['S3_KEY'], :secret_access_key => ENV['S3_SECRET'], :bucket => ENV['S3_BUCKET']}
Image.class_eval do
Image.attachment_definitions[:attachment].tap do |a|
a[:styles][:large] = '600x350>'
a[:styles][:small] = '260x170>'
a[:styles][:mini] = '60x60#'
a[:styles][:square] = '78x78#'
['products/show', 'orders/show', 'taxons/show'].each do |virtual_path|
Deface::Override.new(:virtual_path => virtual_path,
:name => %q{del_accurate_title},
:remove => %q{h1})
end
Deface::Override.new(:virtual_path => "products/show",
:name => "tweak_thumbs",
:replace => "div#main-image",
:closing_selector => "div#thumbnails",
:text => %q{<span>Hello World</span>})
def rake(cmd, options={}, &block)
command = "cd #{current_path} && bundle exec rake #{cmd}"
run(command, options, &block)
end
$ cap rake 'db:admin:create'
class RailsdogRadio::Configuration < Spree::Preferences::Configuration
preference :homepage_groups, :default => ''
end
RailsdogRadio::Config = RailsdogRadio::Configuration.new
RailsdogRadio::Config.homepage_groups = 'Slingbox,Satellite Radios,Boomboxes,Accessories,Internet Radios,Vehicle Installation'
[WARNING] Orphaned preference `api_secret` with value `abc` for Spree::AuthenticationMethod with id of: 1, you should reset the preference value manually.
[WARNING] Orphaned preference `api_key` with value `123` for Spree::AuthenticationMethod with id of: 1, you should reset the preference value manually.
[WARNING] Orphaned preference `provider` with value `facebook` for Spree::AuthenticationMethod with id of: 1, you should reset the preference value manually.
[WARNING] Orphaned preference `amount` with value `5` for Spree::Calculator with id of: 1, you should reset the preference value manually.
[WARNING] Orphaned preference `amount` with value `10` for Spree::Calculator with id of: 2, you should reset the preference value manually.
[WARNING] Orphaned preference `api_secret` with value `def` for Spree::AuthenticationMethod with id of: 2, you should reset the preference value manually.
[WARNING] Orphaned preference `api_key` with value `123` for Spree::AuthenticationMethod with id of: 2, you should reset the
== ContentVisitedEvent: migrating ============================================
-- add_column(:spree_activators, :path, :string)
(90.0ms) ALTER TABLE `spree_activators` ADD `path` varchar(255)
-> 0.0903s
Spree::Promotion::Rules::LandingPage Load (0.2ms) SELECT `spree_promotion_rules`.* FROM `spree_promotion_rules` WHERE `spree_promotion_rules`.`type` IN ('Spree::Promotion::Rules::LandingPage')
Spree::Promotion Load (0.4ms) SELECT `spree_activators`.* FROM `spree_activators` WHERE `spree_activators`.`type` IN ('Spree::Promotion') AND `spree_activators`.`id` = 19 LIMIT 1
rake aborted!
An error has occurred, all later migrations canceled:
undefined method `name' for nil:NilClass
# LandingPage used to support static pages, we've moved to a static
# event. This adds path to promotions then migrates the old LandingPage rules
class ContentVisitedEvent < ActiveRecord::Migration
# Removed Class for Migrations
class Spree::Promotion::Rules::LandingPage < Spree::PromotionRule
preference :path, :string
def eligible?(order, options = {})
true
end