nimbleshop_core 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (255) hide show
  1. data/app/assets/javascripts/admin/payment_method.js.coffee +8 -9
  2. data/app/assets/javascripts/admin/products/delete_picture.js.coffee +10 -0
  3. data/app/assets/javascripts/admin/products/nested_form_fix.js.coffee +4 -0
  4. data/app/assets/javascripts/admin/products/sort_picture.js.coffee +15 -0
  5. data/app/assets/javascripts/admin/shipit.js.coffee +17 -6
  6. data/app/assets/javascripts/admin/shipping_methods/edit.js.coffee +2 -3
  7. data/app/assets/javascripts/admin.js +1 -1
  8. data/app/assets/stylesheets/admin_custom.css +8 -0
  9. data/app/controllers/admin/custom_fields_controller.rb +3 -3
  10. data/app/controllers/admin/link_groups_controller.rb +3 -9
  11. data/app/controllers/admin/navigations_controller.rb +5 -5
  12. data/app/controllers/admin/orders_controller.rb +8 -4
  13. data/app/controllers/admin/payment_methods_controller.rb +9 -8
  14. data/app/controllers/admin/product_groups_controller.rb +1 -3
  15. data/app/controllers/admin/products_controller.rb +1 -5
  16. data/app/controllers/admin/shipments_controller.rb +9 -4
  17. data/app/controllers/admin/shipping_methods_controller.rb +2 -2
  18. data/app/controllers/admin/shipping_zones_controller.rb +5 -5
  19. data/app/models/creditcard.rb +1 -1
  20. data/config/routes.rb +1 -4
  21. data/db/migrate/20111022144421_create_initial_tables.rb +0 -1
  22. data/lib/generators/nimbleshop/app/templates/config/initializers/setup_email.rb +4 -4
  23. data/lib/generators/nimbleshop/app/templates/config/nimbleshop.yml +3 -1
  24. data/lib/nimbleshop/core_ext/force_ssl.rb +4 -4
  25. data/lib/nimbleshop/version.rb +1 -1
  26. data/lib/tasks/setup.rake +4 -1
  27. data/test/integration/admin/link_groups_acceptance_test.rb +3 -3
  28. data/test/integration/admin/orders_acceptance_test.rb +5 -5
  29. data/test/integration/admin/payment_methods_acceptance_test.rb +5 -5
  30. data/test/integration/admin/product_groups_acceptance_test.rb +0 -4
  31. data/test/integration/admin/products_acceptance_test.rb +28 -33
  32. data/test/integration/admin/shipping_methods_acceptance_test.rb +4 -4
  33. data/test/integration/admin/shipping_zones_acceptance_test.rb +1 -1
  34. data/test/integration/admin/shops_acceptance_test.rb +2 -2
  35. data/test/myshop/Gemfile +1 -1
  36. data/test/myshop/config/initializers/secret_token.rb +1 -1
  37. data/test/myshop/config/initializers/setup_email.rb +4 -4
  38. data/test/myshop/config/nimbleshop.yml +3 -1
  39. data/test/myshop/db/development.sqlite3 +0 -0
  40. data/test/myshop/db/migrate/{20121108022908_create_initial_tables.nimbleshop_core.rb → 20121129183432_create_initial_tables.nimbleshop_core.rb} +0 -1
  41. data/test/myshop/db/schema.rb +1 -2
  42. data/test/myshop/db/test.sqlite3 +0 -0
  43. data/test/myshop/log/development.log +717 -806
  44. data/test/myshop/log/test.log +97501 -0
  45. data/test/myshop/public/uploads/picture/picture/1/avatar.png +0 -0
  46. data/test/myshop/public/uploads/picture/picture/1/large_avatar.png +0 -0
  47. data/test/myshop/public/uploads/picture/picture/1/large_plus_avatar.png +0 -0
  48. data/test/myshop/public/uploads/picture/picture/1/medium_avatar.png +0 -0
  49. data/test/myshop/public/uploads/picture/picture/1/medium_plus_avatar.png +0 -0
  50. data/test/myshop/public/uploads/picture/picture/1/small_avatar.png +0 -0
  51. data/test/myshop/public/uploads/picture/picture/1/small_plus_avatar.png +0 -0
  52. data/test/myshop/public/uploads/picture/picture/1/tiny_avatar.png +0 -0
  53. data/test/myshop/public/uploads/picture/picture/1/tiny_plus_avatar.png +0 -0
  54. data/test/myshop/public/uploads/tmp/20121203-1438-25351-1516/avatar.png +0 -0
  55. data/test/myshop/public/uploads/tmp/20121203-1438-25351-1516/tiny_avatar.png +0 -0
  56. data/test/myshop/public/uploads/tmp/20121203-1438-25351-6840/avatar.png +0 -0
  57. data/test/myshop/public/uploads/tmp/20121203-1438-25351-6840/tiny_avatar.png +0 -0
  58. data/test/myshop/public/uploads/tmp/20121203-1438-25351-8084/avatar.png +0 -0
  59. data/test/myshop/public/uploads/tmp/20121203-1438-25351-8084/tiny_avatar.png +0 -0
  60. data/test/myshop/tmp/cache/assets/C20/3E0/sprockets%2F6272686c233069c041768dc99a62220b +0 -0
  61. data/test/myshop/tmp/cache/assets/C2F/840/sprockets%2F6307597ab57709835906888a54cab332 +0 -0
  62. data/test/myshop/tmp/cache/assets/C42/0A0/sprockets%2Fc3507fa0b5035933d865537bd4740310 +0 -0
  63. data/test/myshop/tmp/cache/assets/C47/520/sprockets%2F0dceec443917771d013062944f268311 +0 -0
  64. data/test/myshop/tmp/cache/assets/C51/620/sprockets%2F447611d767d7e61d6322546370a193af +0 -0
  65. data/test/myshop/tmp/cache/assets/C57/830/sprockets%2F0818c4536f6a69f5328b7f127045550e +0 -0
  66. data/test/myshop/tmp/cache/assets/C74/F00/sprockets%2Fc09995330494d994b784c482f881e7d7 +0 -0
  67. data/test/myshop/tmp/cache/assets/C76/FC0/sprockets%2F2712a3122a52fa28eb7682678b6400d9 +0 -0
  68. data/test/myshop/tmp/cache/assets/C7D/670/sprockets%2Fbd4255f99864127dbc6b7280521123a6 +0 -0
  69. data/test/myshop/tmp/cache/assets/C83/FB0/sprockets%2F8e73221616c6667d207ef9b2074606bd +0 -0
  70. data/test/myshop/tmp/cache/assets/C86/330/sprockets%2F4eb8530d606634060bfe419a89539c83 +0 -0
  71. data/test/myshop/tmp/cache/assets/C94/9A0/sprockets%2F082647e39249aef69bb64c139804967b +0 -0
  72. data/test/myshop/tmp/cache/assets/C96/2C0/sprockets%2Fccc09c0812dab32253f109e528141721 +0 -0
  73. data/test/myshop/tmp/cache/assets/C9D/E30/sprockets%2F78b987e096a8435f93f783b1664f4b60 +0 -0
  74. data/test/myshop/tmp/cache/assets/CA3/F60/sprockets%2F6513e45794e700c2e02c95a03bb50d75 +0 -0
  75. data/test/myshop/tmp/cache/assets/CAE/D60/sprockets%2F0b804fa342c193ef1978b00a8719807e +0 -0
  76. data/test/myshop/tmp/cache/assets/CAF/3D0/sprockets%2F7e7328e624d8047ec248e65e1c02f022 +0 -0
  77. data/test/myshop/tmp/cache/assets/CB2/A90/sprockets%2Fea73133259c16b046a77888aa77a53c6 +0 -0
  78. data/test/myshop/tmp/cache/assets/CB3/980/sprockets%2F747860914f389f22ca277b12d3e51d3c +0 -0
  79. data/test/myshop/tmp/cache/assets/CB5/8F0/sprockets%2F0575daed5b154b788eb72d8064466631 +0 -0
  80. data/test/myshop/tmp/cache/assets/CB9/840/sprockets%2Fd030178896ac6530c8375fc5d83782ad +0 -0
  81. data/test/myshop/tmp/cache/assets/CBD/480/sprockets%2F16696253922f95b0bfbe5029a49498ea +0 -0
  82. data/test/myshop/tmp/cache/assets/CBD/490/sprockets%2F9130d65760c969b6cfa4c327f56781c4 +0 -0
  83. data/test/myshop/tmp/cache/assets/CBD/CE0/sprockets%2F2c9388100fa246ffc774943319d6af67 +0 -0
  84. data/test/myshop/tmp/cache/assets/CC2/EE0/sprockets%2Fd87e8386917dd5fc540a4b28598911b1 +0 -0
  85. data/test/myshop/tmp/cache/assets/CC3/E60/sprockets%2F0c6e1f13250594731c60c00d21fbcb46 +0 -0
  86. data/test/myshop/tmp/cache/assets/CCA/000/sprockets%2Fd9f341b02315ce258ae14b27a6d25070 +0 -0
  87. data/test/myshop/tmp/cache/assets/CCA/280/sprockets%2F3453187e9b2e59676bec7b9c831d7395 +0 -0
  88. data/test/myshop/tmp/cache/assets/CCB/D90/sprockets%2F89860669c589fb1e18f8092558adc60b +0 -0
  89. data/test/myshop/tmp/cache/assets/CCD/1A0/sprockets%2Fc952c13381140b67cc1fb0b418369bc2 +0 -0
  90. data/test/myshop/tmp/cache/assets/CCD/470/sprockets%2Fa71a2c66435e2ab2bdc921d024687811 +0 -0
  91. data/test/myshop/tmp/cache/assets/CCF/960/sprockets%2F4139b533a0755eee22415882cd01ba7b +0 -0
  92. data/test/myshop/tmp/cache/assets/CD0/DE0/sprockets%2F6de169d6c66927d887590d3354177eee +0 -0
  93. data/test/myshop/tmp/cache/assets/CD3/A60/sprockets%2Fa2a143650cb9f51c947ee93e52a10461 +0 -0
  94. data/test/myshop/tmp/cache/assets/CD6/5B0/sprockets%2F4bf60ef0439108a06073b9c50cd7b817 +0 -0
  95. data/test/myshop/tmp/cache/assets/CD9/160/sprockets%2F062651b1d2c8b72cdff46e34058c2645 +0 -0
  96. data/test/myshop/tmp/cache/assets/CD9/420/sprockets%2Ff75c6841b46cad183040008384de8aa7 +0 -0
  97. data/test/myshop/tmp/cache/assets/CDE/8D0/sprockets%2F555b6677b24cbe7fe03b275eb0096307 +0 -0
  98. data/test/myshop/tmp/cache/assets/CE0/740/sprockets%2Fd7837981491a4eb711f21098acc49a2a +0 -0
  99. data/test/myshop/tmp/cache/assets/CEA/6E0/sprockets%2F92a120975ff4f91bcf5e37639523ef40 +0 -0
  100. data/test/myshop/tmp/cache/assets/CEB/670/sprockets%2F6a2e9b7338c55721eb636d3da649991b +0 -0
  101. data/test/myshop/tmp/cache/assets/CEB/FE0/sprockets%2F8d0f358193490b84617df5304c9e6ade +0 -0
  102. data/test/myshop/tmp/cache/assets/CED/220/sprockets%2Ff992264672f1ae94e3f90d3df0f04934 +0 -0
  103. data/test/myshop/tmp/cache/assets/CEF/D40/sprockets%2Fe23287b0d739bcd71c9d297c86d95207 +0 -0
  104. data/test/myshop/tmp/cache/assets/CF0/470/sprockets%2Fb86473b7dd59b458184b09209ffc8f04 +0 -0
  105. data/test/myshop/tmp/cache/assets/CF4/B60/sprockets%2F6f53ce7f80736b4c108c5a799853dd74 +0 -0
  106. data/test/myshop/tmp/cache/assets/CFA/9B0/sprockets%2Fcef7a3a252e4cec0343b64a501468251 +0 -0
  107. data/test/myshop/tmp/cache/assets/CFB/3B0/sprockets%2F83f0c4ee51108930d6d1c7a02411ace7 +0 -0
  108. data/test/myshop/tmp/cache/assets/CFE/FF0/sprockets%2F66da2b66aa02e7d3c854c019036130ff +0 -0
  109. data/test/myshop/tmp/cache/assets/D02/F10/sprockets%2F0dc664f09c6f2255ca44b38ae07342c1 +0 -0
  110. data/test/myshop/tmp/cache/assets/D03/B80/sprockets%2Fd682e282de115b528064150fea8c2c1d +0 -0
  111. data/test/myshop/tmp/cache/assets/D04/A40/sprockets%2F2119a3a04e53c224fb88fe71646f32ca +0 -0
  112. data/test/myshop/tmp/cache/assets/D0B/A80/sprockets%2Ff3464b1d20ee2562fce680c269243ad8 +0 -0
  113. data/test/myshop/tmp/cache/assets/D0D/340/sprockets%2Ff46a33a80a4d089529b5e3e3c47f4c05 +0 -0
  114. data/test/myshop/tmp/cache/assets/D10/5A0/sprockets%2Fce19e1808460fd67f2e80751bbe1a491 +0 -0
  115. data/test/myshop/tmp/cache/assets/D10/F10/sprockets%2F929ce581d09ef8aaed5566c0b1354061 +0 -0
  116. data/test/myshop/tmp/cache/assets/D14/1E0/sprockets%2F1ed72090d0906688a4d349ed4f7d01fe +0 -0
  117. data/test/myshop/tmp/cache/assets/D1F/7C0/sprockets%2F925f6ef4af9d564ba84f21762d16d456 +0 -0
  118. data/test/myshop/tmp/cache/assets/D27/1A0/sprockets%2F98a236449cdbe347049eff5872a9d72f +0 -0
  119. data/test/myshop/tmp/cache/assets/D28/8B0/sprockets%2F908b68a287fa2dd77450779d95b6bad9 +0 -0
  120. data/test/myshop/tmp/cache/assets/D2F/C10/sprockets%2F0224fa8eb416275601bbb06ee1197eec +0 -0
  121. data/test/myshop/tmp/cache/assets/D33/CC0/sprockets%2F9ad24304228467ab60ba2dc9fd624c6b +0 -0
  122. data/test/myshop/tmp/cache/assets/D36/5E0/sprockets%2F0d5b232077ed097ba8f7c27029c4cc3b +0 -0
  123. data/test/myshop/tmp/cache/assets/D38/1A0/sprockets%2Fa3c331e637a4172c04e0b96bff6f753d +0 -0
  124. data/test/myshop/tmp/cache/assets/D3D/F20/sprockets%2Faa7d732e89f3dac8a271d29b852b1074 +0 -0
  125. data/test/myshop/tmp/cache/assets/D3E/790/sprockets%2F9c4dcba69c3d1496a18010d06f8286dd +0 -0
  126. data/test/myshop/tmp/cache/assets/D42/360/sprockets%2F0b74d6da10b975d7ea4fa0b0466778f8 +0 -0
  127. data/test/myshop/tmp/cache/assets/D44/480/sprockets%2F83752178bf80c38e14fbd4ca487a6b4c +0 -0
  128. data/test/myshop/tmp/cache/assets/D45/EE0/sprockets%2F60e93ca9b4818e772e4f8f3e443ac1d0 +0 -0
  129. data/test/myshop/tmp/cache/assets/D48/3E0/sprockets%2F490442194945ae74d2fe4bfd6ac4d6d7 +0 -0
  130. data/test/myshop/tmp/cache/assets/D4C/930/sprockets%2F969bec2a5070b5388e6acf16e3d299a8 +0 -0
  131. data/test/myshop/tmp/cache/assets/D59/690/sprockets%2F43d9ed72bb97785a940468cde6ee5a49 +0 -0
  132. data/test/myshop/tmp/cache/assets/D60/F40/sprockets%2F60845114bfdfcf542eb113f3d71a44be +0 -0
  133. data/test/myshop/tmp/cache/assets/D63/3B0/sprockets%2F7b712b44a973300c47be7b6abccf8f11 +0 -0
  134. data/test/myshop/tmp/cache/assets/D64/A10/sprockets%2F11725b64858ef12e20e4255add3eebda +0 -0
  135. data/test/myshop/tmp/cache/assets/D68/1F0/sprockets%2F57fa200f88241de3a017ad1d8facf757 +0 -0
  136. data/test/myshop/tmp/cache/assets/D69/530/sprockets%2F0d6c156f7e61dc971ec15ebbd5b60083 +0 -0
  137. data/test/myshop/tmp/cache/assets/D6A/0F0/sprockets%2F6c8022cac929010a2ecfeddf2486358e +0 -0
  138. data/test/myshop/tmp/cache/assets/D6B/230/sprockets%2F3cdbe792f6989dac643303a3a5a37bc1 +0 -0
  139. data/test/myshop/tmp/cache/assets/D6C/6F0/sprockets%2F2395bceaae210b9d93c29cc99b425e33 +0 -0
  140. data/test/myshop/tmp/cache/assets/D6F/8F0/sprockets%2Fc1df3b489917bef846c2cb060ed1f461 +0 -0
  141. data/test/myshop/tmp/cache/assets/D6F/E80/sprockets%2F4e2cd34921d4df3e9a11485efcd486c0 +0 -0
  142. data/test/myshop/tmp/cache/assets/D70/900/sprockets%2Fd63e881ab0de98c29cf54ea223c550b8 +0 -0
  143. data/test/myshop/tmp/cache/assets/D71/540/sprockets%2F7f8b8f64991a2b2e80292fe40fccbc02 +0 -0
  144. data/test/myshop/tmp/cache/assets/D73/960/sprockets%2Fc7761c46821fe661d0c6efc5c43b2ec9 +0 -0
  145. data/test/myshop/tmp/cache/assets/D74/B60/sprockets%2F338cef2a60cc7e6b54f32fb367d3f079 +0 -0
  146. data/test/myshop/tmp/cache/assets/D74/BA0/sprockets%2F6b4b0586c85c9bcc95bf42b97ee0a640 +0 -0
  147. data/test/myshop/tmp/cache/assets/D76/220/sprockets%2F8748ace30a059bf844edf9e7a981b10b +0 -0
  148. data/test/myshop/tmp/cache/assets/D79/0F0/sprockets%2F583d27eb5454779d74bb4a542cbc9bfd +0 -0
  149. data/test/myshop/tmp/cache/assets/D79/560/sprockets%2F291d29fca6b52d24eb8c46abe642f988 +0 -0
  150. data/test/myshop/tmp/cache/assets/D7A/AC0/sprockets%2F7aee88eabcd2c427706f30d8246be895 +0 -0
  151. data/test/myshop/tmp/cache/assets/D7C/AC0/sprockets%2F337b95d7eb24bcdbf89a6f24549d07a8 +0 -0
  152. data/test/myshop/tmp/cache/assets/D80/AF0/sprockets%2Fa446ff43bef6cd1786b396a9cf1c6629 +0 -0
  153. data/test/myshop/tmp/cache/assets/D88/180/sprockets%2F207be29b481a71f20c28a2cedb214fcc +0 -0
  154. data/test/myshop/tmp/cache/assets/D88/B60/sprockets%2F7c60dd8a4002120f6b29e2ea2d6e2dbc +0 -0
  155. data/test/myshop/tmp/cache/assets/D8C/A10/sprockets%2Fe1f308086ac645200a8d8b5ace0aeab8 +0 -0
  156. data/test/myshop/tmp/cache/assets/D8D/180/sprockets%2Fbba7e4bce2a055fd0d657a331434d7f1 +0 -0
  157. data/test/myshop/tmp/cache/assets/D8F/DB0/sprockets%2Fecf0637ec0c9fbb80b4544005d50bed3 +0 -0
  158. data/test/myshop/tmp/cache/assets/D92/DC0/sprockets%2Fafd95769537ae5e1af0fef9b89c65939 +0 -0
  159. data/test/myshop/tmp/cache/assets/D94/E70/sprockets%2Fa68ba1495cce86c322ba2e10ef69b06c +0 -0
  160. data/test/myshop/tmp/cache/assets/D9A/0C0/sprockets%2F3c40cc90ffd21ec291e2c35875d9bdd1 +0 -0
  161. data/test/myshop/tmp/cache/assets/D9A/C20/sprockets%2F7fb9ca1a582053981b2eb92ddf385aaa +0 -0
  162. data/test/myshop/tmp/cache/assets/D9B/170/sprockets%2Fbbe525f1421628b638ecbe2a5e98de0c +0 -0
  163. data/test/myshop/tmp/cache/assets/D9F/6F0/sprockets%2Fa5bd870cfea0f92837c9a012d08c8d8c +0 -0
  164. data/test/myshop/tmp/cache/assets/DA1/B10/sprockets%2F369f6fcc30aff180c675e17fa3ae8c14 +0 -0
  165. data/test/myshop/tmp/cache/assets/DA4/0D0/sprockets%2F8ca4adf47d2f99cb9170050bd6c93f2f +0 -0
  166. data/test/myshop/tmp/cache/assets/DA4/230/sprockets%2Fb95808fc5741b496bc9dbf0ae5c05b4f +0 -0
  167. data/test/myshop/tmp/cache/assets/DA5/E20/sprockets%2Fcc968ead119b9ad755c6dd6d9c320b35 +0 -0
  168. data/test/myshop/tmp/cache/assets/DAF/4C0/sprockets%2F9577d946bd8238bd42a8eedcc457ac7a +0 -0
  169. data/test/myshop/tmp/cache/assets/DB3/C60/sprockets%2Fd2a33078bdd6b3d5be799b7ef4378fd9 +0 -0
  170. data/test/myshop/tmp/cache/assets/DBA/670/sprockets%2F3894b7598c9eb4c6d66880eedd6baeb5 +0 -0
  171. data/test/myshop/tmp/cache/assets/DBA/C70/sprockets%2Ff287c2f76af44e4685ceb8986decb65b +0 -0
  172. data/test/myshop/tmp/cache/assets/DBC/1D0/sprockets%2F715fba3f00362f334beaae3ba7e54be6 +0 -0
  173. data/test/myshop/tmp/cache/assets/DBF/910/sprockets%2Ff18470e1fb2e3e2f73f3aaafdec44130 +0 -0
  174. data/test/myshop/tmp/cache/assets/DC0/180/sprockets%2F53acffde562a11301dffae236b375e3e +0 -0
  175. data/test/myshop/tmp/cache/assets/DC2/810/sprockets%2Fec901b5b7cb5f4aaa770f42a6f107a9d +0 -0
  176. data/test/myshop/tmp/cache/assets/DC8/6B0/sprockets%2F14babd3cd6dfff04d9f230689380da3b +0 -0
  177. data/test/myshop/tmp/cache/assets/DCC/360/sprockets%2Fb9c6731ecf1d521a276ea60d8dcecc48 +0 -0
  178. data/test/myshop/tmp/cache/assets/DCC/690/sprockets%2Facc83ee53fd3fe6bf209b0d407924da6 +0 -0
  179. data/test/myshop/tmp/cache/assets/DCF/1C0/sprockets%2F42296eec1be44d5af0efefe563414eb6 +0 -0
  180. data/test/myshop/tmp/cache/assets/DCF/530/sprockets%2F37a8adbab8e950b553e7fb50cc61c9d6 +0 -0
  181. data/test/myshop/tmp/cache/assets/DD0/040/sprockets%2Fd7e8eb1efb4a3a37e393de0171f9cd53 +0 -0
  182. data/test/myshop/tmp/cache/assets/DD2/B60/sprockets%2F9b5fb07d9588116cd8c67baadba8a36a +0 -0
  183. data/test/myshop/tmp/cache/assets/DD4/C20/sprockets%2F9cb3062fed4fad2209b96b45fc5ef7d4 +0 -0
  184. data/test/myshop/tmp/cache/assets/DDD/DF0/sprockets%2F194cbc068a6a6e7ff4a56f9cfec8415e +0 -0
  185. data/test/myshop/tmp/cache/assets/DDF/E20/sprockets%2F5fa8f2be7f1ba46b7e9f8b7329f6b19a +0 -0
  186. data/test/myshop/tmp/cache/assets/DE2/810/sprockets%2Fe5508b4e8589f72fa83fe3afe3a57afd +0 -0
  187. data/test/myshop/tmp/cache/assets/DF2/B80/sprockets%2Faea5e110a5b5445795aee4eb3f1cfd2e +0 -0
  188. data/test/myshop/tmp/cache/assets/DF6/BD0/sprockets%2F7bc0d205c243a5d6eaf68cefb73fa83a +0 -0
  189. data/test/myshop/tmp/cache/assets/DF8/AC0/sprockets%2Fc823b0d42a7acf73faa3f47ccee59d15 +0 -0
  190. data/test/myshop/tmp/cache/assets/DFB/4C0/sprockets%2Fc17634f786d8dacfc7da08aa3abaf309 +0 -0
  191. data/test/myshop/tmp/cache/assets/DFF/CE0/sprockets%2F5b09f3df6587fa0dd0b8bccae956f0e0 +0 -0
  192. data/test/myshop/tmp/cache/assets/E09/240/sprockets%2F379facffa55119efe51738ccca58c1ef +0 -0
  193. data/test/myshop/tmp/cache/assets/E20/890/sprockets%2Fc9bb40cca767b5a5ac7b264ecc7bad06 +0 -0
  194. data/test/myshop/tmp/cache/assets/E23/C30/sprockets%2F6d488fd35bcd6d9b0f1deaac27b1a11e +0 -0
  195. data/test/myshop/tmp/cache/assets/E4E/350/sprockets%2F1e4de40cd11c8ba8caea57b2ca7e16ef +0 -0
  196. data/test/myshop/tmp/cache/assets/E58/580/sprockets%2Fc3d000f299e5be8db3ddad3aed3bf9c5 +0 -0
  197. data/test/myshop/tmp/cache/assets/E59/F50/sprockets%2Ff321b3ce47ce73ec1cfead3f39aef0a9 +0 -0
  198. data/test/myshop/tmp/cache/assets/E5F/C60/sprockets%2Fb95ce7dcf32be0b3cb96ea0b9d75efd2 +0 -0
  199. data/test/myshop/tmp/cache/assets/E8D/140/sprockets%2F470beb3daed0e63cf3c7f69dce17ebec +0 -0
  200. data/test/myshop/tmp/cache/assets/E95/E90/sprockets%2Ffbd9cdd1beaf5c67c528a97cbca356fe +0 -0
  201. data/test/myshop/tmp/cache/assets/EF1/C70/sprockets%2Fd3b9dcddcbc0dabeb498be16d98f3dcf +0 -0
  202. data/test/myshop/tmp/cache/sass/92f3bea9cf025f158dff5471ebe43f2066838092/cart.css.scssc +0 -0
  203. data/test/myshop/tmp/cache/sass/92f3bea9cf025f158dff5471ebe43f2066838092/cart_button.css.scssc +0 -0
  204. data/test/myshop/tmp/cache/sass/92f3bea9cf025f158dff5471ebe43f2066838092/creditcard.css.scssc +0 -0
  205. data/test/myshop/tmp/cache/sass/92f3bea9cf025f158dff5471ebe43f2066838092/custom.css.scssc +0 -0
  206. data/test/test_helper.rb +3 -0
  207. data/test/unit/country_shipping_zone_test.rb +1 -1
  208. data/test/unit/custom_field_answer/field_test.rb +1 -1
  209. data/test/unit/product_test.rb +3 -3
  210. data/test/unit/shipping_method_test.rb +1 -1
  211. metadata +334 -51
  212. data/app/assets/javascripts/admin/products/edit.js.coffee +0 -32
  213. data/lib/nimbleshop/sampledata/data.rb +0 -249
  214. data/lib/nimbleshop/sampledata/pictures/product1/pic1.jpg +0 -0
  215. data/lib/nimbleshop/sampledata/pictures/product2/pic1.jpg +0 -0
  216. data/lib/nimbleshop/sampledata/pictures/product2/pic2.jpg +0 -0
  217. data/lib/nimbleshop/sampledata/pictures/product3/pic1.jpg +0 -0
  218. data/lib/nimbleshop/sampledata/pictures/product3/pic2.jpg +0 -0
  219. data/lib/nimbleshop/sampledata/pictures/product3/pic3.jpg +0 -0
  220. data/lib/nimbleshop/sampledata/pictures/product3/pic4.jpg +0 -0
  221. data/lib/nimbleshop/sampledata/pictures/product3/pic5.jpg +0 -0
  222. data/lib/nimbleshop/sampledata/pictures/product4/pic1.jpg +0 -0
  223. data/lib/nimbleshop/sampledata/pictures/product4/pic2.jpg +0 -0
  224. data/lib/nimbleshop/sampledata/pictures/product5/pic1.jpg +0 -0
  225. data/lib/nimbleshop/sampledata/pictures/product5/pic2.jpg +0 -0
  226. data/lib/nimbleshop/sampledata/pictures/product6/pic1.jpg +0 -0
  227. data/lib/nimbleshop/sampledata/pictures/product6/pic10.jpg +0 -0
  228. data/lib/nimbleshop/sampledata/pictures/product6/pic11.jpg +0 -0
  229. data/lib/nimbleshop/sampledata/pictures/product6/pic12.jpg +0 -0
  230. data/lib/nimbleshop/sampledata/pictures/product6/pic13.jpg +0 -0
  231. data/lib/nimbleshop/sampledata/pictures/product6/pic14.jpg +0 -0
  232. data/lib/nimbleshop/sampledata/pictures/product6/pic15.jpg +0 -0
  233. data/lib/nimbleshop/sampledata/pictures/product6/pic16.jpg +0 -0
  234. data/lib/nimbleshop/sampledata/pictures/product6/pic17.jpg +0 -0
  235. data/lib/nimbleshop/sampledata/pictures/product6/pic2.jpg +0 -0
  236. data/lib/nimbleshop/sampledata/pictures/product6/pic3.jpg +0 -0
  237. data/lib/nimbleshop/sampledata/pictures/product6/pic4.jpg +0 -0
  238. data/lib/nimbleshop/sampledata/pictures/product6/pic5.jpg +0 -0
  239. data/lib/nimbleshop/sampledata/pictures/product6/pic6.jpg +0 -0
  240. data/lib/nimbleshop/sampledata/pictures/product6/pic7.jpg +0 -0
  241. data/lib/nimbleshop/sampledata/pictures/product6/pic8.jpg +0 -0
  242. data/lib/nimbleshop/sampledata/pictures/product6/pic9.jpg +0 -0
  243. data/lib/nimbleshop/sampledata/pictures/product7/pic1.jpg +0 -0
  244. data/lib/nimbleshop/sampledata/pictures/product7/pic2.jpg +0 -0
  245. data/lib/nimbleshop/sampledata/pictures/product7/pic3.jpg +0 -0
  246. data/lib/nimbleshop/sampledata/pictures/product8/pic1.jpg +0 -0
  247. data/lib/nimbleshop/sampledata/pictures/product8/pic2.jpg +0 -0
  248. data/lib/nimbleshop/sampledata/pictures/product8/pic3.jpg +0 -0
  249. data/lib/nimbleshop/sampledata/pictures/product8/pic4.jpg +0 -0
  250. data/lib/nimbleshop/sampledata/pictures/product8/pic5.jpg +0 -0
  251. data/lib/nimbleshop/sampledata/pictures/product8/pic6.jpg +0 -0
  252. data/lib/nimbleshop/sampledata/pictures/product8/pic7.jpg +0 -0
  253. data/lib/nimbleshop/sampledata/pictures/product8/pic8.jpg +0 -0
  254. data/lib/nimbleshop/sampledata/pictures/product9/pic1.jpg +0 -0
  255. data/lib/nimbleshop/sampledata/pictures/product9/pic2.jpg +0 -0
@@ -1,249 +0,0 @@
1
- module Sampledata
2
- class Data
3
-
4
- attr_accessor :products
5
-
6
- def populate
7
- load_shipment_carriers
8
- load_shop
9
- load_shipping_methods
10
- load_product_group_for_price
11
- load_product_group_for_category
12
-
13
- load_tag_watch
14
- load_iphone_cover
15
- load_turquoise_bracelet
16
- load_bag
17
- load_tajmahal
18
- load_chronograph_watch
19
- load_mangoes
20
- load_bangles
21
- load_shoes
22
- end
23
-
24
- private
25
-
26
- def load_shipment_carriers
27
- %w(UPS USPS Fedex).each { |carrier| ShipmentCarrier.create!(name: carrier) }
28
- end
29
-
30
- def load_shop
31
- Shop.create!( name: 'nimbleShop',
32
- phone_number: '800-456-7890',
33
- twitter_handle: '@nimbleshop',
34
- from_email: 'support@nimbleshop.com',
35
- tax_percentage: 1.23,
36
- google_analytics_tracking_id: Nimbleshop.config.google_analytics_tracking_id,
37
- facebook_url: 'http://www.facebook.com/pages/NimbleSHOP/119319381517845')
38
- end
39
-
40
- def handle_pictures_for_product(product, dirname)
41
- p = Pathname.new(File.expand_path('../pictures', __FILE__))
42
- pictures = Dir.glob(p.join(dirname, '*'))
43
-
44
- pictures.sort.each do |filename|
45
- attach_picture( filename, product)
46
- end
47
- end
48
-
49
- def attach_picture(filename_with_extension, product)
50
- path = Rails.root.join('lib', 'sampledata', 'pictures', filename_with_extension)
51
- product.attach_picture(filename_with_extension, path)
52
- end
53
-
54
- def load_product_group_for_price
55
- pg_lt_50 = ProductGroup.create!(name: '< $50')
56
- pg_lt_50.product_group_conditions.create(name: 'price', operator: 'lt', value: 50)
57
- pg_between_50_100 = ProductGroup.create!(name: '$50 - $100')
58
- pg_between_50_100.product_group_conditions.create(name: 'price', operator: 'gteq', value: 50)
59
- pg_between_50_100.product_group_conditions.create(name: 'price', operator: 'lteq', value: 100)
60
- pg_gt_100 = ProductGroup.create!(name: '> $100')
61
- pg_gt_100.product_group_conditions.create(name: 'price', operator: 'gt', value: 100)
62
-
63
- link_group = LinkGroup.create!(name: 'Shop by price')
64
- Navigation.create!(link_group: link_group, product_group: pg_lt_50)
65
- Navigation.create!(link_group: link_group, product_group: pg_between_50_100)
66
- Navigation.create!(link_group: link_group, product_group: pg_gt_100)
67
- end
68
-
69
- def load_product_group_for_category
70
- cf = CustomField.create!(name: 'category', field_type: 'text')
71
-
72
- pg_food = ProductGroup.create!(name: 'Food')
73
- pg_food.product_group_conditions.create(name: cf.id, operator: 'eq', value: 'food')
74
-
75
- pg_toy = ProductGroup.create!(name: 'Toy')
76
- pg_toy.product_group_conditions.create(name: cf.id, operator: 'eq', value: 'toy')
77
-
78
- pg_art = ProductGroup.create!(name: 'Art')
79
- pg_art.product_group_conditions.create(name: cf.id, operator: 'eq', value: 'art')
80
-
81
- pg_fashion = ProductGroup.create!(name: 'Fashion')
82
- pg_fashion.product_group_conditions.create(name: cf.id, operator: 'eq', value: 'fashion')
83
-
84
- link_group = LinkGroup.create!(name: 'Shop by category')
85
- link_group.navigations.create(product_group: pg_art)
86
- link_group.navigations.create(product_group: pg_food)
87
- link_group.navigations.create(product_group: pg_fashion)
88
- end
89
-
90
- def load_shipping_methods
91
- sz = CountryShippingZone.create!(country_code: 'US')
92
- ShippingMethod.create!(name: 'Ground shipping', base_price: 10, shipping_zone_id: sz.id, minimum_order_amount: 0, maximum_order_amount: 999999)
93
- ShippingMethod.create!(name: 'Express shipping', base_price: 30, shipping_zone_id: sz.id, minimum_order_amount: 10, maximum_order_amount: 999999)
94
-
95
- sz = CountryShippingZone.create!(country_code: 'CA')
96
- ShippingMethod.create!(name: 'Ground shipping', base_price: 11, shipping_zone_id: sz.id, minimum_order_amount: 0, maximum_order_amount: 999999)
97
- ShippingMethod.create!(name: 'Express shipping', base_price: 31, shipping_zone_id: sz.id, minimum_order_amount: 10, maximum_order_amount: 999999)
98
- end
99
-
100
- def load_tajmahal
101
- print '.'
102
- desc = %q{
103
- Year of construction: 1631
104
- Completed in: 1653
105
- Time taken: 22 years
106
- Built by: Shah Jahan
107
- Dedicated to: Mumtaz Mahal (Arjumand Bano Begum), the wife of Shah Jahan
108
- Location: Agra (Uttar Pradesh), India
109
- Building type: Islamic tomb
110
- Architecture: Mughal (Combination of Persian, Islamic and Indian architecture style)
111
- Architect: Ustad Ahmad Lahauri
112
- Cost of construction: 32 crore rupees
113
- Number of workers: 20,000
114
- Highlights: One of the Seven Wonders of the World; A UNESCO World Heritage Site
115
-
116
- Facts do not capture what Tajmahal is.
117
- }
118
- product = Product.create!( title: "Beautiful portrait of Tajmahal", price: 19, description: desc)
119
- handle_pictures_for_product(product, "product1")
120
- product.custom_field_answers.create(custom_field: CustomField.first, value: 'art')
121
- end
122
-
123
- def load_chronograph_watch
124
- print '.'
125
- desc = %q{
126
- Chronograph sport watch from Guess
127
-
128
- Stopwatch function, 24 Hour/International time
129
-
130
- Brushed + Polished Ionic Black case
131
-
132
- Red + Black dial
133
-
134
- Brushed + Polished Ionic Black Steel bracelet
135
-
136
- 100 M/330 FT Water resistant
137
- }
138
- product = Product.create!( title: "chronograph sport watch from Guess", price: 219, description: desc)
139
- handle_pictures_for_product(product, "product2")
140
- product.custom_field_answers.create(custom_field: CustomField.first, value: 'fashion')
141
- end
142
-
143
- def load_turquoise_bracelet
144
- print '.'
145
- desc = %q{
146
- Simple, modern, stylish, easy to wear bracelet !
147
-
148
- For a custom color bracelet send me a message and I will see what colors are available for your bracelet.
149
-
150
- The strap of the bracelet can also be customized in any color you would like.
151
-
152
- All items come to you beautifully packaged and ready for gift giving.
153
-
154
- Note that real colors may slightly differ from their appearance on your display.
155
- }
156
- product = Product.create!( title: "Turquoise bracelet", price: 89, description: desc)
157
- handle_pictures_for_product(product, "product3")
158
- product.custom_field_answers.create(custom_field: CustomField.first, value: 'fashion')
159
- end
160
-
161
- def load_mangoes
162
- print '.'
163
- desc = %q{
164
- The mango is the national fruit of India and Pakistan. It is also the national fruit in the Philippines. The mango tree is the national tree of Bangladesh.
165
-
166
- Mango leaves are used to decorate archways and doors in Indian houses and during weddings and celebrations.
167
- }
168
- product = Product.create!( title: "A basket of Indian mangoes", price: 17, description: desc)
169
- handle_pictures_for_product(product, "product4")
170
- product.custom_field_answers.create(custom_field: CustomField.first, value: 'food')
171
- end
172
-
173
- def load_bag
174
- print '.'
175
- desc = %q{
176
- Stylish bag in indigo color. How could you say no to this.
177
-
178
- It is just the perfect size also. It has enough space to carry ipad, magazine, cosmetic stuff and othe accessories.
179
-
180
- Length: 32cm(12.60 inches)
181
- Width: 19cm(7.48 inches)
182
- }
183
- product = Product.create!( title: "A simple and elegant bag", price: 107, description: desc)
184
- handle_pictures_for_product(product, "product5")
185
- product.custom_field_answers.create(custom_field: CustomField.first, value: 'fashion')
186
- end
187
-
188
- def load_bangles
189
- print '.'
190
- desc = %q{
191
- Bangles are part of traditional Indian jewelry. They are usually worn in pairs by women, one or more on each arm. Most Indian women prefer wearing either gold or glass bangles or combination of both. Inexpensive bangles made from plastic are slowly replacing those made by glass, but the ones made of glass are still preferred at traditional occasions such as marriages and on festivals.
192
-
193
- The designs range from simple to intricate handmade designs, often studded with precious and semi-precious stones such as diamonds, gems and pearls. Sets of expensive bangles made of gold and silver make a jingling sound. The imitation jewelry, tend to make a tinny sound when jingled.
194
-
195
- It is tradition that the bride will try to wear as many small glass bangles as possible at her wedding and the honeymoon will end when the last bangle breaks.
196
- }
197
- product = Product.create!( title: "Handmade bangles", price: 11, description: desc)
198
- handle_pictures_for_product(product, "product6")
199
- product.custom_field_answers.create(custom_field: CustomField.first, value: 'fashion')
200
- end
201
-
202
- def load_shoes
203
- print '.'
204
- desc = %q{
205
- The shoes that you see in picture are called 'jutti' in India.
206
-
207
- They are usually made of fine leather and are delicately embroidered with threads or beads. Juttis are slip-on in style and are characterized by rising high in the back and covering the toes with a round heavily-embroidered upper shoe and leaving the top of the foot nearly bare.
208
- }
209
- product = Product.create!( title: "Colorful shoes", price: 191, description: desc)
210
- handle_pictures_for_product(product, "product7")
211
- product.custom_field_answers.create(custom_field: CustomField.first, value: 'fashion')
212
- end
213
-
214
- def load_tag_watch
215
- print '.'
216
- desc = %q{
217
- Swiss label, TAG Heuer's Aquaracer 500M Ceramic watch embodies perfection, style and clean look.
218
-
219
- It has ceramic bezel and has the case is 41mm, significantly smaller than the 43mm out-going model. The case has been given softer curvier lines to
220
- create a more classic look.
221
-
222
- Following models are available:
223
-
224
- - Blue dial, blue ceramic bezel, steel
225
- - Black dial, black ceramic bezel, steel
226
- - Blue & gold, steel
227
- - full black, ceramic bezel, titanium carbide case
228
- }
229
- product = Product.create!( title: "TAG Heuer Aquaracer 500M Ceramic Watch", price: 3000, description: desc)
230
- handle_pictures_for_product(product, "product8")
231
- product.custom_field_answers.create(custom_field: CustomField.first, value: 'fashion')
232
- end
233
-
234
- def load_iphone_cover
235
- print '.'
236
- desc = %q{
237
- This is a hard case is for your iPhone 4. Fits both AT&T & Verizon models of the iPhone 4.
238
-
239
- The case has a wood like appearance. It is not actual wood. It will protect it from scractches while also bringing it to life with some color!
240
-
241
- It does not interfere with any buttons. It is available in many different colors. If you have a specific color in mind then contact me.
242
- }
243
- product = Product.create!( title: "Hard wood case for iphone", price: 3.00, description: desc)
244
- handle_pictures_for_product(product, "product9")
245
- product.custom_field_answers.create(custom_field: CustomField.first, value: 'fashion')
246
- end
247
-
248
- end
249
- end