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,12 +1,8 @@
1
1
  window.Nimbleshop = window.Nimbleshop || {}
2
2
 
3
- Nimbleshop.managePaymentMethods = class ManagePaymentMethods
3
+ Nimbleshop.editPaymentMethod = class EditPaymentMethod
4
4
  constructor: ->
5
- @editPaymentForm()
6
- @selectFirstPaymentMethod()
7
-
8
- editPaymentForm: ->
9
- $('[data-behavior~=payment-method-edit-link]').on 'click', ->
5
+ $(document).on 'click', '[data-behavior~=payment-method-edit-link]', ->
10
6
  $this = $(this)
11
7
  permalink = $this.data('payment-method-permalink')
12
8
  console.log permalink
@@ -14,9 +10,12 @@ Nimbleshop.managePaymentMethods = class ManagePaymentMethods
14
10
  contentElem.parent().children().hide()
15
11
  contentElem.show()
16
12
 
17
- selectFirstPaymentMethod: ->
18
- $('[data-behavior~=payment-method-edit-link]:first').trigger('click')
13
+ new Nimbleshop.editPaymentMethod
14
+
19
15
 
16
+ Nimbleshop.selectFirstPaymentMethod = class SelectFirstPaymentMethod
17
+ constructor: ->
18
+ $('[data-behavior~=payment-method-edit-link]:first').trigger('click')
20
19
 
21
20
  $ ->
22
- new Nimbleshop.managePaymentMethods
21
+ new Nimbleshop.selectFirstPaymentMethod
@@ -0,0 +1,10 @@
1
+ window.Nimbleshop = window.Nimbleshop || {}
2
+
3
+ Nimbleshop.deletePicture = class DeletePicture
4
+ constructor: ->
5
+ $(document).on 'click', '[data-behavior~=delete-product-picture]', ->
6
+ $("#delete_picture_" + $(this).attr("data-action-id")).trigger "click"
7
+ $(this).parent().parent().hide "fast"
8
+ false
9
+
10
+ new Nimbleshop.deletePicture
@@ -0,0 +1,4 @@
1
+
2
+ $ ->
3
+ # work around the nested form ugliness
4
+ $("form input:file").parents('.fields').hide()
@@ -0,0 +1,15 @@
1
+ window.Nimbleshop = window.Nimbleshop || {}
2
+
3
+ Nimbleshop.sortPicture = class SortPicture
4
+ constructor: ->
5
+ $(".product_pictures").sortable(update: ->
6
+ order = {}
7
+ $(".product_pictures li").each (index, elem) ->
8
+ order[index] = $(elem).attr("data-id")
9
+
10
+ $("#product_pictures_order").attr "value", $.toJSON(order)
11
+ ).disableSelection()
12
+
13
+
14
+ $ ->
15
+ new Nimbleshop.sortPicture
@@ -1,10 +1,21 @@
1
- $ ->
2
- $('[data-behavior~=ship-items]').on 'click', ->
1
+ window.Nimbleshop = window.Nimbleshop || {}
2
+
3
+ Nimbleshop.shipItems = class ShipItems
4
+ constructor: ->
5
+ $(document).on 'click', '[data-behavior~=ship-items]', ->
3
6
  $(this).hide()
4
7
  $('[data-behavior~=ship-items-box]').show()
5
8
  false
6
9
 
7
- $('[data-behavior~=ship-items-cancel]').on 'click', ->
8
- $('[data-behavior~=ship-items]').show()
9
- $('[data-behavior~=ship-items-box]').hide()
10
- false
10
+
11
+ new Nimbleshop.shipItems
12
+
13
+
14
+ Nimbleshop.cancelShipItems = class CancelShipItems
15
+ constructor: ->
16
+ $(document).on 'click', '[data-behavior~=ship-items-cancel]', ->
17
+ $('[data-behavior~=ship-items]').show()
18
+ $('[data-behavior~=ship-items-box]').hide()
19
+ false
20
+
21
+ new Nimbleshop.cancelShipItems
@@ -1,6 +1,5 @@
1
1
  # this fuction handles anytime shipping cost is changed for a state.
2
2
  # Also when shipment is enabled or disabled for a state.
3
- $ ->
4
- $(".update-shipping").live "ajax:success", (t, result) ->
5
- $(t.target).parents("tr").replaceWith result.html
3
+ $(document).on 'ajax:success', '.update-shipping', (event, result) ->
4
+ $(event.target).parents("tr").replaceWith result.html
6
5
 
@@ -19,7 +19,7 @@
19
19
  //= require admin/product-group-condition
20
20
  //= require admin/shipit
21
21
  //= require admin/shipping_methods/edit
22
- //= require admin/products/edit
22
+ //= require_tree ./admin/products
23
23
  //= require admin/utils/fadeout_success
24
24
  //= require autoresize
25
25
 
@@ -110,3 +110,11 @@ footer .content a {
110
110
  .disable-payment-method-link {
111
111
  float: right;
112
112
  }
113
+
114
+ .page-header h1 {
115
+ color: #ccc;
116
+ }
117
+
118
+ h1.ns-page-title {
119
+ color: #ccc;
120
+ }
@@ -14,7 +14,7 @@ class Admin::CustomFieldsController < AdminController
14
14
  end
15
15
 
16
16
  def update
17
- if @custom_field.update_attributes(params[:custom_field])
17
+ if @custom_field.update_attributes params[:custom_field]
18
18
  redirect_to admin_custom_fields_path, notice: t(:successfully_updated)
19
19
  else
20
20
  respond_with @custom_field
@@ -27,7 +27,7 @@ class Admin::CustomFieldsController < AdminController
27
27
  end
28
28
 
29
29
  def create
30
- @custom_field = CustomField.new(params[:custom_field])
30
+ @custom_field = CustomField.new params[:custom_field]
31
31
  if @custom_field.save
32
32
  redirect_to admin_custom_fields_url, notice: t(:successfully_added)
33
33
  else
@@ -50,7 +50,7 @@ class Admin::CustomFieldsController < AdminController
50
50
  private
51
51
 
52
52
  def load_custom_field
53
- @custom_field = CustomField.find(params[:id])
53
+ @custom_field = CustomField.find params[:id]
54
54
  end
55
55
 
56
56
  end
@@ -21,15 +21,13 @@ class Admin::LinkGroupsController < AdminController
21
21
  def create
22
22
  respond_to do |format|
23
23
  format.html do
24
-
25
- @link_group = LinkGroup.new(post_params[:link_group])
24
+ @link_group = LinkGroup.new post_params[:link_group]
26
25
 
27
26
  if @link_group.save
28
27
  redirect_to admin_link_groups_url, notice: t(:successfully_added)
29
28
  else
30
29
  render action: 'new'
31
30
  end
32
-
33
31
  end
34
32
  end
35
33
  end
@@ -37,13 +35,11 @@ class Admin::LinkGroupsController < AdminController
37
35
  def update
38
36
  respond_to do |format|
39
37
  format.html do
40
-
41
- if @link_group.update_attributes(post_params[:link_group])
38
+ if @link_group.update_attributes post_params[:link_group]
42
39
  redirect_to admin_link_groups_path, notice: t(:successfully_updated)
43
40
  else
44
41
  rener action: 'edit'
45
42
  end
46
-
47
43
  end
48
44
  end
49
45
  end
@@ -51,10 +47,8 @@ class Admin::LinkGroupsController < AdminController
51
47
  def destroy
52
48
  respond_to do |format|
53
49
  format.html do
54
-
55
50
  @link_group.destroy
56
51
  redirect_to admin_link_groups_url, notice: t(:successfully_deleted)
57
-
58
52
  end
59
53
  end
60
54
  end
@@ -70,7 +64,7 @@ class Admin::LinkGroupsController < AdminController
70
64
  end
71
65
 
72
66
  def load_link_group
73
- @link_group = LinkGroup.find_by_permalink!(params[:id])
67
+ @link_group = LinkGroup.find_by_permalink! params[:id]
74
68
  end
75
69
 
76
70
  end
@@ -3,7 +3,7 @@
3
3
  #
4
4
  class Admin::NavigationsController < AdminController
5
5
 
6
- before_filter :load_link_group
6
+ before_filter :load_link_group!
7
7
 
8
8
  respond_to :html
9
9
 
@@ -16,7 +16,7 @@ class Admin::NavigationsController < AdminController
16
16
  respond_to do |format|
17
17
  format.html do
18
18
 
19
- @navigation = @link_group.navigations.build(params[:navigation])
19
+ @navigation = @link_group.navigations.build params[:navigation]
20
20
 
21
21
  if @navigation.save
22
22
  redirect_to [:admin, :link_groups], notice: t(:successfully_added)
@@ -32,7 +32,7 @@ class Admin::NavigationsController < AdminController
32
32
  respond_to do |format|
33
33
  format.html do
34
34
 
35
- @navigation = @link_group.navigations.find_by_id!(params[:id])
35
+ @navigation = @link_group.navigations.find_by_id! params[:id]
36
36
  @navigation.destroy
37
37
  redirect_to [:admin, :link_groups], notice: t(:successfully_deleted)
38
38
 
@@ -42,8 +42,8 @@ class Admin::NavigationsController < AdminController
42
42
 
43
43
  private
44
44
 
45
- def load_link_group
46
- @link_group = LinkGroup.find_by_permalink!(params[:link_group_id])
45
+ def load_link_group!
46
+ @link_group = LinkGroup.find_by_permalink! params[:link_group_id]
47
47
  end
48
48
 
49
49
  end
@@ -1,11 +1,12 @@
1
1
  class Admin::OrdersController < AdminController
2
2
 
3
+ before_filter :load_order!, except: :index
4
+
3
5
  respond_to :html
4
6
 
5
7
  def capture_payment
6
8
  respond_to do |format|
7
9
  format.html do
8
- @order = Order.find_by_number! params[:id]
9
10
  @order.payment_method.kapture! @order
10
11
  redirect_to admin_order_path(@order), notice: "Amount was successfully captured"
11
12
  end
@@ -15,7 +16,6 @@ class Admin::OrdersController < AdminController
15
16
  def purchase_payment
16
17
  respond_to do |format|
17
18
  format.html do
18
- @order = Order.find_by_number! params[:id]
19
19
  @order.purchase!
20
20
  redirect_to admin_order_path(@order), notice: "Amount was successfully paid"
21
21
  end
@@ -28,8 +28,6 @@ class Admin::OrdersController < AdminController
28
28
  end
29
29
 
30
30
  def show
31
- @order = Order.find_by_number! params[:id]
32
-
33
31
  if @order.shipments.any?
34
32
  @shipment = @order.shipments.first
35
33
  else
@@ -40,4 +38,10 @@ class Admin::OrdersController < AdminController
40
38
  respond_with @order
41
39
  end
42
40
 
41
+ private
42
+
43
+ def load_order!
44
+ @order = Order.find_by_number! params[:id]
45
+ end
46
+
43
47
  end
@@ -1,6 +1,7 @@
1
1
  class Admin::PaymentMethodsController < AdminController
2
2
 
3
3
  before_filter :load_payment_methods
4
+ before_filter :load_payment_method, only: [:enable, :disable]
4
5
 
5
6
  def index
6
7
  @disabled_payment_methods = PaymentMethod.disabled.ascending
@@ -16,20 +17,16 @@ class Admin::PaymentMethodsController < AdminController
16
17
  end
17
18
 
18
19
  def enable
19
- payment_method = PaymentMethod.find_by_permalink! params[:id]
20
- payment_method.update_attributes! enabled: true
21
- flash[:notice] = "Payment method #{payment_method.name} has been enabled"
20
+ @payment_method.update_attributes! enabled: true
22
21
  respond_to do |format|
23
- format.html { redirect_to action: :index }
22
+ format.html { redirect_to action: :index, notice: "Payment method #{@payment_method.name} has been enabled" }
24
23
  end
25
24
  end
26
25
 
27
26
  def disable
28
- payment_method = PaymentMethod.find_by_permalink! params[:id]
29
- payment_method.update_attributes! enabled: false
30
- flash[:notice] = "Payment method #{payment_method.name} has been disabled"
27
+ @payment_method.update_attributes! enabled: false
31
28
  respond_to do |format|
32
- format.html { redirect_to action: :index }
29
+ format.html { redirect_to action: :index, notic: "Payment method #{@payment_method.name} has been disabled" }
33
30
  end
34
31
  end
35
32
 
@@ -39,4 +36,8 @@ class Admin::PaymentMethodsController < AdminController
39
36
  @payment_methods = PaymentMethod.enabled.ascending
40
37
  end
41
38
 
39
+ def load_payment_method
40
+ @payment_method = PaymentMethod.find_by_permalink! params[:id]
41
+ end
42
+
42
43
  end
@@ -38,13 +38,11 @@ class Admin::ProductGroupsController < AdminController
38
38
  def update
39
39
  respond_to do |format|
40
40
  format.html do
41
-
42
- if @product_group.update_attributes(post_params[:product_group])
41
+ if @product_group.update_attributes post_params[:product_group]
43
42
  redirect_to admin_product_groups_path, notice: t(:successfully_updated)
44
43
  else
45
44
  render action: 'edit'
46
45
  end
47
-
48
46
  end
49
47
  end
50
48
  end
@@ -26,14 +26,12 @@ class Admin::ProductsController < AdminController
26
26
  def create
27
27
  respond_to do |format|
28
28
  format.html do
29
-
30
29
  @product = Product.new(post_params[:product])
31
30
  if @product.save
32
31
  redirect_to edit_admin_product_path(@product), notice: t(:successfully_added)
33
32
  else
34
33
  render action: 'new'
35
34
  end
36
-
37
35
  end
38
36
  end
39
37
  end
@@ -41,14 +39,12 @@ class Admin::ProductsController < AdminController
41
39
  def update
42
40
  respond_to do |format|
43
41
  format.html do
44
-
45
42
  @product_groups = ProductGroup.contains_product(@product)
46
43
  if @product.update_attributes(post_params[:product])
47
44
  redirect_to edit_admin_product_path(@product), notice: t(:successfully_updated)
48
45
  else
49
46
  respond_with @product
50
47
  end
51
-
52
48
  end
53
49
  end
54
50
  end
@@ -65,7 +61,7 @@ class Admin::ProductsController < AdminController
65
61
  end
66
62
 
67
63
  def load_product!
68
- @product = Product.find_by_permalink!(params[:id])
64
+ @product = Product.find_by_permalink! params[:id]
69
65
  end
70
66
 
71
67
  end
@@ -1,19 +1,24 @@
1
1
  class Admin::ShipmentsController < AdminController
2
2
 
3
+ before_filter :load_order!
4
+
3
5
  def create
4
- @order = Order.find_by_number!(params[:order_id])
5
- @shipment = @order.shipments.build(params[:shipment])
6
+ @shipment = @order.shipments.build params[:shipment]
6
7
 
7
8
  respond_to do |format|
8
9
  format.html do
9
-
10
10
  if @shipment.save
11
11
  @order.shipped
12
12
  redirect_to admin_order_path(@order)
13
13
  end
14
-
15
14
  end
16
15
  end
17
16
  end
18
17
 
18
+ private
19
+
20
+ def load_order!
21
+ @order = Order.find_by_number! params[:order_id]
22
+ end
23
+
19
24
  end
@@ -73,11 +73,11 @@ class Admin::ShippingMethodsController < AdminController
73
73
  private
74
74
 
75
75
  def load_shipping_method
76
- @shipping_method = @shipping_zone.shipping_methods.find_by_id!(params[:id])
76
+ @shipping_method = @shipping_zone.shipping_methods.find_by_id! params[:id]
77
77
  end
78
78
 
79
79
  def load_shipping_zone
80
- @shipping_zone = ShippingZone.find_by_permalink!(shipping_zone_param)
80
+ @shipping_zone = ShippingZone.find_by_permalink! shipping_zone_param
81
81
  end
82
82
 
83
83
  def shipping_zone_param
@@ -1,6 +1,6 @@
1
1
  class Admin::ShippingZonesController < AdminController
2
2
 
3
- before_filter :load_shipping_zone, only: [:edit, :update, :destroy]
3
+ before_filter :load_shipping_zone!, only: [:edit, :update, :destroy]
4
4
 
5
5
  respond_to :html
6
6
 
@@ -19,7 +19,7 @@ class Admin::ShippingZonesController < AdminController
19
19
  end
20
20
 
21
21
  def update
22
- if @shipping_zone.update_attributes(post_params[:shipping_zone])
22
+ if @shipping_zone.update_attributes post_params[:shipping_zone]
23
23
  redirect_to admin_shipping_zones_path, notice: t(:successfully_updated)
24
24
  else
25
25
  respond_with @shipping_zone
@@ -27,7 +27,7 @@ class Admin::ShippingZonesController < AdminController
27
27
  end
28
28
 
29
29
  def create
30
- @shipping_zone = CountryShippingZone.new(post_params[:shipping_zone])
30
+ @shipping_zone = CountryShippingZone.new post_params[:shipping_zone]
31
31
  if @shipping_zone.save
32
32
  redirect_to admin_shipping_zones_path, notice: t(:successfully_created)
33
33
  else
@@ -55,8 +55,8 @@ class Admin::ShippingZonesController < AdminController
55
55
  params.permit(shipping_zone: [ :name, :country_code, :state_code, :country_shipping_zone_id])
56
56
  end
57
57
 
58
- def load_shipping_zone
59
- @shipping_zone = ShippingZone.find_by_permalink!(params[:id])
58
+ def load_shipping_zone!
59
+ @shipping_zone = ShippingZone.find_by_permalink! params[:id]
60
60
  end
61
61
 
62
62
  end
@@ -50,7 +50,7 @@ class Creditcard
50
50
  options[:year] = year
51
51
  options[:month] = month
52
52
  options[:number] = number
53
- options[:type] = cardtype
53
+ options[:brand] = cardtype
54
54
  options[:verification_value] = verification_value
55
55
  end
56
56
 
data/config/routes.rb CHANGED
@@ -1,7 +1,5 @@
1
1
  Rails.application.routes.draw do
2
2
 
3
- root to: 'nimbleshop_simply/products#index'
4
-
5
3
  get '/admin', to: 'admin/main#index'
6
4
 
7
5
  # Ideally it should only be included in development mode
@@ -56,9 +54,8 @@ Rails.application.routes.draw do
56
54
  end
57
55
 
58
56
  mount NimbleshopAuthorizedotnet::Engine, at: '/nimbleshop_authorizedotnet'
57
+ mount NimbleshopStripe::Engine, at: '/nimbleshop_stripe'
59
58
  mount NimbleshopPaypalwp::Engine, at: '/nimbleshop_paypalwp'
60
59
  mount NimbleshopSplitable::Engine, at: '/nimbleshop_splitable'
61
60
  mount NimbleshopCod::Engine, at: '/nimbleshop_cod'
62
- mount NimbleshopSimply::Engine, at: '/'
63
-
64
61
  end
@@ -182,7 +182,6 @@ class CreateInitialTables < ActiveRecord::Migration
182
182
  t.string "status", :default => "active", :null => false
183
183
  t.text "description"
184
184
  t.decimal "price", :precision => 8, :scale => 2, :null => false
185
- t.boolean "new", :default => false, :null => false
186
185
  t.string "permalink", :null => false
187
186
  t.datetime "created_at", :null => false
188
187
  t.datetime "updated_at", :null => false
@@ -8,10 +8,10 @@ else
8
8
 
9
9
  ActionMailer::Base.delivery_method = :smtp
10
10
  ActionMailer::Base.smtp_settings = {
11
- user_name: Nimbleshop.config.mailtrapio.username,
12
- password: Nimbleshop.config.mailtrapio.password,
13
- address: "mailtrap.io",
14
- port: 2525,
11
+ user_name: Nimbleshop.config.mailtrap.username,
12
+ password: Nimbleshop.config.mailtrap.password,
13
+ address: Nimbleshop.config.mailtrap.address,
14
+ port: Nimbleshop.config.mailtrap.port,
15
15
  authentication: :plain }
16
16
 
17
17
  end
@@ -24,9 +24,11 @@ common:
24
24
  secret_access_key: <%= ENV['S3_SECRET_ACCESS_KEY'] %>
25
25
  bucket_name: <%= ENV['S3_BUCKET_NAME'] %>
26
26
 
27
- mailtrapio:
27
+ mailtrap:
28
28
  username: <%= ENV['MAILTRAPIO_USERNAME'] || 'nimbleshop' %>
29
29
  password: <%= ENV['MAILTRAPIO_PASSWORD'] || 'f42c2934fbc2e229' %>
30
+ address: mailtrap.railsware.com
31
+ port: 2525
30
32
 
31
33
  development:
32
34
  use_s3: false
@@ -11,12 +11,12 @@ module ActionController
11
11
 
12
12
  module ClassMethods
13
13
  def force_ssl(options = {})
14
- host = options.delete(:host)
14
+ host = options.delete :host
15
15
  before_filter(options) do
16
16
  if !request.ssl?# && !Rails.env.development?
17
- redirect_options = {:protocol => 'https://', :status => :moved_permanently}
18
- redirect_options.merge!(:host => host) if host
19
- redirect_options.merge!(:params => request.query_parameters)
17
+ redirect_options = {protocol: 'https://', status: :moved_permanently}
18
+ redirect_options.merge! host: host if host
19
+ redirect_options.merge! params: request.query_parameters
20
20
  redirect_to redirect_options
21
21
  end
22
22
  end
@@ -2,7 +2,7 @@ module Nimbleshop
2
2
  class Version
3
3
  @major = 0
4
4
  @minor = 0
5
- @tiny = 12
5
+ @tiny = 13
6
6
  @build = nil
7
7
 
8
8
  class << self
data/lib/tasks/setup.rake CHANGED
@@ -9,8 +9,11 @@ namespace :nimbleshop do
9
9
 
10
10
  Rake::Task["db:seed"].invoke
11
11
 
12
+ theme_klass_name = 'NimbleshopSimply'
13
+
12
14
  puts "Loading sample data ..."
13
- Sampledata::Data.new.populate
15
+ cmd = "#{theme_klass_name.underscore}:populate_sample_data"
16
+ Rake::Task[cmd].invoke
14
17
 
15
18
  puts "Loading paymen records ..."
16
19
  Rake::Task["nimbleshop_splitable:load_record"].invoke
@@ -7,7 +7,7 @@ class LinkGroupsAcceptanceTest < ActionDispatch::IntegrationTest
7
7
  @link_group = create :link_group, name: "Branded Shoes"
8
8
  end
9
9
 
10
- test "add a new link group" do
10
+ test "adding a new link group" do
11
11
  visit admin_path
12
12
  click_link 'Link groups'
13
13
  click_link 'add_new_link_group'
@@ -17,7 +17,7 @@ class LinkGroupsAcceptanceTest < ActionDispatch::IntegrationTest
17
17
  assert page.has_content?('Popular products')
18
18
  end
19
19
 
20
- test "add new link" do
20
+ test "adding a new link" do
21
21
  visit admin_path
22
22
  click_link 'Link groups'
23
23
  refute page.has_content?('Nike Shoes')
@@ -27,7 +27,7 @@ class LinkGroupsAcceptanceTest < ActionDispatch::IntegrationTest
27
27
  assert page.has_content?('Nike Shoes')
28
28
  end
29
29
 
30
- test "delete link group" do
30
+ test "deleting link group" do
31
31
  nav = @link_group.navigations.create(product_group: @product_group)
32
32
  Capybara.current_driver = :selenium
33
33
  visit admin_link_groups_path
@@ -2,7 +2,7 @@ require "test_helper"
2
2
 
3
3
  class OrdersAcceptanceTest < ActionDispatch::IntegrationTest
4
4
 
5
- test "paid using splitable" do
5
+ test "paying using splitable" do
6
6
  order = create(:order_paid_using_splitable, payment_status: 'purchased')
7
7
 
8
8
  visit admin_path
@@ -12,7 +12,7 @@ class OrdersAcceptanceTest < ActionDispatch::IntegrationTest
12
12
  assert page.has_content?('Splitable')
13
13
  end
14
14
 
15
- test "paid using paypalwp" do
15
+ test "paying using paypalwp" do
16
16
  order = create(:order_paid_using_paypalwp, payment_status: 'purchased')
17
17
 
18
18
  visit admin_path
@@ -22,7 +22,7 @@ class OrdersAcceptanceTest < ActionDispatch::IntegrationTest
22
22
  assert page.has_content?('Paypal website payments standard')
23
23
  end
24
24
 
25
- test "paid using authorize.net" do
25
+ test "paying using authorize.net" do
26
26
  order = create(:order_paid_using_authorizedotnet, payment_status: 'authorized')
27
27
 
28
28
  visit admin_path
@@ -33,7 +33,7 @@ class OrdersAcceptanceTest < ActionDispatch::IntegrationTest
33
33
  assert page.has_content?('Payment status AUTHORIZED')
34
34
  end
35
35
 
36
- test "payment status abandoned" do
36
+ test "default payment status should be abandoned" do
37
37
  order = build :order, email: nil, shipping_address: nil, shipping_method: nil
38
38
  order.save(validate: false)
39
39
 
@@ -45,7 +45,7 @@ class OrdersAcceptanceTest < ActionDispatch::IntegrationTest
45
45
  assert page.has_content?('Payment status ABANDONED')
46
46
  end
47
47
 
48
- test "show order with line item and product is deleted" do
48
+ test "even if product is deleted order with line item should come up" do
49
49
  order = build :order, email: nil, shipping_address: nil, shipping_method: nil
50
50
  order.save(validate: false)
51
51