genkan 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (237) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +94 -0
  4. data/Rakefile +26 -0
  5. data/app/controllers/concerns/genkan/authenticatable.rb +29 -0
  6. data/app/controllers/concerns/genkan/helper.rb +18 -0
  7. data/app/controllers/genkan/application_controller.rb +7 -0
  8. data/app/controllers/genkan/sessions_controller.rb +50 -0
  9. data/app/models/concerns/genkan/auth.rb +78 -0
  10. data/app/models/genkan/application_record.rb +5 -0
  11. data/config/locales/en.yml +11 -0
  12. data/config/locales/ja.yml +11 -0
  13. data/config/routes.rb +6 -0
  14. data/lib/generators/genkan/USAGE +9 -0
  15. data/lib/generators/genkan/helper.rb +57 -0
  16. data/lib/generators/genkan/install_generator.rb +45 -0
  17. data/lib/generators/genkan/templates/initializer.erb +21 -0
  18. data/lib/generators/genkan/templates/migration.erb +17 -0
  19. data/lib/generators/genkan/templates/model.erb +3 -0
  20. data/lib/generators/genkan/templates/view.erb +3 -0
  21. data/lib/genkan/config.rb +22 -0
  22. data/lib/genkan/engine.rb +13 -0
  23. data/lib/genkan/version.rb +3 -0
  24. data/lib/genkan.rb +12 -0
  25. data/lib/tasks/genkan_tasks.rake +4 -0
  26. data/spec/controllers/genkan/sessions_controller_spec.rb +74 -0
  27. data/spec/controllers/welcome_controller_spec.rb +26 -0
  28. data/spec/dummy/Rakefile +6 -0
  29. data/spec/dummy/app/assets/config/manifest.js +4 -0
  30. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  31. data/spec/dummy/app/assets/javascripts/cable.js +13 -0
  32. data/spec/dummy/app/assets/javascripts/welcome.js +2 -0
  33. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  34. data/spec/dummy/app/assets/stylesheets/welcome.css +4 -0
  35. data/spec/dummy/app/channels/application_cable/channel.rb +4 -0
  36. data/spec/dummy/app/channels/application_cable/connection.rb +4 -0
  37. data/spec/dummy/app/controllers/application_controller.rb +4 -0
  38. data/spec/dummy/app/controllers/welcome_controller.rb +4 -0
  39. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  40. data/spec/dummy/app/helpers/welcome_helper.rb +2 -0
  41. data/spec/dummy/app/jobs/application_job.rb +2 -0
  42. data/spec/dummy/app/mailers/application_mailer.rb +4 -0
  43. data/spec/dummy/app/models/application_record.rb +3 -0
  44. data/spec/dummy/app/models/user.rb +3 -0
  45. data/spec/dummy/app/views/genkan/sessions/new.html.erb +3 -0
  46. data/spec/dummy/app/views/layouts/application.html.erb +21 -0
  47. data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
  48. data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
  49. data/spec/dummy/app/views/welcome/index.html.erb +2 -0
  50. data/spec/dummy/bin/bundle +3 -0
  51. data/spec/dummy/bin/rails +4 -0
  52. data/spec/dummy/bin/rake +4 -0
  53. data/spec/dummy/bin/setup +38 -0
  54. data/spec/dummy/bin/update +29 -0
  55. data/spec/dummy/bin/yarn +11 -0
  56. data/spec/dummy/config/application.rb +18 -0
  57. data/spec/dummy/config/boot.rb +5 -0
  58. data/spec/dummy/config/cable.yml +10 -0
  59. data/spec/dummy/config/database.yml +25 -0
  60. data/spec/dummy/config/environment.rb +5 -0
  61. data/spec/dummy/config/environments/development.rb +54 -0
  62. data/spec/dummy/config/environments/production.rb +91 -0
  63. data/spec/dummy/config/environments/test.rb +42 -0
  64. data/spec/dummy/config/initializers/application_controller_renderer.rb +6 -0
  65. data/spec/dummy/config/initializers/assets.rb +14 -0
  66. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  67. data/spec/dummy/config/initializers/cookies_serializer.rb +5 -0
  68. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  69. data/spec/dummy/config/initializers/genkan.rb +16 -0
  70. data/spec/dummy/config/initializers/inflections.rb +16 -0
  71. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  72. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  73. data/spec/dummy/config/locales/en.yml +33 -0
  74. data/spec/dummy/config/puma.rb +56 -0
  75. data/spec/dummy/config/routes.rb +6 -0
  76. data/spec/dummy/config/secrets.yml +32 -0
  77. data/spec/dummy/config/spring.rb +6 -0
  78. data/spec/dummy/config.ru +5 -0
  79. data/spec/dummy/db/development.sqlite3 +0 -0
  80. data/spec/dummy/db/migrate/20170705145634_create_users.rb +17 -0
  81. data/spec/dummy/db/schema.rb +26 -0
  82. data/spec/dummy/db/test.sqlite3 +0 -0
  83. data/spec/dummy/log/development.log +106 -0
  84. data/spec/dummy/log/test.log +21007 -0
  85. data/spec/dummy/package.json +5 -0
  86. data/spec/dummy/public/404.html +67 -0
  87. data/spec/dummy/public/422.html +67 -0
  88. data/spec/dummy/public/500.html +66 -0
  89. data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
  90. data/spec/dummy/public/apple-touch-icon.png +0 -0
  91. data/spec/dummy/public/favicon.ico +0 -0
  92. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-a/-anb1le1UfL1rAsfL6vauFV9hAwJ5gMXKUu3xL08kUk.cache +1 -0
  93. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-z/-zggpD8P_aYMr6NLbWRYgnYvBbziQZBeEx1PktCGEXI.cache +2 -0
  94. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/0g/0g2prc3JF5Bmp09lvpxf98IkTOH2vTxfSTcGrRF7tDY.cache +2 -0
  95. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/0j/0j0It68B_34E2bHwElTlWS0Y6kgaf45ST90payRW4Jo.cache +1 -0
  96. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/2S/2SUXxOYN50uS4DQcyysYjnfZtLXl9Hlk0t2N9SgLB0Q.cache +0 -0
  97. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/3a/3azp7y1RT8w2JtT4ezvBIXEk5T85Hn6MyEi8d0vG8y4.cache +2 -0
  98. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/4p/4pPp889DYAQDA_jytD7lOck7mxgU0Yd6fnfZHXLdoCc.cache +0 -0
  99. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/5J/5JNEPK3X_MzDSfrmiIhbHj9YsSU_eVLAbgBHdiTrNi8.cache +0 -0
  100. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/5L/5LHD8D4FTU8esjUNnebxaJfBYlkScZM7mfUgifmcKXs.cache +2 -0
  101. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/5k/5k0_mK4ah0LyKz_V0L5ewQW69uKcg4AXcfFYl11LkkU.cache +2 -0
  102. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/60/60UFBuw-joBLVwC7c_zp0kSHY1eFbRwZ_6dtpqrfqgE.cache +1 -0
  103. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/6L/6LWZEU7dfxLMlAZC0dbWyFfAjZ4osHIEWZa3S944n3s.cache +0 -0
  104. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/6O/6OiuoEFcjfdg_T6P3vVSAbv8GEikjkFbJzAPqcjjIBQ.cache +2 -0
  105. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/6y/6yYtw9nBy5BQSaqXmBCmbMKZ2W9i-xXzDUipnQmPyBg.cache +1 -0
  106. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/79/79x651YgKUXaujQCdJ-pAEC5dZg_pn2dunb0jchMaDQ.cache +1 -0
  107. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7D/7DA7NcBgtuGkw874ZnGGog86dav0rfRpwsOqr5NZn8w.cache +0 -0
  108. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7G/7GfbUJUiFTReNmQLPaoNQb6zwaAn8V2F6TSbb6gHUe0.cache +1 -0
  109. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7H/7Hl6K8gEbb3P74YnUpKFaNJpP7D2xYYgOMGojcOa-ag.cache +1 -0
  110. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8M/8MjSjTnG8bT0MHX2mtSwts_g41nf5tdQGu72StLOCH8.cache +2 -0
  111. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8S/8SvabF4ymQg1Bvye9LUpj_kgUYvtEyrC_IFy21I9QkQ.cache +1 -0
  112. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8V/8Vuze0yfvn-ZGnSPhHfFylf_THj3OYxZ43MgYYietX8.cache +2 -0
  113. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8a/8ayEXSXjdhDv7nFgvX2HZLPF4zorczNuMB12acBi5Tg.cache +1 -0
  114. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/9K/9KVq9HdUeF1QpFrSVJNkFVYSVnf6eBvjNOj1ScdcDBk.cache +1 -0
  115. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/9X/9XpG6MU2DaMe_As-AVmJLHdetFNNVe6tuSzG3wdBFgw.cache +1 -0
  116. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/9b/9bxqdiQYs5dr4yZ7AZfQuus70vM93F4H45nnz56elaM.cache +1 -0
  117. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/AQ/AQwVruFOIEFAa6aCfUPI4NMLs5DcA7F9jJHINlokjdM.cache +0 -0
  118. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Aj/Aj4xA0Ms8-0zqpxEQL_wIoWFvtW6vqdbN03k7x-Zn_w.cache +1 -0
  119. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Br/BrptdQg6UEupRauAlmc_iY-9bgz-lRY7XFQJWh1Cj-I.cache +0 -0
  120. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/C9/C9e7-Bx6ORaFLsjSigwMjM9wgB2SOEBIh9F7Nyuizi0.cache +0 -0
  121. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/CC/CCNBz0pRBBaXl9LPDXUwcU5GwnMhyMZ3hN9k8F_-y1k.cache +1 -0
  122. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ch/ChbwGMU9eLsrC2zaGtMQmlI_cyC4LA1DM0edywF834E.cache +1 -0
  123. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ck/CkC2Zx2KIvKFX2W5bsqxi-ykghbhqFnfPxba8Ox49hk.cache +1 -0
  124. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Cq/CqS8f-adc43tZVUYwbeYNlaAp68VAND9gSz75EJ_qIk.cache +0 -0
  125. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Dh/DhvRJbXpx9vsnErI2VDpKjXz-hndz7cH_DPgu8PL6uo.cache +0 -0
  126. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Dm/DmswZczHVjLH0N3U2GKkfL0rhDuMg5Q7FCoT8GxCaks.cache +2 -0
  127. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/E1/E1DkSt3mnv_bJAuFVZ3AtOltVU6UNdTgKDBtGytXTW0.cache +1 -0
  128. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ED/EDJquckajF45p6W06qS_rw70poqK8SPCaVQ7SYdZaaI.cache +0 -0
  129. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/EE/EEplIoXGshtrgJgFxcH1B6LgetWrS_RuhCYsTuqiO6s.cache +0 -0
  130. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/EH/EHIpjGxqjcpjWgDJnv5qyQoHj61Grtz_nBtM0MrfrpY.cache +1 -0
  131. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/EM/EM7lC_qW1a9LhesPkDChUijCpMMGIQ9anREMaOxeim0.cache +1 -0
  132. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ej/Ej3tOd_jldb5OqbeKuZTgniWmNEhB8SqUDrAf1AY2R8.cache +2 -0
  133. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Es/EsAu2JEirIm31MKweNKHRZGJy0biOeEt5cQNLfnAURA.cache +1 -0
  134. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/F6/F6xGHKoJgwoM4vZWx9Tj5PdU-eQ1-7Bhnh-zagjLQDA.cache +1 -0
  135. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Fi/FixyVGg9bu3eRk3ddmMXWy7M33tm03pAi1P7UVxXCYs.cache +0 -0
  136. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/G6/G6LBIUOF6NiEmJOb7yUEYKKwAEeqicAJ3W6n8UfEXOg.cache +1 -0
  137. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/GH/GHvnaT_97475zA0bbnVWENv13-dhtQlnj1Unf-tsl6U.cache +1 -0
  138. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Gr/GrA-ejqbqUhgmuDXEav8TmwzP4fKgUcKhkZPhJDFW-s.cache +1 -0
  139. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Gr/GrKBj_NUfuWBJQ-WIrEqu9R9SQR6cX9I8hb6Qw2F7hg.cache +0 -0
  140. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/H6/H64c-4CUUS2AfwaiQFio18rIyst_XRDM4GWgWYw8-Rc.cache +1 -0
  141. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/HC/HCDOUd7-S45aJ_PjVAC_Vmjyud3i1aQv4cE3t9_Z3Dw.cache +0 -0
  142. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/KC/KCNxu9eZUWPxk72xh5pBqHgL9Mq1eQBX_hIxN3UffPk.cache +0 -0
  143. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/KT/KThrNT1MjSFnwiZQ7_nlQr0ItXkzDuhIq_kXzam40mI.cache +0 -0
  144. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/LT/LTXJhfDnAx8fXhGMgZ2e53Ek7uImLI32AUqTv3MIafw.cache +1 -0
  145. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/LU/LUfEmeqDaa3HaK6f3vZMSQEUKJ4VONMmCwT8YN0QgqE.cache +1 -0
  146. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Lo/Lo5ezKyD81tLPXc-tjc8epiltXcknaWbyurke6mkQ1I.cache +0 -0
  147. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/M3/M3220HcICdTz9arsognbp2l_1RDG78Z56bTv_KlWPL4.cache +0 -0
  148. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ma/Madl7SA4t7JZLahxu6Ke9R30VOZBBD8vVoRSzIjOnJY.cache +1 -0
  149. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Oi/Oi2ZmEFBbtuD00cZCMuBTvEexWeTZkvHsPJmkcInYjE.cache +0 -0
  150. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ok/Oks6stFiBciNz80-Nk2OxzjcJhXFyZR9B3pDm1Lq8Us.cache +0 -0
  151. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/P8/P84t1Do34k5QzzfUpukZqwnzEn-Vge8zRU8ebYqXUYI.cache +1 -0
  152. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/PM/PMCnZAAKIrllZ_Jgp_Ur6WoxIU9kyM_E1EjHp-ci9iI.cache +0 -0
  153. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Qb/QbgPEai63zAhH5BGyBVFWenWEKvlKHXHy_aZu3VQQpk.cache +2 -0
  154. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Qj/QjSVnMprIdvgTEGBVBnh-AKjeEsiGANemX5AY7Y8mCw.cache +0 -0
  155. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/RR/RRaseJ4GmYu1ezbdAWsQBtYS1BjZQvnLuQoav8QxW4A.cache +2 -0
  156. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/RS/RS-ZXk-Y-ySoIbDQmoby7Bgj7N3evbVYh6NY9-qXamM.cache +1 -0
  157. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Rg/RgSAb6QWYSpBwgCAvMUi1HocmrZwUgG3-JQ2F1p5jwg.cache +1 -0
  158. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Rt/RtUdV-4geEzAWpHpkNyJKPdEB_NbyUudKWgJ6RFD_QM.cache +1 -0
  159. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/SB/SBCC3yocqP5GfrbWOlGUKkdQbLCJoirLZFdFIvwCSog.cache +1 -0
  160. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/SU/SUTF9Cbkbi747jwRIsVQpfN3-OJb7f2GomctHX9uLXo.cache +2 -0
  161. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/SU/SUUXheDD95mUwPAvpXV7TZr0J7rrRSoGrawyr0ZvpHs.cache +0 -0
  162. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/S_/S_Pcb0mGOL8qoG746qUkzjEgfDWafYwWmBKFg_oVILs.cache +2 -0
  163. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Sf/SfDlB2o4tLK2rgB9-jEDtcfGNRPY_Nzde-2msr9_cv4.cache +1 -0
  164. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Sx/Sx5fQ5H_ttg0Jg8OMZkvVVPOXFoRK7rxRQZ-Xglb0Wg.cache +1 -0
  165. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Tv/TvM2B-OCKO7_mMMJ5e9vWXzQvSJnk-CSc8Y6v80I_A4.cache +1 -0
  166. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Vg/VgksnxhDAqGJx05xz9F070c5O377BL58YZ22sDHt-eM.cache +0 -0
  167. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Vk/Vk8iyUuxBx5oHqTJEBws7ePqD0IvCQW7V0hcde1ocso.cache +0 -0
  168. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Wo/WoLIUbAjm95qIXELkwfMhb-6f6Bxe-VVQfj8Gbxmf9k.cache +1 -0
  169. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Wo/wO-HGAbFrXwx_FjrEAzCpBqQLHnbpTqtDZsc_ku4V-Y.cache +1 -0
  170. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Wx/WxX55vFARl0L-n4U2bhoT95AiCKlc1rnpXws-1MJ61M.cache +1 -0
  171. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/X2/X2YYhxXfSMeWK-PEIsEKVn7WHuTZZoVr3-TJw8PZ2qI.cache +0 -0
  172. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/XZ/XZbqz8CgU6sBTJ3C6FzSB2WZbvPjftngO7rSqFy5Oe0.cache +0 -0
  173. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/YP/YP9lbyR4I4Y2H56XD8xB_lG5JZ3cEhpla6Z1KWITau0.cache +0 -0
  174. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Yv/YvhG84OATIN1hzcxIm1dUdAFzDHrXQv0tq2XWOgZ9Bg.cache +1 -0
  175. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ZX/ZXX9zCAbm4kDXzvtHkDG04KXhtHv5eLFQGJ8C0ZnwTE.cache +1 -0
  176. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/_3/_365sloRfW0to4KL2d0zrfRsUChA29CQ9xTbiXfY8y4.cache +1 -0
  177. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/_5/_52n2WLJfIOWeCBtjZ2Murh6pKib-IpuR0EktBYqKpg.cache +1 -0
  178. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ac/Acp3i9aB6aj3TgUf8XbdfNdl1LHrnCbqjZJKY04jv-M.cache +2 -0
  179. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ac/acwwbKOCVUQx43GRtU33pvyIqUhvbIsJEqtjUYJ4Y7I.cache +2 -0
  180. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ac/acxzeNJnCGIvMIiRx5uHanox2nphcqymTTHXDUDQyjM.cache +0 -0
  181. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/am/amQnyYc9WanAOKWZ6-lGMYKgK9SaStZ0GidmAquDeNQ.cache +1 -0
  182. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/bO/bO32hG_YBKRnvEUnc6WVkRoKXgRX_P6I6HvQBrfrcqg.cache +1 -0
  183. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/b_/b_Itlk9QZZd7Rvf8kcA4yLP1R5Acu7jB-m1xQiSU0qE.cache +2 -0
  184. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dQ/dQRyP5ear4CnYAvUi3utlj-ArD8Mpm1tu_YrKo3sYqM.cache +2 -0
  185. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/eI/eIdCi9pdESg8mBSixNWcP0ggpHkdGhBz4gCmXu-1T-Q.cache +1 -0
  186. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ek/ektXM_dhs-Yt3Rcr9qqcunWR9Qeiy49omvRIsePDrgY.cache +1 -0
  187. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/et/etvkegz3h_RG3JuPFHQ5vlcF-ZBc2AQCS8K1uTz4MsE.cache +0 -0
  188. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fy/fyosVngyRNzyNGWgLC3fqIYBF1trPoEj5-YGUucZqv8.cache +1 -0
  189. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/gT/gTcO28g7KBHGNWEbIrvu4lKACr-oi8jrtfPpJK-alGw.cache +1 -0
  190. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ga/gauwzOQ2YQbofsKqaMHHIRc36QjCKVsJU-PBd0_sxdo.cache +1 -0
  191. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/gv/gvenMj3wS4MU8luvX4B9yoWLDsu4aEjPHu6HqmqRmVM.cache +2 -0
  192. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/hE/hEo_QU7FPYjtX-4RWTE3CDhpbTnrssn_eidJPTT9jus.cache +1 -0
  193. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/hU/hUnVNKA_obB93f9QaBacYahJlxmSsqMPb0caf7TgYHA.cache +1 -0
  194. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/iI/iI5ECMKY_c5Jh5EUcyEm268wH1-WXkPACA4Eokv5oG4.cache +1 -0
  195. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/kK/kKX2bv1FYx1ivrRttxcoKhFrJbTPmfOqhNhA_PHvL20.cache +1 -0
  196. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/lQ/lQx4QOVnycSCCGdKdkf68q--9oxPGtL-SkzKrsXP0OE.cache +1 -0
  197. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/lk/lkDKpnutXrq58TmSi1a_3CpPW0bua3P2qM1pfkdeiNM.cache +1 -0
  198. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/mX/mX1nlsL_SWOB4y22W5FheRX0YEONKyOY7xUeIvRiHco.cache +0 -0
  199. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/mj/mj7IPPrG3Iu6yNF_Rt8X7uLmXnX9Xus9-w8pzw33qKI.cache +0 -0
  200. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/mk/mK3anqtvwJApYR3xceuQcefcjhVib0s2Oq7FN1p2ZLI.cache +1 -0
  201. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/mk/mkAYMbgT7m9l0b-cZitIKvywgCGfXZ3pzQnyC1zF5pk.cache +1 -0
  202. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/n_/n_xYqQYhwEMQknb3jFQnjlxxBE9TzMNHCdJ-bEyZFIw.cache +0 -0
  203. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nx/nxTv3sKVUQZADJyM3dPaVmUA78MIsMLD_K279yN_GsI.cache +0 -0
  204. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/oD/oDib09gdE8WkzxXJjQsQ0mOCVGkbIIkaQ-JZlozEvoo.cache +1 -0
  205. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/oR/oRbeNQfk--2vMaiBNK-IPZuWtL8-Zjpj4wdKYwpWT-Y.cache +0 -0
  206. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/oS/oSwxAumjvW64xQ1Lc0jZ5ZUupKl39p9NW1fRMHGN2D8.cache +1 -0
  207. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/oz/ozK4IPJj2CBcsem3fLJx3wqcOl6mI6B91PkN0wVfkyk.cache +2 -0
  208. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/p7/p75ImfMSO7wEgU1utN18Pq01BL5fr5j3xQj6eRYFE4o.cache +2 -0
  209. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/pp/pp9vUiXJLyGHZCkMCl70DkL_xiv4XWz9ztTiMarEfNY.cache +1 -0
  210. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/pt/ptHawc95ZK08GgV9kHAAAa89jpZVYPhqqpPPVWi71Do.cache +1 -0
  211. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/q0/q074YUa9rnMSU4RVfvIYMAnW_TmVXrT1hlJO41-OBbU.cache +1 -0
  212. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/qA/qAXCQxgc8uN7nSfqrtsa8DD_UWBUox9OcwfdrJtzb6A.cache +1 -0
  213. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/qP/qPmv5snMrDw830S6hSICDcnIy7kVEWoFKXhGKT38lG4.cache +2 -0
  214. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/qZ/qZqBOuyk1j0lKHz7Onk5w-W6zpsJwXCI_oAV6Jft7fM.cache +0 -0
  215. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ql/qleugiSP8m-MGCnPwKRGi97ngKjTxzFCgiFaCo42B1k.cache +1 -0
  216. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/s8/s8SZLe11poSYC83ACEC77enudBY-sGq2cIvp_url9wQ.cache +0 -0
  217. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sn/sn4QRxxVjF0Ci_0wXT2_r3juzRsTYpdr3oIZOPuMDRY.cache +1 -0
  218. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/tR/tR-01mKfGTeWGUVCkmD0FSf0n1ls5mjSBbZmDBQRxdE.cache +0 -0
  219. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/tR/tROEyESrcH-klIdGYfWPZ70uL93VzoncYdd6EBP_fck.cache +0 -0
  220. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/tf/tfaDK6L3U-9ZYIbuxubkyB691dNwMLwNxr54XI0_H7Q.cache +2 -0
  221. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/uh/uhHJ7XB-kBAusYJqgB2h0IJ9trO3-jD8Lq9aDNSxZGc.cache +1 -0
  222. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/vH/vH0I-a20tX_6BHX9WyF-EGLn4QfpGfa2BvRUNEdzP0I.cache +0 -0
  223. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/vL/vL3g9boowrqsF7Dol4tVdRb-2KVAvMx02XlYyU7NYOU.cache +1 -0
  224. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/vj/vjJiNWLGxIRFCyH6-2SDfyWDBm0zK1czKmpH2BzMDlQ.cache +1 -0
  225. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wb/wbt51tMiDSdeDVRHR8wCjuvZ2y_hzC2yretlmGGMgYU.cache +1 -0
  226. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wg/wgIeHcawFV0WGNd4pKlXfAV7TEDj1UNwO4b7oYaBpW0.cache +1 -0
  227. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wy/wyVoJ3SJ2UwQEUAMb0JVmXmqR6OvjkGK7N06SWNtAcw.cache +0 -0
  228. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xs/xsj35WA8E1f9NhikKGOGSP1bdaGqxlLSs2D06MWhhDk.cache +2 -0
  229. data/spec/dummy/tmp/cache/assets/sprockets/v3.0/y_/y_3kGB4SKGsTCgcO9GE43TC33LT1A75f2qkzXF4066I.cache +1 -0
  230. data/spec/factories/users.rb +26 -0
  231. data/spec/features/authentication_spec.rb +47 -0
  232. data/spec/lib/genkan/config_spec.rb +60 -0
  233. data/spec/lib/genkan_spec.rb +23 -0
  234. data/spec/models/user_spec.rb +186 -0
  235. data/spec/rails_helper.rb +49 -0
  236. data/spec/spec_helper.rb +15 -0
  237. metadata +504 -0
@@ -0,0 +1,26 @@
1
+ require 'rails_helper'
2
+
3
+ RSpec.describe WelcomeController do
4
+ describe 'GET #index' do
5
+ let(:user) { create :user }
6
+
7
+ before do
8
+ allow(controller).to receive(:current_user).and_return(user) if enable_login_stub
9
+ get :index
10
+ end
11
+
12
+ context 'with authenticated' do
13
+ let(:enable_login_stub) { true }
14
+
15
+ it { expect(response).to have_http_status(200) }
16
+ it { expect(response).to render_template(:index) }
17
+ end
18
+
19
+ context 'without authenticated' do
20
+ let(:enable_login_stub) { false }
21
+
22
+ it { expect(response).to have_http_status(302) }
23
+ it { expect(response).to redirect_to(Genkan::Engine.routes.url_helpers.login_path) }
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require_relative 'config/application'
5
+
6
+ Rails.application.load_tasks
@@ -0,0 +1,4 @@
1
+
2
+ //= link_tree ../images
3
+ //= link_directory ../javascripts .js
4
+ //= link_directory ../stylesheets .css
@@ -0,0 +1,13 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file. JavaScript code in this file should be added after the last require_* statement.
9
+ //
10
+ // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require_tree .
@@ -0,0 +1,13 @@
1
+ // Action Cable provides the framework to deal with WebSockets in Rails.
2
+ // You can generate new channels where WebSocket features live using the `rails generate channel` command.
3
+ //
4
+ //= require action_cable
5
+ //= require_self
6
+ //= require_tree ./channels
7
+
8
+ (function() {
9
+ this.App || (this.App = {});
10
+
11
+ App.cable = ActionCable.createConsumer();
12
+
13
+ }).call(this);
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
+ * files in this directory. Styles in this file should be added after the last require_* statement.
11
+ * It is generally better to create a new file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -0,0 +1,4 @@
1
+ /*
2
+ Place all the styles related to the matching controller here.
3
+ They will automatically be included in application.css.
4
+ */
@@ -0,0 +1,4 @@
1
+ module ApplicationCable
2
+ class Channel < ActionCable::Channel::Base
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module ApplicationCable
2
+ class Connection < ActionCable::Connection::Base
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ class ApplicationController < ActionController::Base
2
+ include Genkan::Authenticatable
3
+ protect_from_forgery with: :exception
4
+ end
@@ -0,0 +1,4 @@
1
+ class WelcomeController < ApplicationController
2
+ def index
3
+ end
4
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ module WelcomeHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ class ApplicationJob < ActiveJob::Base
2
+ end
@@ -0,0 +1,4 @@
1
+ class ApplicationMailer < ActionMailer::Base
2
+ default from: 'from@example.com'
3
+ layout 'mailer'
4
+ end
@@ -0,0 +1,3 @@
1
+ class ApplicationRecord < ActiveRecord::Base
2
+ self.abstract_class = true
3
+ end
@@ -0,0 +1,3 @@
1
+ class User < ApplicationRecord
2
+ include Genkan::Auth
3
+ end
@@ -0,0 +1,3 @@
1
+ <h1>Genkan::SessionsController#new</h1>
2
+
3
+ <%= link_to "login", "/auth/google" %>
@@ -0,0 +1,21 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= csrf_meta_tags %>
6
+
7
+ <%= stylesheet_link_tag 'application', media: 'all' %>
8
+ <%= javascript_include_tag 'application' %>
9
+ </head>
10
+
11
+ <body>
12
+ <p class="notice"><%= notice %></p>
13
+ <p class="alert"><%= alert %></p>
14
+
15
+ <% if logged_in? %>
16
+ <p><%= link_to 'logout', genkan.logout_path %></p>
17
+ <% end %>
18
+
19
+ <%= yield %>
20
+ </body>
21
+ </html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <style>
6
+ /* Email styles need to be inline */
7
+ </style>
8
+ </head>
9
+
10
+ <body>
11
+ <%= yield %>
12
+ </body>
13
+ </html>
@@ -0,0 +1 @@
1
+ <%= yield %>
@@ -0,0 +1,2 @@
1
+ <h1>Welcome#index</h1>
2
+ <p>Find me in app/views/welcome/index.html.erb</p>
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../config/application', __dir__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env ruby
2
+ require 'pathname'
3
+ require 'fileutils'
4
+ include FileUtils
5
+
6
+ # path to your application root.
7
+ APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
8
+
9
+ def system!(*args)
10
+ system(*args) || abort("\n== Command #{args} failed ==")
11
+ end
12
+
13
+ chdir APP_ROOT do
14
+ # This script is a starting point to setup your application.
15
+ # Add necessary setup steps to this file.
16
+
17
+ puts '== Installing dependencies =='
18
+ system! 'gem install bundler --conservative'
19
+ system('bundle check') || system!('bundle install')
20
+
21
+ # Install JavaScript dependencies if using Yarn
22
+ # system('bin/yarn')
23
+
24
+
25
+ # puts "\n== Copying sample files =="
26
+ # unless File.exist?('config/database.yml')
27
+ # cp 'config/database.yml.sample', 'config/database.yml'
28
+ # end
29
+
30
+ puts "\n== Preparing database =="
31
+ system! 'bin/rails db:setup'
32
+
33
+ puts "\n== Removing old logs and tempfiles =="
34
+ system! 'bin/rails log:clear tmp:clear'
35
+
36
+ puts "\n== Restarting application server =="
37
+ system! 'bin/rails restart'
38
+ end
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ require 'pathname'
3
+ require 'fileutils'
4
+ include FileUtils
5
+
6
+ # path to your application root.
7
+ APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
8
+
9
+ def system!(*args)
10
+ system(*args) || abort("\n== Command #{args} failed ==")
11
+ end
12
+
13
+ chdir APP_ROOT do
14
+ # This script is a way to update your development environment automatically.
15
+ # Add necessary update steps to this file.
16
+
17
+ puts '== Installing dependencies =='
18
+ system! 'gem install bundler --conservative'
19
+ system('bundle check') || system!('bundle install')
20
+
21
+ puts "\n== Updating database =="
22
+ system! 'bin/rails db:migrate'
23
+
24
+ puts "\n== Removing old logs and tempfiles =="
25
+ system! 'bin/rails log:clear tmp:clear'
26
+
27
+ puts "\n== Restarting application server =="
28
+ system! 'bin/rails restart'
29
+ end
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+ VENDOR_PATH = File.expand_path('..', __dir__)
3
+ Dir.chdir(VENDOR_PATH) do
4
+ begin
5
+ exec "yarnpkg #{ARGV.join(" ")}"
6
+ rescue Errno::ENOENT
7
+ $stderr.puts "Yarn executable was not detected in the system."
8
+ $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
9
+ exit 1
10
+ end
11
+ end
@@ -0,0 +1,18 @@
1
+ require_relative 'boot'
2
+
3
+ require 'rails/all'
4
+
5
+ Bundler.require(*Rails.groups)
6
+ require "genkan"
7
+
8
+ module Dummy
9
+ class Application < Rails::Application
10
+ # Initialize configuration defaults for originally generated Rails version.
11
+ config.load_defaults 5.1
12
+
13
+ # Settings in config/environments/* take precedence over those specified here.
14
+ # Application configuration should go into files in config/initializers
15
+ # -- all .rb files in that directory are automatically loaded.
16
+ end
17
+ end
18
+
@@ -0,0 +1,5 @@
1
+ # Set up gems listed in the Gemfile.
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../Gemfile', __dir__)
3
+
4
+ require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5
+ $LOAD_PATH.unshift File.expand_path('../../../lib', __dir__)
@@ -0,0 +1,10 @@
1
+ development:
2
+ adapter: async
3
+
4
+ test:
5
+ adapter: async
6
+
7
+ production:
8
+ adapter: redis
9
+ url: redis://localhost:6379/1
10
+ channel_prefix: dummy_production
@@ -0,0 +1,25 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ #
7
+ default: &default
8
+ adapter: sqlite3
9
+ pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
10
+ timeout: 5000
11
+
12
+ development:
13
+ <<: *default
14
+ database: db/development.sqlite3
15
+
16
+ # Warning: The database defined as "test" will be erased and
17
+ # re-generated from your development database when you run "rake".
18
+ # Do not set this db to the same as development or production.
19
+ test:
20
+ <<: *default
21
+ database: db/test.sqlite3
22
+
23
+ production:
24
+ <<: *default
25
+ database: db/production.sqlite3
@@ -0,0 +1,5 @@
1
+ # Load the Rails application.
2
+ require_relative 'application'
3
+
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!
@@ -0,0 +1,54 @@
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the web server when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Do not eager load code on boot.
10
+ config.eager_load = false
11
+
12
+ # Show full error reports.
13
+ config.consider_all_requests_local = true
14
+
15
+ # Enable/disable caching. By default caching is disabled.
16
+ if Rails.root.join('tmp/caching-dev.txt').exist?
17
+ config.action_controller.perform_caching = true
18
+
19
+ config.cache_store = :memory_store
20
+ config.public_file_server.headers = {
21
+ 'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}"
22
+ }
23
+ else
24
+ config.action_controller.perform_caching = false
25
+
26
+ config.cache_store = :null_store
27
+ end
28
+
29
+ # Don't care if the mailer can't send.
30
+ config.action_mailer.raise_delivery_errors = false
31
+
32
+ config.action_mailer.perform_caching = false
33
+
34
+ # Print deprecation notices to the Rails logger.
35
+ config.active_support.deprecation = :log
36
+
37
+ # Raise an error on page load if there are pending migrations.
38
+ config.active_record.migration_error = :page_load
39
+
40
+ # Debug mode disables concatenation and preprocessing of assets.
41
+ # This option may cause significant delays in view rendering with a large
42
+ # number of complex assets.
43
+ config.assets.debug = true
44
+
45
+ # Suppress logger output for asset requests.
46
+ config.assets.quiet = true
47
+
48
+ # Raises error for missing translations
49
+ # config.action_view.raise_on_missing_translations = true
50
+
51
+ # Use an evented file watcher to asynchronously detect changes in source code,
52
+ # routes, locales, etc. This feature depends on the listen gem.
53
+ # config.file_watcher = ActiveSupport::EventedFileUpdateChecker
54
+ end
@@ -0,0 +1,91 @@
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
+ # Attempt to read encrypted secrets from `config/secrets.yml.enc`.
18
+ # Requires an encryption key in `ENV["RAILS_MASTER_KEY"]` or
19
+ # `config/secrets.yml.key`.
20
+ config.read_encrypted_secrets = true
21
+
22
+ # Disable serving static files from the `/public` folder by default since
23
+ # Apache or NGINX already handles this.
24
+ config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
25
+
26
+ # Compress JavaScripts and CSS.
27
+ config.assets.js_compressor = :uglifier
28
+ # config.assets.css_compressor = :sass
29
+
30
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
31
+ config.assets.compile = false
32
+
33
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
34
+
35
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
36
+ # config.action_controller.asset_host = 'http://assets.example.com'
37
+
38
+ # Specifies the header that your server uses for sending files.
39
+ # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
40
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
41
+
42
+ # Mount Action Cable outside main process or domain
43
+ # config.action_cable.mount_path = nil
44
+ # config.action_cable.url = 'wss://example.com/cable'
45
+ # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
46
+
47
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
48
+ # config.force_ssl = true
49
+
50
+ # Use the lowest log level to ensure availability of diagnostic information
51
+ # when problems arise.
52
+ config.log_level = :debug
53
+
54
+ # Prepend all log lines with the following tags.
55
+ config.log_tags = [ :request_id ]
56
+
57
+ # Use a different cache store in production.
58
+ # config.cache_store = :mem_cache_store
59
+
60
+ # Use a real queuing backend for Active Job (and separate queues per environment)
61
+ # config.active_job.queue_adapter = :resque
62
+ # config.active_job.queue_name_prefix = "dummy_#{Rails.env}"
63
+ config.action_mailer.perform_caching = false
64
+
65
+ # Ignore bad email addresses and do not raise email delivery errors.
66
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
67
+ # config.action_mailer.raise_delivery_errors = false
68
+
69
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
70
+ # the I18n.default_locale when a translation cannot be found).
71
+ config.i18n.fallbacks = true
72
+
73
+ # Send deprecation notices to registered listeners.
74
+ config.active_support.deprecation = :notify
75
+
76
+ # Use default logging formatter so that PID and timestamp are not suppressed.
77
+ config.log_formatter = ::Logger::Formatter.new
78
+
79
+ # Use a different logger for distributed setups.
80
+ # require 'syslog/logger'
81
+ # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
82
+
83
+ if ENV["RAILS_LOG_TO_STDOUT"].present?
84
+ logger = ActiveSupport::Logger.new(STDOUT)
85
+ logger.formatter = config.log_formatter
86
+ config.logger = ActiveSupport::TaggedLogging.new(logger)
87
+ end
88
+
89
+ # Do not dump schema after migrations.
90
+ config.active_record.dump_schema_after_migration = false
91
+ end
@@ -0,0 +1,42 @@
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 public file server for tests with Cache-Control for performance.
16
+ config.public_file_server.enabled = true
17
+ config.public_file_server.headers = {
18
+ 'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}"
19
+ }
20
+
21
+ # Show full error reports and disable caching.
22
+ config.consider_all_requests_local = true
23
+ config.action_controller.perform_caching = false
24
+
25
+ # Raise exceptions instead of rendering exception templates.
26
+ config.action_dispatch.show_exceptions = false
27
+
28
+ # Disable request forgery protection in test environment.
29
+ config.action_controller.allow_forgery_protection = false
30
+ config.action_mailer.perform_caching = false
31
+
32
+ # Tell Action Mailer not to deliver emails to the real world.
33
+ # The :test delivery method accumulates sent emails in the
34
+ # ActionMailer::Base.deliveries array.
35
+ config.action_mailer.delivery_method = :test
36
+
37
+ # Print deprecation notices to the stderr.
38
+ config.active_support.deprecation = :stderr
39
+
40
+ # Raises error for missing translations
41
+ # config.action_view.raise_on_missing_translations = true
42
+ end
@@ -0,0 +1,6 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # ApplicationController.renderer.defaults.merge!(
4
+ # http_host: 'example.org',
5
+ # https: false
6
+ # )
@@ -0,0 +1,14 @@
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
+ # Add additional assets to the asset load path.
7
+ # Rails.application.config.assets.paths << Emoji.images_path
8
+ # Add Yarn node_modules folder to the asset load path.
9
+ Rails.application.config.assets.paths << Rails.root.join('node_modules')
10
+
11
+ # Precompile additional assets.
12
+ # application.js, application.css, and all non-JS/CSS in the app/assets
13
+ # folder are already added.
14
+ # Rails.application.config.assets.precompile += %w( admin.js admin.css )
@@ -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,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Specify a serializer for the signed and encrypted cookie jars.
4
+ # Valid options are :json, :marshal, and :hybrid.
5
+ 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
+ Genkan.configure do |config|
2
+ config.user_class_name = 'User'
3
+ config.auto_acceptance = false
4
+ end
5
+
6
+ Genkan::Engine.configure do |config|
7
+ config.middleware.use OmniAuth::Builder do
8
+ provider(
9
+ :google_oauth2,
10
+ ENV.fetch('GOOGLE_OAUTH_CLIENT_ID') { 'google_oauth_client_id' },
11
+ ENV.fetch('GOOGLE_OAUTH_CLIENT_SECRET') { 'google_oauth_client_secret' },
12
+ name: 'google',
13
+ scope: 'email'
14
+ )
15
+ end
16
+ end
@@ -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