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
#!/bin/sh | |
# | |
# An example hook script to verify what is about to be committed. | |
# Called by git-commit with no arguments. The hook should | |
# exit with non-zero status after issuing an appropriate message if | |
# it wants to stop the commit. | |
# | |
# To enable this hook, rename this file to "pre-commit". | |
if git-rev-parse --verify HEAD > /dev/null |
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
Processing ProductsController#show (for 127.0.0.1 at 2009-11-15 17:55:52) [GET] | |
Parameters: {"action"=>"show", "id"=>"palmgard-grip-tack-lite-adult-football-lineman-gloves", "controller"=>"products"} | |
[4;36;1mProduct Load (0.9ms)[0m [0;1mSELECT * FROM `products` WHERE (`products`.`permalink` = 'palmgard-grip-tack-lite-adult-football-lineman-gloves') LIMIT 1[0m | |
Cache miss: Spree::Config ({}) | |
[4;35;1mPreference Load (0.4ms)[0m [0mSELECT * FROM `preferences` WHERE (`preferences`.owner_id = 1 AND `preferences`.owner_type = 'Configuration') [0m | |
[4;36;1mConfiguration Columns (1.2ms)[0m [0;1mSHOW FIELDS FROM `configurations`[0m | |
[4;35;1mConfiguration Load (0.2ms)[0m [0mSELECT * FROM `configurations` WHERE (`configurations`.`id` = 1) [0m | |
[4;36;1mCACHE (0.0ms)[0m [0;1mSELECT * FROM `configurations` WHERE (`configurations`.`id` = 1) [0m | |
[4;35;1mCACHE (0.0ms)[0m [0mSELECT * FROM `configurations` WHERE (`configurations`.`id` = 1) [0m | |
Cache write (will save 3.80ms): Spree::Config |
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
Processing ProductsController#show (for 127.0.0.1 at 2009-11-15 17:55:52) [GET] | |
Parameters: {"action"=>"show", "id"=>"palmgard-grip-tack-lite-adult-football-lineman-gloves", "controller"=>"products"} | |
[4;36;1mProduct Load (0.9ms)[0m [0;1mSELECT * FROM `products` WHERE (`products`.`permalink` = 'palmgard-grip-tack-lite-adult-football-lineman-gloves') LIMIT 1[0m | |
Cache miss: Spree::Config ({}) | |
[4;35;1mPreference Load (0.4ms)[0m [0mSELECT * FROM `preferences` WHERE (`preferences`.owner_id = 1 AND `preferences`.owner_type = 'Configuration') [0m | |
[4;36;1mConfiguration Columns (1.2ms)[0m [0;1mSHOW FIELDS FROM `configurations`[0m | |
[4;35;1mConfiguration Load (0.2ms)[0m [0mSELECT * FROM `configurations` WHERE (`configurations`.`id` = 1) [0m | |
[4;36;1mCACHE (0.0ms)[0m [0;1mSELECT * FROM `configurations` WHERE (`configurations`.`id` = 1) [0m | |
[4;35;1mCACHE (0.0ms)[0m [0mSELECT * FROM `configurations` WHERE (`configurations`.`id` = 1) [0m | |
Cache write (will save 3.80ms): Spree::Config |
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
curl -H "Content-Type:application/json" -H "Accept:application/json" -H "X-SpreeAPIKey: 164472af75abf6bb02a7b83ff1bed852852252b6" http://localhost:3000/api/orders | |
curl -H "Content-Type:application/json" -H "Accept:application/json" -H "X-SpreeAPIKey: 164472af75abf6bb02a7b83ff1bed852852252b6" http://localhost:3000/api/orders?search[number]=R664048424 --globoff -i | |
curl -H "Content-Type:application/json" -H "Accept:application/json" -H "X-SpreeAPIKey: 164472af75abf6bb02a7b83ff1bed852852252b6" | |
http://localhost:3000/api/orders/1035625630 | |
curl -H "Content-Type:application/json" -H "Accept:application/json" -H "X-SpreeAPIKey: 164472af75abf6bb02a7b83ff1bed852852252b6" http://localhost:3000/api/orders/1035625630/shipments | |
# create new shipment for order (assumes you know shipping method id - no inventory units) |
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
curl -H "Content-Type:application/json" -H "Accept:application/json" -H "X-SpreeAPIKey: 164472af75abf6bb02a7b83ff1bed852852252b6" http://localhost:3000/api/orders | |
curl -H "Content-Type:application/json" -H "Accept:application/json" -H "X-SpreeAPIKey: 164472af75abf6bb02a7b83ff1bed852852252b6" http://localhost:3000/api/orders?search[number]=R664048424 --globoff -i | |
curl -H "Content-Type:application/json" -H "Accept:application/json" -H "X-SpreeAPIKey: 164472af75abf6bb02a7b83ff1bed852852252b6" | |
http://localhost:3000/api/orders/1035625630 | |
curl -H "Content-Type:application/json" -H "Accept:application/json" -H "X-SpreeAPIKey: 164472af75abf6bb02a7b83ff1bed852852252b6" http://localhost:3000/api/orders/1035625630/shipments | |
# create new shipment for order (assumes you know shipping method id - no inventory units) |
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
Shipment.class_eval do | |
def editable_by?(user) | |
%w(pending ready_to_ship unable_to_ship needs_fulfilment).include?(state) or user.has_role?(:admin) | |
end | |
Shipment.state_machines[:state] = StateMachine::Machine.new(Shipment, :initial => 'pending') do | |
event :ready do | |
transition :from => 'pending', :to => 'ready_to_ship' | |
end | |
event :pend do |
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
function hset() { | |
rm -rf ~/.heroku/credentials | |
ln -s ~/.heroku/credentials_$1 ~/.heroku/credentials | |
} |
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
== 0.11.0 | |
* # - 728 ProductsController::change_image method is not in use | |
* # - 1170 Support EWay payment gateway (AU) | |
* # - 1194 Improve confirmation button text for checkout steps | |
* # - 1232 user.has_role? should respect changes to roles and reloads | |
* # - 1235 Explicitly define the @orders collection on which to paginate in the admin/orders/index view | |
* # - 1236 Improve API for products. | |
* # - 1239 Introduce support of Cucumber | |
* # - 1256 Add alternative text to product images |
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
#!/usr/bin/perl | |
use 5.008; | |
use strict; | |
use Memoize; | |
sub usage { die "usage: git-large-blob <size[b|k|m]> [<git-log arguments ...>]\n" } | |
@ARGV or usage(); | |
my ( $max_size, $unit ) = ( shift =~ /^(\d+)([bkm]?)\z/ ) ? ( $1, $2 ) : usage(); |
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" | |
describe Spree::MailSettings do | |
let(:mail_method) { MailMethod.create(:environment => "test") } | |
before { mail_method.set(:perform_delivery => false) } | |
after { mail_method.set(:perform_delivery => true) } | |
context "init" do |
OlderNewer