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
| desc "Duplicates images from all app/assets directories" | |
| task :cache_images_for_development => :environment do | |
| image_paths = Rails.application.assets.paths.select {|path| path.ends_with? "/images" } | |
| image_paths.reverse.each do |path| | |
| Dir.glob(File.join(path, "**/*")) do |file| | |
| puts file.to_s.sub(path, '') | |
| end |
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
| Deface::Override.new(:name => 'set_cart_form_enctype', | |
| :virtual_path => 'products/_cart_form', | |
| :replace => "code[erb-loud]:contains('populate_orders_url')", | |
| :text => "<%= form_for :order, :url => populate_orders_url, :html => {:multipart => true} do |f| %>") |
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
| require 'sprockets/asset_attributes' | |
| Sprockets::AssetAttributes.class_eval do | |
| alias_method :sprockets_path_with_fingerprint, :path_with_fingerprint | |
| def path_with_fingerprint(digest) | |
| if Rails.env.development? | |
| pathname.to_s | |
| else | |
| sprockets_path_with_fingerprint(digest) |
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
| $('#add_product_name').val('apache'); | |
| $('#add_product_name').trigger($.Event('keydown', { which: 34} )); |
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
| #### core/lib/spree_core/railtie.rb ##### | |
| initializer "spree.environment" do |app| | |
| app.config.spree = Spree::Environment.new | |
| end | |
| initializer "spree.register.payments" do |app| | |
| app.config.spree.payment_methods = [ | |
| Gateway::Bogus, | |
| Gateway::AuthorizeNet, |
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
| #!/usr/bin/ruby | |
| #url labels can only be /a-zA-Z0-9-/ | |
| urls = [ | |
| ['Spreedemo-home', 'http://demo.spreecommerce.com/'], | |
| ['Spreedemo-product', 'http://demo.spreecommerce.com/products/xm-inno-xm2go-portable-satellite-radio-mp3-player-and-home-kit'] | |
| ] | |
| n = 100 | |
| cons = [2, 20] | |
| results = { "rps" => [], "tpr" => [] } |
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
| source 'http://rubygems.org' | |
| gem 'rails', '3.1.0.rc6' | |
| # Bundle edge Rails instead: | |
| # gem 'rails', :git => 'git://github.com/rails/rails.git' | |
| gem 'sqlite3' | |
| gem 'json' |
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
| Deface::Override.new(:virtual_path => "layouts/admin", | |
| :name => "promo_admin_tabs", | |
| :insert_bottom => "[data-hook='admin_tabs'], #admin_tabs[data-hook]", | |
| :text => "<%= tab(:promotions) %>", | |
| :disabled => false) |
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
| require 'rubygems' | |
| require 'deface' | |
| html = %q{<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ --> | |
| <!--[if lt IE 7 ]> <html lang="<%= ::I18n.locale %>" class="no-js ie6"> <![endif]--> | |
| <!--[if IE 7 ]> <html lang="<%= ::I18n.locale %>" class="no-js ie7"> <![endif]--> | |
| <!--[if IE 8 ]> <html lang="<%= ::I18n.locale %>" class="no-js ie8"> <![endif]--> | |
| <!--[if IE 9 ]> <html lang="<%= ::I18n.locale %>" class="no-js ie9"> <![endif]--> | |
| <!--[if (gt IE 9)|!(IE)]> <html lang="<%= ::I18n.locale %>" class="no-js"> <![endif]-->} |
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
| echo "test is a test" | |
| echo $? |