shoppy 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (352) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +34 -0
  5. data/app/.DS_Store +0 -0
  6. data/app/api/apihelpers/api_auth.rb +50 -0
  7. data/app/api/base.rb +7 -0
  8. data/app/api/v1/auth.rb +57 -0
  9. data/app/api/v1/test.rb +15 -0
  10. data/app/api/v1/users.rb +50 -0
  11. data/app/api/v1/v1_api.rb +15 -0
  12. data/app/api/vo/user_vo.rb +7 -0
  13. data/app/assets/fonts/.DS_Store +0 -0
  14. data/app/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  15. data/app/assets/fonts/glyphicons-halflings-regular.svg +229 -0
  16. data/app/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  17. data/app/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  18. data/app/assets/images/.DS_Store +0 -0
  19. data/app/assets/images/Sorting icons.psd +0 -0
  20. data/app/assets/images/back_disabled.png +0 -0
  21. data/app/assets/images/back_enabled.png +0 -0
  22. data/app/assets/images/back_enabled_hover.png +0 -0
  23. data/app/assets/images/favicon.ico +0 -0
  24. data/app/assets/images/forward_disabled.png +0 -0
  25. data/app/assets/images/forward_enabled.png +0 -0
  26. data/app/assets/images/forward_enabled_hover.png +0 -0
  27. data/app/assets/images/shoppy.svg +34 -0
  28. data/app/assets/images/sort_asc.png +0 -0
  29. data/app/assets/images/sort_asc_disabled.png +0 -0
  30. data/app/assets/images/sort_both.png +0 -0
  31. data/app/assets/images/sort_desc.png +0 -0
  32. data/app/assets/images/sort_desc_disabled.png +0 -0
  33. data/app/assets/images/spritemap.png +0 -0
  34. data/app/assets/images/spritemap@2x.png +0 -0
  35. data/app/assets/javascripts/.DS_Store +0 -0
  36. data/app/assets/javascripts/bootstrap.js +2114 -0
  37. data/app/assets/javascripts/bootstrap.min.js +6 -0
  38. data/app/assets/javascripts/jasny-bootstrap.min.js +6 -0
  39. data/app/assets/javascripts/jquery.dataTables.min.js +155 -0
  40. data/app/assets/javascripts/main.js +29 -0
  41. data/app/assets/javascripts/shoppy.js +31 -0
  42. data/app/assets/stylesheets/.DS_Store +0 -0
  43. data/app/assets/stylesheets/bootstrap.css +6203 -0
  44. data/app/assets/stylesheets/jasny-bootstrap.css +621 -0
  45. data/app/assets/stylesheets/jquery.dataTables.min.css +1 -0
  46. data/app/assets/stylesheets/jquery.dataTables_themeroller.css +330 -0
  47. data/app/assets/stylesheets/shoppy.css +23 -0
  48. data/app/assets/stylesheets/style.sass +79 -0
  49. data/app/controllers/.DS_Store +0 -0
  50. data/app/controllers/shoppy/accounts_controller.rb +102 -0
  51. data/app/controllers/shoppy/application_controller.rb +23 -0
  52. data/app/controllers/shoppy/brands_controller.rb +60 -0
  53. data/app/controllers/shoppy/cart_controller.rb +46 -0
  54. data/app/controllers/shoppy/categories_controller.rb +72 -0
  55. data/app/controllers/shoppy/concerns/.keep +0 -0
  56. data/app/controllers/shoppy/customer_addresses_controller.rb +90 -0
  57. data/app/controllers/shoppy/home_controller.rb +9 -0
  58. data/app/controllers/shoppy/inventories_controller.rb +62 -0
  59. data/app/controllers/shoppy/locations_controller.rb +80 -0
  60. data/app/controllers/shoppy/logs_controller.rb +9 -0
  61. data/app/controllers/shoppy/manufacturers_controller.rb +77 -0
  62. data/app/controllers/shoppy/options_controller.rb +63 -0
  63. data/app/controllers/shoppy/orders_controller.rb +130 -0
  64. data/app/controllers/shoppy/products_controller.rb +98 -0
  65. data/app/controllers/shoppy/reviews_controller.rb +70 -0
  66. data/app/controllers/shoppy/sessions_controller.rb +5 -0
  67. data/app/controllers/shoppy/settings_controller.rb +26 -0
  68. data/app/controllers/shoppy/shipments_controller.rb +125 -0
  69. data/app/controllers/shoppy/variants_controller.rb +104 -0
  70. data/app/helpers/shoppy/accounts_helper.rb +5 -0
  71. data/app/helpers/shoppy/application_helper.rb +19 -0
  72. data/app/helpers/shoppy/brands_helper.rb +4 -0
  73. data/app/helpers/shoppy/cart_helper.rb +66 -0
  74. data/app/helpers/shoppy/categories_helper.rb +4 -0
  75. data/app/helpers/shoppy/customer_addresses_helper.rb +4 -0
  76. data/app/helpers/shoppy/home_helper.rb +5 -0
  77. data/app/helpers/shoppy/inventories_helper.rb +53 -0
  78. data/app/helpers/shoppy/locations_helper.rb +4 -0
  79. data/app/helpers/shoppy/logs_helper.rb +4 -0
  80. data/app/helpers/shoppy/manufacturers_helper.rb +4 -0
  81. data/app/helpers/shoppy/options_helper.rb +43 -0
  82. data/app/helpers/shoppy/orders_helper.rb +61 -0
  83. data/app/helpers/shoppy/products_helper.rb +65 -0
  84. data/app/helpers/shoppy/reviews_helper.rb +4 -0
  85. data/app/helpers/shoppy/settings_helper.rb +5 -0
  86. data/app/helpers/shoppy/shipments_helper.rb +43 -0
  87. data/app/helpers/shoppy/variants_helper.rb +4 -0
  88. data/app/models/shoppy/.DS_Store +0 -0
  89. data/app/models/shoppy/admin.rb +5 -0
  90. data/app/models/shoppy/brand.rb +23 -0
  91. data/app/models/shoppy/cart_item.rb +13 -0
  92. data/app/models/shoppy/category.rb +50 -0
  93. data/app/models/shoppy/concerns/.DS_Store +0 -0
  94. data/app/models/shoppy/concerns/models/api_token_authenticatable.rb +36 -0
  95. data/app/models/shoppy/concerns/models/hashable.rb +60 -0
  96. data/app/models/shoppy/concerns/models/optionable.rb +60 -0
  97. data/app/models/shoppy/concerns/models/promotional.rb +36 -0
  98. data/app/models/shoppy/concerns/models/taggable.rb +44 -0
  99. data/app/models/shoppy/customer.rb +10 -0
  100. data/app/models/shoppy/customer_address.rb +44 -0
  101. data/app/models/shoppy/inventory.rb +18 -0
  102. data/app/models/shoppy/log.rb +8 -0
  103. data/app/models/shoppy/manufacturer.rb +35 -0
  104. data/app/models/shoppy/options_group.rb +57 -0
  105. data/app/models/shoppy/options_item.rb +18 -0
  106. data/app/models/shoppy/order.rb +15 -0
  107. data/app/models/shoppy/order_line.rb +16 -0
  108. data/app/models/shoppy/payment_method.rb +19 -0
  109. data/app/models/shoppy/product.rb +43 -0
  110. data/app/models/shoppy/review.rb +12 -0
  111. data/app/models/shoppy/setting.rb +11 -0
  112. data/app/models/shoppy/shipment.rb +11 -0
  113. data/app/models/shoppy/stock_location.rb +47 -0
  114. data/app/models/shoppy/user.rb +37 -0
  115. data/app/models/shoppy/variant.rb +48 -0
  116. data/app/views/.DS_Store +0 -0
  117. data/app/views/accounts/admins.html.erb +104 -0
  118. data/app/views/accounts/customers.html.erb +106 -0
  119. data/app/views/accounts/show.html.erb +50 -0
  120. data/app/views/brands/index.html.erb +85 -0
  121. data/app/views/brands/show.html.erb +31 -0
  122. data/app/views/cart/index.html.erb +52 -0
  123. data/app/views/categories/index.html.erb +84 -0
  124. data/app/views/categories/show.html.erb +29 -0
  125. data/app/views/customer_addresses/index.html.erb +112 -0
  126. data/app/views/customer_addresses/show.html.erb +50 -0
  127. data/app/views/devise/confirmations/new.html.erb +12 -0
  128. data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  129. data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  130. data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
  131. data/app/views/devise/passwords/edit.html.erb +16 -0
  132. data/app/views/devise/passwords/new.html.erb +12 -0
  133. data/app/views/devise/registrations/edit.html.erb +29 -0
  134. data/app/views/devise/registrations/new.html.erb +23 -0
  135. data/app/views/devise/sessions/new.html.erb +33 -0
  136. data/app/views/devise/shared/_links.erb +25 -0
  137. data/app/views/devise/unlocks/new.html.erb +12 -0
  138. data/app/views/home/index.html.erb +4 -0
  139. data/app/views/inventories/.DS_Store +0 -0
  140. data/app/views/inventories/index.html.erb +119 -0
  141. data/app/views/layouts/.DS_Store +0 -0
  142. data/app/views/layouts/shoppy.html.erb +27 -0
  143. data/app/views/locations/index.html.erb +120 -0
  144. data/app/views/locations/show.html.erb +58 -0
  145. data/app/views/logs/index.html.erb +49 -0
  146. data/app/views/manufacturers/index.html.erb +119 -0
  147. data/app/views/manufacturers/show.html.erb +62 -0
  148. data/app/views/options/index.html.erb +90 -0
  149. data/app/views/options/show.html.erb +32 -0
  150. data/app/views/orders/index.html.erb +174 -0
  151. data/app/views/orders/show.html.erb +74 -0
  152. data/app/views/products/index.html.erb +102 -0
  153. data/app/views/products/show.html.erb +112 -0
  154. data/app/views/reviews/index.html.erb +58 -0
  155. data/app/views/reviews/show.html.erb +46 -0
  156. data/app/views/settings/show.html.erb +50 -0
  157. data/app/views/shared/_custom_file_input.html.erb +12 -0
  158. data/app/views/shared/_flashes.html.erb +21 -0
  159. data/app/views/shared/_navigation.html.erb +66 -0
  160. data/app/views/shipments/index.html.erb +97 -0
  161. data/app/views/shipments/show.html.erb +84 -0
  162. data/app/views/variants/index.html.erb +119 -0
  163. data/app/views/variants/show.html.erb +114 -0
  164. data/bin/shoppy +183 -0
  165. data/config/routes.rb +124 -0
  166. data/db/.DS_Store +0 -0
  167. data/db/migrate/001__setup_hstore.rb +9 -0
  168. data/db/migrate/002__create_logs.rb +11 -0
  169. data/db/migrate/003__devise_create_users.rb +49 -0
  170. data/db/migrate/004__add_personal_info_to_user.rb +8 -0
  171. data/db/migrate/005__create_user_addresses.rb +16 -0
  172. data/db/migrate/006__create_categories.rb +11 -0
  173. data/db/migrate/007__create_brands.rb +10 -0
  174. data/db/migrate/008__create_manufacturers.rb +19 -0
  175. data/db/migrate/009__create_options_groups.rb +10 -0
  176. data/db/migrate/010__create_options_items.rb +10 -0
  177. data/db/migrate/011__create_products.rb +14 -0
  178. data/db/migrate/012__create_product_options_joint_table.rb +9 -0
  179. data/db/migrate/013__create_stock_locations.rb +18 -0
  180. data/db/migrate/014__create_variants.rb +12 -0
  181. data/db/migrate/015__add_promotional_to_variant.rb +8 -0
  182. data/db/migrate/016__create_inventories.rb +12 -0
  183. data/db/migrate/017__create_payment_methods.rb +9 -0
  184. data/db/migrate/018__create_cart_items.rb +12 -0
  185. data/db/migrate/019__create_orders.rb +11 -0
  186. data/db/migrate/020__create_order_lines.rb +14 -0
  187. data/db/migrate/021__add_type_to_user.rb +5 -0
  188. data/db/migrate/022__rename_user_address_to_customer_address.rb +5 -0
  189. data/db/migrate/023__create_shipments.rb +12 -0
  190. data/db/migrate/024__add_shipment_id_to_order_line.rb +5 -0
  191. data/db/migrate/025__change_user_gender_to_not_nullable.rb +5 -0
  192. data/db/migrate/026__add_category_id_to_product.rb +5 -0
  193. data/db/migrate/027__add_attachment_brand_image_to_brands.rb +11 -0
  194. data/db/migrate/028__add_delivery_date_to_shipment.rb +5 -0
  195. data/db/migrate/029__add_customer_info_to_order.rb +13 -0
  196. data/db/migrate/030__add_status_to_order.rb +5 -0
  197. data/db/migrate/031__add_default_address_to_user.rb +5 -0
  198. data/db/migrate/032__add_options_to_variant.rb +5 -0
  199. data/db/migrate/033__add_display_to_options_groups.rb +5 -0
  200. data/db/migrate/034__add_points_to_variant.rb +5 -0
  201. data/db/migrate/035__add_points_to_user.rb +5 -0
  202. data/db/migrate/036__define_ids.rb +25 -0
  203. data/db/migrate/037__create_seed_users.rb +13 -0
  204. data/db/migrate/038__add_name_to_customer_address.rb +5 -0
  205. data/db/migrate/039__create_reviews.rb +14 -0
  206. data/db/migrate/040__alter_table_customer_address.rb +5 -0
  207. data/db/migrate/041__create_settings.rb +23 -0
  208. data/lib/.DS_Store +0 -0
  209. data/lib/shoppy.rb +13 -0
  210. data/lib/shoppy/client.rb +53 -0
  211. data/lib/shoppy/engine.rb +4 -0
  212. data/lib/shoppy/version.rb +3 -0
  213. data/lib/tasks/shoppy_tasks.rake +4 -0
  214. data/lib/template/.gitignore +20 -0
  215. data/lib/template/Gemfile +46 -0
  216. data/lib/template/Gemfile.lock +218 -0
  217. data/lib/template/Rakefile +6 -0
  218. data/lib/template/app/assets/images/.keep +0 -0
  219. data/lib/template/app/assets/javascripts/application.js +13 -0
  220. data/lib/template/app/assets/stylesheets/application.css +15 -0
  221. data/lib/template/app/controllers/accounts_controller.rb +3 -0
  222. data/lib/template/app/controllers/application_controller.rb +3 -0
  223. data/lib/template/app/controllers/brands_controller.rb +3 -0
  224. data/lib/template/app/controllers/cart_controller.rb +3 -0
  225. data/lib/template/app/controllers/categories_controller.rb +3 -0
  226. data/lib/template/app/controllers/concerns/.keep +0 -0
  227. data/lib/template/app/controllers/customer_addresses_controller.rb +3 -0
  228. data/lib/template/app/controllers/home_controller.rb +3 -0
  229. data/lib/template/app/controllers/inventories_controller.rb +3 -0
  230. data/lib/template/app/controllers/locations_controller.rb +3 -0
  231. data/lib/template/app/controllers/logs_controller.rb +3 -0
  232. data/lib/template/app/controllers/manufacturers_controller.rb +3 -0
  233. data/lib/template/app/controllers/options_controller.rb +3 -0
  234. data/lib/template/app/controllers/orders_controller.rb +3 -0
  235. data/lib/template/app/controllers/products_controller.rb +3 -0
  236. data/lib/template/app/controllers/reviews_controller.rb +3 -0
  237. data/lib/template/app/controllers/sessions_controller.rb +3 -0
  238. data/lib/template/app/controllers/settings_controller.rb +3 -0
  239. data/lib/template/app/controllers/shipments_controller.rb +3 -0
  240. data/lib/template/app/controllers/variants_controller.rb +3 -0
  241. data/lib/template/app/helpers/.keep +0 -0
  242. data/lib/template/app/helpers/orders_helper.rb +4 -0
  243. data/lib/template/app/mailers/.keep +0 -0
  244. data/lib/template/app/models/.keep +0 -0
  245. data/lib/template/app/models/account.rb +4 -0
  246. data/lib/template/app/models/admin.rb +4 -0
  247. data/lib/template/app/models/brand.rb +3 -0
  248. data/lib/template/app/models/cart_item.rb +3 -0
  249. data/lib/template/app/models/category.rb +3 -0
  250. data/lib/template/app/models/concerns/.keep +0 -0
  251. data/lib/template/app/models/concerns/hashable.rb +4 -0
  252. data/lib/template/app/models/customer.rb +4 -0
  253. data/lib/template/app/models/customer_address.rb +3 -0
  254. data/lib/template/app/models/inventory.rb +3 -0
  255. data/lib/template/app/models/log.rb +3 -0
  256. data/lib/template/app/models/manufacturer.rb +3 -0
  257. data/lib/template/app/models/option_item.rb +3 -0
  258. data/lib/template/app/models/options_group.rb +3 -0
  259. data/lib/template/app/models/order.rb +3 -0
  260. data/lib/template/app/models/order_line.rb +3 -0
  261. data/lib/template/app/models/payment_method.rb +3 -0
  262. data/lib/template/app/models/product.rb +3 -0
  263. data/lib/template/app/models/review.rb +3 -0
  264. data/lib/template/app/models/setting.rb +3 -0
  265. data/lib/template/app/models/shipment.rb +3 -0
  266. data/lib/template/app/models/stock_location.rb +3 -0
  267. data/lib/template/app/models/variant.rb +3 -0
  268. data/lib/template/app/views/layouts/.keep +0 -0
  269. data/lib/template/bin/bundle +3 -0
  270. data/lib/template/bin/rails +8 -0
  271. data/lib/template/bin/rake +8 -0
  272. data/lib/template/bin/spring +18 -0
  273. data/lib/template/config.ru +4 -0
  274. data/lib/template/config/application.rb +23 -0
  275. data/lib/template/config/boot.rb +4 -0
  276. data/lib/template/config/database.yml +86 -0
  277. data/lib/template/config/environment.rb +5 -0
  278. data/lib/template/config/environments/development.rb +37 -0
  279. data/lib/template/config/environments/production.rb +78 -0
  280. data/lib/template/config/environments/test.rb +39 -0
  281. data/lib/template/config/initializers/assets.rb +8 -0
  282. data/lib/template/config/initializers/backtrace_silencers.rb +7 -0
  283. data/lib/template/config/initializers/cookies_serializer.rb +3 -0
  284. data/lib/template/config/initializers/devise.rb +256 -0
  285. data/lib/template/config/initializers/filter_parameter_logging.rb +4 -0
  286. data/lib/template/config/initializers/inflections.rb +16 -0
  287. data/lib/template/config/initializers/mime_types.rb +4 -0
  288. data/lib/template/config/initializers/session_store.rb +3 -0
  289. data/lib/template/config/initializers/wrap_parameters.rb +14 -0
  290. data/lib/template/config/locales/devise.en.yml +59 -0
  291. data/lib/template/config/locales/en.yml +23 -0
  292. data/lib/template/config/routes.rb +3 -0
  293. data/lib/template/config/secrets.yml +22 -0
  294. data/lib/template/db/migrate/.keep +0 -0
  295. data/lib/template/db/seeds.rb +7 -0
  296. data/lib/template/lib/assets/.keep +0 -0
  297. data/lib/template/lib/tasks/.keep +0 -0
  298. data/lib/template/log/.keep +0 -0
  299. data/lib/template/public/404.html +67 -0
  300. data/lib/template/public/422.html +67 -0
  301. data/lib/template/public/500.html +66 -0
  302. data/lib/template/public/favicon.ico +0 -0
  303. data/lib/template/public/robots.txt +5 -0
  304. data/lib/template/test/controllers/.keep +0 -0
  305. data/lib/template/test/fixtures/.keep +0 -0
  306. data/lib/template/test/helpers/.keep +0 -0
  307. data/lib/template/test/integration/.keep +0 -0
  308. data/lib/template/test/mailers/.keep +0 -0
  309. data/lib/template/test/models/.keep +0 -0
  310. data/lib/template/test/test_helper.rb +10 -0
  311. data/lib/template/vendor/assets/javascripts/.keep +0 -0
  312. data/lib/template/vendor/assets/stylesheets/.keep +0 -0
  313. data/test/dummy/README.rdoc +28 -0
  314. data/test/dummy/Rakefile +6 -0
  315. data/test/dummy/app/assets/javascripts/application.js +13 -0
  316. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  317. data/test/dummy/app/controllers/application_controller.rb +5 -0
  318. data/test/dummy/app/helpers/application_helper.rb +2 -0
  319. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  320. data/test/dummy/bin/bundle +3 -0
  321. data/test/dummy/bin/rails +4 -0
  322. data/test/dummy/bin/rake +4 -0
  323. data/test/dummy/config.ru +4 -0
  324. data/test/dummy/config/application.rb +23 -0
  325. data/test/dummy/config/boot.rb +5 -0
  326. data/test/dummy/config/database.yml +25 -0
  327. data/test/dummy/config/environment.rb +5 -0
  328. data/test/dummy/config/environments/development.rb +37 -0
  329. data/test/dummy/config/environments/production.rb +78 -0
  330. data/test/dummy/config/environments/test.rb +39 -0
  331. data/test/dummy/config/initializers/assets.rb +8 -0
  332. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  333. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  334. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  335. data/test/dummy/config/initializers/inflections.rb +16 -0
  336. data/test/dummy/config/initializers/mime_types.rb +4 -0
  337. data/test/dummy/config/initializers/session_store.rb +3 -0
  338. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  339. data/test/dummy/config/locales/en.yml +23 -0
  340. data/test/dummy/config/routes.rb +56 -0
  341. data/test/dummy/config/secrets.yml +22 -0
  342. data/test/dummy/public/404.html +67 -0
  343. data/test/dummy/public/422.html +67 -0
  344. data/test/dummy/public/500.html +66 -0
  345. data/test/dummy/public/favicon.ico +0 -0
  346. data/test/integration/navigation_test.rb +10 -0
  347. data/test/shoppy/Users/alybadawy/exp/shoppy/lib/template/Gemfile.lock +217 -0
  348. data/test/shoppy/Users/alybadawy/exp/shoppy/lib/template/README.rdoc +28 -0
  349. data/test/shoppy/Users/alybadawy/exp/shoppy/lib/template/config.ru +4 -0
  350. data/test/shoppy_test.rb +7 -0
  351. data/test/test_helper.rb +15 -0
  352. metadata +495 -0
@@ -0,0 +1,78 @@
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # Code is not reloaded between requests.
5
+ config.cache_classes = true
6
+
7
+ # Eager load code on boot. This eager loads most of Rails and
8
+ # your application in memory, allowing both threaded web servers
9
+ # and those relying on copy on write to perform better.
10
+ # Rake tasks automatically ignore this option for performance.
11
+ config.eager_load = true
12
+
13
+ # Full error reports are disabled and caching is turned on.
14
+ config.consider_all_requests_local = false
15
+ config.action_controller.perform_caching = true
16
+
17
+ # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
+ # Add `rack-cache` to your Gemfile before enabling this.
19
+ # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
20
+ # config.action_dispatch.rack_cache = true
21
+
22
+ # Disable Rails's static asset server (Apache or nginx will already do this).
23
+ config.serve_static_assets = false
24
+
25
+ # Compress JavaScripts and CSS.
26
+ config.assets.js_compressor = :uglifier
27
+ # config.assets.css_compressor = :sass
28
+
29
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
30
+ config.assets.compile = false
31
+
32
+ # Generate digests for assets URLs.
33
+ config.assets.digest = true
34
+
35
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
36
+
37
+ # Specifies the header that your server uses for sending files.
38
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
39
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
40
+
41
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
42
+ # config.force_ssl = true
43
+
44
+ # Set to :debug to see everything in the log.
45
+ config.log_level = :info
46
+
47
+ # Prepend all log lines with the following tags.
48
+ # config.log_tags = [ :subdomain, :uuid ]
49
+
50
+ # Use a different logger for distributed setups.
51
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
52
+
53
+ # Use a different cache store in production.
54
+ # config.cache_store = :mem_cache_store
55
+
56
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
57
+ # config.action_controller.asset_host = "http://assets.example.com"
58
+
59
+ # Ignore bad email addresses and do not raise email delivery errors.
60
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
61
+ # config.action_mailer.raise_delivery_errors = false
62
+
63
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
64
+ # the I18n.default_locale when a translation cannot be found).
65
+ config.i18n.fallbacks = true
66
+
67
+ # Send deprecation notices to registered listeners.
68
+ config.active_support.deprecation = :notify
69
+
70
+ # Disable automatic flushing of the log to improve performance.
71
+ # config.autoflush_log = false
72
+
73
+ # Use default logging formatter so that PID and timestamp are not suppressed.
74
+ config.log_formatter = ::Logger::Formatter.new
75
+
76
+ # Do not dump schema after migrations.
77
+ config.active_record.dump_schema_after_migration = false
78
+ end
@@ -0,0 +1,39 @@
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # The test environment is used exclusively to run your application's
5
+ # test suite. You never need to work with it otherwise. Remember that
6
+ # your test database is "scratch space" for the test suite and is wiped
7
+ # and recreated between test runs. Don't rely on the data there!
8
+ config.cache_classes = true
9
+
10
+ # Do not eager load code on boot. This avoids loading your whole application
11
+ # just for the purpose of running a single test. If you are using a tool that
12
+ # preloads Rails for running tests, you may have to set it to true.
13
+ config.eager_load = false
14
+
15
+ # Configure static asset server for tests with Cache-Control for performance.
16
+ config.serve_static_assets = true
17
+ config.static_cache_control = 'public, max-age=3600'
18
+
19
+ # Show full error reports and disable caching.
20
+ config.consider_all_requests_local = true
21
+ config.action_controller.perform_caching = false
22
+
23
+ # Raise exceptions instead of rendering exception templates.
24
+ config.action_dispatch.show_exceptions = false
25
+
26
+ # Disable request forgery protection in test environment.
27
+ config.action_controller.allow_forgery_protection = false
28
+
29
+ # Tell Action Mailer not to deliver emails to the real world.
30
+ # The :test delivery method accumulates sent emails in the
31
+ # ActionMailer::Base.deliveries array.
32
+ config.action_mailer.delivery_method = :test
33
+
34
+ # Print deprecation notices to the stderr.
35
+ config.active_support.deprecation = :stderr
36
+
37
+ # Raises error for missing translations
38
+ # config.action_view.raise_on_missing_translations = true
39
+ end
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Version of your assets, change this if you want to expire all your assets.
4
+ Rails.application.config.assets.version = '1.0'
5
+
6
+ # Precompile additional assets.
7
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
8
+ # Rails.application.config.assets.precompile += %w( search.js )
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Rails.application.config.filter_parameters += [:password]
@@ -0,0 +1,16 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format. Inflections
4
+ # are locale specific, and you may define rules for as many different
5
+ # locales as you wish. All of these examples are active by default:
6
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
+ # inflect.plural /^(ox)$/i, '\1en'
8
+ # inflect.singular /^(ox)en/i, '\1'
9
+ # inflect.irregular 'person', 'people'
10
+ # inflect.uncountable %w( fish sheep )
11
+ # end
12
+
13
+ # These inflection rules are supported but not enabled by default:
14
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
+ # inflect.acronym 'RESTful'
16
+ # end
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
@@ -0,0 +1,3 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Rails.application.config.session_store :cookie_store, key: '_dummy_session'
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
+ end
10
+
11
+ # To enable root element in JSON for ActiveRecord objects.
12
+ # ActiveSupport.on_load(:active_record) do
13
+ # self.include_root_in_json = true
14
+ # end
@@ -0,0 +1,23 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # To learn more, please read the Rails Internationalization guide
20
+ # available at http://guides.rubyonrails.org/i18n.html.
21
+
22
+ en:
23
+ hello: "Hello world"
@@ -0,0 +1,56 @@
1
+ Rails.application.routes.draw do
2
+ # The priority is based upon order of creation: first created -> highest priority.
3
+ # See how all your routes lay out with "rake routes".
4
+
5
+ # You can have the root of your site routed with "root"
6
+ # root 'welcome#index'
7
+
8
+ # Example of regular route:
9
+ # get 'products/:id' => 'catalog#view'
10
+
11
+ # Example of named route that can be invoked with purchase_url(id: product.id)
12
+ # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
13
+
14
+ # Example resource route (maps HTTP verbs to controller actions automatically):
15
+ # resources :products
16
+
17
+ # Example resource route with options:
18
+ # resources :products do
19
+ # member do
20
+ # get 'short'
21
+ # post 'toggle'
22
+ # end
23
+ #
24
+ # collection do
25
+ # get 'sold'
26
+ # end
27
+ # end
28
+
29
+ # Example resource route with sub-resources:
30
+ # resources :products do
31
+ # resources :comments, :sales
32
+ # resource :seller
33
+ # end
34
+
35
+ # Example resource route with more complex sub-resources:
36
+ # resources :products do
37
+ # resources :comments
38
+ # resources :sales do
39
+ # get 'recent', on: :collection
40
+ # end
41
+ # end
42
+
43
+ # Example resource route with concerns:
44
+ # concern :toggleable do
45
+ # post 'toggle'
46
+ # end
47
+ # resources :posts, concerns: :toggleable
48
+ # resources :photos, concerns: :toggleable
49
+
50
+ # Example resource route within a namespace:
51
+ # namespace :admin do
52
+ # # Directs /admin/products/* to Admin::ProductsController
53
+ # # (app/controllers/admin/products_controller.rb)
54
+ # resources :products
55
+ # end
56
+ end
@@ -0,0 +1,22 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure the secrets in this file are kept private
11
+ # if you're sharing your code publicly.
12
+
13
+ development:
14
+ secret_key_base: efff6d11bcfb7f3f0161a5b43d676ec0f6f6ced86405c257af818c821cacdce3c7cc14077c4ae326f69c8600195944fcca0e4bc920ff71694ad1e9caba797bf0
15
+
16
+ test:
17
+ secret_key_base: b3ad3f33542aea00d8ec132833725e29279806b4578e9b94b3680387721c8377fc941c6ed80a5b78609a64166afc0f5c138641c619cba1e697c1f5b087d253c5
18
+
19
+ # Do not keep production secrets in the repository,
20
+ # instead read values from the environment.
21
+ production:
22
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/404.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The page you were looking for doesn't exist.</h1>
62
+ <p>You may have mistyped the address or the page may have moved.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,67 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/422.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>The change you wanted was rejected.</h1>
62
+ <p>Maybe you tried to change something you didn't have access to.</p>
63
+ </div>
64
+ <p>If you are the application owner check the logs for more information.</p>
65
+ </div>
66
+ </body>
67
+ </html>
@@ -0,0 +1,66 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/500.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>We're sorry, but something went wrong.</h1>
62
+ </div>
63
+ <p>If you are the application owner check the logs for more information.</p>
64
+ </div>
65
+ </body>
66
+ </html>