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
| def packages(order) | |
| split_packages = Array.new | |
| number_of_packages = 1 | |
| multiplier = Spree::ActiveShipping::Config[:unit_multiplier] | |
| default_weight = Spree::ActiveShipping::Config[:default_weight] | |
| weight = order.line_items.inject(0) do |weight, line_item| | |
| item_weight = line_item.variant.weight.present? ? line_item.variant.weight : default_weight | |
| weight + (line_item.quantity * item_weight * multiplier) |
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
| //tr[th[text()="[email protected]"]]/descendant::a[normalize-space(text())='Delete'] |
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
| for num in [1..starValue] |
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} &) |
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
| Dir[Rails.root.join("vendor/game_types/**/app/stylesheets")].each do |sass_folder| | |
| Sass::Plugin.add_template_location( | |
| sass_folder, | |
| sass_folder + '/../../public/stylesheets' | |
| ) | |
| 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
| InheritedResources::BaseHelpers.module_eval do | |
| def resource | |
| get_resource_ivar || end_of_association_chain.respond_to?('by_slug') ? set_resource_ivar(end_of_association_chain.by_slug(params[:id])) : set_resource_ivar(end_of_association_chain.find(params[:id])) | |
| end | |
| def collection | |
| get_collection_ivar || set_collection_ivar(end_of_association_chain.all) | |
| end | |
| 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
| def filter_url_helper(filter_key, filter_value) | |
| product_group_query = params[:product_group_query] != nil ? Array.new(params[:product_group_query]) : nil | |
| if product_group_query == nil | |
| return "/t/#{params[:id].join('/')}/s/#{filter_key}/#{filter_value}" | |
| end | |
| if product_group_query.index(filter_key) == nil | |
| return "/t/#{params[:id].join('/')}/s/#{product_group_query.join('/')}/#{filter_key}/#{filter_value}" | |
| else | |
| product_group_query[product_group_query.index(filter_key)+1] = filter_value |
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
| <httpHandlers> | |
| <add verb="*" path="BuiltJS" type="Castle.MonoRail.Framework.MonoRailHttpHandlerFactory, Castle.MonoRail.Framework"/> | |
| </httpHandlers> |
NewerOlder