Skip to content

Instantly share code, notes, and snippets.

@GeekOnCoffee
GeekOnCoffee / README.md
Last active August 3, 2017 13:58 — forked from jondkinney/README.md
jondkinney's console vim setup

Console VIM and Tmux setup compatible with Mac OS X and Linux.

Installation

Because this script prompts for user input, you have to execute it in a bit of an odd way. From a new command prompt simply copy and paste the following command and press return:

exec 3<&1;bash <&3 <(curl https://gist.githubusercontent.com/jondkinney/2040114/raw/vim.sh 2> /dev/null)
@GeekOnCoffee
GeekOnCoffee / shared_example.rb
Last active August 29, 2015 14:16 — forked from coreyhaines/not sure I like this
slightly better
RSpec.shared_examples "remember token" do
describe '#remember_token' do
subject { super().remember_token }
it { is_expected.not_to be_blank }
end
end
SELECT "spree_variants".*
FROM "spree_variants"
LEFT OUTER JOIN "spree_option_values_variants" ON "spree_option_values_variants"."variant_id" = "spree_variants"."id"
LEFT OUTER JOIN "spree_option_values" ON "spree_option_values"."id" = "spree_option_values_variants"."option_value_id"
LEFT OUTER JOIN "spree_products" ON "spree_products"."id" = "spree_variants"."product_id"
AND "spree_products"."deleted_at" IS NULL
WHERE "spree_variants"."deleted_at" IS NULL
AND (((("spree_option_values"."name" LIKE '%Big%'
OR "spree_products"."name" LIKE '%Big%')
OR "spree_variants"."sku" LIKE '%Big%')
desc "Generate completed orders on a fresh Spree install. e.g. rake make_orders[10]"
task :make_orders, [:number] => :environment do |t, args|
address_attributes = {
firstname: "Spree",
lastname: "Commerce",
address1: "4600 East West Highway, Suite 800",
city: "Bethesda",
country_id: Spree::Country.find_by(iso: "US").id,
state_id: Spree::State.find_by(abbr: "MD").id,
zipcode: "20814",
/Users/GeekOnCoffee/.rbenv/versions/2.1.0-preview2/lib/ruby/gems/2.1.0/gems/actionpack-4.0.1/lib/action_view/template/resolver.rb:310 allocated 3248 `String`
/Users/GeekOnCoffee/.rbenv/versions/2.1.0-preview2/lib/ruby/gems/2.1.0/gems/activesupport-4.0.1/lib/active_support/inflector/methods.rb:93 allocated 2154 `String`
/Users/GeekOnCoffee/.rbenv/versions/2.1.0-preview2/lib/ruby/gems/2.1.0/gems/activesupport-4.0.1/lib/active_support/inflector/methods.rb:92 allocated 1543 `String`
/Users/GeekOnCoffee/.rbenv/versions/2.1.0-preview2/lib/ruby/gems/2.1.0/gems/activesupport-4.0.1/lib/active_support/inflector/methods.rb:95 allocated 1329 `String`
/Users/GeekOnCoffee/.rbenv/versions/2.1.0-preview2/lib/ruby/gems/2.1.0/gems/paperclip-3.4.2/lib/paperclip/interpolations.rb:33 allocated 1320 `String`
/Users/GeekOnCoffee/.rbenv/versions/2.1.0-preview2/lib/ruby
This file has been truncated, but you can view the full file.
/Users/GeekOnCoffee/.rbenv/versions/2.1.0-preview2/lib/ruby/2.1.0/pathname.rb:43 allocated 23719 `String`
/Users/GeekOnCoffee/.rbenv/versions/2.1.0-preview2/lib/ruby/2.1.0/pathname.rb:47 allocated 10654 `String`
/Users/GeekOnCoffee/.rbenv/versions/2.1.0-preview2/lib/ruby/2.1.0/pathname.rb:47 allocated 10654 `Array<String>`
/Users/GeekOnCoffee/.rbenv/versions/2.1.0-preview2/lib/ruby/gems/2.1.0/gems/hike-1.2.3/lib/hike/index.rb:82 allocated 9561 `String`
/Users/GeekOnCoffee/.rbenv/versions/2.1.0-preview2/lib/ruby/gems/2.1.0/gems/activesupport-4.0.1/lib/active_support/core_ext/marshal.rb:6 allocated 7780 `String`
/Use
{:id=>"580485385", :idDomain=>"QB"}
"R801382384"
{:id=>"073411161", :idDomain=>"QB"}
"R307406722"
{:id=>"237431841", :idDomain=>"QB"}
"R782613781"
{:id=>"370276320", :idDomain=>"QB"}
State Superintendent of Public Instruction - VOTE FOR ONE
TONY EVERS (Non-Partisan)
DON PRIDEMORE (Non-Partisan)
JUSTICE OF THE SUPREME COURT - VOTE FOR ONE
ED FALLONE (Non-Partisan)
PAT ROGGENSACK (Non-Partisan)
COURT OF APPEALS - DISTRICT 3 - VOTE FOR ONE
LISA K. STARK (Non-Partisan)
Spree::Core::Search::Base.class_eval do
def get_products_conditions_for(base_scope, query)
unless query.blank?
base_scope = base_scope.like_any([:meta_keywords], query.split)
end
base_scope
end
end
Pending:
Spree::Api::CheckoutsController PUT 'update' can update addresses and transition from address to delivery
# need new technique of getting shipping methods
# ./spec/controllers/spree/api/checkouts_controller_spec.rb:78
Spree::Api::OrdersController working with an order can add shipping address
# need to figure out how to get shipping methods for an order
# ./spec/controllers/spree/api/orders_controller_spec.rb:127
Spree::Api::UsersController as a normal user cannot create a new user with invalid attributes
# Temporarily disabled with xit
# ./spec/controllers/spree/api/users_controller_spec.rb:39