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 "uri" | |
| (URI::REGEXP.constants - ["PATTERN"]).each do |rc| | |
| puts "#{rc}: #{URI::REGEXP.const_get(rc)}" | |
| end | |
| URI::REGEXP::PATTERN.constants.each do |pc| | |
| puts "#{pc}: #{URI::REGEXP::PATTERN.const_get(pc)}" | |
| 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
| module SpreeSite | |
| class Engine < Rails::Engine | |
| def self.activate | |
| Order.class_eval do | |
| def artworks; true; end | |
| end | |
| end | |
| config.to_prepare &method(:activate).to_proc |
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 "Regenerates a rails 3 app for testing" | |
| task :test_app do | |
| SPREE_PATH = ENV['SPREE_PATH'] | |
| raise "SPREE_PATH should be specified" unless SPREE_PATH | |
| require File.join(SPREE_PATH, 'lib/generators/spree/test_app_generator') | |
| class FlagPromotionTestAppGenerator < Spree::Generators::TestAppGenerator | |
| def tweak_gemfile | |
| append_file 'Gemfile' do | |
| <<-gems |
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 a bookmark to this | |
| javascript:(function(){var c=document.getElementsByTagName("link");for(var d=0;d<c.length;d++){var a=c[d];if(a.rel=='stylesheet'||a.type=="text/css"){var e="css_buster_"+Math.floor(Math.random()*1000000000);var g=a.href.split("?",2);var f;if(g.length>1){var b=g[1].indexOf("&")==-1;if(b){f=e}else{f=g[1]+"&"+e}}else{f=e}a.href=g[0]+"?"+f}}})(); | |
| */ | |
| (function() { | |
| var links = document.getElementsByTagName('link'); | |
| for (var i = 0; i < links.length; i++) { | |
| var l = links[i]; | |
| if (l.rel == 'stylesheet' || l.type == 'text/css') { |
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
| ENV["WATCHR"] = "1" | |
| system 'clear' | |
| def growl(message) | |
| growlnotify = `which growlnotify`.chomp | |
| title = "Watchr Test Results" | |
| puts message | |
| image = message.match(/\s0\s(errors|failures)/) ? "~/.watchr_images/passed.png" : "~/.watchr_images/failed.png" | |
| options = "-w -n Watchr --image '#{File.expand_path(image)}' -m '#{message}' '#{title}'" | |
| system %(#{growlnotify} #{options} &) |
NewerOlder