disco_app 0.14.4 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (429) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -5
  3. data/app/clients/disco_app/api_client.rb +5 -4
  4. data/app/clients/disco_app/graphql_client.rb +85 -0
  5. data/app/controllers/disco_app/admin/app_settings_controller.rb +2 -0
  6. data/app/controllers/disco_app/admin/application_controller.rb +1 -0
  7. data/app/controllers/disco_app/admin/concerns/app_settings_controller.rb +2 -1
  8. data/app/controllers/disco_app/admin/concerns/authenticated_controller.rb +5 -3
  9. data/app/controllers/disco_app/admin/concerns/plans_controller.rb +3 -2
  10. data/app/controllers/disco_app/admin/concerns/shops_controller.rb +1 -0
  11. data/app/controllers/disco_app/admin/concerns/sources_controller.rb +2 -1
  12. data/app/controllers/disco_app/admin/concerns/subscriptions_controller.rb +3 -2
  13. data/app/controllers/disco_app/admin/plans_controller.rb +2 -0
  14. data/app/controllers/disco_app/admin/resources/shops_controller.rb +2 -0
  15. data/app/controllers/disco_app/admin/shops_controller.rb +2 -0
  16. data/app/controllers/disco_app/admin/sources_controller.rb +2 -0
  17. data/app/controllers/disco_app/admin/subscriptions_controller.rb +2 -0
  18. data/app/controllers/disco_app/charges_controller.rb +6 -7
  19. data/app/controllers/disco_app/concerns/app_proxy_controller.rb +6 -6
  20. data/app/controllers/disco_app/concerns/authenticated_controller.rb +24 -25
  21. data/app/controllers/disco_app/concerns/carrier_request_controller.rb +22 -11
  22. data/app/controllers/disco_app/concerns/user_authenticated_controller.rb +1 -0
  23. data/app/controllers/disco_app/concerns/webhooks_controller.rb +49 -0
  24. data/app/controllers/disco_app/flow/actions_controller.rb +9 -0
  25. data/app/controllers/disco_app/flow/concerns/actions_controller.rb +50 -0
  26. data/app/controllers/disco_app/frame_controller.rb +0 -1
  27. data/app/controllers/disco_app/install_controller.rb +3 -6
  28. data/app/controllers/disco_app/subscriptions_controller.rb +12 -4
  29. data/app/controllers/disco_app/user_sessions_controller.rb +1 -0
  30. data/app/controllers/disco_app/webhooks_controller.rb +2 -44
  31. data/app/controllers/sessions_controller.rb +4 -3
  32. data/app/helpers/disco_app/application_helper.rb +7 -7
  33. data/app/jobs/disco_app/app_installed_job.rb +2 -0
  34. data/app/jobs/disco_app/app_uninstalled_job.rb +2 -0
  35. data/app/jobs/disco_app/concerns/app_installed_job.rb +2 -3
  36. data/app/jobs/disco_app/concerns/app_uninstalled_job.rb +2 -1
  37. data/app/jobs/disco_app/concerns/render_asset_group_job.rb +1 -0
  38. data/app/jobs/disco_app/concerns/shop_update_job.rb +9 -2
  39. data/app/jobs/disco_app/concerns/subscription_changed_job.rb +2 -1
  40. data/app/jobs/disco_app/concerns/synchronise_carrier_service_job.rb +8 -7
  41. data/app/jobs/disco_app/concerns/synchronise_resources_job.rb +1 -0
  42. data/app/jobs/disco_app/concerns/synchronise_users_job.rb +6 -3
  43. data/app/jobs/disco_app/concerns/synchronise_webhooks_job.rb +4 -5
  44. data/app/jobs/disco_app/flow/process_action_job.rb +11 -0
  45. data/app/jobs/disco_app/flow/process_trigger_job.rb +11 -0
  46. data/app/jobs/disco_app/render_asset_group_job.rb +2 -0
  47. data/app/jobs/disco_app/shop_job.rb +10 -10
  48. data/app/jobs/disco_app/shop_update_job.rb +2 -0
  49. data/app/jobs/disco_app/subscription_changed_job.rb +2 -0
  50. data/app/jobs/disco_app/synchronise_carrier_service_job.rb +2 -0
  51. data/app/jobs/disco_app/synchronise_resources_job.rb +2 -0
  52. data/app/jobs/disco_app/synchronise_users_job.rb +2 -0
  53. data/app/jobs/disco_app/synchronise_webhooks_job.rb +2 -0
  54. data/app/models/application_record.rb +2 -0
  55. data/app/models/disco_app/app_settings.rb +2 -0
  56. data/app/models/disco_app/application_charge.rb +1 -1
  57. data/app/models/disco_app/concerns/app_settings.rb +2 -0
  58. data/app/models/disco_app/concerns/can_be_liquified.rb +29 -14
  59. data/app/models/disco_app/concerns/has_metafields.rb +1 -2
  60. data/app/models/disco_app/concerns/plan.rb +3 -4
  61. data/app/models/disco_app/concerns/plan_code.rb +1 -2
  62. data/app/models/disco_app/concerns/renders_assets.rb +14 -18
  63. data/app/models/disco_app/concerns/shop.rb +11 -12
  64. data/app/models/disco_app/concerns/source.rb +2 -3
  65. data/app/models/disco_app/concerns/subscription.rb +3 -3
  66. data/app/models/disco_app/concerns/synchronises.rb +10 -15
  67. data/app/models/disco_app/concerns/taggable.rb +1 -0
  68. data/app/models/disco_app/concerns/user.rb +3 -2
  69. data/app/models/disco_app/flow/action.rb +9 -0
  70. data/app/models/disco_app/flow/concerns/action.rb +27 -0
  71. data/app/models/disco_app/flow/concerns/trigger.rb +27 -0
  72. data/app/models/disco_app/flow/trigger.rb +9 -0
  73. data/app/models/disco_app/plan.rb +2 -0
  74. data/app/models/disco_app/plan_code.rb +2 -0
  75. data/app/models/disco_app/session_storage.rb +3 -0
  76. data/app/models/disco_app/shop.rb +2 -0
  77. data/app/models/disco_app/source.rb +2 -0
  78. data/app/models/disco_app/subscription.rb +2 -0
  79. data/app/models/disco_app/user.rb +2 -0
  80. data/app/resources/disco_app/admin/resources/concerns/shop_resource.rb +12 -15
  81. data/app/resources/disco_app/admin/resources/shop_resource.rb +1 -0
  82. data/app/services/disco_app/carrier_request_service.rb +3 -3
  83. data/app/services/disco_app/charges_service.rb +26 -34
  84. data/app/services/disco_app/flow/create_action.rb +35 -0
  85. data/app/services/disco_app/flow/create_trigger.rb +34 -0
  86. data/app/services/disco_app/flow/process_action.rb +50 -0
  87. data/app/services/disco_app/flow/process_trigger.rb +52 -0
  88. data/app/services/disco_app/partner_app_service.rb +1 -1
  89. data/app/services/disco_app/proxy_service.rb +2 -2
  90. data/app/services/disco_app/request_validation_service.rb +2 -2
  91. data/app/services/disco_app/subscription_service.rb +60 -32
  92. data/app/services/disco_app/webhook_service.rb +9 -11
  93. data/config/routes.rb +7 -3
  94. data/db/migrate/20150525000000_create_shops_if_not_existent.rb +80 -80
  95. data/db/migrate/20170315062548_create_disco_app_sources.rb +2 -0
  96. data/db/migrate/20170315062629_add_sources_to_shop_subscriptions.rb +3 -1
  97. data/db/migrate/20170327214540_create_disco_app_users.rb +2 -1
  98. data/db/migrate/20170606160751_fix_disco_app_users_index.rb +2 -0
  99. data/db/migrate/20181229100327_create_flow_actions_and_triggers.rb +32 -0
  100. data/lib/disco_app/configuration.rb +9 -5
  101. data/lib/disco_app/constants.rb +4 -2
  102. data/lib/disco_app/engine.rb +1 -1
  103. data/lib/disco_app/session.rb +1 -0
  104. data/lib/disco_app/support/file_fixtures.rb +2 -1
  105. data/lib/disco_app/version.rb +3 -1
  106. data/lib/generators/disco_app/install/USAGE +5 -0
  107. data/lib/generators/disco_app/install/install_generator.rb +287 -0
  108. data/lib/generators/disco_app/{templates → install/templates}/assets/javascripts/application.js +0 -0
  109. data/lib/generators/disco_app/{templates → install/templates}/assets/javascripts/components.js +0 -0
  110. data/lib/generators/disco_app/{templates → install/templates}/assets/stylesheets/application.scss +0 -0
  111. data/lib/generators/disco_app/install/templates/config/appsignal.yml +12 -0
  112. data/lib/generators/disco_app/install/templates/config/cable.yml.tt +11 -0
  113. data/lib/generators/disco_app/{templates → install/templates}/config/database.yml.tt +6 -3
  114. data/lib/generators/disco_app/install/templates/config/environments/staging.rb +108 -0
  115. data/lib/generators/disco_app/{templates → install/templates}/config/puma.rb +0 -0
  116. data/lib/generators/disco_app/{templates → install/templates}/controllers/home_controller.rb +1 -0
  117. data/lib/generators/disco_app/{templates → install/templates}/initializers/disco_app.rb +0 -0
  118. data/lib/generators/disco_app/install/templates/initializers/session_store.rb +2 -0
  119. data/lib/generators/disco_app/{templates → install/templates}/initializers/shopify_app.rb +0 -0
  120. data/lib/generators/disco_app/{templates → install/templates}/initializers/shopify_session_repository.rb +0 -0
  121. data/lib/generators/disco_app/install/templates/initializers/timber.rb +6 -0
  122. data/lib/generators/disco_app/{templates → install/templates}/root/.editorconfig +0 -0
  123. data/lib/generators/disco_app/{templates → install/templates}/root/.env +3 -0
  124. data/lib/generators/disco_app/{templates → install/templates}/root/.env.local +3 -0
  125. data/lib/generators/disco_app/install/templates/root/.github/PULL_REQUEST_TEMPLATE.md +18 -0
  126. data/lib/generators/disco_app/{templates → install/templates}/root/.gitignore +10 -0
  127. data/lib/generators/disco_app/install/templates/root/.rspec +1 -0
  128. data/lib/generators/disco_app/{templates → install/templates}/root/.rubocop.yml +263 -170
  129. data/lib/generators/disco_app/{templates → install/templates}/root/.ruby-version +0 -0
  130. data/lib/generators/disco_app/{templates → install/templates}/root/CHECKS +0 -0
  131. data/lib/generators/disco_app/{templates → install/templates}/root/Procfile +0 -0
  132. data/lib/generators/disco_app/{templates → install/templates}/root/README.md +0 -0
  133. data/lib/generators/disco_app/install/templates/spec/rails_helper.rb +40 -0
  134. data/lib/generators/disco_app/install/templates/spec/spec_helper.rb +24 -0
  135. data/lib/generators/disco_app/install/templates/spec/support/active_job.rb +13 -0
  136. data/lib/generators/disco_app/install/templates/spec/support/coveralls.rb +3 -0
  137. data/lib/generators/disco_app/install/templates/spec/support/database_cleaner.rb +17 -0
  138. data/lib/generators/disco_app/install/templates/spec/support/factory_bot.rb +3 -0
  139. data/lib/generators/disco_app/install/templates/spec/support/helpers/json_helper.rb +13 -0
  140. data/lib/generators/disco_app/install/templates/spec/support/shared_examples/a_synchronise_job.rb +12 -0
  141. data/lib/generators/disco_app/install/templates/spec/support/shoulda.rb +6 -0
  142. data/lib/generators/disco_app/install/templates/spec/support/vcr.rb +14 -0
  143. data/lib/generators/disco_app/install/templates/spec/support/webmock.rb +8 -0
  144. data/lib/generators/disco_app/{templates → install/templates}/views/home/index.html.erb +0 -0
  145. data/lib/generators/disco_app/react/USAGE +5 -0
  146. data/lib/generators/disco_app/react/react_generator.rb +108 -0
  147. data/lib/generators/disco_app/react/templates/app/controllers/embedded/api/base_controller.rb +18 -0
  148. data/lib/generators/disco_app/react/templates/app/controllers/embedded/api/home_controller.rb +10 -0
  149. data/lib/generators/disco_app/react/templates/app/controllers/embedded/api/shops_controller.rb +11 -0
  150. data/lib/generators/disco_app/react/templates/app/controllers/embedded/api/users_controller.rb +11 -0
  151. data/lib/generators/disco_app/react/templates/app/controllers/embedded/home_controller.rb +13 -0
  152. data/lib/generators/disco_app/react/templates/app/models/api_response.rb +107 -0
  153. data/lib/generators/disco_app/react/templates/app/serializers/disco_app/shop_serializer.rb +13 -0
  154. data/lib/generators/disco_app/react/templates/app/serializers/disco_app/user_serializer.rb +13 -0
  155. data/lib/generators/disco_app/react/templates/app/serializers/empty_serializer.rb +5 -0
  156. data/lib/generators/disco_app/react/templates/app/serializers/error_serializer.rb +76 -0
  157. data/lib/generators/disco_app/react/templates/app/views/embedded/home/index.html.erb +12 -0
  158. data/lib/generators/disco_app/react/templates/app/views/layouts/embedded.html.erb +10 -0
  159. data/lib/generators/disco_app/react/templates/app/webpack/javascripts/embedded/components/App.jsx +77 -0
  160. data/lib/generators/disco_app/react/templates/app/webpack/javascripts/embedded/components/HomePage.jsx +34 -0
  161. data/lib/generators/disco_app/react/templates/app/webpack/javascripts/embedded/components/Shared/EmbeddedPage.jsx +70 -0
  162. data/lib/generators/disco_app/react/templates/app/webpack/javascripts/embedded/components/Shared/ErrorBanner.jsx +58 -0
  163. data/lib/generators/disco_app/react/templates/app/webpack/javascripts/embedded/components/Shared/PaginationWrapper.jsx +10 -0
  164. data/lib/generators/disco_app/react/templates/app/webpack/javascripts/embedded/components/Shared/ScrollToTop.jsx +23 -0
  165. data/lib/generators/disco_app/react/templates/app/webpack/javascripts/embedded/components/withApi.jsx +125 -0
  166. data/lib/generators/disco_app/react/templates/app/webpack/javascripts/embedded/index.jsx +39 -0
  167. data/lib/generators/disco_app/react/templates/app/webpack/javascripts/embedded/utils.js +19 -0
  168. data/lib/generators/disco_app/react/templates/app/webpack/packs/embedded.js +2 -0
  169. data/lib/generators/disco_app/react/templates/app/webpack/stylesheets/embedded/shared/banners.scss +7 -0
  170. data/lib/generators/disco_app/react/templates/app/webpack/stylesheets/embedded/shared/busy.scss +3 -0
  171. data/lib/generators/disco_app/react/templates/app/webpack/stylesheets/embedded/shared/index.scss +3 -0
  172. data/lib/generators/disco_app/react/templates/app/webpack/stylesheets/embedded/shared/pagination.scss +5 -0
  173. data/lib/generators/disco_app/react/templates/app/webpack/stylesheets/embedded.scss +2 -0
  174. data/lib/generators/disco_app/react/templates/config/initializers/mime_types.rb +13 -0
  175. data/lib/generators/disco_app/react/templates/config/initializers/omniauth.rb +27 -0
  176. data/lib/generators/disco_app/react/templates/config/initializers/version.rb.tt +7 -0
  177. data/lib/generators/disco_app/react/templates/config/webpack/staging.js +5 -0
  178. data/lib/generators/disco_app/react/templates/config/webpack/test.js +5 -0
  179. data/lib/generators/disco_app/react/templates/config/webpacker.yml +96 -0
  180. data/lib/generators/disco_app/react/templates/root/.eslintignore +5 -0
  181. data/lib/generators/disco_app/react/templates/root/.eslintrc +69 -0
  182. data/lib/generators/disco_app/react/templates/root/.prettierrc +3 -0
  183. data/lib/generators/disco_app/react/templates/root/VERSION +1 -0
  184. data/lib/generators/disco_app/react/templates/root/babel.config.js +72 -0
  185. data/lib/generators/disco_app/react/templates/root/package.json.tt +84 -0
  186. data/lib/generators/disco_app/react/templates/root/postcss.config.js +14 -0
  187. data/lib/tasks/api.rake +0 -2
  188. data/lib/tasks/carrier_service.rake +0 -2
  189. data/lib/tasks/database.rake +1 -1
  190. data/lib/tasks/sessions.rake +0 -2
  191. data/lib/tasks/shops.rake +0 -2
  192. data/lib/tasks/users.rake +0 -2
  193. data/lib/tasks/webhooks.rake +0 -2
  194. data/test/clients/disco_app/api_client_test.rb +3 -3
  195. data/test/controllers/disco_app/admin/shops_controller_test.rb +1 -0
  196. data/test/controllers/disco_app/charges_controller_test.rb +7 -8
  197. data/test/controllers/disco_app/install_controller_test.rb +2 -1
  198. data/test/controllers/disco_app/subscriptions_controller_test.rb +1 -0
  199. data/test/controllers/disco_app/webhooks_controller_test.rb +1 -0
  200. data/test/controllers/home_controller_test.rb +1 -1
  201. data/test/disco_app_test.rb +3 -1
  202. data/test/dummy/Rakefile +1 -1
  203. data/test/dummy/app/controllers/application_controller.rb +2 -0
  204. data/test/dummy/app/controllers/carrier_request_controller.rb +1 -0
  205. data/test/dummy/app/controllers/disco_app/admin/shops_controller.rb +1 -0
  206. data/test/dummy/app/controllers/home_controller.rb +1 -0
  207. data/test/dummy/app/controllers/proxy_controller.rb +1 -0
  208. data/test/dummy/app/jobs/disco_app/app_installed_job.rb +2 -3
  209. data/test/dummy/app/jobs/disco_app/app_uninstalled_job.rb +1 -0
  210. data/test/dummy/app/models/application_record.rb +2 -0
  211. data/test/dummy/app/models/cart.rb +4 -3
  212. data/test/dummy/app/models/disco_app/shop.rb +4 -5
  213. data/test/dummy/app/models/js_configuration.rb +1 -0
  214. data/test/dummy/app/models/product.rb +3 -2
  215. data/test/dummy/app/models/widget_configuration.rb +1 -0
  216. data/test/dummy/bin/bundle +1 -1
  217. data/test/dummy/bin/rails +1 -1
  218. data/test/dummy/bin/setup +8 -8
  219. data/test/dummy/config/application.rb +4 -3
  220. data/test/dummy/config/boot.rb +2 -2
  221. data/test/dummy/config/database.yml +3 -0
  222. data/test/dummy/config/environment.rb +1 -1
  223. data/test/dummy/config/environments/staging.rb +85 -0
  224. data/test/dummy/config/initializers/disco_app.rb +1 -1
  225. data/test/dummy/config/initializers/omniauth.rb +3 -4
  226. data/test/dummy/config/initializers/session_store.rb +1 -1
  227. data/test/dummy/config/routes.rb +0 -2
  228. data/test/dummy/config/secrets.yml +3 -0
  229. data/test/dummy/db/migrate/20160307182229_create_products.rb +3 -1
  230. data/test/dummy/db/migrate/20160530160739_create_asset_models.rb +3 -1
  231. data/test/dummy/db/migrate/20161105054746_create_carts.rb +2 -1
  232. data/test/dummy/db/schema.rb +179 -152
  233. data/test/dummy/log/development.log +123 -0
  234. data/test/dummy/log/test.log +22884 -0
  235. data/test/dummy/tmp/cache/assets/sprockets/v3.0/-p/-p4kkBudGSkrc-Hs2yVEjJfJGuf9E8MY-5Huo4W9iZ0.cache +3 -0
  236. data/test/dummy/tmp/cache/assets/sprockets/v3.0/02/02ODr719GA9zZyrA_CgJwh5Vg-Pq_dHkMMbUvRIygtA.cache +3 -0
  237. data/test/dummy/tmp/cache/assets/sprockets/v3.0/0y/0yiARCmpEBX_JoExohBEcHFx0vv-nWUcjHbxtQbEA3w.cache +1 -0
  238. data/test/dummy/tmp/cache/assets/sprockets/v3.0/12/12KLSO9fSADQ-vGWrYiIRQqP1yFoPcxxZfCvm6paqnE.cache +1 -0
  239. data/test/dummy/tmp/cache/assets/sprockets/v3.0/1h/1ho8ca9C4lfKF780RN8l2MHAActK0WYWa_5I_LQO_ag.cache +1 -0
  240. data/test/dummy/tmp/cache/assets/sprockets/v3.0/2E/2E5jz5DyydbByixysW06PLr06e_FQdg9TtbY_LxsRo8.cache +0 -0
  241. data/test/dummy/tmp/cache/assets/sprockets/v3.0/2J/2JdcXeYI4Ed1DoLpSzLbKAvxbzMjrdwRoNICGVN45dU.cache +0 -0
  242. data/test/dummy/tmp/cache/assets/sprockets/v3.0/2X/2X74oB94L9QPqDYRPZkVEcbdsec1wp6qB_y7h3qwYp4.cache +1 -0
  243. data/test/dummy/tmp/cache/assets/sprockets/v3.0/32/32y6lFrrvtuqVj8A3uafoeX0iA_l4YhD5PJS1JvQIfk.cache +0 -0
  244. data/test/dummy/tmp/cache/assets/sprockets/v3.0/35/35LlNk3lHMnnozK9qRT4mpTbnAtOnjBpfHIybikbcfo.cache +0 -0
  245. data/test/dummy/tmp/cache/assets/sprockets/v3.0/3X/3Xl5kEo1hpRF6kHX2lvLp2kUaNDYGuAkylPqJsOLKXQ.cache +0 -0
  246. data/test/dummy/tmp/cache/assets/sprockets/v3.0/4H/4HXBYKkHtI3ZmDZncAS7pdUwtVhzmwt8XWQMGH1R5xo.cache +0 -0
  247. data/test/dummy/tmp/cache/assets/sprockets/v3.0/4H/4hR2zE1hAnLGpPIQS2v71qG-jmiWb2SHAbGiQjxijck.cache +1 -0
  248. data/test/dummy/tmp/cache/assets/sprockets/v3.0/4O/4OJh4kuEsZJ7ok8p5Wd0wui5pwAE46AFCurNgp2gSmk.cache +1 -0
  249. data/test/dummy/tmp/cache/assets/sprockets/v3.0/4Q/4Qe1126dQRjtMngpBX8SwgKoZu8tQFMDj6XxRU8h4TM.cache +1 -0
  250. data/test/dummy/tmp/cache/assets/sprockets/v3.0/4a/4aPQ7FUdl3IqfTnkIvvU_TbAQVz9rEuUbGQk4YMlFHc.cache +4 -0
  251. data/test/dummy/tmp/cache/assets/sprockets/v3.0/4t/4t0ZbDDyABeGi5MqrX0f4_dHY4BEtHc_zGRi1rkQRog.cache +3 -0
  252. data/test/dummy/tmp/cache/assets/sprockets/v3.0/5e/5efYNzR4038HZsit1p-T65aXkUBH4ZVleUZb9hEvXIw.cache +1 -0
  253. data/test/dummy/tmp/cache/assets/sprockets/v3.0/5f/5fTS4gj7gRDTvcAIYd46ZVrIJqJxQXrLVHhxzWoSJnw.cache +0 -0
  254. data/test/dummy/tmp/cache/assets/sprockets/v3.0/6B/6B5j5ojbS7-L49BW-pNvcpI-SvSgiwvMtK7cKz9UnVE.cache +1 -0
  255. data/test/dummy/tmp/cache/assets/sprockets/v3.0/87/87o1fQc0-Zza8i-HNr9IqA4HYu8ePoAOkIJKIKf8Z6c.cache +0 -0
  256. data/test/dummy/tmp/cache/assets/sprockets/v3.0/8G/8Gp6gCGqi_pI4TmiSRkdhdWznz8tSvZmez3YdyJLNDk.cache +1 -0
  257. data/test/dummy/tmp/cache/assets/sprockets/v3.0/8Z/8Z6fieaymg-zBK1iKgH2xBNnbfeA8Or1VfihnmwZfDc.cache +1 -0
  258. data/test/dummy/tmp/cache/assets/sprockets/v3.0/95/95puf81N4E8lDxbeI9yL09DueyWMUjfsUJ9IAP5jOOM.cache +1 -0
  259. data/test/dummy/tmp/cache/assets/sprockets/v3.0/9E/9E3lx2-LKkXgLWP5jG38B5uCsGiSeWq2po03Die5KF4.cache +3 -0
  260. data/test/dummy/tmp/cache/assets/sprockets/v3.0/9m/9m2H02fp4A1UDiXojyy9sl9NgiiNhAbWFL99jKLSUXQ.cache +1 -0
  261. data/test/dummy/tmp/cache/assets/sprockets/v3.0/A-/A-NmGmyyn0mjkLyKGGU0KRIZalJ2fZNyOkgZt5e910I.cache +3 -0
  262. data/test/dummy/tmp/cache/assets/sprockets/v3.0/AF/AFq71LdWk8T3oJ3clzVzZV--uw0vgLDhG7eMv-RzXWQ.cache +0 -0
  263. data/test/dummy/tmp/cache/assets/sprockets/v3.0/AV/AVaNyVl3EijOrYMZaI7oNgwVbsBIxZHrTKLar1ze83A.cache +0 -0
  264. data/test/dummy/tmp/cache/assets/sprockets/v3.0/B-/B-Qo2b4ZsaxV28WasrCQxMuvqER0D7WhzdE4ydvu6bs.cache +1 -0
  265. data/test/dummy/tmp/cache/assets/sprockets/v3.0/BC/BCGc2X3UiMM53c7SecA7o8rP8PnnWI-msrib8ngDCzU.cache +1 -0
  266. data/test/dummy/tmp/cache/assets/sprockets/v3.0/B_/B_Zzsw0s5HhMI_CS94zPqXl1CdI5oR2CksO7cRDTQKk.cache +0 -0
  267. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Bk/BkOwynwXRQOTj1eL9WyhTbRj-UqFPIrWaIpShoHs9Ck.cache +1 -0
  268. data/test/dummy/tmp/cache/assets/sprockets/v3.0/CP/CPGMneZZYKfNQIQfykCtq6C_kPvs-Q_5IT7-62sQig8.cache +0 -0
  269. data/test/dummy/tmp/cache/assets/sprockets/v3.0/D4/D4FYk677edDaB59dMMpaLK_laiH2ExaAoNfQ3tckUe0.cache +0 -0
  270. data/test/dummy/tmp/cache/assets/sprockets/v3.0/D9/D9O72M_cglvDAMJDjtzio3B6-aC_mmcbI4mLvvKnBX8.cache +1 -0
  271. data/test/dummy/tmp/cache/assets/sprockets/v3.0/DM/DMgq30X20--UWPvaAZ5Cf4oEvG4tBBHF4gLe5mnePRI.cache +1 -0
  272. data/test/dummy/tmp/cache/assets/sprockets/v3.0/E0/E03lez839JRYKgxWxjIrCnVdXJ26UoZDCSHUmR4ojdc.cache +0 -0
  273. data/test/dummy/tmp/cache/assets/sprockets/v3.0/E4/E4Pb3S8O5ZHVIkRSm6c-VFO-17tIFqQzHVloIC9yVQQ.cache +2 -0
  274. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Ep/Eph4FRIXVEgT6ofe0aGn6s-8A-Q0jsyxstY422Btwgk.cache +0 -0
  275. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Eq/Eq6J05FaAYDioPfJRie-I5fIzVt8N8Cc9fFrum3R0kU.cache +2 -0
  276. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Ev/EvGs2l1aBK0RXGSw8osKl01fEOHn6RuiWkR55TIZADE.cache +0 -0
  277. data/test/dummy/tmp/cache/assets/sprockets/v3.0/F3/F3sM5VHZOb3PYnt59S-zBWfWtU_HMpihPI61bBdqtPo.cache +0 -0
  278. data/test/dummy/tmp/cache/assets/sprockets/v3.0/FV/FVpKiOBNCAznp4Ya_eMnQ38K-xO3tK46uPBg-mFB4v4.cache +0 -0
  279. data/test/dummy/tmp/cache/assets/sprockets/v3.0/G5/G5aZsL6LP4HC_Of4i2yYsPaOm8dEOLIXkYdZ6tfuYH4.cache +1 -0
  280. data/test/dummy/tmp/cache/assets/sprockets/v3.0/GP/GPc2gCWO8la32JX3fK1ArDYv3QM63WVQ4S0iwpyJinA.cache +1 -0
  281. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Hg/Hgo9RBfSwY8h8vBNKW38aTRYrA2POVwE2v0ZUs4H4iY.cache +1 -0
  282. data/test/dummy/tmp/cache/assets/sprockets/v3.0/I2/I2iRIXHbnG_vgyhptOqXgQHRe8AIPfa34zmkDL06ibY.cache +2 -0
  283. data/test/dummy/tmp/cache/assets/sprockets/v3.0/IT/ITu-bZPOSBI44uFwzG-2bXQvYQvlsjFhIzQtA6FjpzI.cache +0 -0
  284. data/test/dummy/tmp/cache/assets/sprockets/v3.0/IU/IUU7_XlyzslBC48YPBBx35oNruWg9vN906B_uV4GiDg.cache +0 -0
  285. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Jt/JtSpiYSuQ7CjfmgQNb7_FLI2Bls3o7yLZf-2Yn3Tp2U.cache +1 -0
  286. data/test/dummy/tmp/cache/assets/sprockets/v3.0/KA/KA1WZHj-tCh9wJTjQ82C6RW2abPAHfPbczUvt3U0tBA.cache +1 -0
  287. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Kr/KrbYQRjOQilz5PwngxqljeBbo7gnho2oNCzt9xeostM.cache +2 -0
  288. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Kv/KvrosnOxWBhs2jdBY359Jd_PuPgvRxTEhknjpLZI2J4.cache +1 -0
  289. data/test/dummy/tmp/cache/assets/sprockets/v3.0/LB/LBKCbI8U7auhpX6SCBMuQUyESeMLr90SUzMlnB2u9K0.cache +0 -0
  290. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Lx/LxvZGzkKI0YLuIZB1jBioj31ElpU3JOmhzZrQIqu6f4.cache +2 -0
  291. data/test/dummy/tmp/cache/assets/sprockets/v3.0/MA/MAY9X_jK8UHgcT3acJjAPNRR1io9S2E5KXFZjk9BVoc.cache +0 -0
  292. data/test/dummy/tmp/cache/assets/sprockets/v3.0/MA/MAjMl63wcw2lt9F7Fu0Aml-DdcReV0Op4kCwLLkgZzE.cache +1 -0
  293. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Mb/MbUcsjDehlhHnLqP_sU8IKStNYDZEz09Ga5gk4psMZU.cache +1 -0
  294. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Mf/Mfdr1mda4l8eqbsSlL2hylksXaiTeYfwU-fq4ko_F_s.cache +1 -0
  295. data/test/dummy/tmp/cache/assets/sprockets/v3.0/ND/NDwUm11hTOtktv5tkuUYsrSYAA911qwhO2acqloyxas.cache +0 -0
  296. data/test/dummy/tmp/cache/assets/sprockets/v3.0/ND/ndYRNd1Jv1ESobiH7xjHCJXHooPNdUPSxG8OUoCVi40.cache +1 -0
  297. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Nu/NuS-wdnyjTJSg7hUaprtYh_3hQyvNGTTaRSmK0tUNiU.cache +3 -0
  298. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Nz/NzUGztrNqSgb4WfJOviqI6mjmx1g1L9T6V7BdOgZs3A.cache +0 -0
  299. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Oo/Oox1vL8lRd_YME1JHrD8fTh4Osz1njTWieFpIZ0_G2Y.cache +1 -0
  300. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Pj/PjFSX3ELsmK13-CVKc39OnguIcUMb4EbMV6s0lspCps.cache +1 -0
  301. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Qa/Qa6iUyiZsHRjXGz39RPFnBoVYB2YNZJRlihJjDXm1Bk.cache +0 -0
  302. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Qa/qA0PpX9EMQtQoiP0QbK5bYMUX9OkK1OKTIKwGLtqEMw.cache +0 -0
  303. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Qv/Qvrsp8Of-JGCe25QvfmdH--wQL5vGbLtKiKb921jFq4.cache +1 -0
  304. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Qx/QxOtw5pSMh_dcbeU_FmhURV2lEsclOCcFfNrk2EoSRA.cache +0 -0
  305. data/test/dummy/tmp/cache/assets/sprockets/v3.0/RB/RBgpR6mjFySj9-G4E_qadgKjQbF7G_pAA6D_iRDUk1k.cache +0 -0
  306. data/test/dummy/tmp/cache/assets/sprockets/v3.0/RY/RYr7AxgrTd-Qg2KQa84E8ph9qmA7YFrdrVHMRxMxh_w.cache +0 -0
  307. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Re/ReX-_166hRZykFAwmvCQ19NZEbV6Wa82TEZyyIJna4I.cache +3 -0
  308. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Rk/Rk2lt4VSCTBJ_5w3zwlezlAymCnCIrj-u4hkGrphzDM.cache +1 -0
  309. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Rl/RlgTK-oa7AfiImaIV0ABJ7Gfbg0PdFMeQitXJ-wgKA4.cache +1 -0
  310. data/test/dummy/tmp/cache/assets/sprockets/v3.0/SG/SGGTeEpmk20e5GZV4hcfdbmHMbsQgC8C1VhYlrrQ66M.cache +0 -0
  311. data/test/dummy/tmp/cache/assets/sprockets/v3.0/SK/SKaaVqp6uc_kLTIG2y22QaCGc6g3O4GhL8G4LwJJB8s.cache +1 -0
  312. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Sw/SwRQFgc8QgHfYpyQ7yxe3tPOoP2VJ4Gg6hNH1-fS7LQ.cache +0 -0
  313. data/test/dummy/tmp/cache/assets/sprockets/v3.0/TF/TFzMURDWcxBdkePR_mAtaTIrdc4vWlLJuL48b_xiOxQ.cache +0 -0
  314. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Ul/Ulgt7E1quzZA4FaG37lmxJCoTzG74eHZg-dpjniHHYw.cache +0 -0
  315. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Vr/Vr3hv8nrf3Q9kTPp7bZK9GzGVXU77Yrd_iW4QjMda08.cache +0 -0
  316. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Wg/WgJ8nC_59fjWlE7iFIGPD94i3QCNLt1kR9gcAFkou_4.cache +1 -0
  317. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Wi/WiufxFw0JHFbFUn_8t_eC06A3pMN-vHT-Bs-bxXLsJk.cache +1 -0
  318. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Wx/WxK5JQ5Syi4DSTgcxH3k0-PfF_g7eeb7qW1z5EEqEkY.cache +1 -0
  319. data/test/dummy/tmp/cache/assets/sprockets/v3.0/XB/XBj30cQH2Bw6KE9wpF6ylqczHNtz1rvailJi85_aXFY.cache +0 -0
  320. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Xf/XfRpHm7iz1vW_wpIEZRO4i4dFQLBLzmdP3UPg1tcf-E.cache +0 -0
  321. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Xt/Xtcw2vyNc82l8ChsSieO0h0kbELj9P2Tw9TxjmttoEw.cache +1 -0
  322. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Y0/Y0IFckg4LNe1fBvLBTvZct2gfX_g_1MpAMoTBU8qfLg.cache +0 -0
  323. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Y0/y0SkzhEQe_b3MQq69A2KH5LjHUB7vPYj6wp4neZzf6Q.cache +1 -0
  324. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Y4/Y4jdKVp7dOOcuMaUutQ1s4NmmLXq47L1LWhyXZXEaLg.cache +3 -0
  325. data/test/dummy/tmp/cache/assets/sprockets/v3.0/YE/YEjjWfxdNXU6i_3BklG7anaVrOdu-5jksfoL9GufaGU.cache +0 -0
  326. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Yi/YitmSGSMIDji4aC0llOHl0AS6taxqjRk6e_SYw-V1Is.cache +1 -0
  327. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Zb/Zbler-n-7XzOneefutPvH2Cu1UsS967fqjldXwVuStU.cache +0 -0
  328. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Zs/Zs5ig01Gu3Y1thnsToaKQbOIFKAQPCQm0HEEec_vblE.cache +1 -0
  329. data/test/dummy/tmp/cache/assets/sprockets/v3.0/_C/_C10TQWkrfsm41Aaav86lCOkEcLdO7fX8yojbphLRbE.cache +1 -0
  330. data/test/dummy/tmp/cache/assets/sprockets/v3.0/_G/_GCN7qhLkwrwMKEGcBZ9ITsu0QC1l9HD9XaViXBlNQM.cache +0 -0
  331. data/test/dummy/tmp/cache/assets/sprockets/v3.0/_H/_HRU4CZPSyJ4PEUvsGMJSiIVZqSkNIvU3PoQGUB4l2I.cache +3 -0
  332. data/test/dummy/tmp/cache/assets/sprockets/v3.0/_T/_TQROPFCUq0STw2BzbGITspAWA8dF_WvVa7aR02nXAE.cache +2 -0
  333. data/test/dummy/tmp/cache/assets/sprockets/v3.0/_d/_dgNuvKh1O-ss5yC3qg8KPo3anB_pzCXJw3sphxrAFI.cache +0 -0
  334. data/test/dummy/tmp/cache/assets/sprockets/v3.0/_p/_pqVJRc7OZRexEiqcsNQKd5ip8aNkUW9mKQc6OpAp8I.cache +0 -0
  335. data/test/dummy/tmp/cache/assets/sprockets/v3.0/a1/a1P7jCwGayzCGMYDX1CYCSvT7-pi0eiRewg9KbC-6mI.cache +2 -0
  336. data/test/dummy/tmp/cache/assets/sprockets/v3.0/ao/aoPwSmt5N3P9MyBoWUSbkg8F3_b0jhvKuZ6GlBbwRw0.cache +1 -0
  337. data/test/dummy/tmp/cache/assets/sprockets/v3.0/au/au5wohs0fb0VW1crV3GXkqZs18247x-hRKniPTdRqRM.cache +3 -0
  338. data/test/dummy/tmp/cache/assets/sprockets/v3.0/bW/bWiegRudr21oJdzrS11Fu6RMJ9hjYELHp5F94RA6zRI.cache +1 -0
  339. data/test/dummy/tmp/cache/assets/sprockets/v3.0/c1/c1tUtq98JfLhITxPjfdj6g0Ys9pCpneLHq6wBa9v4co.cache +1 -0
  340. data/test/dummy/tmp/cache/assets/sprockets/v3.0/cC/cCneJUl-S3YnUyRCXIUSQxORgSrNf3K24tBhWxLceo4.cache +0 -0
  341. data/test/dummy/tmp/cache/assets/sprockets/v3.0/cK/cK54mTNBuCdAdDEaSzhZ43uo00XDN8FDTMcsViGpmUc.cache +0 -0
  342. data/test/dummy/tmp/cache/assets/sprockets/v3.0/cy/cydtDFqB_RwfVSEq7ACddUz8us2dp3h4WtZnAJTukfU.cache +0 -0
  343. data/test/dummy/tmp/cache/assets/sprockets/v3.0/dY/dYKoKcEw2XuaSJKsyIixsGilwIzRPtXACDh0e-w3PAM.cache +1 -0
  344. data/test/dummy/tmp/cache/assets/sprockets/v3.0/eY/eYr7xslMqmPqzIH5i1RCZ-XnPoU9owIbQ-hnrsR9SFk.cache +1 -0
  345. data/test/dummy/tmp/cache/assets/sprockets/v3.0/ec/ecxUdWV-k6NvipoXNVXRmH32mnDSwr-ZeNVGhBlpYQQ.cache +0 -0
  346. data/test/dummy/tmp/cache/assets/sprockets/v3.0/ej/ejTWaTrHa-76kUnlqc-EfP1NfTPMyHyqS00NMupK9WQ.cache +0 -0
  347. data/test/dummy/tmp/cache/assets/sprockets/v3.0/f7/f7tLgf7D2qMZcsHSt8R97kFvH30wBYGkeLz9-8U6uhc.cache +1 -0
  348. data/test/dummy/tmp/cache/assets/sprockets/v3.0/fX/fXmxRq4KBzpEegCEzFlkLnWGxPMakZmprlIYMFbQJ1E.cache +0 -0
  349. data/test/dummy/tmp/cache/assets/sprockets/v3.0/g7/g7UL8J5-FXcqK8YQM_ghdj_iEx4xnApvwAaWbgBV0TY.cache +1 -0
  350. data/test/dummy/tmp/cache/assets/sprockets/v3.0/gV/gVz5L3gA5w0S8o3yZpVZF-mP-TreyN5iepl1RRZ-R-E.cache +0 -0
  351. data/test/dummy/tmp/cache/assets/sprockets/v3.0/hI/hIpGOQMTq1d2_3DlNrPG4Q7MfO1WPpkjtd7RFyBWu3A.cache +1 -0
  352. data/test/dummy/tmp/cache/assets/sprockets/v3.0/hI/hiDKOMo7TGsMf1DyunEb03ce439H742gxAM3mgi6Ihg.cache +0 -0
  353. data/test/dummy/tmp/cache/assets/sprockets/v3.0/iG/iGaY16bCJiW0AwP1GzM9Uwad-mZCe1Q937irWUgiI9c.cache +0 -0
  354. data/test/dummy/tmp/cache/assets/sprockets/v3.0/iy/iyzEFHfDRV_piHvWtrdYZuaKMqScr_j4oPKDNHfsDjU.cache +1 -0
  355. data/test/dummy/tmp/cache/assets/sprockets/v3.0/kn/knb5R_X55aCiFz3vJWuSUSQPM4CHSNnp0iae5UMECcw.cache +1 -0
  356. data/test/dummy/tmp/cache/assets/sprockets/v3.0/lJ/lJBk3thZoWRjF0s__eDJF7w6qLdkFpA4eAbwgxH_Dho.cache +1 -0
  357. data/test/dummy/tmp/cache/assets/sprockets/v3.0/lY/lYQpdxF4JQIu4RN2ECazZRXa2r04cIJxhUIa05qojZE.cache +3 -0
  358. data/test/dummy/tmp/cache/assets/sprockets/v3.0/m4/m4QRh4VcQWkjLezj3he7eCiAI-NzVhXPeLzAAcIlYxU.cache +3 -0
  359. data/test/dummy/tmp/cache/assets/sprockets/v3.0/mH/mHZUE9U2nO5Wpi1_6ZOvKorTK0DB1XAgAy8vCzKwPUE.cache +3 -0
  360. data/test/dummy/tmp/cache/assets/sprockets/v3.0/mM/mMFR0RXDB_d00Q-DWF3raKUOK_pKIoLKWe8sbByIbmA.cache +2 -0
  361. data/test/dummy/tmp/cache/assets/sprockets/v3.0/mj/mjHlIUoMbdf3_s3E3yHmx6cD3XBpNw44VkLuszduuQU.cache +2 -0
  362. data/test/dummy/tmp/cache/assets/sprockets/v3.0/mj/mjVM7LYY8IA7tuNN3xA7teC_8er8vfGYt2yIlZtm9ss.cache +1 -0
  363. data/test/dummy/tmp/cache/assets/sprockets/v3.0/my/myTGA5_heGVdkdReWuRE40AphRvs-JEHfS14DVL5pIk.cache +1 -0
  364. data/test/dummy/tmp/cache/assets/sprockets/v3.0/nb/nbBwrQkAIneOVTkIGBCdsMtZIT4043SIOR6sXJP_LHU.cache +0 -0
  365. data/test/dummy/tmp/cache/assets/sprockets/v3.0/nq/nqJAnHctHKNe0jSpv19MqPf8BB_w495YOe2rzF_ehos.cache +1 -0
  366. data/test/dummy/tmp/cache/assets/sprockets/v3.0/nq/nqj0Mk3m_97LBVDR7MZgIC80X4_mAeL6ZwDdqgtI1Gw.cache +0 -0
  367. data/test/dummy/tmp/cache/assets/sprockets/v3.0/od/odSXqZl0ZH48zGt8AMIRhQkDU-YtstjobbS5e7ZkN3k.cache +0 -0
  368. data/test/dummy/tmp/cache/assets/sprockets/v3.0/pO/pOygnjQeOv1F__tZVlOBgQIns_FPOY0Hg8jD24Q1MzQ.cache +0 -0
  369. data/test/dummy/tmp/cache/assets/sprockets/v3.0/pZ/pZ0SU1EHDUQqCK7f8encuHCG6TMsPQBoRaMFxy5vqfo.cache +1 -0
  370. data/test/dummy/tmp/cache/assets/sprockets/v3.0/pp/ppVvwCOmFUDtfjoiXcUyRCdjSHm90PXKtkb4qnuRXco.cache +3 -0
  371. data/test/dummy/tmp/cache/assets/sprockets/v3.0/pu/puTfP5YER7biq4Y4_EFFbcfDeYmOSuBt6z0CGzwFGkA.cache +2 -0
  372. data/test/dummy/tmp/cache/assets/sprockets/v3.0/q1/q1F3pWmX7ZJXbKtQUuNQE2PWTRGmvfAySjo0yHBS_BM.cache +1 -0
  373. data/test/dummy/tmp/cache/assets/sprockets/v3.0/q8/q8rvNJwHhh0RwP_ggTBQX15sVQfAGmHVkhopI3IPsHY.cache +0 -0
  374. data/test/dummy/tmp/cache/assets/sprockets/v3.0/q9/q9Mvo1FFlvxT_LCt7H3xYwBY1V5h3Jpe0eEXH8fv5Wk.cache +1 -0
  375. data/test/dummy/tmp/cache/assets/sprockets/v3.0/qG/qGfHn3hSyl2R1i-xwZDvumLbhV-cFIv5USU0_1iehb4.cache +1 -0
  376. data/test/dummy/tmp/cache/assets/sprockets/v3.0/qS/qSUOLK2mlX6Qg4pb39vYusg3MMB-5KqC4PqOt3qqU_I.cache +0 -0
  377. data/test/dummy/tmp/cache/assets/sprockets/v3.0/qZ/qZ7PeULj1cXaHw1RbEoymDg9vVEWoqR7b2tfe6Bjc-g.cache +1 -0
  378. data/test/dummy/tmp/cache/assets/sprockets/v3.0/ql/qldoyykCYdfXs4qvYwGJiKYSq-r0R1Hlw6cjY8IUfmk.cache +3 -0
  379. data/test/dummy/tmp/cache/assets/sprockets/v3.0/s9/s91U__cBvKPCirRM_cTGjn2d8Iv3KUJ2NbC6HeITxbg.cache +0 -0
  380. data/test/dummy/tmp/cache/assets/sprockets/v3.0/sI/sINrJvpYJWwxFKLJbhUC7OAf7ZuyUP888wzWFOlBPts.cache +3 -0
  381. data/test/dummy/tmp/cache/assets/sprockets/v3.0/sI/sIyfH9Z6L3jrjvuKCFI7EqiQOZ2AETT6OvpnumLpjQg.cache +1 -0
  382. data/test/dummy/tmp/cache/assets/sprockets/v3.0/sU/sU13DKNwa_RkHnSkgjrhcBWQed7kETAwwikJRsAU00M.cache +1 -0
  383. data/test/dummy/tmp/cache/assets/sprockets/v3.0/sq/sqx5Hs0Pydu-MUCvGvLJVo9B2Q3rFkn88DuIz9KSkaU.cache +1 -0
  384. data/test/dummy/tmp/cache/assets/sprockets/v3.0/tp/tpDl_cHg-S7_NzWixr_IxfubDy8a3sRY9mOfB_eDu_0.cache +0 -0
  385. data/test/dummy/tmp/cache/assets/sprockets/v3.0/tt/tthgO-QyL3rkOmOxkriE3s0lD3m_en6g7IVBmP6WfpQ.cache +1 -0
  386. data/test/dummy/tmp/cache/assets/sprockets/v3.0/tu/tuvygi0c8-7HYCnG21mYtnMbRq3byGoC-v0EPr_rcqw.cache +1 -0
  387. data/test/dummy/tmp/cache/assets/sprockets/v3.0/u7/u7Ba9DdA5Y5nYCATAuCiIkwdzV8uFn2mIAz6uIKQGCY.cache +1 -0
  388. data/test/dummy/tmp/cache/assets/sprockets/v3.0/u9/u9kCUfXtoYIqW4g4MTByGD589fmczyYmfBSV1aBwKlA.cache +1 -0
  389. data/test/dummy/tmp/cache/assets/sprockets/v3.0/vo/vo2bQsrDyQHltM8J3UVYBos-ex4ksUlyS_JaAXL9gp8.cache +0 -0
  390. data/test/dummy/tmp/cache/assets/sprockets/v3.0/wN/wNuzOUQkHcNtINLMu5i-oArMVgYINdApTU3CTGrBcr0.cache +1 -0
  391. data/test/dummy/tmp/cache/assets/sprockets/v3.0/xH/xHIb5G7OYHTA8bRoeHgv0B_-ttn9qrt7X8tNzWmBOSw.cache +0 -0
  392. data/test/dummy/tmp/cache/assets/sprockets/v3.0/yG/yGybriOHUct9EJuL4y_xiTsDmXYhzyhtdyjMl_bdnyA.cache +0 -0
  393. data/test/dummy/tmp/cache/assets/sprockets/v3.0/yH/yHWDEeVRq__H83jsasoRVfR13AGZqz3-ljrem37eYhA.cache +1 -0
  394. data/test/dummy/tmp/cache/assets/sprockets/v3.0/yJ/yJOgszuKdJlo777tz6syyQBm-5U9m92DdtWG80FyLrk.cache +1 -0
  395. data/test/dummy/tmp/cache/assets/sprockets/v3.0/zN/zN6nRw3aNJhIaKnykNJFXsCpDZNJhoeGEh6OC0YmBEQ.cache +0 -0
  396. data/test/dummy/tmp/cache/assets/sprockets/v3.0/zZ/zZz-dhRhZqpFP0QbFY4EnkgUw5okSYV61DC3u-Uo_Lg.cache +1 -0
  397. data/test/dummy/tmp/cache/assets/sprockets/v3.0/zy/zyV8aFlgWhLDl1dtI6PHd8CiddDhYL9jpZTc6f00L2Y.cache +0 -0
  398. data/test/integration/synchronises_test.rb +2 -1
  399. data/test/jobs/disco_app/app_installed_job_test.rb +27 -8
  400. data/test/jobs/disco_app/app_uninstalled_job_test.rb +5 -2
  401. data/test/jobs/disco_app/send_subscription_job_test.rb +3 -2
  402. data/test/jobs/disco_app/synchronise_carrier_service_job_test.rb +1 -0
  403. data/test/jobs/disco_app/synchronise_users_job_test.rb +1 -0
  404. data/test/jobs/disco_app/synchronise_webhooks_job_test.rb +31 -14
  405. data/test/models/disco_app/can_be_liquified_test.rb +3 -1
  406. data/test/models/disco_app/has_metafields_test.rb +37 -18
  407. data/test/models/disco_app/renders_assets_test.rb +2 -1
  408. data/test/models/disco_app/session_test.rb +2 -2
  409. data/test/services/disco_app/charges_service_test.rb +7 -8
  410. data/test/services/disco_app/flow/create_action_test.rb +51 -0
  411. data/test/services/disco_app/flow/create_trigger_test.rb +56 -0
  412. data/test/services/disco_app/flow/process_action_test.rb +68 -0
  413. data/test/services/disco_app/flow/process_trigger_test.rb +61 -0
  414. data/test/services/disco_app/subscription_service_test.rb +3 -2
  415. data/test/support/test_file_fixtures.rb +2 -2
  416. data/test/support/test_shopify_api.rb +1 -1
  417. data/test/test_helper.rb +7 -7
  418. data/test/vcr/flow_trigger_invalid_title.yml +35 -0
  419. data/test/vcr/flow_trigger_valid.yml +38 -0
  420. metadata +732 -250
  421. data/app/clients/disco_app/rollbar_client.rb +0 -53
  422. data/app/clients/disco_app/rollbar_client_error.rb +0 -2
  423. data/lib/generators/disco_app/USAGE +0 -5
  424. data/lib/generators/disco_app/disco_app_generator.rb +0 -236
  425. data/lib/generators/disco_app/templates/config/newrelic.yml +0 -26
  426. data/lib/generators/disco_app/templates/initializers/rollbar.rb +0 -23
  427. data/lib/generators/disco_app/templates/initializers/session_store.rb +0 -2
  428. data/lib/generators/disco_app/templates/root/.codeclimate.yml +0 -7
  429. data/lib/tasks/rollbar.rake +0 -24
@@ -0,0 +1,35 @@
1
+ require 'interactor'
2
+
3
+ module DiscoApp
4
+ module Flow
5
+ class CreateAction
6
+
7
+ include Interactor
8
+
9
+ delegate :shop, :action_id, :action_run_id, :properties, to: :context
10
+ delegate :action, to: :context
11
+
12
+ def call
13
+ create_action
14
+ enqueue_process_action_job
15
+ end
16
+
17
+ private
18
+
19
+ def create_action
20
+ context.action = shop.flow_actions.create!(
21
+ action_id: action_id,
22
+ action_run_id: action_run_id,
23
+ properties: properties
24
+ )
25
+ rescue ActiveRecord::RecordNotUnique, PG::UniqueViolation
26
+ context.fail!
27
+ end
28
+
29
+ def enqueue_process_action_job
30
+ ProcessActionJob.perform_later(shop, action)
31
+ end
32
+
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,34 @@
1
+ require 'interactor'
2
+
3
+ module DiscoApp
4
+ module Flow
5
+ class CreateTrigger
6
+
7
+ include Interactor
8
+
9
+ delegate :shop, :title, :resource_name, :resource_url, :properties, to: :context
10
+ delegate :trigger, to: :context
11
+
12
+ def call
13
+ create_trigger
14
+ enqueue_process_trigger_job
15
+ end
16
+
17
+ private
18
+
19
+ def create_trigger
20
+ context.trigger = shop.flow_triggers.create!(
21
+ title: title,
22
+ resource_name: resource_name,
23
+ resource_url: resource_url,
24
+ properties: properties
25
+ )
26
+ end
27
+
28
+ def enqueue_process_trigger_job
29
+ ProcessTriggerJob.perform_later(shop, trigger)
30
+ end
31
+
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,50 @@
1
+ require 'interactor'
2
+
3
+ module DiscoApp
4
+ module Flow
5
+ class ProcessAction
6
+
7
+ include Interactor
8
+
9
+ delegate :action, to: :context
10
+ delegate :action_service_class, to: :context
11
+
12
+ def call
13
+ validate_action
14
+ find_action_service_class
15
+ execute_action_service_class
16
+ end
17
+
18
+ private
19
+
20
+ def validate_action
21
+ context.fail! unless action.pending?
22
+ end
23
+
24
+ def find_action_service_class
25
+ context.action_service_class =
26
+ action.action_id.classify.safe_constantize ||
27
+ %(Flow::Actions::#{action.action_id.to_s.classify}).safe_constantize
28
+
29
+ return unless action_service_class.nil?
30
+
31
+ update_action(false, ["Could not find service class for #{action.action_id}"])
32
+ context.fail!
33
+ end
34
+
35
+ def execute_action_service_class
36
+ result = action_service_class.call(shop: action.shop, properties: action.properties)
37
+ update_action(result.success?, result.errors)
38
+ end
39
+
40
+ def update_action(success, errors)
41
+ action.update!(
42
+ status: success ? Action.statuses[:succeeded] : Action.statuses[:failed],
43
+ processing_errors: success ? [] : errors,
44
+ processed_at: Time.current
45
+ )
46
+ end
47
+
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,52 @@
1
+ require 'interactor'
2
+
3
+ module DiscoApp
4
+ module Flow
5
+ class ProcessTrigger
6
+
7
+ include Interactor
8
+
9
+ delegate :trigger, to: :context
10
+ delegate :api_success, :api_errors, to: :context
11
+
12
+ def call
13
+ validate_trigger
14
+ make_api_request
15
+ update_trigger
16
+ fail_if_errors_present
17
+ end
18
+
19
+ private
20
+
21
+ def validate_trigger
22
+ context.fail! unless trigger.pending?
23
+ end
24
+
25
+ def make_api_request
26
+ context.api_success, context.api_errors = api_client.create_flow_trigger(
27
+ trigger.title,
28
+ trigger.resource_name,
29
+ trigger.resource_url,
30
+ trigger.properties
31
+ )
32
+ end
33
+
34
+ def update_trigger
35
+ trigger.update!(
36
+ status: api_success ? Trigger.statuses[:succeeded] : Trigger.statuses[:failed],
37
+ processing_errors: api_success ? [] : api_errors,
38
+ processed_at: Time.current
39
+ )
40
+ end
41
+
42
+ def fail_if_errors_present
43
+ context.fail! unless api_success
44
+ end
45
+
46
+ def api_client
47
+ @api_client ||= DiscoApp::GraphqlClient.new(trigger.shop)
48
+ end
49
+
50
+ end
51
+ end
52
+ end
@@ -79,7 +79,7 @@ module DiscoApp
79
79
  form['create_form[application_url]'] = @app_url
80
80
 
81
81
  # Accept TOS
82
- unless form['create_form[accepted]'].blank?
82
+ if form['create_form[accepted]'].present?
83
83
  form['create_form[accepted]'] = '1'
84
84
  form.hiddens.last.value = 1
85
85
  end
@@ -5,12 +5,12 @@ class DiscoApp::ProxyService
5
5
  def self.proxy_signature_is_valid?(query_string, secret)
6
6
  query_hash = Rack::Utils.parse_query(query_string)
7
7
  signature = query_hash.delete('signature').to_s
8
- ActiveSupport::SecurityUtils.secure_compare(self.calculated_signature(query_hash, secret), signature)
8
+ ActiveSupport::SecurityUtils.secure_compare(calculated_signature(query_hash, secret), signature)
9
9
  end
10
10
 
11
11
  # Return the calculated signature for the given query hash and secret.
12
12
  def self.calculated_signature(query_hash, secret)
13
- sorted_params = query_hash.collect{ |k, v| "#{k}=#{Array(v).join(',')}" }.sort.join
13
+ sorted_params = query_hash.map{ |k, v| "#{k}=#{Array(v).join(',')}" }.sort.join
14
14
  OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), secret, sorted_params)
15
15
  end
16
16
 
@@ -3,12 +3,12 @@ class DiscoApp::RequestValidationService
3
3
  def self.hmac_valid?(query_string, secret)
4
4
  query_hash = Rack::Utils.parse_query(query_string)
5
5
  hmac = query_hash.delete('hmac').to_s
6
- ActiveSupport::SecurityUtils.secure_compare(self.calculated_hmac(query_hash, secret), hmac)
6
+ ActiveSupport::SecurityUtils.secure_compare(calculated_hmac(query_hash, secret), hmac)
7
7
  end
8
8
 
9
9
  # Return the calculated hmac for the given query hash and secret.
10
10
  def self.calculated_hmac(query_hash, secret)
11
- sorted_params = query_hash.collect{ |k, v| "#{k}=#{Array(v).join(',')}" }.sort.join('&')
11
+ sorted_params = query_hash.map{ |k, v| "#{k}=#{Array(v).join(',')}" }.sort.join('&')
12
12
  OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), secret, sorted_params)
13
13
  end
14
14
 
@@ -3,50 +3,78 @@ class DiscoApp::SubscriptionService
3
3
  # Subscribe the given shop to the given plan, optionally using the given plan
4
4
  # code and optionally tracking the subscription source.
5
5
  def self.subscribe(shop, plan, plan_code = nil, source_name = nil)
6
+ new(shop, plan, plan_code, source_name).subscribe
7
+ end
8
+
9
+ attr_reader :shop, :plan, :plan_code, :source_name
10
+
11
+ def initialize(shop, plan, plan_code = nil, source_name = nil)
12
+ @shop = shop
13
+ @plan = plan
14
+ @plan_code = plan_code
15
+ @source_name = source_name
16
+ end
17
+
18
+ def subscribe
19
+ cancel_existing_subscriptions
20
+
21
+ # Create the new subscription.
22
+ new_subscription = create_new_subscription
23
+
24
+ # Enqueue the subscription changed background job.
25
+ DiscoApp::SubscriptionChangedJob.perform_later(shop, new_subscription)
26
+
27
+ # Return the new subscription.
28
+ new_subscription
29
+ end
30
+
31
+ private
6
32
 
7
33
  # If a plan code was provided, fetch it for the given plan.
8
- plan_code_instance = nil
9
- if plan_code.present?
10
- plan_code_instance = DiscoApp::PlanCode.available.find_by(plan: plan, code: plan_code)
34
+ def plan_code_instance
35
+ return if plan_code.blank?
36
+
37
+ @plan_code_instance ||= DiscoApp::PlanCode.available.find_by(plan: plan, code: plan_code)
11
38
  end
12
39
 
13
40
  # If a source name has been provided, fetch or create it
14
- source_instance = nil
15
- if source_name.present?
16
- source_instance = DiscoApp::Source.find_or_create_by(source: source_name)
41
+ def source_instance
42
+ return if source_name.blank?
43
+
44
+ @source_instance ||= DiscoApp::Source.find_or_create_by(source: source_name)
17
45
  end
18
46
 
19
47
  # Cancel any existing current subscriptions.
20
- shop.subscriptions.current.update_all(
21
- status: DiscoApp::Subscription.statuses[:cancelled],
22
- cancelled_at: Time.now
23
- )
48
+ def cancel_existing_subscriptions
49
+ shop.subscriptions.current.update_all( # rubocop:disable Rails/SkipsModelValidations
50
+ status: DiscoApp::Subscription.statuses[:cancelled],
51
+ cancelled_at: Time.zone.now
52
+ )
53
+ end
24
54
 
25
55
  # Get the amount that should be charged for the subscription.
26
- subscription_amount = plan_code_instance.present? ? plan_code_instance.amount : plan.amount
56
+ def subscription_amount
57
+ plan_code_instance.present? ? plan_code_instance.amount : plan.amount
58
+ end
27
59
 
28
60
  # Get the date the subscription trial should end.
29
- subscription_trial_period_days = plan_code_instance.present? ? plan_code_instance.trial_period_days : plan.trial_period_days
30
-
31
- # Create the new subscription.
32
- new_subscription = DiscoApp::Subscription.create!(
33
- shop: shop,
34
- plan: plan,
35
- plan_code: plan_code_instance,
36
- status: DiscoApp::Subscription.statuses[plan.has_trial? ? :trial : :active],
37
- subscription_type: plan.plan_type,
38
- amount: subscription_amount,
39
- trial_period_days: plan.has_trial? ? subscription_trial_period_days : nil,
40
- trial_start_at: plan.has_trial? ? Time.now : nil,
41
- trial_end_at: plan.has_trial? ? subscription_trial_period_days.days.from_now : nil,
42
- source: source_instance
43
- )
44
-
45
- # Enqueue the subscription changed background job.
46
- DiscoApp::SubscriptionChangedJob.perform_later(shop, new_subscription)
61
+ def subscription_trial_period_days
62
+ plan_code_instance.present? ? plan_code_instance.trial_period_days : plan.trial_period_days
63
+ end
47
64
 
48
- # Return the new subscription.
49
- new_subscription
50
- end
65
+ def create_new_subscription
66
+ DiscoApp::Subscription.create!(
67
+ shop: shop,
68
+ plan: plan,
69
+ plan_code: plan_code_instance,
70
+ status: DiscoApp::Subscription.statuses[plan.has_trial? ? :trial : :active],
71
+ subscription_type: plan.plan_type,
72
+ amount: subscription_amount,
73
+ trial_period_days: plan.has_trial? ? subscription_trial_period_days : nil,
74
+ trial_start_at: plan.has_trial? ? Time.zone.now : nil,
75
+ trial_end_at: plan.has_trial? ? subscription_trial_period_days.days.from_now : nil,
76
+ source: source_instance
77
+ )
78
+ end
51
79
 
52
80
  end
@@ -2,28 +2,26 @@ class DiscoApp::WebhookService
2
2
 
3
3
  # Return true iff the provided hmac_to_verify matches that calculated from the
4
4
  # given data and secret.
5
- def self.is_valid_hmac?(body, secret, hmac_to_verify)
6
- ActiveSupport::SecurityUtils.secure_compare(self.calculated_hmac(body, secret), hmac_to_verify.to_s)
5
+ def self.valid_hmac?(body, secret, hmac_to_verify)
6
+ ActiveSupport::SecurityUtils.secure_compare(calculated_hmac(body, secret), hmac_to_verify.to_s)
7
7
  end
8
8
 
9
9
  # Calculate the HMAC for the given data and secret.
10
10
  def self.calculated_hmac(body, secret)
11
- digest = OpenSSL::Digest.new('sha256')
11
+ digest = OpenSSL::Digest.new('sha256')
12
12
  Base64.encode64(OpenSSL::HMAC.digest(digest, secret, body)).strip
13
13
  end
14
14
 
15
15
  # Try to find a job class for the given webhook topic.
16
16
  def self.find_job_class(topic)
17
+ # First try to find a top-level matching job class.
18
+ "#{topic}_job".tr('/', '_').classify.constantize
19
+ rescue NameError
20
+ # If that fails, try to find a DiscoApp:: prefixed job class.
17
21
  begin
18
- # First try to find a top-level matching job class.
19
- "#{topic}_job".gsub('/', '_').classify.constantize
22
+ %(DiscoApp::#{"#{topic}_job".tr('/', '_').classify}).constantize
20
23
  rescue NameError
21
- # If that fails, try to find a DiscoApp:: prefixed job class.
22
- begin
23
- %Q{DiscoApp::#{"#{topic}_job".gsub('/', '_').classify}}.constantize
24
- rescue NameError
25
- nil
26
- end
24
+ nil
27
25
  end
28
26
  end
29
27
 
data/config/routes.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  require 'sidekiq/web'
2
2
 
3
3
  DiscoApp::Engine.routes.draw do
4
-
5
4
  get 'ref', to: '/sessions#referral'
6
5
  get '/auth/failure', to: '/sessions#failure'
7
6
 
@@ -9,6 +8,12 @@ DiscoApp::Engine.routes.draw do
9
8
  post 'webhooks' => :process_webhook, as: :webhooks
10
9
  end
11
10
 
11
+ namespace :flow do
12
+ controller :actions do
13
+ post 'actions/:id' => :create_flow_action, as: :flow_actions
14
+ end
15
+ end
16
+
12
17
  resources :user_sessions, only: [:new, :create, :destroy]
13
18
  get 'auth/shopify_user/callback' => 'user_sessions#callback'
14
19
 
@@ -46,7 +51,7 @@ DiscoApp::Engine.routes.draw do
46
51
  end
47
52
 
48
53
  # Make the Sidekiq Web UI accessible using the same credentials as the admin.
49
- if Rails.env.production?
54
+ if Rails.env.production? || Rails.env.staging?
50
55
  Sidekiq::Web.use Rack::Auth::Basic do |username, password|
51
56
  [
52
57
  ENV['ADMIN_APP_USERNAME'].present?,
@@ -64,5 +69,4 @@ DiscoApp::Engine.routes.draw do
64
69
  get 'frame' => :frame, as: :frame
65
70
  end
66
71
  end
67
-
68
72
  end
@@ -6,105 +6,105 @@ class CreateShopsIfNotExistent < ActiveRecord::Migration[5.1]
6
6
  def change
7
7
  return if table_exists? :disco_app_shops
8
8
 
9
- create_table "disco_app_app_settings", force: :cascade do |t|
10
- t.datetime "created_at", null: false
11
- t.datetime "updated_at", null: false
9
+ create_table :disco_app_app_settings, force: :cascade do |t|
10
+ t.datetime :created_at, null: false
11
+ t.datetime :updated_at, null: false
12
12
  end
13
13
 
14
- create_table "disco_app_application_charges", force: :cascade do |t|
15
- t.integer "shop_id", limit: 8
16
- t.integer "subscription_id", limit: 8
17
- t.integer "status", default: 0
18
- t.datetime "created_at", null: false
19
- t.datetime "updated_at", null: false
20
- t.integer "shopify_id", limit: 8
21
- t.string "confirmation_url"
14
+ create_table :disco_app_application_charges, force: :cascade do |t|
15
+ t.integer :shop_id, limit: 8
16
+ t.integer :subscription_id, limit: 8
17
+ t.integer :status, default: 0
18
+ t.datetime :created_at, null: false
19
+ t.datetime :updated_at, null: false
20
+ t.integer :shopify_id, limit: 8
21
+ t.string :confirmation_url
22
22
  end
23
23
 
24
- create_table "disco_app_plan_codes", force: :cascade do |t|
25
- t.integer "plan_id", limit: 8
26
- t.string "code"
27
- t.integer "trial_period_days"
28
- t.integer "amount"
29
- t.datetime "created_at", null: false
30
- t.datetime "updated_at", null: false
31
- t.integer "status", default: 0
24
+ create_table :disco_app_plan_codes, force: :cascade do |t|
25
+ t.integer :plan_id, limit: 8
26
+ t.string :code
27
+ t.integer :trial_period_days
28
+ t.integer :amount
29
+ t.datetime :created_at, null: false
30
+ t.datetime :updated_at, null: false
31
+ t.integer :status, default: 0
32
32
  end
33
33
 
34
- create_table "disco_app_plans", force: :cascade do |t|
35
- t.integer "status", default: 0
36
- t.string "name"
37
- t.integer "plan_type", default: 0
38
- t.integer "trial_period_days"
39
- t.datetime "created_at", null: false
40
- t.datetime "updated_at", null: false
41
- t.integer "amount", default: 0
42
- t.string "currency", default: "USD"
43
- t.integer "interval", default: 0
44
- t.integer "interval_count", default: 1
34
+ create_table :disco_app_plans, force: :cascade do |t|
35
+ t.integer :status, default: 0
36
+ t.string :name
37
+ t.integer :plan_type, default: 0
38
+ t.integer :trial_period_days
39
+ t.datetime :created_at, null: false
40
+ t.datetime :updated_at, null: false
41
+ t.integer :amount, default: 0
42
+ t.string :currency, default: 'USD'
43
+ t.integer :interval, default: 0
44
+ t.integer :interval_count, default: 1
45
45
  end
46
46
 
47
- create_table "disco_app_recurring_application_charges", force: :cascade do |t|
48
- t.integer "shop_id", limit: 8
49
- t.integer "subscription_id", limit: 8
50
- t.integer "status", default: 0
51
- t.datetime "created_at", null: false
52
- t.datetime "updated_at", null: false
53
- t.integer "shopify_id", limit: 8
54
- t.string "confirmation_url"
47
+ create_table :disco_app_recurring_application_charges, force: :cascade do |t|
48
+ t.integer :shop_id, limit: 8
49
+ t.integer :subscription_id, limit: 8
50
+ t.integer :status, default: 0
51
+ t.datetime :created_at, null: false
52
+ t.datetime :updated_at, null: false
53
+ t.integer :shopify_id, limit: 8
54
+ t.string :confirmation_url
55
55
  end
56
56
 
57
- create_table "disco_app_sessions", force: :cascade do |t|
58
- t.string "session_id", null: false
59
- t.text "data"
60
- t.datetime "created_at", null: false
61
- t.datetime "updated_at", null: false
62
- t.integer "shop_id"
57
+ create_table :disco_app_sessions, force: :cascade do |t|
58
+ t.string :session_id, null: false
59
+ t.text :data
60
+ t.datetime :created_at, null: false
61
+ t.datetime :updated_at, null: false
62
+ t.integer :shop_id
63
63
  end
64
64
 
65
- add_index "disco_app_sessions", ["session_id"], name: "index_disco_app_sessions_on_session_id", unique: true, using: :btree
66
- add_index "disco_app_sessions", ["updated_at"], name: "index_disco_app_sessions_on_updated_at", using: :btree
65
+ add_index :disco_app_sessions, [:session_id], name: 'index_disco_app_sessions_on_session_id', unique: true, using: :btree
66
+ add_index :disco_app_sessions, [:updated_at], name: 'index_disco_app_sessions_on_updated_at', using: :btree
67
67
 
68
- create_table "disco_app_shops", force: :cascade do |t|
69
- t.string "shopify_domain", null: false
70
- t.string "shopify_token", null: false
71
- t.datetime "created_at", null: false
72
- t.datetime "updated_at", null: false
73
- t.integer "status", default: 0
74
- t.string "domain"
75
- t.string "plan_name"
76
- t.string "name"
77
- t.jsonb "data", default: {}
68
+ create_table :disco_app_shops, force: :cascade do |t|
69
+ t.string :shopify_domain, null: false
70
+ t.string :shopify_token, null: false
71
+ t.datetime :created_at, null: false
72
+ t.datetime :updated_at, null: false
73
+ t.integer :status, default: 0
74
+ t.string :domain
75
+ t.string :plan_name
76
+ t.string :name
77
+ t.jsonb :data, default: {}
78
78
  end
79
79
 
80
- add_index "disco_app_shops", ["shopify_domain"], name: "index_disco_app_shops_on_shopify_domain", unique: true, using: :btree
80
+ add_index :disco_app_shops, [:shopify_domain], name: 'index_disco_app_shops_on_shopify_domain', unique: true, using: :btree
81
81
 
82
- create_table "disco_app_subscriptions", force: :cascade do |t|
83
- t.integer "shop_id"
84
- t.integer "plan_id"
85
- t.integer "status"
86
- t.integer "subscription_type"
87
- t.datetime "created_at", null: false
88
- t.datetime "updated_at", null: false
89
- t.datetime "trial_start_at"
90
- t.datetime "trial_end_at"
91
- t.datetime "cancelled_at"
92
- t.integer "amount", default: 0
93
- t.integer "plan_code_id", limit: 8
94
- t.string "source"
95
- t.integer "trial_period_days"
82
+ create_table :disco_app_subscriptions, force: :cascade do |t|
83
+ t.integer :shop_id
84
+ t.integer :plan_id
85
+ t.integer :status
86
+ t.integer :subscription_type
87
+ t.datetime :created_at, null: false
88
+ t.datetime :updated_at, null: false
89
+ t.datetime :trial_start_at
90
+ t.datetime :trial_end_at
91
+ t.datetime :cancelled_at
92
+ t.integer :amount, default: 0
93
+ t.integer :plan_code_id, limit: 8
94
+ t.string :source
95
+ t.integer :trial_period_days
96
96
  end
97
97
 
98
- add_index "disco_app_subscriptions", ["plan_id"], name: "index_disco_app_subscriptions_on_plan_id", using: :btree
99
- add_index "disco_app_subscriptions", ["shop_id"], name: "index_disco_app_subscriptions_on_shop_id", using: :btree
98
+ add_index :disco_app_subscriptions, [:plan_id], name: 'index_disco_app_subscriptions_on_plan_id', using: :btree
99
+ add_index :disco_app_subscriptions, [:shop_id], name: 'index_disco_app_subscriptions_on_shop_id', using: :btree
100
100
 
101
- add_foreign_key "disco_app_application_charges", "disco_app_shops", column: "shop_id"
102
- add_foreign_key "disco_app_application_charges", "disco_app_subscriptions", column: "subscription_id"
103
- add_foreign_key "disco_app_plan_codes", "disco_app_plans", column: "plan_id"
104
- add_foreign_key "disco_app_recurring_application_charges", "disco_app_shops", column: "shop_id"
105
- add_foreign_key "disco_app_recurring_application_charges", "disco_app_subscriptions", column: "subscription_id"
106
- add_foreign_key "disco_app_sessions", "disco_app_shops", column: "shop_id", on_delete: :cascade
107
- add_foreign_key "disco_app_subscriptions", "disco_app_plan_codes", column: "plan_code_id"
101
+ add_foreign_key :disco_app_application_charges, :disco_app_shops, column: :shop_id
102
+ add_foreign_key :disco_app_application_charges, :disco_app_subscriptions, column: :subscription_id
103
+ add_foreign_key :disco_app_plan_codes, :disco_app_plans, column: :plan_id
104
+ add_foreign_key :disco_app_recurring_application_charges, :disco_app_shops, column: :shop_id
105
+ add_foreign_key :disco_app_recurring_application_charges, :disco_app_subscriptions, column: :subscription_id
106
+ add_foreign_key :disco_app_sessions, :disco_app_shops, column: :shop_id, on_delete: :cascade
107
+ add_foreign_key :disco_app_subscriptions, :disco_app_plan_codes, column: :plan_code_id
108
108
  end
109
109
 
110
110
  end
@@ -1,4 +1,5 @@
1
1
  class CreateDiscoAppSources < ActiveRecord::Migration[5.1]
2
+
2
3
  def change
3
4
  create_table :disco_app_sources do |t|
4
5
  t.string :source, null: true
@@ -7,4 +8,5 @@ class CreateDiscoAppSources < ActiveRecord::Migration[5.1]
7
8
  end
8
9
  add_index :disco_app_sources, :source
9
10
  end
11
+
10
12
  end
@@ -1,4 +1,5 @@
1
1
  class AddSourcesToShopSubscriptions < ActiveRecord::Migration[5.1]
2
+
2
3
  def change
3
4
  add_column :disco_app_subscriptions, :source_id, :integer, limit: 8, index: true
4
5
  add_foreign_key :disco_app_subscriptions, :disco_app_sources, column: :source_id
@@ -9,6 +10,7 @@ class AddSourcesToShopSubscriptions < ActiveRecord::Migration[5.1]
9
10
  end
10
11
  end
11
12
 
12
- remove_column :disco_app_subscriptions, :source
13
+ remove_column :disco_app_subscriptions, :source, :string
13
14
  end
15
+
14
16
  end
@@ -1,13 +1,14 @@
1
1
  class CreateDiscoAppUsers < ActiveRecord::Migration[5.1]
2
+
2
3
  def change
3
4
  create_table :disco_app_users do |t|
4
5
  t.integer :shop_id, limit: 8
5
6
  t.string :first_name
6
7
  t.string :last_name
7
8
  t.string :email
8
-
9
9
  t.timestamps null: false
10
10
  end
11
11
  add_index :disco_app_users, :shop_id, unique: true
12
12
  end
13
+
13
14
  end
@@ -1,6 +1,8 @@
1
1
  class FixDiscoAppUsersIndex < ActiveRecord::Migration[5.1]
2
+
2
3
  def change
3
4
  remove_index :disco_app_users, :shop_id
4
5
  add_index :disco_app_users, [:id, :shop_id], unique: true
5
6
  end
7
+
6
8
  end