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
# Calculate the nth Fibonacci number, f(n). Using invariants | |
def fibo_tr(n, acc1, acc2) | |
if n == 0 | |
0 | |
elsif n < 2 | |
acc2 | |
else | |
return fibo_tr(n - 1, acc2, acc2 + acc1) | |
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
after(:create) do |product| | |
image = File.open(File.expand_path('../../fixtures/thinking-cat.jpg', __FILE__)) | |
product.images.create!(attachment: image) | |
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
Started GET "/checkout" for 127.0.0.1 at 2014-10-24 01:25:31 -0500 | |
Processing by Spree::CheckoutController#edit as HTML | |
Spree::Store Load (0.6ms) SELECT "spree_stores".* FROM "spree_stores" WHERE (url like '%localhost%') ORDER BY "spree_stores"."id" ASC LIMIT 1 | |
Spree::Store Load (0.3ms) SELECT "spree_stores".* FROM "spree_stores" WHERE "spree_stores"."default" = 't' ORDER BY "spree_stores"."id" ASC LIMIT 1 | |
Spree::Order Load (1.3ms) SELECT "spree_orders".* FROM "spree_orders" WHERE "spree_orders"."completed_at" IS NULL AND "spree_orders"."currency" = 'MXN' AND "spree_orders"."guest_token" = 'iBU58pwSD_OWSgCu5s18DA' AND "spree_orders"."store_id" = 1 AND "spree_orders"."user_id" IS NULL LIMIT 1 FOR UPDATE | |
Spree::Adjustment Load (0.4ms) SELECT "spree_adjustments".* FROM "spree_adjustments" WHERE "spree_adjustments"."adjustable_type" = 'Spree::Order' AND "spree_adjustments"."adjustable_id" IN (23) ORDER BY spree_adjustments.created_at ASC | |
@order.bill_address before @order.with_lock: nil | |
(0 |
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
GIT | |
remote: git://github.com/AgilTec/spree_admin_roles_and_access.git | |
revision: 7b70317041ea9091964e445d4eb8a8cda517d213 | |
branch: 3.0.0.beta | |
specs: | |
spree_admin_roles_and_access (1.2.3) | |
spree_auth_devise | |
spree_core (~> 3.0.0.beta) | |
GIT |
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
Spree::User.class_eval do | |
scope :distributor, -> { includes(:spree_roles).where("#{Role.table_name}.name" => "distributor") } | |
def distributor? | |
has_spree_role?('distributor') | |
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
class Spree::DistributorRegistrationsController < Devise::RegistrationsController | |
helper 'spree/base', 'spree/store' | |
if Spree::Auth::Engine.dash_available? | |
helper 'spree/analytics' | |
end | |
include Spree::Core::ControllerHelpers::Auth | |
include Spree::Core::ControllerHelpers::Common | |
include Spree::Core::ControllerHelpers::Order |
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
<% @body_id = 'signup' %> | |
<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @user } %> | |
<div class="col-md-6 col-md-offset-3"> | |
<div class="panel panel-default"> | |
<div class="panel-heading"> | |
<h3 class="panel-title"><%= Spree.t(:new_distributor) %></h3> | |
</div> | |
<div id="new-customer" class="panel-body" data-hook="login"> | |
<%= form_for resource, :as => :spree_user, :url => "/afiliarse" do |f| %> |
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
HOMEBREW_VERSION: 0.6 | |
HEAD: | |
HOMEBREW_PREFIX: /usr/local | |
HOMEBREW_CELLAR: /usr/local/Cellar | |
HOMEBREW_CACHE: /Users/manuelvidaurre/Library/Caches/Homebrew | |
HOMEBREW_REPOSITORY: /usr/local | |
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew | |
Hardware: dual-core 64-bit penryn | |
OS X: 10.6.3 | |
Kernel Architecture: i386 |
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
brew install libgcrypt -vd (06-30 21:53) | |
==> Build Environment | |
CC: /usr/bin/cc | |
CXX: /usr/bin/c++ | |
LD: /usr/bin/cc | |
CFLAGS: -O3 -march=core2 -msse4.1 -w -pipe | |
CXXFLAGS: -O3 -march=core2 -msse4.1 -w -pipe | |
MAKEFLAGS: -j2 | |
PATH: /usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/Library/Frameworks/Python.framework/Versions/3.1/bin:/Users/manuelvidaurre/bin:/usr/local/git/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/X11/bin:/usr/local/sbin:/usr/local/mysql/bin:/Library/Frameworks/Python.framework/Versions/3.1/bin:/Users/manuelvidaurre/bin:/usr/local/git/bin:/opt/local/bin:/Applications/liftweb-1.0.1/apache-maven/bin:/Applications/liftweb-1.0.1/apache-maven/bin | |
==> Downloading ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.4.5.tar.bz2 |
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
checking for a BSD-compatible install... /usr/bin/install -c | |
checking whether build environment is sane... yes | |
checking for a thread-safe mkdir -p... ./install-sh -c -d | |
checking for gawk... no | |
checking for mawk... no | |
checking for nawk... no | |
checking for awk... awk | |
checking whether make sets $(MAKE)... yes | |
checking build system type... i386-apple-darwin10.4.0 | |
checking host system type... i386-apple-darwin10.4.0 |
OlderNewer