diff --git a/benchmark/shopify.rb b/benchmark/shopify.rb
new file mode 100644
index 0000000..e5dc3a3
--- /dev/null
+++ b/benchmark/shopify.rb
@@ -0,0 +1,88 @@
+# This profiler run simulates Shopify.
+# We are looking in the tests directory for liquid files and render them within the designated layout file.
+# We will also export a substantial database to liquid which the templates can render values of.
+# All this is to make the benchmark as non syntetic as possible. All templates and tests are lifted from
+# direct real-world usage and the profiler measures code that looks very similar to the way it looks in
+# Shopify which is likely the biggest user of liquid in the world which something to the tune of several
+# million Template#render calls a day.
+
+require 'rubygems'
+require 'active_support'
+require 'yaml'
+require 'digest/md5'
+
+require 'shopify/liquid'
+require 'shopify/database.rb'
+
+require "ruby-prof" rescue fail("install ruby-prof extension/gem")
+
+class ThemeProfiler
+
+ # Load all templates into memory, do this now so that
+ # we don't profile IO.
+ def initialize
+ @tests = Dir['tests/**/*.liquid'].collect do |test|
+ next if File.basename(test) == 'theme.liquid'
+
+ theme_path = File.dirname(test) + '/theme.liquid'
+
+ [File.read(test), (File.file?(theme_path) ? File.read(theme_path) : nil), test]
+ end.compact
+ end
+
+
+ def profile
+ RubyProf.measure_mode = RubyProf::WALL_TIME
+
+ # Dup assigns because will make some changes to them
+ assigns = Database.tables.dup
+
+ @tests.each do |liquid, layout, template_name|
+
+ # Compute page_tempalte outside of profiler run, uninteresting to profiler
+ html = nil
+ page_template = File.basename(template_name, File.extname(template_name))
+
+ # Profile compiling and rendering both
+ RubyProf.resume { html = compile_and_render(liquid, layout, assigns, page_template) }
+
+ # return the result and the MD5 of the content, this can be used to detect regressions between liquid version
+ $stdout.puts "* rendered template %s, content: %s" % [template_name, Digest::MD5.hexdigest(html)]
+
+ # Uncomment to dump html files to /tmp so that you can inspect for errors
+ #File.open("/tmp/#{File.basename(template_name)}.html", "w+") { |fp| fp < context.registers[:posted_successfully],
+ 'errors' => context['comment.errors'],
+ 'author' => context['comment.author'],
+ 'email' => context['comment.email'],
+ 'body' => context['comment.body']
+ }
+ wrap_in_form(article, render_all(@nodelist, context))
+ end
+ end
+
+ def wrap_in_form(article, input)
+ %Q{
}
+ end
+end
diff --git a/benchmark/shopify/database.rb b/benchmark/shopify/database.rb
new file mode 100644
index 0000000..4326a3a
--- /dev/null
+++ b/benchmark/shopify/database.rb
@@ -0,0 +1,44 @@
+require 'yaml'
+module Database
+
+ # Load the standard vision toolkit database and re-arrage it to be simply exportable
+ # to liquid as assigns. All this is based on Shopify
+ def self.tables
+ @tables ||= begin
+ db = YAML.load_file(File.dirname(__FILE__) + '/vision.database.yml')
+
+ # From vision source
+ db['products'].each do |product|
+ collections = db['collections'].find_all do |collection|
+ collection['products'].any? { |p| p['id'].to_i == product['id'].to_i }
+ end
+ product['collections'] = collections
+ end
+
+ # key the tables by handles, as this is how liquid expects it.
+ db = db.inject({}) do |assigns, (key, values)|
+ assigns[key] = values.inject({}) { |h, v| h[v['handle']] = v; h; }
+ assigns
+ end
+
+ # Some standard direct accessors so that the specialized templates
+ # render correctly
+ db['collection'] = db['collections'].values.first
+ db['product'] = db['products'].values.first
+ db['blog'] = db['blogs'].values.first
+ db['article'] = db['blog']['articles'].first
+
+ db['cart'] = {
+ 'total_price' => db['line_items'].values.inject(0) { |sum, item| sum += item['line_price'] * item['quantity'] },
+ 'item_count' => db['line_items'].values.inject(0) { |sum, item| sum += item['quantity'] },
+ 'items' => db['line_items'].values
+ }
+
+ db
+ end
+ end
+end
+
+if __FILE__ == $0
+ p Database.tables['collections']['frontpage'].keys
+end
\ No newline at end of file
diff --git a/benchmark/shopify/json_filter.rb b/benchmark/shopify/json_filter.rb
new file mode 100644
index 0000000..76ff3d2
--- /dev/null
+++ b/benchmark/shopify/json_filter.rb
@@ -0,0 +1,7 @@
+module JsonFilter
+
+ def json(object)
+ object.reject {|k,v| k == "collections" }.to_json
+ end
+
+end
\ No newline at end of file
diff --git a/benchmark/shopify/liquid.rb b/benchmark/shopify/liquid.rb
new file mode 100644
index 0000000..86863c6
--- /dev/null
+++ b/benchmark/shopify/liquid.rb
@@ -0,0 +1,18 @@
+require File.dirname(__FILE__) + '/../../lib/liquid'
+
+require File.dirname(__FILE__) + '/comment_form'
+require File.dirname(__FILE__) + '/paginate'
+require File.dirname(__FILE__) + '/json_filter'
+require File.dirname(__FILE__) + '/money_filter'
+require File.dirname(__FILE__) + '/shop_filter'
+require File.dirname(__FILE__) + '/tag_filter'
+require File.dirname(__FILE__) + '/weight_filter'
+
+Liquid::Template.register_tag 'paginate', Paginate
+Liquid::Template.register_tag 'form', CommentForm
+
+Liquid::Template.register_filter JsonFilter
+Liquid::Template.register_filter MoneyFilter
+Liquid::Template.register_filter WeightFilter
+Liquid::Template.register_filter ShopFilter
+Liquid::Template.register_filter TagFilter
diff --git a/benchmark/shopify/money_filter.rb b/benchmark/shopify/money_filter.rb
new file mode 100644
index 0000000..8f1f00e
--- /dev/null
+++ b/benchmark/shopify/money_filter.rb
@@ -0,0 +1,18 @@
+module MoneyFilter
+
+ def money_with_currency(money)
+ return '' if money.nil?
+ sprintf("$ %.2f USD", money/100.0)
+ end
+
+ def money(money)
+ return '' if money.nil?
+ sprintf("$ %.2f", money/100.0)
+ end
+
+ private
+
+ def currency
+ ShopDrop.new.currency
+ end
+end
\ No newline at end of file
diff --git a/benchmark/shopify/paginate.rb b/benchmark/shopify/paginate.rb
new file mode 100644
index 0000000..5972a74
--- /dev/null
+++ b/benchmark/shopify/paginate.rb
@@ -0,0 +1,93 @@
+class Paginate < Liquid::Block
+ Syntax = /(#{Liquid::QuotedFragment})\s*(by\s*(\d+))?/
+
+ def initialize(tag_name, markup, tokens)
+ @nodelist = []
+
+ if markup =~ Syntax
+ @collection_name = $1
+ @page_size = if $2
+ $3.to_i
+ else
+ 20
+ end
+
+ @attributes = { 'window_size' => 3 }
+ markup.scan(Liquid::TagAttributes) do |key, value|
+ @attributes[key] = value
+ end
+ else
+ raise SyntaxError.new("Syntax Error in tag 'paginate' - Valid syntax: paginate [collection] by number")
+ end
+
+ super
+ end
+
+ def render(context)
+ @context = context
+
+ context.stack do
+ current_page = context['current_page'].to_i
+
+ pagination = {
+ 'page_size' => @page_size,
+ 'current_page' => 5,
+ 'current_offset' => @page_size * 5
+ }
+
+ context['paginate'] = pagination
+
+ collection_size = context[@collection_name].size
+
+ raise ArgumentError.new("Cannot paginate array '#{@collection_name}'. Not found.") if collection_size.nil?
+
+ page_count = (collection_size.to_f / @page_size.to_f).to_f.ceil + 1
+
+ pagination['items'] = collection_size
+ pagination['pages'] = page_count -1
+ pagination['previous'] = link('« Previous', current_page-1 ) unless 1 >= current_page
+ pagination['next'] = link('Next »', current_page+1 ) unless page_count <= current_page+1
+ pagination['parts'] = []
+
+ hellip_break = false
+
+ if page_count > 2
+ 1.upto(page_count-1) do |page|
+
+ if current_page == page
+ pagination['parts'] << no_link(page)
+ elsif page == 1
+ pagination['parts'] << link(page, page)
+ elsif page == page_count -1
+ pagination['parts'] << link(page, page)
+ elsif page <= current_page - @attributes['window_size'] or page >= current_page + @attributes['window_size']
+ next if hellip_break
+ pagination['parts'] << no_link('…')
+ hellip_break = true
+ next
+ else
+ pagination['parts'] << link(page, page)
+ end
+
+ hellip_break = false
+ end
+ end
+
+ render_all(@nodelist, context)
+ end
+ end
+
+ private
+
+ def no_link(title)
+ { 'title' => title, 'is_link' => false}
+ end
+
+ def link(title, page)
+ { 'title' => title, 'url' => current_url + "?page=#{page}", 'is_link' => true}
+ end
+
+ def current_url
+ "/collections/#{frontpage}"
+ end
+end
\ No newline at end of file
diff --git a/benchmark/shopify/shop_filter.rb b/benchmark/shopify/shop_filter.rb
new file mode 100644
index 0000000..90d2e39
--- /dev/null
+++ b/benchmark/shopify/shop_filter.rb
@@ -0,0 +1,98 @@
+module ShopFilter
+
+ def asset_url(input)
+ "/files/1/[shop_id]/[shop_id]/assets/#{input}"
+ end
+
+ def global_asset_url(input)
+ "/global/#{input}"
+ end
+
+ def shopify_asset_url(input)
+ "/shopify/#{input}"
+ end
+
+ def script_tag(url)
+ %()
+ end
+
+ def stylesheet_tag(url, media="all")
+ %()
+ end
+
+ def link_to(link, url, title="")
+ %|#{link}|
+ end
+
+ def img_tag(url, alt="")
+ %||
+ end
+
+ def link_to_vendor(vendor)
+ if vendor
+ link_to vendor, url_for_vendor(vendor), vendor
+ else
+ 'Unknown Vendor'
+ end
+ end
+
+ def link_to_type(type)
+ if type
+ link_to type, url_for_type(type), type
+ else
+ 'Unknown Vendor'
+ end
+ end
+
+ def url_for_vendor(vendor_title)
+ "/collections/#{vendor_title.to_handle}"
+ end
+
+ def url_for_type(type_title)
+ "/collections/#{type_title.to_handle}"
+ end
+
+ def product_img_url(url, style = 'small')
+
+ unless url =~ /^products\/([\w\-\_]+)\.(\w{2,4})/
+ raise ArgumentError, 'filter "size" can only be called on product images'
+ end
+
+ case style
+ when 'original'
+ return '/files/shops/random_number/' + url
+ when 'grande', 'large', 'medium', 'small', 'thumb', 'icon'
+ "/files/shops/random_number/products/#{$1}_#{style}.#{$2}"
+ else
+ raise ArgumentError, 'valid parameters for filter "size" are: original, grande, large, medium, small, thumb and icon '
+ end
+ end
+
+ def default_pagination(paginate)
+
+ html = []
+ html << %(#{link_to(paginate['previous']['title'], paginate['previous']['url'])}) if paginate['previous']
+
+ for part in paginate['parts']
+
+ if part['is_link']
+ html << %(#{link_to(part['title'], part['url'])})
+ elsif part['title'].to_i == paginate['current_page'].to_i
+ html << %(#{part['title']})
+ else
+ html << %(#{part['title']})
+ end
+
+ end
+
+ html << %(#{link_to(paginate['next']['title'], paginate['next']['url'])}) if paginate['next']
+ html.join(' ')
+ end
+
+ # Accepts a number, and two words - one for singular, one for plural
+ # Returns the singular word if input equals 1, otherwise plural
+ def pluralize(input, singular, plural)
+ input == 1 ? singular : plural
+ end
+
+end
diff --git a/benchmark/shopify/tag_filter.rb b/benchmark/shopify/tag_filter.rb
new file mode 100644
index 0000000..93de0a5
--- /dev/null
+++ b/benchmark/shopify/tag_filter.rb
@@ -0,0 +1,25 @@
+module TagFilter
+
+ def link_to_tag(label, tag)
+ "#{label}"
+ end
+
+ def highlight_active_tag(tag, css_class='active')
+ if @context['current_tags'].include?(tag)
+ "#{tag}"
+ else
+ tag
+ end
+ end
+
+ def link_to_add_tag(label, tag)
+ tags = (@context['current_tags'] + [tag]).uniq
+ "#{label}"
+ end
+
+ def link_to_remove_tag(label, tag)
+ tags = (@context['current_tags'] - [tag]).uniq
+ "#{label}"
+ end
+
+end
diff --git a/benchmark/shopify/vision.database.yml b/benchmark/shopify/vision.database.yml
new file mode 100644
index 0000000..199d257
--- /dev/null
+++ b/benchmark/shopify/vision.database.yml
@@ -0,0 +1,945 @@
+# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+# Variants
+# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+product_variants:
+ - &product-1-var-1
+ id: 1
+ title: 151cm / Normal
+ price: 19900
+ weight: 1000
+ compare_at_price: 49900
+ available: true
+ inventory_quantity: 5
+ option1: 151cm
+ option2: Normal
+ option3:
+ - &product-1-var-2
+ id: 2
+ title: 155cm / Normal
+ price: 31900
+ weight: 1000
+ compare_at_price: 50900
+ available: true
+ inventory_quantity: 2
+ option1: 155cm
+ option2: Normal
+ option3:
+ - &product-2-var-1
+ id: 3
+ title: 162cm
+ price: 29900
+ weight: 1000
+ compare_at_price: 52900
+ available: true
+ inventory_quantity: 3
+ option1: 162cm
+ option2:
+ option3:
+ - &product-3-var-1
+ id: 4
+ title: 159cm
+ price: 19900
+ weight: 1000
+ compare_at_price:
+ available: true
+ inventory_quantity: 4
+ option1: 159cm
+ option2:
+ option3:
+ - &product-4-var-1
+ id: 5
+ title: 159cm
+ price: 19900
+ weight: 1000
+ compare_at_price: 32900
+ available: true
+ inventory_quantity: 6
+ option1: 159cm
+ option2:
+ option3:
+ - &product-1-var-3
+ id: 6
+ title: 158cm / Wide
+ price: 23900
+ weight: 1000
+ compare_at_price: 99900
+ available: false
+ inventory_quantity: 0
+ option1: 158cm
+ option2: Wide
+ option3:
+ - &product-3-var-2
+ id: 7
+ title: 162cm
+ price: 19900
+ weight: 1000
+ compare_at_price:
+ available: false
+ inventory_quantity: 0
+ option1: 162cm
+ option2:
+ option3:
+ - &product-3-var-3
+ id: 8
+ title: 165cm
+ price: 22900
+ weight: 1000
+ compare_at_price:
+ available: true
+ inventory_quantity: 4
+ option1: 165cm
+ option2:
+ option3:
+ - &product-5-var-1
+ id: 9
+ title: black / 42
+ price: 11900
+ weight: 500
+ compare_at_price: 22900
+ available: true
+ inventory_quantity: 1
+ option1: black
+ option2: 42
+ option3:
+ - &product-5-var-2
+ id: 10
+ title: beige / 42
+ price: 11900
+ weight: 500
+ compare_at_price: 22900
+ available: true
+ inventory_quantity: 3
+ option1: beige
+ option2: 42
+ option3:
+ - &product-5-var-3
+ id: 11
+ title: white / 42
+ price: 13900
+ weight: 500
+ compare_at_price: 24900
+ available: true
+ inventory_quantity: 1
+ option1: white
+ option2: 42
+ option3:
+ - &product-5-var-4
+ id: 12
+ title: black / 44
+ price: 11900
+ weight: 500
+ compare_at_price: 22900
+ available: true
+ inventory_quantity: 2
+ option1: black
+ option2: 44
+ option3:
+ - &product-5-var-5
+ id: 13
+ title: beige / 44
+ price: 11900
+ weight: 500
+ compare_at_price: 22900
+ available: false
+ inventory_quantity: 0
+ option1: beige
+ option2: 44
+ option3:
+ - &product-5-var-6
+ id: 14
+ title: white / 44
+ price: 13900
+ weight: 500
+ compare_at_price: 24900
+ available: false
+ inventory_quantity: 0
+ option1: white
+ option2: 44
+ option3:
+ - &product-6-var-1
+ id: 15
+ title: red
+ price: 2179500
+ weight: 200000
+ compare_at_price:
+ available: true
+ inventory_quantity: 0
+ option1: red
+ option2:
+ option3:
+ - &product-7-var-1
+ id: 16
+ title: black / small
+ price: 1900
+ weight: 200
+ compare_at_price:
+ available: true
+ inventory_quantity: 20
+ option1: black
+ option2: small
+ option3:
+ - &product-7-var-2
+ id: 17
+ title: black / medium
+ price: 1900
+ weight: 200
+ compare_at_price:
+ available: false
+ inventory_quantity: 0
+ option1: black
+ option2: medium
+ option3:
+ - &product-7-var-3
+ id: 18
+ title: black / large
+ price: 1900
+ weight: 200
+ compare_at_price:
+ available: true
+ inventory_quantity: 10
+ option1: black
+ option2: large
+ option3:
+ - &product-7-var-4
+ id: 19
+ title: black / extra large
+ price: 1900
+ weight: 200
+ compare_at_price:
+ available: false
+ inventory_quantity: 0
+ option1: black
+ option2: extra large
+ option3:
+ - &product-8-var-1
+ id: 20
+ title: brown / small
+ price: 5900
+ weight: 400
+ compare_at_price: 6900
+ available: true
+ inventory_quantity: 5
+ option1: brown
+ option2: small
+ option3:
+ - &product-8-var-2
+ id: 21
+ title: brown / medium
+ price: 5900
+ weight: 400
+ compare_at_price: 6900
+ available: false
+ inventory_quantity: 0
+ option1: brown
+ option2: medium
+ option3:
+ - &product-8-var-3
+ id: 22
+ title: brown / large
+ price: 5900
+ weight: 400
+ compare_at_price: 6900
+ available: true
+ inventory_quantity: 10
+ option1: brown
+ option2: large
+ option3:
+ - &product-8-var-4
+ id: 23
+ title: black / small
+ price: 5900
+ weight: 400
+ compare_at_price: 6900
+ available: true
+ inventory_quantity: 10
+ option1: black
+ option2: small
+ option3:
+ - &product-8-var-5
+ id: 24
+ title: black / medium
+ price: 5900
+ weight: 400
+ compare_at_price: 6900
+ available: true
+ inventory_quantity: 10
+ option1: black
+ option2: medium
+ option3:
+ - &product-8-var-6
+ id: 25
+ title: black / large
+ price: 5900
+ weight: 400
+ compare_at_price: 6900
+ available: false
+ inventory_quantity: 0
+ option1: black
+ option2: large
+ option3:
+ - &product-9-var-1
+ id: 26
+ title: Body Only
+ price: 499995
+ weight: 2000
+ compare_at_price:
+ available: true
+ inventory_quantity: 3
+ option1: Body Only
+ option2:
+ option3:
+ - &product-9-var-2
+ id: 27
+ title: Kit with 18-55mm VR lens
+ price: 523995
+ weight: 2000
+ compare_at_price:
+ available: true
+ inventory_quantity: 2
+ option1: Kit with 18-55mm VR lens
+ option2:
+ option3:
+ - &product-9-var-3
+ id: 28
+ title: Kit with 18-200 VR lens
+ price: 552500
+ weight: 2000
+ compare_at_price:
+ available: true
+ inventory_quantity: 3
+ option1: Kit with 18-200 VR lens
+ option2:
+ option3:
+
+# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+# Products
+# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+products:
+ - &product-1
+ id: 1
+ title: Arbor Draft
+ handle: arbor-draft
+ type: Snowboards
+ vendor: Arbor
+ price: 23900
+ price_max: 31900
+ price_min: 23900
+ price_varies: true
+ available: true
+ tags:
+ - season2005
+ - pro
+ - intermediate
+ - wooden
+ - freestyle
+ options:
+ - Length
+ - Style
+ compare_at_price: 49900
+ compare_at_price_max: 50900
+ compare_at_price_min: 49900
+ compare_at_price_varies: true
+ url: /products/arbor-draft
+ featured_image: products/arbor_draft.jpg
+ images:
+ - products/arbor_draft.jpg
+ description:
+ The Arbor Draft snowboard wouldn't exist if Polynesians hadn't figured out how to surf hundreds of years ago. But the Draft does exist, and it's here to bring your urban and park riding to a new level. The board's freaky Tiki design pays homage to culture that inspired snowboarding. It's designed to spin with ease, land smoothly, lock hook-free onto rails, and take the abuse of a pavement pounding or twelve. The Draft will pop off kickers with authority and carve solidly across the pipe. The Draft features targeted Koa wood die cuts inlayed into the deck that enhance the flex pattern. Now bow down to riding's ancestors.
+ variants:
+ - *product-1-var-1
+ - *product-1-var-2
+ - *product-1-var-3
+ - &product-2
+ id: 2
+ title: Arbor Element
+ handle: arbor-element
+ type: Snowboards
+ vendor: Arbor
+ price: 29900
+ price_max: 29900
+ price_min: 29900
+ price_varies: false
+ available: true
+ tags:
+ - season2005
+ - pro
+ - wooden
+ - freestyle
+ options:
+ - Length
+ compare_at_price: 52900
+ compare_at_price_max: 52900
+ compare_at_price_min: 52900
+ compare_at_price_varies: false
+ url: /products/arbor-element
+ featured_image: products/element58.jpg
+ images:
+ - products/element58.jpg
+ description:
+ The Element is a technically advanced all-mountain board for riders who readily transition from one terrain, snow condition, or riding style to another. Its balanced design provides the versatility needed for the true ride-it-all experience. The Element is exceedingly lively, freely initiates, and holds a tight edge at speed. Its structural real-wood topsheet is made with book-matched Koa.
+ variants:
+ - *product-2-var-1
+
+ - &product-3
+ id: 3
+ title: Comic ~ Pastel
+ handle: comic-pastel
+ type: Snowboards
+ vendor: Technine
+ price: 19900
+ price_max: 22900
+ price_min: 19900
+ tags:
+ - season2006
+ - beginner
+ - intermediate
+ - freestyle
+ - purple
+ options:
+ - Length
+ price_varies: true
+ available: true
+ compare_at_price:
+ compare_at_price_max: 0
+ compare_at_price_min: 0
+ compare_at_price_varies: false
+ url: /products/comic-pastel
+ featured_image: products/technine1.jpg
+ images:
+ - products/technine1.jpg
+ - products/technine2.jpg
+ - products/technine_detail.jpg
+ description:
+ 2005 Technine Comic Series Description The Comic series was developed to be the ultimate progressive freestyle board in the Technine line. Dependable edge control and a perfect flex pattern for jumping in the park or out of bounds. Landins and progression will come easy with this board and it will help your riding progress to the next level. Street rails, park jibs, backcountry booters and park jumps, this board will do it all.
+ variants:
+ - *product-3-var-1
+ - *product-3-var-2
+ - *product-3-var-3
+
+ - &product-4
+ id: 4
+ title: Comic ~ Orange
+ handle: comic-orange
+ type: Snowboards
+ vendor: Technine
+ price: 19900
+ price_max: 19900
+ price_min: 19900
+ price_varies: false
+ available: true
+ tags:
+ - season2006
+ - beginner
+ - intermediate
+ - freestyle
+ - orange
+ options:
+ - Length
+ compare_at_price: 32900
+ compare_at_price_max: 32900
+ compare_at_price_min: 32900
+ compare_at_price_varies: false
+ url: /products/comic-orange
+ featured_image: products/technine3.jpg
+ images:
+ - products/technine3.jpg
+ - products/technine4.jpg
+ description:
+ 2005 Technine Comic Series Description The Comic series was developed to be the ultimate progressive freestyle board in the Technine line. Dependable edge control and a perfect flex pattern for jumping in the park or out of bounds. Landins and progression will come easy with this board and it will help your riding progress to the next level. Street rails, park jibs, backcountry booters and park jumps, this board will do it all.
+ variants:
+ - *product-4-var-1
+
+ - &product-5
+ id: 5
+ title: Burton Boots
+ handle: burton-boots
+ type: Boots
+ vendor: Burton
+ price: 11900
+ price_max: 11900
+ price_min: 11900
+ price_varies: false
+ available: true
+ tags:
+ - season2006
+ - beginner
+ - intermediate
+ - boots
+ options:
+ - Color
+ - Shoe Size
+ compare_at_price: 22900
+ compare_at_price_max: 22900
+ compare_at_price_min: 22900
+ compare_at_price_varies: false
+ url: /products/burton-boots
+ featured_image: products/burton.jpg
+ images:
+ - products/burton.jpg
+ description:
+ The Burton boots are particularly well on snowboards. The very best thing about them is that the according picture is cubic. This makes testing in a Vision testing environment very easy.
+ variants:
+ - *product-5-var-1
+ - *product-5-var-2
+ - *product-5-var-3
+ - *product-5-var-4
+ - *product-5-var-5
+ - *product-5-var-6
+
+ - &product-6
+ id: 6
+ title: Superbike 1198 S
+ handle: superbike
+ type: Superbike
+ vendor: Ducati
+ price: 2179500
+ price_max: 2179500
+ price_min: 2179500
+ price_varies: false
+ available: true
+ tags:
+ - ducati
+ - superbike
+ - bike
+ - street
+ - racing
+ - performance
+ options:
+ - Color
+ compare_at_price:
+ compare_at_price_max: 0
+ compare_at_price_min: 0
+ compare_at_price_varies: false
+ url: /products/superbike
+ featured_image: products/ducati.jpg
+ images:
+ - products/ducati.jpg
+ description:
+
‘S’ PERFORMANCE
+
Producing 170hp (125kW) and with a dry weight of just 169kg (372.6lb), the new 1198 S now incorporates more World Superbike technology than ever before by taking the 1198 motor and adding top-of-the-range suspension, lightweight chassis components and a true racing-style traction control system designed for road use.
+
The high performance, fully adjustable 43mm Öhlins forks, which sport low friction titanium nitride-treated fork sliders, respond effortlessly to every imperfection in the tarmac. Beyond their advanced engineering solutions, one of the most important characteristics of Öhlins forks is their ability to communicate the condition and quality of the tyre-to-road contact patch, a feature that puts every rider in superior control. The suspension set-up at the rear is complemented with a fully adjustable Öhlins rear shock equipped with a ride enhancing top-out spring and mounted to a single-sided swingarm for outstanding drive and traction. The front-to-rear Öhlins package is completed with a control-enhancing adjustable steering damper.
High Quality Shopify Shirt. Wear your e-commerce solution with pride and attract attention anywhere you go.
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Extra comfortable zip up sweater. Durable quality, ideal for any outdoor activities.
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Flagship pro D-SLR with a 12.1-MP FX-format CMOS sensor, blazing 9 fps shooting at full FX resolution and low-noise performance up to 6400 ISO.
+
Nikon's original 12.1-megapixel FX-format (23.9 x 36mm) CMOS sensor: Couple Nikon's exclusive digital image processing system with the 12.1-megapixel FX-format and you'll get breathtakingly rich images while also reducing noise to unprecedented levels with even higher ISOs.
+
Continuous shooting at up to 9 frames per second: At full FX resolution and up to 11fps in the DX crop mode, the D3 offers uncompromised shooting speeds for fast-action and sports photography.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+ created_at: 2005-04-04 12:00
+
+blogs:
+ - id: 1
+ handle: news
+ title: News
+ url: /blogs/news
+ articles:
+ - id: 3
+ title: 'Welcome to the new Foo Shop'
+ author: Daniel
+ content:
Welcome to your Shopify store! The jaded Pixel crew is really glad you decided to take Shopify for a spin.
To help you get you started with Shopify, here are a couple of tips regarding what you see on this page.
The text you see here is an article. To edit this article, create new articles or create new pages you can go to the Blogs & Pages tab of the administration menu.
The Shopify t-shirt above is a product and selling products is what Shopify is all about. To edit this product, or create new products you can go to the Products Tab in of the administration menu.
While you're looking around be sure to check out the Collections and Navigations tabs and soon you will be well on your way to populating your site.
And of course don't forget to browse the theme gallery to pick a new look for your shop!
Shopify is in beta If you would like to make comments or suggestions please visit us in the Shopify Forums or drop us an email.
+ created_at: 2005-04-04 16:00
+ - id: 4
+ title: 'Breaking News: Restock on all sales products'
+ author: Tobi
+ content: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+ created_at: 2005-04-04 12:00
+ articles_count: 2
+
+ - id: 2
+ handle: bigcheese-blog
+ title: Bigcheese blog
+ url: /blogs/bigcheese-blog
+ articles:
+ - id: 1
+ title: 'One thing you probably did not know yet...'
+ author: Justin
+ content: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+ created_at: 2005-04-04 16:00
+ comments:
+ -
+ id: 1
+ author: John Smith
+ email: john@smith.com
+ content: Wow...great article man.
+ status: published
+ created_at: 2009-01-01 12:00
+ updated_at: 2009-02-01 12:00
+ url: ""
+ -
+ id: 2
+ author: John Jones
+ email: john@jones.com
+ content: I really enjoyed this article. And I love your shop! It's awesome. Shopify rocks!
+ status: published
+ created_at: 2009-03-01 12:00
+ updated_at: 2009-02-01 12:00
+ url: "http://somesite.com/"
+ - id: 2
+ title: Fascinating
+ author: Tobi
+ content: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+ created_at: 2005-04-06 12:00
+ comments:
+ articles_count: 2
+ comments_enabled?: true
+ comment_post_url: ""
+ comments_count: 2
+ moderated?: true
+
+ - id: 3
+ handle: paginated-blog
+ title: Paginated blog
+ url: /blogs/paginated-blog
+ articles:
+ - id: 6
+ title: 'One thing you probably did not know yet...'
+ author: Justin
+ content: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+ created_at: 2005-04-04 16:00
+
+ - id: 7
+ title: Fascinating
+ author: Tobi
+ content: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+ created_at: 2005-04-06 12:00
+ articles_count: 200
diff --git a/benchmark/shopify/weight_filter.rb b/benchmark/shopify/weight_filter.rb
new file mode 100644
index 0000000..cf5c8bc
--- /dev/null
+++ b/benchmark/shopify/weight_filter.rb
@@ -0,0 +1,11 @@
+module WeightFilter
+
+ def weight(grams)
+ sprintf("%.2f", grams / 1000)
+ end
+
+ def weight_with_unit(grams)
+ "#{weight(grams)} kg"
+ end
+
+end
\ No newline at end of file
diff --git a/benchmark/tests/dropify/article.liquid b/benchmark/tests/dropify/article.liquid
new file mode 100644
index 0000000..504eb39
--- /dev/null
+++ b/benchmark/tests/dropify/article.liquid
@@ -0,0 +1,74 @@
+
Not all the fields have been filled out correctly!
+ {% endif %}
+
+
+
+
+
+
+
+
+
+
+
+
+ {% if blog.moderated? %}
+
comments have to be approved before showing up
+ {% endif %}
+
+
+ {% endform %}
+
+
+
+
+{% endif %}
+
\ No newline at end of file
diff --git a/benchmark/tests/dropify/blog.liquid b/benchmark/tests/dropify/blog.liquid
new file mode 100644
index 0000000..3c36a32
--- /dev/null
+++ b/benchmark/tests/dropify/blog.liquid
@@ -0,0 +1,33 @@
+
+
{{page.title}}
+
+ {% paginate blog.articles by 20 %}
+
+ {% for article in blog.articles %}
+
+
\ No newline at end of file
diff --git a/benchmark/tests/dropify/cart.liquid b/benchmark/tests/dropify/cart.liquid
new file mode 100644
index 0000000..f206ee5
--- /dev/null
+++ b/benchmark/tests/dropify/cart.liquid
@@ -0,0 +1,66 @@
+
+
+
+
+ {% if cart.item_count == 0 %}
+
Your shopping cart is looking rather empty...
+ {% else %}
+
+
+ {% endif %}
+
+
\ No newline at end of file
diff --git a/benchmark/tests/dropify/collection.liquid b/benchmark/tests/dropify/collection.liquid
new file mode 100644
index 0000000..0679d1e
--- /dev/null
+++ b/benchmark/tests/dropify/collection.liquid
@@ -0,0 +1,22 @@
+{% paginate collection.products by 20 %}
+
+
+
+{% endpaginate %}
\ No newline at end of file
diff --git a/benchmark/tests/dropify/index.liquid b/benchmark/tests/dropify/index.liquid
new file mode 100644
index 0000000..569896d
--- /dev/null
+++ b/benchmark/tests/dropify/index.liquid
@@ -0,0 +1,47 @@
+
+
Featured Items
+{% for product in collections.frontpage.products limit:1 offset:0 %}
+
+ In Admin > Blogs & Pages, create a page with the handle frontpage and it will show up here.
+ {{ "Learn more about handles" | link_to "http://wiki.shopify.com/Handle" }}
+
+ {% endif %}
+
+
+
+
+ {% for article in blogs.news.articles offset:1 %}
+
+
{{ article.title }}
+
+ {{ article.content }}
+
+
+ {% endfor %}
+
+
diff --git a/benchmark/tests/dropify/page.liquid b/benchmark/tests/dropify/page.liquid
new file mode 100644
index 0000000..dcd6399
--- /dev/null
+++ b/benchmark/tests/dropify/page.liquid
@@ -0,0 +1,8 @@
+
+
{{page.title}}
+
+
+ {{page.content}}
+
+
+
\ No newline at end of file
diff --git a/benchmark/tests/dropify/product.liquid b/benchmark/tests/dropify/product.liquid
new file mode 100644
index 0000000..12d8ea0
--- /dev/null
+++ b/benchmark/tests/dropify/product.liquid
@@ -0,0 +1,68 @@
+
Comments
+ + ++ {% for comment in article.comments %} +-
+
+ {{ comment.author }} said on {{ comment.created_at | date: "%B %d, %Y" }}:
+
+
+
+ {{ comment.content }}
+
+
+ {% endfor %}
+
+ + +Leave a comment
+ + + {% if form.posted_successfully? %} + {% if blog.moderated? %} ++ It will have to be approved by the blog owner first before showing up. +
+ + + + + + + + +
+ + {% if blog.moderated? %} +comments have to be approved before showing up
+ {% endif %} + + + {% endform %} +