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
compile_styles: function(){ | |
var palette = Spraycan.palettes.find(function(palette){ return palette.get('active') }); | |
var config_template = JST["spraycan/templates/shared/less_config"]; | |
var less_css = config_template({ palette: palette}); | |
less_css += window.frames[0].$jQ('style#source')[0].textContent; | |
var parser = less.Parser(); | |
parser.parse(less_css, function(error, result){ | |
if(error == null){ |
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
" changing tabs with number keys | |
let mapleader=',' | |
map <leader>1 1gt | |
map <leader>2 2gt | |
map <leader>3 3gt | |
map <leader>4 4gt | |
map <leader>5 5gt | |
map <leader>6 6gt | |
map <leader>7 7gt | |
map <leader>8 8gt |
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
== AddApiKeyToSpreeUsers: migrating ========================================== | |
-- add_column(:spree_users, :api_key, :string, {:limit=>40}) | |
rake aborted! | |
An error has occurred, this and all later migrations canceled: | |
SQLite3::SQLException: no such table: spree_users: ALTER TABLE "spree_users" ADD "api_key" varchar(40) |
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
NoMethodError in Spree::OmniauthCallbacksController#spree_works | |
undefined method `collect' for nil:NilClass | |
Rails.root: /Users/briandquinn/Development/store_works | |
Application Trace | Framework Trace | Full Trace | |
app/controllers/spree/omniauth_callbacks_controller.rb:19:in `check_for_store_ownership' | |
app/controllers/spree/omniauth_callbacks_controller.rb:4:in `spreeworks' | |
actionpack (3.2.2) lib/action_controller/metal/implicit_render.rb:4:in `send_action' |
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
== AddIndexOnUsersPersistenceToken: migrating ================================ | |
-- add_index(:users, :persistence_token) | |
rake aborted! | |
An error has occurred, this and all later migrations canceled: | |
SQLite3::SQLException: table users has no column named persistence_token: CREATE INDEX "index_users_on_persistence_token" ON "users" ("persistence_token") | |
Tasks: TOP => db:migrate | |
(See full trace by running task with --trace) |
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
== RenameApiKeyToSpreeApiKey: migrating ====================================== | |
-- rename_column(:spree_users, :api_key, :spree_api_key) | |
rake aborted! | |
An error has occurred, this and all later migrations canceled: | |
Could not find table 'spree_users' | |
Tasks: TOP => db:migrate | |
(See full trace by running task with --trace) |
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
# Adding a new state | |
Order.state_machine.states << skrill_state = StateMachine::State.new(Order.state_machine, 'skrill') | |
# Redefining an event | |
Order.state_machine.events << next_event = StateMachine::Event.new(Order.state_machine, :next) | |
next_event.transition :from => 'cart', :to => 'address' | |
next_event.transition :from => 'address', :to => 'delivery' | |
next_event.transition :from => 'delivery', :to => 'payment', :if => :payment_required? | |
next_event.transition :from => 'payment', :to => 'skrill', :if => lambda {true} | |
next_event.transition :from => 'skrill', :to => 'complete' |
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
p = Spree::Promotion.create(event_name: "spree.checkout.coupon_code_added", name: "Free Shipping", code: "FREESHIPBD") | |
p.promotion_actions << Spree::Promotion::Actions::CreateAdjustment.create() | |
pa = p.promotion_actions.first | |
pa.calculator = Spree::Calculator::FreeShipping.new |
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
Spree::Activator | |
event_names | |
event_names | |
Failures: | |
1) Spree::Activator event_names | |
Failure/Error: Unable to find matching line from backtrace | |
NoMethodError: |
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
Failures: | |
1) Spree::Api::V1::ProductsController as a normal user pagination can select the next page of products | |
Failure/Error: json_response["products"].first.should have_attributes(attributes) | |
NoMethodError: | |
undefined method `first' for nil:NilClass | |
# ./spec/controllers/spree/api/v1/products_controller_spec.rb:36:in `block (4 levels) in <module:Spree>' | |
Finished in 10.91 seconds | |
108 examples, 1 failure |