Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

initial checkin

  • Loading branch information...
commit cf989a683deaab0142930459bec327c14d420238 0 parents
@tobi tobi authored
Showing with 29,566 additions and 0 deletions.
  1. +36 −0 .gitignore
  2. +91 −0 Rakefile
  3. +47 −0 Vision.app/Contents/Info.plist
  4. BIN  Vision.app/Contents/MacOS/Vision
  5. +1 −0  Vision.app/Contents/PkgInfo
  6. 0  Vision.app/Contents/Resources/.script
  7. +20 −0 Vision.app/Contents/Resources/AppSettings.plist
  8. BIN  Vision.app/Contents/Resources/appIcon.icns
  9. +4 −0 Vision.app/Contents/Resources/en.lproj/InfoPlist.strings
  10. +26 −0 Vision.app/Contents/Resources/en.lproj/MainMenu.nib/classes.nib
  11. +21 −0 Vision.app/Contents/Resources/en.lproj/MainMenu.nib/info.nib
  12. BIN  Vision.app/Contents/Resources/en.lproj/MainMenu.nib/keyedobjects.nib
  13. +29 −0 Vision.app/Contents/Resources/script
  14. BIN  Vision.exe
  15. BIN  exports/dropify.theme.zip
  16. BIN  exports/lemongrass.theme.zip
  17. BIN  exports/spectrum.theme.zip
  18. +10 −0 misc/Vision
  19. +13 −0 misc/Vision.sh
  20. +5 −0 misc/browsertest.rb
  21. BIN  misc/vision-logo.png
  22. BIN  misc/vision.exe/Vision.ico
  23. +28 −0 misc/vision.exe/vision.Xml
  24. +14 −0 misc/vision.exe/vision.c
  25. +13 −0 misc/vision.exe/vision.h
  26. +31 −0 misc/vision.exe/vision.prj
  27. +7 −0 misc/vision.exe/vision.rc
  28. +6 −0 misc/vision.exe/vision_gen.c
  29. +6 −0 misc/vision.exe/weditfn.prt
  30. +64 −0 public/contest.html
  31. BIN  public/images/corners/bl.png
  32. BIN  public/images/corners/br.png
  33. BIN  public/images/corners/gbl.png
  34. BIN  public/images/corners/gbr.png
  35. BIN  public/images/corners/gtl.png
  36. BIN  public/images/corners/gtr.png
  37. BIN  public/images/corners/tl.png
  38. BIN  public/images/corners/tr.png
  39. BIN  public/images/docs.gif
  40. BIN  public/images/download.gif
  41. BIN  public/images/hdr-tile-top.gif
  42. BIN  public/images/hdr-tile-top.png
  43. BIN  public/images/jp-symbol.gif
  44. BIN  public/images/logo-2.png
  45. BIN  public/images/logo.gif
  46. BIN  public/images/logo.png
  47. BIN  public/images/logo2.ai
  48. BIN  public/images/logo3.png
  49. BIN  public/images/media.gif
  50. BIN  public/images/nano.jpg
  51. BIN  public/images/notify.png
  52. BIN  public/images/plan-free.gif
  53. BIN  public/images/plan-premium.gif
  54. BIN  public/images/register.gif
  55. BIN  public/images/shlogo-large.png
  56. BIN  public/images/shopify-logo.png
  57. BIN  public/images/software.gif
  58. BIN  public/images/themes.gif
  59. BIN  public/images/tile-ablue.gif
  60. BIN  public/images/tile-blue.gif
  61. BIN  public/images/tile-green.gif
  62. BIN  public/images/tile.gif
  63. BIN  public/images/top-box.gif
  64. BIN  public/images/tour.gif
  65. BIN  public/images/us.gif
  66. BIN  public/images/vision-screen.gif
  67. BIN  public/images/win-nano.gif
  68. BIN  public/images/xlink.gif
  69. +118 −0 public/index.html
  70. BIN  public/media/vision.mov
  71. BIN  public/misc/Ruby-1.8.2.dmg
  72. +36 −0 public/ruby.html
  73. +567 −0 public/stylesheets/vision.css
  74. +97 −0 public/update.html
  75. +1 −0  public/version.xml
  76. +97 −0 server/Rakefile
  77. +9 −0 server/app/drops/blog_collection_drop.rb
  78. +15 −0 server/app/drops/cart_drop.rb
  79. +9 −0 server/app/drops/collection_collection_drop.rb
  80. +9 −0 server/app/drops/link_list_collection_drop.rb
  81. +9 −0 server/app/drops/page_collection_drop.rb
  82. +27 −0 server/app/drops/shop_drop.rb
  83. +18 −0 server/app/filters/money_filter.rb
  84. +95 −0 server/app/filters/shop_filter.rb
  85. +25 −0 server/app/filters/tag_filter.rb
  86. +11 −0 server/app/filters/weight_filter.rb
  87. +47 −0 server/app/servlets/static_assets_servlet.rb
  88. +161 −0 server/app/servlets/theme_picker_servlet.rb
  89. +138 −0 server/app/servlets/theme_servlet.rb
  90. +129 −0 server/app/servlets/vision_servlet.rb
  91. +97 −0 server/app/tags/paginate.rb
  92. +47 −0 server/app/views/theme/checkout.html
  93. +50 −0 server/app/views/theme/search.html
  94. +39 −0 server/app/views/theme_picker/create.rhtml
  95. +3 −0  server/app/views/theme_picker/create_theme.rhtml
  96. +31 −0 server/app/views/theme_picker/export.rhtml
  97. +37 −0 server/app/views/theme_picker/export_theme.rhtml
  98. +60 −0 server/app/views/theme_picker/index.rhtml
  99. +261 −0 server/app/views/vision/vision.css
  100. +78 −0 server/app/views/vision/vision.js
  101. +31 −0 server/app/views/vision/vision.rhtml
  102. BIN  server/bin/ruby.exe
  103. +37 −0 server/config/environment.rb
  104. +18 −0 server/config/mounts.rb
  105. +32 −0 server/config/version.rb
  106. +483 −0 server/db/database.yml
  107. +110 −0 server/db/docs.textile
  108. +66 −0 server/db/docs.yml
  109. +57 −0 server/lib/class_attribute_accessor.rb
  110. +30 −0 server/lib/database.rb
  111. +17 −0 server/lib/liquid_servlet.rb
  112. +22 −0 server/lib/logging.rb
  113. +44 −0 server/lib/module_attribute_accessors.rb
  114. +182 −0 server/lib/servlet.rb
  115. +26 −0 server/lib/string_ext.rb
  116. 0  server/public/favicon.ico
  117. BIN  server/public/files/shops/random_number/products/arbor_draft.jpg
  118. BIN  server/public/files/shops/random_number/products/arbor_draft_icon.jpg
  119. BIN  server/public/files/shops/random_number/products/arbor_draft_medium.jpg
  120. BIN  server/public/files/shops/random_number/products/arbor_draft_pico.jpg
  121. BIN  server/public/files/shops/random_number/products/arbor_draft_small.jpg
  122. BIN  server/public/files/shops/random_number/products/arbor_draft_thumb.jpg
  123. BIN  server/public/files/shops/random_number/products/burton.jpg
  124. BIN  server/public/files/shops/random_number/products/burton_icon.jpg
  125. BIN  server/public/files/shops/random_number/products/burton_medium.jpg
  126. BIN  server/public/files/shops/random_number/products/burton_pico.jpg
  127. BIN  server/public/files/shops/random_number/products/burton_small.jpg
  128. BIN  server/public/files/shops/random_number/products/burton_thumb.jpg
  129. BIN  server/public/files/shops/random_number/products/element58.jpg
  130. BIN  server/public/files/shops/random_number/products/element58_icon.jpg
  131. BIN  server/public/files/shops/random_number/products/element58_medium.jpg
  132. BIN  server/public/files/shops/random_number/products/element58_pico.jpg
  133. BIN  server/public/files/shops/random_number/products/element58_small.jpg
  134. BIN  server/public/files/shops/random_number/products/element58_thumb.jpg
  135. BIN  server/public/files/shops/random_number/products/technine1.jpg
  136. BIN  server/public/files/shops/random_number/products/technine1_icon.jpg
  137. BIN  server/public/files/shops/random_number/products/technine1_medium.jpg
  138. BIN  server/public/files/shops/random_number/products/technine1_pico.jpg
  139. BIN  server/public/files/shops/random_number/products/technine1_small.jpg
  140. BIN  server/public/files/shops/random_number/products/technine1_thumb.jpg
  141. BIN  server/public/files/shops/random_number/products/technine2.jpg
  142. BIN  server/public/files/shops/random_number/products/technine2_icon.jpg
  143. BIN  server/public/files/shops/random_number/products/technine2_medium.jpg
  144. BIN  server/public/files/shops/random_number/products/technine2_pico.jpg
  145. BIN  server/public/files/shops/random_number/products/technine2_small.jpg
  146. BIN  server/public/files/shops/random_number/products/technine2_thumb.jpg
  147. BIN  server/public/files/shops/random_number/products/technine3.jpg
  148. BIN  server/public/files/shops/random_number/products/technine3_icon.jpg
  149. BIN  server/public/files/shops/random_number/products/technine3_medium.jpg
  150. BIN  server/public/files/shops/random_number/products/technine3_pico.jpg
  151. BIN  server/public/files/shops/random_number/products/technine3_small.jpg
  152. BIN  server/public/files/shops/random_number/products/technine3_thumb.jpg
  153. BIN  server/public/files/shops/random_number/products/technine4.jpg
  154. BIN  server/public/files/shops/random_number/products/technine4_icon.jpg
  155. BIN  server/public/files/shops/random_number/products/technine4_medium.jpg
  156. BIN  server/public/files/shops/random_number/products/technine4_pico.jpg
  157. BIN  server/public/files/shops/random_number/products/technine4_small.jpg
  158. BIN  server/public/files/shops/random_number/products/technine4_thumb.jpg
  159. BIN  server/public/files/shops/random_number/products/technine_detail.jpg
  160. BIN  server/public/files/shops/random_number/products/technine_detail_icon.jpg
  161. BIN  server/public/files/shops/random_number/products/technine_detail_medium.jpg
  162. BIN  server/public/files/shops/random_number/products/technine_detail_pico.jpg
  163. BIN  server/public/files/shops/random_number/products/technine_detail_small.jpg
  164. BIN  server/public/files/shops/random_number/products/technine_detail_thumb.jpg
  165. +815 −0 server/public/global/controls.js
  166. +913 −0 server/public/global/dragdrop.js
  167. +958 −0 server/public/global/effects.js
  168. +67 −0 server/public/global/lightbox/v1/lightbox.css
  169. +188 −0 server/public/global/lightbox/v1/lightbox.js
  170. BIN  server/public/global/lightbox/v2/close.gif
  171. +26 −0 server/public/global/lightbox/v2/lightbox.css
  172. +422 −0 server/public/global/lightbox/v2/lightbox.js
  173. BIN  server/public/global/lightbox/v2/loading.gif
  174. BIN  server/public/global/lightbox/v2/overlay.png
  175. BIN  server/public/global/lightbox/v2/zoom-lg.gif
  176. +2,006 −0 server/public/global/prototype.js
  177. +33 −0 server/public/global/textile.css
  178. BIN  server/public/images/logo.gif
  179. BIN  server/public/images/nav-tile.gif
  180. BIN  server/public/images/palette/bg-tile.gif
  181. BIN  server/public/images/palette/btn-reference.gif
  182. BIN  server/public/images/palette/btn-variables.gif
  183. BIN  server/public/images/palette/nav-tile.gif
  184. BIN  server/public/images/palette/xpand.gif
  185. +776 −0 server/public/javascripts/controls.js
  186. +73 −0 server/public/javascripts/deprecated.js
  187. +651 −0 server/public/javascripts/dragdrop.js
  188. +912 −0 server/public/javascripts/effects.js
  189. +116 −0 server/public/javascripts/logger.js
  190. +1,949 −0 server/public/javascripts/prototype.js
  191. +45 −0 server/public/javascripts/scriptaculous.js
  192. +546 −0 server/public/javascripts/shopify.js
  193. +283 −0 server/public/javascripts/slider.js
  194. +548 −0 server/public/javascripts/util.js
  195. +36 −0 server/public/stylesheets/undohtml.css
  196. +110 −0 server/public/stylesheets/wizard.css
  197. +38 −0 server/vendor/liquid/CHANGELOG
  198. +20 −0 server/vendor/liquid/MIT-LICENSE
  199. +60 −0 server/vendor/liquid/Manifest.txt
  200. +38 −0 server/vendor/liquid/README
  201. +24 −0 server/vendor/liquid/Rakefile
  202. +37 −0 server/vendor/liquid/example/server/example_servlet.rb
  203. +28 −0 server/vendor/liquid/example/server/liquid_servlet.rb
  204. +12 −0 server/vendor/liquid/example/server/server.rb
  205. +6 −0 server/vendor/liquid/example/server/templates/index.liquid
  206. +45 −0 server/vendor/liquid/example/server/templates/products.liquid
  207. +6 −0 server/vendor/liquid/init.rb
  208. +27 −0 server/vendor/liquid/lib/extras/liquid_view.rb
  209. +66 −0 server/vendor/liquid/lib/liquid.rb
  210. +102 −0 server/vendor/liquid/lib/liquid/block.rb
  211. +99 −0 server/vendor/liquid/lib/liquid/condition.rb
  212. +228 −0 server/vendor/liquid/lib/liquid/context.rb
  213. +17 −0 server/vendor/liquid/lib/liquid/document.rb
  214. +48 −0 server/vendor/liquid/lib/liquid/drop.rb
  215. +7 −0 server/vendor/liquid/lib/liquid/errors.rb
  216. +56 −0 server/vendor/liquid/lib/liquid/extensions.rb
  217. +62 −0 server/vendor/liquid/lib/liquid/file_system.rb
  218. +64 −0 server/vendor/liquid/lib/liquid/htmltags.rb
  219. +133 −0 server/vendor/liquid/lib/liquid/standardfilters.rb
  220. +43 −0 server/vendor/liquid/lib/liquid/strainer.rb
  221. +26 −0 server/vendor/liquid/lib/liquid/tag.rb
  222. +33 −0 server/vendor/liquid/lib/liquid/tags/assign.rb
  223. +35 −0 server/vendor/liquid/lib/liquid/tags/capture.rb
  224. +79 −0 server/vendor/liquid/lib/liquid/tags/case.rb
  225. +9 −0 server/vendor/liquid/lib/liquid/tags/comment.rb
  226. +60 −0 server/vendor/liquid/lib/liquid/tags/cycle.rb
  227. +118 −0 server/vendor/liquid/lib/liquid/tags/for.rb
  228. +66 −0 server/vendor/liquid/lib/liquid/tags/if.rb
  229. +20 −0 server/vendor/liquid/lib/liquid/tags/ifchanged.rb
  230. +55 −0 server/vendor/liquid/lib/liquid/tags/include.rb
  231. +33 −0 server/vendor/liquid/lib/liquid/tags/unless.rb
  232. +143 −0 server/vendor/liquid/lib/liquid/template.rb
  233. +52 −0 server/vendor/liquid/lib/liquid/variable.rb
  234. +58 −0 server/vendor/liquid/test/block_test.rb
  235. +75 −0 server/vendor/liquid/test/condition_test.rb
  236. +381 −0 server/vendor/liquid/test/context_test.rb
  237. +141 −0 server/vendor/liquid/test/drop_test.rb
  238. +65 −0 server/vendor/liquid/test/error_handling_test.rb
  239. +547 −0 server/vendor/liquid/test/extra/breakpoint.rb
  240. +80 −0 server/vendor/liquid/test/extra/caller.rb
  241. +30 −0 server/vendor/liquid/test/file_system_test.rb
  242. +98 −0 server/vendor/liquid/test/filter_test.rb
  243. +20 −0 server/vendor/liquid/test/helper.rb
  244. +24 −0 server/vendor/liquid/test/html_tag_test.rb
  245. +104 −0 server/vendor/liquid/test/if_else_test.rb
  246. +96 −0 server/vendor/liquid/test/include_tag_test.rb
  247. +121 −0 server/vendor/liquid/test/output_test.rb
  248. +22 −0 server/vendor/liquid/test/parsing_quirks_test.rb
  249. +39 −0 server/vendor/liquid/test/regexp_test.rb
  250. +41 −0 server/vendor/liquid/test/security_test.rb
  251. +107 −0 server/vendor/liquid/test/standard_filter_test.rb
  252. +359 −0 server/vendor/liquid/test/standard_tag_test.rb
  253. +137 −0 server/vendor/liquid/test/statements_test.rb
  254. +16 −0 server/vendor/liquid/test/strainer_test.rb
  255. +26 −0 server/vendor/liquid/test/template_test.rb
  256. +20 −0 server/vendor/liquid/test/test_helper.rb
  257. +27 −0 server/vendor/liquid/test/unless_else_test.rb
  258. +135 −0 server/vendor/liquid/test/variable_test.rb
  259. +1,370 −0 server/vendor/rubyzip/ChangeLog
  260. +131 −0 server/vendor/rubyzip/NEWS
  261. +70 −0 server/vendor/rubyzip/README
  262. +111 −0 server/vendor/rubyzip/Rakefile
  263. +17 −0 server/vendor/rubyzip/TODO
  264. +22 −0 server/vendor/rubyzip/install.rb
  265. +153 −0 server/vendor/rubyzip/lib/zip/ioextras.rb
  266. +111 −0 server/vendor/rubyzip/lib/zip/stdrubyext.rb
  267. +195 −0 server/vendor/rubyzip/lib/zip/tempfile_bugfixed.rb
  268. +1,565 −0 server/vendor/rubyzip/lib/zip/zip.rb
  269. +609 −0 server/vendor/rubyzip/lib/zip/zipfilesystem.rb
  270. +90 −0 server/vendor/rubyzip/lib/zip/ziprequire.rb
  271. +69 −0 server/vendor/rubyzip/samples/example.rb
  272. +34 −0 server/vendor/rubyzip/samples/example_filesystem.rb
  273. +86 −0 server/vendor/rubyzip/samples/gtkRubyzip.rb
  274. +101 −0 server/vendor/rubyzip/samples/qtzip.rb
  275. +13 −0 server/vendor/rubyzip/samples/write_simple.rb
  276. +80 −0 server/vendor/rubyzip/samples/zipdialogui.rb
  277. +74 −0 server/vendor/rubyzip/samples/zipfind.rb
  278. +9 −0 server/vendor/rubyzip/test/alltests.rb
  279. +46 −0 server/vendor/rubyzip/test/data/file1.txt
  280. BIN  server/vendor/rubyzip/test/data/file1.txt.deflatedData
  281. +1,504 −0 server/vendor/rubyzip/test/data/file2.txt
  282. 0  server/vendor/rubyzip/test/data/file2.txt.other
  283. +7 −0 server/vendor/rubyzip/test/data/notzippedruby.rb
  284. BIN  server/vendor/rubyzip/test/data/rubycode.zip
  285. BIN  server/vendor/rubyzip/test/data/rubycode2.zip
  286. BIN  server/vendor/rubyzip/test/data/testDirectory.bin
  287. BIN  server/vendor/rubyzip/test/data/zipWithDirs.zip
  288. +155 −0 server/vendor/rubyzip/test/gentestfiles.rb
  289. +208 −0 server/vendor/rubyzip/test/ioextrastest.rb
  290. +52 −0 server/vendor/rubyzip/test/stdrubyexttest.rb
  291. +831 −0 server/vendor/rubyzip/test/zipfilesystemtest.rb
  292. +43 −0 server/vendor/rubyzip/test/ziprequiretest.rb
  293. +1,594 −0 server/vendor/rubyzip/test/ziptest.rb
  294. +26 −0 server/vendor/rubyzip/test/zlibtest.rb
  295. +5 −0 themes/dropify/README
  296. BIN  themes/dropify/assets/addtocart.gif
  297. BIN  themes/dropify/assets/arrow2.gif
  298. BIN  themes/dropify/assets/checkout.gif
  299. BIN  themes/dropify/assets/content-bg.png
  300. BIN  themes/dropify/assets/delete.gif
Sorry, we could not display the entire diff because too many files (528) changed.
36 .gitignore
@@ -0,0 +1,36 @@
+# No log or backup files should be recorded
+*.log
+rails_monitor.*
+*.orig
+
+# We ignore all subversion directories underneath test and vendor
+.svn
+vendor/*/.svn
+test/*/.svn
+
+
+# ignore generated docs
+doc/api*
+
+# ignore osx dsstore files
+.DS_Store
+
+# no compressed js/css files
+public/*/admin.*
+
+# no love for tmp files
+tmp/*
+
+# no local theme / product images either
+public/files
+private/files
+
+*.orig
+
+.dotest
+
+# ignore schema.rb -- update and restore from schema.versioned.rb when appropriate
+db/schema.rb
+
+# ignore backups
+db/backup
91 Rakefile
@@ -0,0 +1,91 @@
+require 'rake/gempackagetask'
+require 'rake/contrib/rubyforgepublisher'
+require 'fileutils'
+require 'server/config/version'
+
+
+NAME = 'vision'
+FILE_ZIP = "#{NAME}-#{Vision.version}.zip"
+FILE_TGZ = "#{NAME}-#{Vision.version}.tgz"
+
+spec = Gem::Specification.new do |s|
+ s.name = NAME
+ s.version = Vision.version
+ s.has_rdoc = false
+ s.files = Dir.glob('**/*', File::FNM_DOTMATCH).reject do |f|
+ [ /\.$/, /^public/, /^exports/, /^misc/, /Rakefile$/, /\.log$/, /^pkg/, /\.svn/, /\~$/, /\/\._/, /\.DS/].any? {|regex| f =~ regex }
+ end
+ s.require_path = '.'
+ s.summary = 'Shopify Design Server'
+ s.author = "Tobias Luetke"
+ s.email = "tobi@jadedpixel.com"
+end
+
+Rake::GemPackageTask.new(spec) do |p|
+ p.gem_spec = spec
+ p.need_tar = false
+ p.need_zip = true
+end
+
+
+desc "Publish web page and all that jazz to shopify.com"
+task :publish => [:create_page, :copy_files] do
+ system("rsync --delete --progress -arz pkg/html/ vision.shopify.com:/u/apps/vision/current/public/")
+end
+
+desc "Release web page and all that jazz to shopify.com"
+task :release => [:publish]
+task :deploy => [:publish]
+
+desc "Create page"
+task :create_page do
+ require 'erb'
+ puts "Releasing version #{Vision.version}"
+ html = File.dirname(__FILE__) + '/pkg/html'
+ public = File.dirname(__FILE__) + '/public'
+
+ FileUtils.mkdir_p(html)
+ FileUtils.mkdir_p(html + '/stylesheets')
+ FileUtils.mkdir_p(html + '/images/corners')
+ FileUtils.mkdir_p(html + '/media')
+ FileUtils.mkdir_p(html + '/misc')
+
+ @version = Vision.version
+ @file_zip = FILE_ZIP
+ #@file_tgz = FILE_TGZ
+
+ file_list = Dir.glob('public/**/*')
+
+ file_list.reject! do |f|
+ [ /\.$/, /\.svn/, /\.DS/].any? {|regex| f =~ regex }
+ end
+
+ file_list.each do |f|
+ next if File.directory?(f)
+
+ f['public/'] = ''
+
+ if ['.xml', '.html'].include?(File.extname(f))
+ tmpl = ERB.new(File.read("#{public}/#{f}"))
+ File.open( "#{html}/#{f}", 'w+') do |fp|
+ fp << tmpl.result(binding)
+ end
+ else
+
+ FileUtils.cp("#{public}/#{f}", "#{html}/#{f}")
+
+ end
+
+
+ end
+
+
+end
+
+task :copy_files => [:package] do
+ html = 'pkg/html/files'
+ FileUtils.mkdir_p(html)
+
+ FileUtils.cp("pkg/#{FILE_ZIP}", "pkg/html/files")
+ #FileUtils.cp("pkg/#{FILE_TGZ}", "pkg/html/files")
+end
47 Vision.app/Contents/Info.plist
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleDisplayName</key>
+ <string>Vision</string>
+ <key>CFBundleExecutable</key>
+ <string>Vision</string>
+ <key>CFBundleGetInfoString</key>
+ <string>Vision 1.0 Copyright 2006 Tobias Luetke</string>
+ <key>CFBundleIconFile</key>
+ <string>appIcon.icns</string>
+ <key>CFBundleIdentifier</key>
+ <string>org.tobi.Vision</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>Vision</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSEnvironment</key>
+ <dict>
+ <key>APP_BUNDLER</key>
+ <string>Platypus-3.2</string>
+ </dict>
+ <key>LSHasLocalizedDisplayName</key>
+ <false/>
+ <key>LSUIElement</key>
+ <false/>
+ <key>NSAppleScriptEnabled</key>
+ <false/>
+ <key>NSHumanReadableCopyright</key>
+ <string>Vision 1.0 Copyright 2006 Tobias Luetke</string>
+ <key>NSMainNibFile</key>
+ <string>MainMenu</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+</dict>
+</plist>
BIN  Vision.app/Contents/MacOS/Vision
Binary file not shown
1  Vision.app/Contents/PkgInfo
@@ -0,0 +1 @@
+APPL????
0  Vision.app/Contents/Resources/.script
No changes.
20 Vision.app/Contents/Resources/AppSettings.plist
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Creator</key>
+ <string>Platypus-3.2</string>
+ <key>EncryptAndChecksum</key>
+ <false/>
+ <key>IsDroppable</key>
+ <false/>
+ <key>OutputType</key>
+ <string>TextWindow</string>
+ <key>RemainRunningAfterCompletion</key>
+ <true/>
+ <key>RequiresAdminPrivileges</key>
+ <false/>
+ <key>ScriptInterpreter</key>
+ <string>/bin/bash</string>
+</dict>
+</plist>
BIN  Vision.app/Contents/Resources/appIcon.icns
Binary file not shown
4 Vision.app/Contents/Resources/en.lproj/InfoPlist.strings
@@ -0,0 +1,4 @@
+CFBundleName = "Vision";
+CFBundleShortVersionString = "1.0";
+CFBundleGetInfoString = "Vision version 1.0 Copyright 2006 Tobias Luetke";
+NSHumanReadableCopyright = "Copyright 2006 Tobias Luetke.";
26 Vision.app/Contents/Resources/en.lproj/MainMenu.nib/classes.nib
@@ -0,0 +1,26 @@
+{
+ IBClasses = (
+ {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
+ {
+ ACTIONS = {cancel = id; };
+ CLASS = ScriptExecController;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ aboutMenuItem = id;
+ applicationMenu = id;
+ cancelButton = id;
+ hideMenuItem = id;
+ messageTextField = id;
+ progressBar = id;
+ progressWindow = id;
+ quitMenuItem = id;
+ textOutputCancelButton = id;
+ textOutputProgressIndicator = id;
+ textOutputTextField = id;
+ textOutputWindow = id;
+ };
+ SUPERCLASS = NSObject;
+ }
+ );
+ IBVersion = 1;
+}
21 Vision.app/Contents/Resources/en.lproj/MainMenu.nib/info.nib
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IBDocumentLocation</key>
+ <string>477 26 356 240 0 0 1280 832 </string>
+ <key>IBEditorPositions</key>
+ <dict>
+ <key>29</key>
+ <string>281 550 273 44 0 0 1280 832 </string>
+ </dict>
+ <key>IBFramework Version</key>
+ <string>364.0</string>
+ <key>IBOpenObjects</key>
+ <array>
+ <integer>29</integer>
+ </array>
+ <key>IBSystem Version</key>
+ <string>7M34</string>
+</dict>
+</plist>
BIN  Vision.app/Contents/Resources/en.lproj/MainMenu.nib/keyedobjects.nib
Binary file not shown
29 Vision.app/Contents/Resources/script
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+
+DIR="`dirname "$0"`"
+cd "$DIR/../../../"
+
+source ~/.profile &> /dev/null
+source ~/.bashrc &> /dev/null
+
+export PATH="/usr/local/bin:/opt/local/bin:/sw/local/bin:$PATH"
+RUBY="`which ruby`"
+
+if [[ -f "vision.rb" ]]; then
+ echo "Vision coming up..."
+ echo "=> `uname -sr` on `machine`"
+ echo "=> using $RUBY"
+ echo "=> `$RUBY -v`"
+else
+ echo "=> Could not find vision.rb in same directory as Vision.app"
+ echo "=> Please only use Vision.app when its in the original directory"
+ exit 1
+fi
+
+exec $RUBY vision.rb
+
+if [ 0 -ne $? ]; then
+ echo "*** Please visit http://help.shopify.com/design/show/VisionTroubleshooting for further assistence"
+fi
+
+exit 0
BIN  Vision.exe
Binary file not shown
BIN  exports/dropify.theme.zip
Binary file not shown
BIN  exports/lemongrass.theme.zip
Binary file not shown
BIN  exports/spectrum.theme.zip
Binary file not shown
10 misc/Vision
@@ -0,0 +1,10 @@
+#!/usr/bin/ruby
+
+vision = File.dirname(__FILE__) + '/../../../vision.rb'
+
+if File.exists?(vision)
+ require vision
+else
+ puts " => Could not find vision.rb"
+ puts " => Please copy Vision.app in the same directory as the vision.rb and the themes directory."
+end
13 misc/Vision.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+DIR=`dirname $0`
+cd "$DIR/../../../"
+
+if [[ -f "vision.rb" ]]; then
+ RUBY=`/usr/bin/env which ruby`
+ echo "Vision coming up..."
+ echo "=> using $RUBY"
+$RUBY vision.rb
+else
+ echo "=> Could not find vision.rb in same directory as Vision.app"
+ echo "=> Please only use Vision.app when its in the original directory"
+fi
5 misc/browsertest.rb
@@ -0,0 +1,5 @@
+puts 'Trying to start browser...'
+
+system('start http://localhost:3000')
+
+getc
BIN  misc/vision-logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  misc/vision.exe/Vision.ico
Binary file not shown
28 misc/vision.exe/vision.Xml
@@ -0,0 +1,28 @@
+<resource>
+<ProjectParams
+ Signature="/*@@ Generated by Wedit @@ */"
+ WedVersion="11"
+ DialogCount="0"
+ ProjectName="vision"
+ RcFile="C:\\Code\\C\\Vision\\vision.rc"
+ IncludeFile="C:\\Code\\C\\Vision\\vision.h"
+ CurrentDirectory="C:\\Code\\C\\Vision"
+ CallbackFile="C:\\Code\\C\\Vision\\vision_cbk.c"
+ GeneratedCFile="C:\\Code\\C\\Vision\\vision_gen.c"
+ GlobalControlStyles="43476"
+ NumberOfFonts="1"
+Font0="MS Sans Serif"
+/>
+<SYMBOLS>
+ <SYMBOL
+ Type="Container"
+ ID_Define="IDICON100"
+ ID-Value="100"
+ />
+</SYMBOLS>
+<ICON
+ ID_Define="IDICON100"
+ ID-Value="100"
+ Filename="c:\code\c\vision\vision.ico"
+/>
+</resource>
14 misc/vision.exe/vision.c
@@ -0,0 +1,14 @@
+/* --- The following code comes from C:\Code\lcc\lib\wizard\textmode.tpl. */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <windows.h>
+
+#define PROGNAME = 'Vision'
+
+int main(int argc,char *argv[])
+{
+ printf("Vision coming up...\n");
+ system("server\\bin\\ruby.exe vision.rb");
+ return 0;
+}
13 misc/vision.exe/vision.h
@@ -0,0 +1,13 @@
+/* Weditres generated include file. Do NOT edit */
+#include <windows.h>
+#include <lfc.h>
+#define IDICON100 100
+/*@ Prototypes @*/
+#ifndef WEDIT_PROTOTYPES
+#define WEDIT_PROTOTYPES
+#endif
+void SetDlgBkColor(HWND,COLORREF);
+BOOL APIENTRY HandleCtlColor(UINT,DWORD);
+extern void *GetDialogArguments(HWND);
+extern char *GetDico(int,long);
+/*@@ End Prototypes @@*/
31 misc/vision.exe/vision.prj
@@ -0,0 +1,31 @@
+; Wedit project file. Syntax: Name = value
+[vision]
+PrjFiles=2
+File1=vision.rc
+ProjectFlags=0
+Frame=315 59 1260 749
+StatusBar=0,0,0,0
+Name=vision
+CurrentFile=Z:\Code\Ruby\vison\misc\vision.exe\vision.c
+OpenFiles=2
+OpenFile1="Z:\Code\Ruby\vison\misc\vision.exe\vision.c" 9 18 2 -1030 460
+OpenFile2="" 1 22 22 1100 392
+ProjectPath=Z:\Code\Ruby\vison\misc\vision.exe
+SourcesDir=Z:\Code\Ruby\vison\misc\vision.exe
+Defines=
+Includes=C:\Code\lcc\include
+Libraries=
+LinkerArgs=
+ProjectTime=665
+MakeName=C:\Code\lcc\bin\make.exe
+MakeDir=C:\Code\C\lcc
+Exe=c:\code\c\lcc\vision.exe
+DebuggerArguments=
+DbgExeName=c:\code\c\lcc\vision.exe
+DbgDir=c:\code\c\lcc
+CompilerFlags=65676
+Useframework=0
+NumberOfBreakpoints=0
+ErrorFile=
+NrOfFileProcessors=0
+File2=vision.c
7 misc/vision.exe/vision.rc
@@ -0,0 +1,7 @@
+/* Wedit generated resource file */
+#ifdef __LCC__
+#include <windows.h>
+#endif
+#include "vision.h"
+
+IDICON100 ICON "c:\\code\\c\\vision\\vision.ico"
6 misc/vision.exe/vision_gen.c
@@ -0,0 +1,6 @@
+/*@@ Generated by Wedit @@ */
+#include <windows.h>
+#include <lfc.h>
+#include "vision.h"
+
+/*@@Callbacks Section--------------------------------------Callbacks Section@@*/
6 misc/vision.exe/weditfn.prt
@@ -0,0 +1,6 @@
+Wedit Xref 2006.2.25.12.0.42
+
+main [C:\Code\C\Vision\vision.c] 9
+
+int main(int argc,char *argv[])
+
64 public/contest.html
@@ -0,0 +1,64 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+ <meta name="keywords" content="e-commerce, shopping cart, shopping, ruby on rails, rails, shoppingcart, content management, selling goods, jaded pixel, software development" />
+ <meta name="description" content="Jaded Pixel is a small Web 2.0 software company that is focused simplifying the complex world of e-commerce." />
+
+ <link rel="stylesheet" href="stylesheets/vision.css" type="text/css" media="screen" />
+ <title>Vision - Win a 1GB iPod Nano</title>
+ <script src="http://shopify.com/mint/?js" type="text/javascript"></script>
+ </head>
+
+ <body>
+ <!-- HEADER -->
+ <div id="header">
+ <h1 id="logo">Vision - Theme design toolkit</h1>
+ <div id="nav" class="clear">
+ <ul class="clear">
+ <li id="first"><a href="/" title="Vision homepage">Home</a></li>
+ <li><a href="http://blog.jadedpixel.com" title="We talk about shopify here!">Our Blog</a></li>
+ <li><a href="http://shopify.com" title="Shopify screenshots">Shopify</a></li>
+ </ul>
+ </div>
+ </div>
+ <!-- /HEADER -->
+ <div id="container">
+<div id="highlight" class="clear" style="background:#000;margin-top:-5px;">
+ <div id="hleft">
+ <img src="images/nano.jpg" title="1GB iPod Nano" alt="1GB iPod Nano" />
+ </div>
+ <div id="hright">
+ <h2 id="tagline" style="margin-top:80px;font-size:180%">
+ Sorry the theme contest is now closed. Thanks to everyone who participated.&hellip;
+ </h2>
+ </div>
+</div>
+
+<div id="content">
+
+ <div id="main">
+ <div id="info">
+
+ <h2 style="margin-top:0;">Will there be more contests?</h2>
+ <p>We hope to make this contest a regular thing. We let you know on our <a href="http://blog.jadedpixel.com">blog</a> as soon as we made up our minds :)</p>
+
+
+ </div>
+ </div>
+
+</div>
+<div id="footer">
+ <ul>
+ <li id="first"><a href="/" title="Shopify homepage">Home</a></li>
+ <li><a href="http://blog.jadedpixel.com" title="We talk about shopify here!">Our Blog</a></li>
+ <li><a href="http://shopify.com">Shopify</a></li>
+ <li><a href="http://shopify.com/contact/">Contact us</a></li>
+ </ul>
+ Copyright &copy; 2006 <a href="http://jadedpixel.com">JadedPixel</a>&trade;
+</div>
+ </div>
+ </body>
+</html>
+
BIN  public/images/corners/bl.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  public/images/corners/br.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  public/images/corners/gbl.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  public/images/corners/gbr.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  public/images/corners/gtl.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  public/images/corners/gtr.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  public/images/corners/tl.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  public/images/corners/tr.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  public/images/docs.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  public/images/download.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  public/images/hdr-tile-top.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  public/images/hdr-tile-top.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  public/images/jp-symbol.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  public/images/logo-2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  public/images/logo.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  public/images/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  public/images/logo2.ai
Binary file not shown
BIN  public/images/logo3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  public/images/media.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  public/images/nano.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  public/images/notify.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  public/images/plan-free.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  public/images/plan-premium.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  public/images/register.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  public/images/shlogo-large.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  public/images/shopify-logo.png
Diff not rendered
BIN  public/images/software.gif
Diff not rendered
BIN  public/images/themes.gif
Diff not rendered
BIN  public/images/tile-ablue.gif
Diff not rendered
BIN  public/images/tile-blue.gif
Diff not rendered
BIN  public/images/tile-green.gif
Diff not rendered
BIN  public/images/tile.gif
Diff not rendered
BIN  public/images/top-box.gif
Diff not rendered
BIN  public/images/tour.gif
Diff not rendered
BIN  public/images/us.gif
Diff not rendered
BIN  public/images/vision-screen.gif
Diff not rendered
BIN  public/images/win-nano.gif
Diff not rendered
BIN  public/images/xlink.gif
Diff not rendered
118 public/index.html
@@ -0,0 +1,118 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+ <meta name="keywords" content="e-commerce, shopping cart, shopping, ruby on rails, rails, shoppingcart, content management, selling goods, jaded pixel, software development" />
+ <meta name="description" content="Jaded Pixel is a small Web 2.0 software company that is focused simplifying the complex world of e-commerce." />
+
+ <link rel="stylesheet" href="stylesheets/vision.css" type="text/css" media="screen" />
+ <title>Vision - A Designers toolkit for Shopify themes</title>
+
+ <script src="http://shopify.com/mint/?js" type="text/javascript"></script>
+ </head>
+
+ <body>
+ <!-- HEADER -->
+ <div id="header">
+ <h1 id="logo">Vision - Theme design toolkit</h1>
+ <div id="nav" class="clear">
+ <ul class="clear">
+ <li id="first"><a href="/" title="Vision homepage">Home</a></li>
+ <li><a href="http://blog.jadedpixel.com" title="We talk about shopify here!">Our Blog</a></li>
+ <li><a href="http://shopify.com" title="Shopify screenshots">Shopify</a></li>
+ <li><a href="http://forums.shopify.com/community" title="Vision Community">Community</a></li>
+ </ul>
+ </div>
+ </div>
+ <!-- /HEADER -->
+ <div id="container">
+<div id="highlight" class="clear">
+ <div id="hleft">
+ <a href="/media/vision.mov" title="Watch vision in action"><img src="images/vision-screen.gif" alt="Shopify screenshots" class="" /></a>
+ </div>
+ <div id="hright">
+ <h2 id="tagline" style="margin-top:5px;">
+ Design and package your own Shopify theme straight from your desktop&hellip;
+ </h2>
+ <ul>
+ <li id ="download">
+ <h3><a href="files/<%= @file_zip %>">Download it</a></h3>
+ <p>Download Vision and get rolling. For those about to rock, we salute you.</p>
+ <ul>
+ <li>OSX 10.3 Panther users need to <a href="misc/Ruby-1.8.2.dmg" title="Install Ruby 1.8.2 for OSX 10.3 Panther">install ruby</a></small></li>
+ </ul>
+ </li>
+ <li id ="docs">
+ <h3><a href="http://help.shopify.com">Get better at it</a></h3>
+ <p>
+ Check out the extensive documentation and learn how you can design the coolest Shopify theme.
+ </p>
+ </li>
+ <li id ="media">
+ <h3><a href="/media/vision.mov">See it in action</a></h3>
+ <p>
+ Take a look at a sample video we put together on how to get up and running with Vision.
+ </p>
+ </li>
+ </ul>
+ </div>
+</div>
+
+<div id="content">
+
+ <div id="main">
+ <div id="info">
+
+ <h2 style="margin-top:10px;">What is Vision?</h2>
+ <p>
+ Vision is a stand-alone application that lets you create themes for Shopify stores on your local machine without having to
+ setup a database or all that other geek stuff.
+ </p>
+
+
+ <h2>What do I need to run Vision?</h2>
+ <p>Vision comes complete with everything needed to run straight out of the box. If you've got a text editor and a web browser installed, you are ready to roll.</p>
+
+
+ <h2>Can you promote my themes?!</h2>
+ <p>We are very committed to create an infrastructure for selling themes online and getting designers in touch with potential clients. Be one of the first and start your career as a Shopify Theme Designer now!</p>
+
+ </div>
+ </div>
+ <div style="margin-top:0;" id="sidebar" class="round">
+ <div class="pad">
+ <h4 style="margin-bottom:10px;">What others are saying</h4>
+ <blockquote>
+ <p>[Shopify] has the most extensible theming system I’ve ever seen on any web application</p>
+ &mdash;<cite>Mike Rundle</cite>
+ </blockquote>
+ <blockquote>
+ <p>This is the exact package I’ve been looking for&hellip;</p>
+ &mdash;<cite>Andy Howard</cite>
+ </blockquote>
+ <blockquote>
+ <p>Wow. Just… wow. I’m incredibly impressed.</p>
+ &mdash;<cite>Benedict Eastaugh</cite>
+ </blockquote>
+ <blockquote>
+ <p>I really believe that Shopify is going to take the world by storm.</p>
+ &mdash;<cite>James Archer</cite>
+ </blockquote>
+ </div>
+ </div>
+
+</div>
+<div id="footer">
+ <ul>
+ <li id="first"><a href="/" title="Shopify homepage">Home</a></li>
+ <li><a href="http://blog.jadedpixel.com" title="We talk about shopify here!">Our Blog</a></li>
+ <li><a href="http://shopify.com" title="Shopify homepage">Shopify</a></li>
+ <li><a href="http://shopify.com/contact/">Contact us</a></li>
+ </ul>
+ Copyright &copy; 2006 <a href="http://jadedpixel.com">JadedPixel</a>&trade;
+</div>
+ </div>
+ </body>
+</html>
+
BIN  public/media/vision.mov
Binary file not shown
BIN  public/misc/Ruby-1.8.2.dmg
Binary file not shown
36 public/ruby.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+ <meta http-equiv="Content-Language" content="en-us" />
+ <title>Where do i get ruby?</title>
+ <link rel="stylesheet" href="stylesheets/vision.css" type="text/css" media="screen" title="Wizard" charset="utf-8" />
+
+ <script src="http://shopify.com/mint/?js" type="text/javascript"></script>
+ </head>
+
+ <body>
+
+ <div id="wizard">
+ <h2>Getting ruby</h2>
+ <p>The modest requirement for getting vision to run</p>
+
+ <h3>Windows</h3>
+ <p>Windows users get to use the fantastic <a href="http://rubyforge.org/frs/?group_id=167&release_id=4153">One Click Installer...</a></p>
+
+ <h3>Linux</h3>
+ <p>Check your package management system, on debian for example you run <code>apt-get install ruby</code></p>
+
+ <h3>Mac OSX</h3>
+ <p>OSX comes with ruby pre-installed, you are good to go</p>
+
+ <p><a href="/">Back</a> to the vision page
+ </div>
+
+</html>
+
+
+
+
+
567 public/stylesheets/vision.css
@@ -0,0 +1,567 @@
+/* STYLES */
+
+body {
+ background: #595959 url(../images/hdr-tile-top.gif) repeat-x;
+ margin: 0;
+ font: 1em/1.3em "Lucida Grande", Helvetica, sans-serif;
+ text-align: center;
+ color: #000;
+ }
+
+body * {
+ padding: 0;
+ margin: 0;
+}
+
+#container {
+ margin: 0 auto;
+ text-align: left;
+ font-size: 80%;
+ min-width: 778px;
+ }
+
+#content {
+ padding-top: 3em;
+}
+
+#header {
+ height: 106px;
+ position: relative;
+}
+
+#logo {
+ background: url(../images/logo.gif) top left no-repeat;
+ width: 288px;
+ height: 69px;
+ text-indent: -9999px;
+ padding: 0;
+ position: absolute;
+ left: 0;
+ top: 0;
+ line-height: 100%;
+}
+
+
+
+#nav, #nav-btm {
+ padding: 10px;
+ text-align: center;
+}
+
+#nav {
+ margin-left: 350px;
+ padding: 0;
+}
+
+#nav-btm {
+ clear: left;
+}
+
+#nav ul {
+}
+
+#nav ul li {
+ display: inline;
+ padding: 0;
+ margin: 0;
+}
+
+#nav ul li a {
+ padding: 0 12px;
+ background: #ffd200;
+ text-decoration: none;
+ height: 68px;
+ line-height: 68px;
+ display: block;
+ float: left;
+ color: #630;
+ text-shadow: #fff 2px 2px;
+ font-weight: bold;
+ word-spacing: -0.15em;
+ border-right: 1px dotted #960;
+}
+
+#nav ul li a:hover {
+ background: #fc3;
+}
+
+#highlight {
+ background: #222;
+}
+
+#sidebar {
+ margin: 50px 20px 0 70%;
+ color: #ccc;
+ background: #333;
+}
+
+#main {
+ width: 69%;
+ float: left;
+}
+
+#info {
+ padding: 0 0 70px 20px;
+ color: #ddd;
+}
+
+#notify {
+ background: #222 url(../images/jp-symbol.gif) 50% 50% no-repeat;
+ padding: 50px 10%;
+ height: 180px;
+ color: #ccc;
+}
+
+#notify input#email {
+ font-size: 180%;
+ display: block;
+ margin-bottom: 4px;
+}
+
+#notify h2, #screen-title h2 {
+ color: #f60 !important;
+ font-size: 130% !important;
+ margin-bottom: 5px;
+}
+
+#screen-title {
+ background-color: #222;
+ padding: 5px 20px;
+}
+
+#screenshots {
+ background-color: #222;
+}
+
+
+#footer {
+ font-size: 85%;
+ background: #222;
+ color: #555;
+ padding: 10px 20px;
+ text-align: center;
+ clear: left;
+}
+
+/*
+ *=UTILITY
+ */
+
+img { border: 0; }
+.clear:after {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+}
+
+.clear{display: inline-table;}
+
+/* Hides from IE-mac \*/
+* html .clear {height: 1%;}
+.clear {display: block;}
+/* End hide from IE-mac */
+
+.round:before {
+ background: transparent url(../images/corners/gtr.png) scroll no-repeat top right;
+ margin-bottom: -20px;
+ height: 30px;
+ display: block;
+ border: none;
+ content: url(../images/corners/gtl.png);
+ padding: 0;
+ line-height: 0.1em;
+ font-size: 1px;
+}
+
+.round:after {
+ display: block;
+ line-height: 0.1;
+ font-size: 1px;
+ content: url(../images/corners/gbl.png);
+ margin: 0 0 -1px 0;
+ height: 8px;
+ background: white;
+ background: transparent url(../images/corners/gbr.png) scroll no-repeat bottom right ;
+ padding: 0;
+}
+
+.pad {
+ padding: 5px;
+}
+
+.pic-container {
+ width: 100%;
+}
+
+
+.featured {
+ margin: 0 auto;
+ width: 500px;
+ height: 500px;
+}
+
+/*
+ *=LINKS
+ */
+
+#header a {
+ color: #fff;
+ font-size: 90%;
+}
+
+a { color: #A2591A; }
+
+#logo a {
+ text-decoration: none;
+ display: block;
+ height: 50px;
+ border: 0;
+}
+
+/*
+ *=INFO
+ */
+
+#info h2 {
+ font-weight: normal;
+ color: #fff;
+ letter-spacing: -0.06em;
+ margin-top: 30px;
+ font-family: Garamound, Helvetica, "Lucida Grande";
+ text-shadow: #111 2px 2px;
+}
+
+#info p {
+}
+
+#info a {
+ color: #FECC25;
+}
+
+#info a:hover {
+ background: #000;
+ color: #fff;
+}
+
+
+/*
+ *=HIGHLIGHTS
+ */
+
+#hleft {
+ float: left;
+ width: 435px;
+ padding: 5px;
+}
+
+#hleft2 {
+ float: left;
+ width: 55%;
+ padding: 10px;
+}
+
+#hright2 {
+ margin-left: 60%;
+}
+
+#hright {
+ margin-left: 445px;
+ padding-top: 5px;
+ margin-right: 10px;
+}
+
+.tagline, #tagline, #notify h2 {
+ color: #fff;
+ font-weight: normal;
+ letter-spacing: .009em;
+ font-size: 190%;
+ line-height: 1.2em;
+ font-style: italic;
+ text-shadow: #000 2px 2px;
+}
+
+#hright ul {
+ list-style: none;
+ margin: 10px 0 0 0;
+ padding: 0;
+ color: #ccc;
+ text-shadow: #000 2px 2px;
+
+}
+
+#hright ul li {
+ padding: 5px 5px 20px 75px;
+ display: block;
+}
+
+#hright ul li:hover {
+ background-color: #111;
+}
+
+#hright ul li h3 a {
+ display: block;
+ text-decoration: none;
+ color: #f60;
+ font-weight: bold;
+ font-size: 120%;
+ letter-spacing: -0.09em;
+}
+
+#hright ul li a:hover {
+ color: #fff;
+}
+
+li#download { background: url(../images/download.gif) 2% 25% no-repeat; }
+li#docs { background: url(../images/docs.gif) 2% 25% no-repeat; }
+li#media { background: url(../images/media.gif) 2% 25% no-repeat; }
+
+
+/*
+ *=SIDEBAR
+ */
+
+
+#sidebar ul {
+ list-style: none;
+ margin: 0 0 20px 10px;
+ padding: 0;
+}
+
+#sidebar ul li {
+ padding-left: 18px;
+ background: url(../images/xlink.gif) 0 50% no-repeat;
+}
+
+
+#shopify-logo {
+ display: block;
+ width: 135px;
+ height: 67px;
+ text-indent: -9999px;
+ background: url(../images/shopify-logo.png) no-repeat;
+ text-decoration: none;
+}
+
+#sidebar h2 {
+ font-size: 100%;
+ color: #fff;
+}
+
+#sidebar {
+ font-size: 90%;
+}
+
+#sidebar blockquote {
+ margin: 0 0 20px 0;
+ padding: 0;
+ border-bottom: 1px dotted #444;
+}
+
+#sidebar blockquote p {
+ font-style: italic;
+ color: #ccc;
+}
+
+#sidebar h4 {
+ color: #fff;
+}
+
+#sidebar cite {
+ color: #fff;
+ margin-bottom: 20px;
+}
+
+/*
+ *=SIGNUP
+ */
+
+#plans {
+ width: 100%;
+ border-collapse: collapse;
+ font-size: 80%;
+ color: #fff;
+ line-height: 180%;
+}
+
+#plans th {
+ padding: 5px;
+ border-right: 2px solid #333;
+ font-weight: normal;
+ text-align: right;
+}
+
+#plans td {
+ border: 1px solid #333;
+ padding: 5px 10px;
+ text-align: center;
+ color: #ccc;
+}
+
+#plan-head td, #plan-head th {
+ text-align: center !important;
+ border-left: none;
+}
+
+#plan-head th a {
+ display: block;
+}
+
+th#select {
+ text-align: right !important;
+ border-bottom: 1px solid #333;
+ font-weight: bold;
+}
+
+.price {
+ font: 250% Georgia, "Times New Roman", serif;
+ color: #A4D429;
+}
+
+#fineprint td {
+ border-bottom: none;
+ border-right: none;
+}
+
+/*
+ *=SCREENSHOTS
+ */
+
+#screen-list {
+ margin: 0 auto;
+ text-align: center;
+}
+
+#screens {
+ list-style: none;
+ margin: 0 auto;
+ padding: 0;
+ width: 99%;
+ margin: 0 auto;
+ text-align: center;
+}
+
+#screens li {
+ float: left;
+ display: block;
+ margin-right: 10px;
+ margin-bottom: 10px;
+ font-size: 90%;
+ width: 350px;
+ text-align: left;
+ line-height: 140%;
+}
+
+#screens .thumb {
+
+}
+
+.thumb img {
+ padding: 5px;
+ background: #222;
+ border: 1px solid #999;
+}
+
+#screens h2 {
+ font-size: 100%;
+ margin: 0;
+ padding: 0;
+ display: inline;
+ font-weight: bold;
+
+}
+
+
+/*
+ *=FOOTER
+ */
+
+#footer a {
+ color: #ccc;
+}
+
+#footer a:hover {
+ background: #000;
+}
+
+#footer ul {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+}
+
+#footer ul li {
+ display: inline;
+ margin-right: 5px;
+}
+
+#footer li:before {
+ content: "|";
+ margin-right: 5px;
+}
+
+#first:before {
+ content: "" !important;
+}
+
+/*
+ *=MISC
+ */
+
+.hlight {
+ font-weight: bold;
+ color: #ffd200;
+ background: #333;
+}
+
+.hint {
+ font-size: 90%;
+ color: #999;
+}
+
+
+/*
+ *=FORMS
+ */
+
+#contact {
+ padding-top: 5px !important;
+ border: 1px solid;
+}
+
+dt label {
+ margin-top: 10px;
+ display: block;
+}
+
+#form dl {
+ margin: 10px 15px;
+ color: #fff;
+}
+
+
+#thankyou {
+ padding: 25px;
+ color: #ccc;
+}
+
+#thankyou h1 {
+ color: #fff;
+ margin: 10px 0;
+}
+
+.changes {
+ color: #777;
+ font-size: 90%;
+ margin: 0 10px;
+ margin-left: 20px;
+ padding: 0 10px;
+}
+
+h3.stdout {
+ color: #fc0;
+ margin-left: 10px;
+ font-size: 100%;
+ text-shadow: 2px 2px #000;
+}
97 public/update.html
@@ -0,0 +1,97 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+ <meta name="keywords" content="e-commerce, shopping cart, shopping, ruby on rails, rails, shoppingcart, content management, selling goods, jaded pixel, software development" />
+ <meta name="description" content="Jaded Pixel is a small Web 2.0 software company that is focused simplifying the complex world of e-commerce." />
+
+ <link rel="stylesheet" href="stylesheets/vision.css" type="text/css" media="screen" />
+ <title>Vision - Version Update</title>
+ <script src="http://shopify.com/mint/?js" type="text/javascript"></script>
+
+ <script src="http://shopify.com/mint/?js" type="text/javascript"></script>
+
+ </head>
+
+<body style="background-image:none;">
+
+ <div id="container">
+ <div id="highlight" class="round clear" style="margin: 50px;">
+ <div id="hleft" class="clearfix">
+ <h2 class="tagline">You need to update.</h2>
+ <h3 class="stdout">3.1.0:</h3>
+ <ul class="changes">
+ <li>Added new theme ripen...<li>
+ </ul>
+ <h3 class="stdout">3.0.0:</h3>
+ <ul class="changes">
+ <li>Spectrum updates...<li>
+ </ul>
+ <h3 class="stdout">2.9.0:</h3>
+ <ul class="changes">
+ <li>Internet Explorer 7 fixes.<li>
+ </ul>
+ <h3 class="stdout">2.8.0:</h3>
+ <ul class="changes">
+ <li>Updated to the latest liquid: elsif, array notation and similar updates. .</li>
+ <li>Added paginate tag and applied it to all templates
+for blogs and collections.<li>
+ </ul>
+ <h3 class="stdout">2.5.0:</h3>
+ <ul class="changes">
+ <li>Improved the DB to be more like a real shopify DB.</li>
+ <li>Updated all themes to adhere to new global_asset_url system. Common files are hosted globally in shopify so that they can be cached and customoer's load times improve.'</li>
+ </ul>
+ <h3 class="stdout">2.3.1:</h3>
+ <ul class="changes">
+ <li>Fixed cart.item_count and cart.total_price which both ignored the carts quantity. This bug was only in vision and not in shopify.</li>
+ </ul>
+ <h3 class="stdout">2.3.0:</h3>
+ <ul class="changes">
+ <li>Added weight and weight_with_unit filters useable on variant.weight.</li>
+ </ul>
+ <h3 class="stdout">2.2.3:</h3>
+ <ul class="changes">
+ <li>Tweaks to the image switcher so that it works without prototype.</li>
+ </ul>
+ <h3 class="stdout">2.2.2:</h3>
+ <ul class="changes">
+ <li>Made sure that all themes support display of multiple images. Glacialis, spectrum, tangerine and tellus were upgraded.</li>
+ </ul>
+ <h3 class="stdout">2.2.1:</h3>
+ <ul class="changes">
+ <li>Added .collections to product.</li>
+ <li>Fixed problems with creating theme exports under windows xp .</li>
+ </ul>
+ <h3 class="stdout">2.1.1:</h3>
+ <ul class="changes">
+ <li>Small tweaks for dropify and tangerine.</li>
+ <li>Show a helpful search page when going to /search.</li>
+ </ul>
+ <h3 class="stdout">2.1.0:</h3>
+ <ul class="changes">
+ <li>Added a textile.css to all themes, include it and add the class <em>textile</em> everywhere formatted html appears. This is a new (soft) convention for shopify themes.</li>
+ </ul>
+ <h2 class="tagline">You need to update.</h2>
+ <h3 class="stdout">2.0.0:</h3>
+ <ul class="changes">
+ <li>Included all the themes which won the shopify theme contest. Congrats guys!</li>
+ </ul>
+ </div>
+ <div id="hright">
+
+ <ul>
+ <li id ="download">
+ <h3><a href="files/<%= @file_zip %>">Download Vision <%= @version %> update</a></h3>
+ <p>Download Vision and get rolling. For those about to rock, we salute you.</p>
+ </li>
+ </ul>
+ </div>
+ </div>
+
+
+ </div>
+</body>
+</html>
+
1  public/version.xml
@@ -0,0 +1 @@
+<vision current="<%= @version %>" href="http://vision.shopify.com/update.html" />
97 server/Rakefile
@@ -0,0 +1,97 @@
+require 'rubygems'
+require 'rake'
+require 'rake/testtask'
+require 'rake/rdoctask'
+require 'rake/gempackagetask'
+require 'rake/contrib/rubyforgepublisher'
+
+PKG_VERSION = "0.1"
+PKG_NAME = "search"
+PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
+
+PKG_FILES = FileList[
+ "lib/**/*", "test/*", "[A-Z]*", "rakefile"
+].exclude(/\bCVS\b|~$/)
+
+desc "Default Task"
+task :default => [ :test ]
+
+desc "Delete tar.gz / zip / rdoc"
+task :cleanup => [ :rm_packages, :clobber_rdoc ]
+
+# Run the unit tests
+
+task :syntax do
+ `find . -name '*.rb' -print | xargs ruby -c`
+end
+
+task :update_liquid do
+ `svn export --force svn://home.leetsoft.com/liquid/trunk/liquid vendor/liquid`
+end
+
+desc "Transform yml docs to textile"
+task :docs_to_textile do
+ File.open("db/docs.textile", "w") do |f|
+ f.puts textile_from_docs(load_docs)
+ end
+end
+
+def load_docs
+ YAML.load(File.read("db/docs.yml"))
+end
+
+def textile_from_docs(docs)
+ result = []
+ docs.sort.each do |key, val|
+
+ result << "h3. #{key}\n\n" if %w(product shop variant).include?(key)
+ result << "h4. #{key}\n\n" unless %w(syntax description product shop variant).include?(key)
+
+ val = key == 'syntax' ? "\n\n<pre><code>\n #{val} \n</code></pre>\n\n" : val
+ key = key == 'description' ? '' : key
+
+ result << "#{val.kind_of?(Hash) ? textile_from_docs(val) : val}"
+ end
+ result
+end
+
+# def listify_docs(docs)
+# result = ["<ul>"]
+# docs.sort.each do |key, val|
+# result << "<li>"
+# val = key == 'syntax' ? "<pre><code> #{val} </code></pre>" : val
+# key = key == 'description' ? '' : key
+# result << "<span>#{key}</span> #{val.kind_of?(Hash) ? listify_docs(val) : val}"
+# result << "</li>"
+# end
+#
+# result << "</ul>"
+# end
+# Genereate the RDoc documentation
+
+Rake::RDocTask.new { |rdoc|
+ rdoc.rdoc_dir = 'doc'
+ rdoc.title = "Search Server"
+ rdoc.options << '--line-numbers --inline-source'
+ rdoc.rdoc_files.include('README')
+ rdoc.rdoc_files.include('lib/**/*.rb')
+}
+
+task :lines do
+ lines = 0
+ codelines = 0
+ Dir.foreach("lib") { |file_name|
+ next unless file_name =~ /.*rb/
+
+ f = File.open("lib/" + file_name)
+
+ while line = f.gets
+ lines += 1
+ next if line =~ /^\s*$/
+ next if line =~ /^\s*#/
+ codelines += 1
+ end
+ }
+ puts "Lines #{lines}, LOC #{codelines}"
+end
+
9 server/app/drops/blog_collection_drop.rb
@@ -0,0 +1,9 @@
+class BlogCollectionDrop < Liquid::Drop
+ def before_method(value)
+ if blog = Database.find(:all, :blogs).find {|l| l['handle'] == value}
+ blog
+ else
+ {'id' => 0, 'title' => "Unknown blog '#{value}'"}
+ end
+ end
+end
15 server/app/drops/cart_drop.rb
@@ -0,0 +1,15 @@
+class CartDrop < Liquid::Drop
+
+ def total_price
+ items.inject(0) { |sum, item| sum += item['line_price'] * item['quantity'] }
+ end
+
+ def item_count
+ items.inject(0) { |sum, item| sum += item['quantity'] }
+ end
+
+ def items
+ Database.find(:all, :line_items)
+ end
+
+end
9 server/app/drops/collection_collection_drop.rb
@@ -0,0 +1,9 @@
+class CollectionCollectionDrop < Liquid::Drop
+
+ def before_method(value)
+ collection = Database.find(:all, :collections).find {|l| l['handle'] == value}
+ collection['tags'] = collection['products'].collect { |p| p['tags'] }.flatten.uniq
+ collection['products_count'] ||= collection['products'].size
+ collection
+ end
+end
9 server/app/drops/link_list_collection_drop.rb
@@ -0,0 +1,9 @@
+class LinkListCollectionDrop < Liquid::Drop
+ def before_method(value)
+ if menu = Database.find(:all, :link_lists).find {|l| l['handle'] == value}
+ menu
+ else
+ {'id' => 0, 'title' => "Unknown Menu '#{value}'", 'links' => []}
+ end
+ end
+end
9 server/app/drops/page_collection_drop.rb
@@ -0,0 +1,9 @@
+class PageCollectionDrop < Liquid::Drop
+ def before_method(value)
+ if page = Database.find(:all, :pages).find {|l| l['handle'] == value}
+ page
+ else
+ {'id' => 0, 'title' => "Unknown Page '#{value}'"}
+ end
+ end
+end
27 server/app/drops/shop_drop.rb
@@ -0,0 +1,27 @@
+class ShopDrop < Liquid::Drop
+
+ def name
+ 'Foo Shop'
+ end
+
+ def currency
+ 'USD'
+ end
+
+ def domain
+ 'vision.shopify.com'
+ end
+
+ def url
+ 'http://vision.shopify.com'
+ end
+
+ def products_count
+ 5
+ end
+
+ def collections_count
+ 5
+ end
+
+end
18 server/app/filters/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
95 server/app/filters/shop_filter.rb
@@ -0,0 +1,95 @@
+module ShopFilter
+
+ def asset_url(input)
+ "/files/shops/random_number/assets/#{input}"
+ end
+
+ def global_asset_url(input)
+ req = @context.registers[:request]
+ "http://#{req.host}:#{req.port}/global/#{input}"
+ end
+
+ def script_tag(url)
+ %(<script src="#{url}" type="text/javascript"></script>)
+ end
+
+ def stylesheet_tag(url, media="all")
+ %(<link href="#{url}" rel="stylesheet" type="text/css" media="#{media}" />)
+ end
+
+ def link_to(link, url, title="")
+ %|<a href="#{url}" title="#{title}">#{link}</a>|
+ end
+
+ def img_tag(url, alt="")
+ %|<img src="#{url}" alt="#{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 'large'
+ return '/files/shops/random_number/' + url
+ when 'medium', 'small', 'thumb', 'icon'
+ "/files/shops/random_number/products/#{$1}_#{style}.#{$2}"
+ else
+ raise ArgumentError, 'valid parameters for filter "size" are: large, medium, small, thumb and icon '
+ end
+ end
+
+ def default_pagination(paginate)
+
+ html = []
+ html << %(<span class="prev">#{link_to(paginate['previous']['title'], paginate['previous']['url'])}</span>) if paginate['previous']
+
+ for part in paginate['parts']
+
+ if part['is_link']
+ html << %(<span class="page">#{link_to(part['title'], part['url'])}</span>)
+ elsif part['title'].to_i == paginate['current_page'].to_i
+ html << %(<span class="page current">#{part['title']}</span>)
+ else
+ html << %(<span class="deco">#{part['title']}</span>)
+ end
+
+ end
+
+ html << %(<span class="next">#{link_to(paginate['next']['title'], paginate['next']['url'])}</span>) 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
25 server/app/filters/tag_filter.rb
@@ -0,0 +1,25 @@
+module TagFilter
+
+ def link_to_tag(label, tag)
+ "<a title=\"Show tag #{tag}\" href=\"/collections/#{@context['handle']}/#{tag}\">#{label}</a>"
+ end
+
+ def highlight_active_tag(tag, css_class='active')
+ if @context['current_tags'].include?(tag)
+ "<span class=\"#{css_class}\">#{tag}</span>"
+ else
+ tag
+ end
+ end
+
+ def link_to_add_tag(label, tag)
+ tags = (@context['current_tags'] + [tag]).uniq
+ "<a title=\"Show tag #{tag}\" href=\"/collections/#{@context['handle']}/#{tags.join("+")}\">#{label}</a>"
+ end
+
+ def link_to_remove_tag(label, tag)
+ tags = (@context['current_tags'] - [tag]).uniq
+ "<a title=\"Show tag #{tag}\" href=\"/collections/#{@context['handle']}/#{tags.join("+")}\">#{label}</a>"
+ end
+
+end
11 server/app/filters/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
47 server/app/servlets/static_assets_servlet.rb
@@ -0,0 +1,47 @@
+require 'servlet'
+
+class StaticAssetsServlet < Servlet
+
+ def serve_file
+ filepath = "#{template_path}/#{@params['file']}"
+ if File.exists?(filepath)
+ @response['Content-Type'] = mime_types[File.extname(filepath)[1..-1]]
+ File.open(filepath, "rb") do |fp|
+ render :text => fp.read
+ end
+ else
+ raise NotFoundError
+ end
+ end
+
+ protected
+
+ def template_path
+ "#{THEMES}/#{@theme}/assets"
+ end
+
+ def before_filter
+ cookie = @request.cookies.find { |c| c.name == 'theme' }
+
+ if cookie.nil?
+ redirect_to '/dashboard/'
+ end
+
+ @theme = cookie.value
+ end
+
+
+ def path_scan
+ @params['file'] = @request.path_info
+ @action_name = 'serve_file'
+ end
+
+ private
+
+ def extra(str)
+ str
+ end
+
+
+end
+
161 server/app/servlets/theme_picker_servlet.rb
@@ -0,0 +1,161 @@
+require 'servlet'
+
+class ThemePickerServlet < Servlet
+
+ def choose
+ cookie = WEBrick::Cookie.new('theme', @params['theme'].to_s)
+ cookie.path = '/'
+
+ @response.cookies.push(cookie)
+
+ redirect_to '/'
+ end
+
+ def index
+ @themes = available_themes
+ end
+