model_base_generators 0.3.9 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (455) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/.travis.yml +8 -2
  4. data/Gemfile +1 -1
  5. data/Gemfiles/rails-5.0 +25 -0
  6. data/Gemfiles/rails-5.1 +25 -0
  7. data/README.md +2 -2
  8. data/Rakefile +10 -1
  9. data/{example → examples/rails-5.0}/.gitignore +1 -1
  10. data/{example → examples/rails-5.0}/.model_base/controllers +0 -0
  11. data/{example → examples/rails-5.0}/.rspec +0 -0
  12. data/{example → examples/rails-5.0}/.rubocop.yml +0 -0
  13. data/{example → examples/rails-5.0}/Gemfile +5 -4
  14. data/{example → examples/rails-5.0}/Gemfile.lock +87 -77
  15. data/{example → examples/rails-5.0}/Rakefile +0 -0
  16. data/{example → examples/rails-5.0}/app/assets/config/manifest.js +0 -0
  17. data/{example → examples/rails-5.0}/app/assets/images/.keep +0 -0
  18. data/{example → examples/rails-5.0}/app/assets/javascripts/application.js +0 -0
  19. data/{example → examples/rails-5.0}/app/assets/javascripts/cable.js +0 -0
  20. data/{example → examples/rails-5.0}/app/assets/javascripts/channels/.keep +0 -0
  21. data/{example → examples/rails-5.0}/app/assets/stylesheets/application.css +0 -0
  22. data/{example → examples/rails-5.0}/app/channels/application_cable/channel.rb +0 -0
  23. data/{example → examples/rails-5.0}/app/channels/application_cable/connection.rb +0 -0
  24. data/{example → examples/rails-5.0}/app/controllers/application_controller.rb +0 -0
  25. data/{example → examples/rails-5.0}/app/controllers/attached_files_controller.rb +0 -0
  26. data/{example → examples/rails-5.0}/app/controllers/concerns/.keep +0 -0
  27. data/{example → examples/rails-5.0}/app/controllers/concerns/authentication.rb +0 -0
  28. data/{example → examples/rails-5.0}/app/controllers/issue_comments_controller.rb +0 -0
  29. data/{example → examples/rails-5.0}/app/controllers/issues_controller.rb +0 -0
  30. data/{example → examples/rails-5.0}/app/controllers/phases_controller.rb +0 -0
  31. data/{example → examples/rails-5.0}/app/controllers/project_assignments_controller.rb +0 -0
  32. data/{example → examples/rails-5.0}/app/controllers/projects_controller.rb +0 -0
  33. data/{example → examples/rails-5.0}/app/helpers/application_helper.rb +0 -0
  34. data/{example → examples/rails-5.0}/app/helpers/attached_files_helper.rb +0 -0
  35. data/{example → examples/rails-5.0}/app/helpers/issue_comments_helper.rb +0 -0
  36. data/{example → examples/rails-5.0}/app/helpers/issues_helper.rb +0 -0
  37. data/{example → examples/rails-5.0}/app/helpers/phases_helper.rb +0 -0
  38. data/{example → examples/rails-5.0}/app/helpers/project_assignments_helper.rb +0 -0
  39. data/{example → examples/rails-5.0}/app/helpers/projects_helper.rb +0 -0
  40. data/{example → examples/rails-5.0}/app/jobs/application_job.rb +0 -0
  41. data/{example → examples/rails-5.0}/app/mailers/application_mailer.rb +0 -0
  42. data/{example → examples/rails-5.0}/app/models/ability.rb +0 -0
  43. data/{example → examples/rails-5.0}/app/models/application_record.rb +0 -0
  44. data/{example → examples/rails-5.0}/app/models/attached_file.rb +0 -0
  45. data/{example → examples/rails-5.0}/app/models/concerns/.keep +0 -0
  46. data/{example → examples/rails-5.0}/app/models/issue.rb +1 -1
  47. data/{example → examples/rails-5.0}/app/models/issue_comment.rb +0 -0
  48. data/{example → examples/rails-5.0}/app/models/phase.rb +0 -0
  49. data/{example → examples/rails-5.0}/app/models/project.rb +0 -0
  50. data/{example → examples/rails-5.0}/app/models/project_assignment.rb +0 -0
  51. data/{example → examples/rails-5.0}/app/models/user.rb +0 -0
  52. data/{example → examples/rails-5.0}/app/validations/ar_internal_metadatum_validation.rb +0 -0
  53. data/{example → examples/rails-5.0}/app/validations/attached_file_validation.rb +0 -0
  54. data/{example → examples/rails-5.0}/app/validations/issue_comment_validation.rb +0 -0
  55. data/{example → examples/rails-5.0}/app/validations/issue_validation.rb +0 -0
  56. data/{example → examples/rails-5.0}/app/validations/phase_validation.rb +0 -0
  57. data/{example → examples/rails-5.0}/app/validations/project_assignment_validation.rb +0 -0
  58. data/{example → examples/rails-5.0}/app/validations/project_validation.rb +0 -0
  59. data/{example → examples/rails-5.0}/app/validations/user_validation.rb +0 -0
  60. data/{example → examples/rails-5.0}/app/views/attached_files/_attached_file.json.jbuilder +0 -0
  61. data/{example → examples/rails-5.0}/app/views/attached_files/_form.html.erb +0 -0
  62. data/{example → examples/rails-5.0}/app/views/attached_files/_table.html.erb +0 -0
  63. data/{example → examples/rails-5.0}/app/views/attached_files/edit.html.erb +0 -0
  64. data/{example → examples/rails-5.0}/app/views/attached_files/index.html.erb +0 -0
  65. data/{example → examples/rails-5.0}/app/views/attached_files/index.json.jbuilder +0 -0
  66. data/{example → examples/rails-5.0}/app/views/attached_files/new.html.erb +0 -0
  67. data/{example → examples/rails-5.0}/app/views/attached_files/show.html.erb +0 -0
  68. data/{example → examples/rails-5.0}/app/views/attached_files/show.json.jbuilder +0 -0
  69. data/{example → examples/rails-5.0}/app/views/issue_comments/_form.html.erb +0 -0
  70. data/examples/rails-5.0/app/views/issue_comments/_issue_comment.json.jbuilder +2 -0
  71. data/{example → examples/rails-5.0}/app/views/issue_comments/_table.html.erb +0 -0
  72. data/{example → examples/rails-5.0}/app/views/issue_comments/edit.html.erb +0 -0
  73. data/{example → examples/rails-5.0}/app/views/issue_comments/index.html.erb +0 -0
  74. data/examples/rails-5.0/app/views/issue_comments/index.json.jbuilder +1 -0
  75. data/{example → examples/rails-5.0}/app/views/issue_comments/new.html.erb +0 -0
  76. data/{example → examples/rails-5.0}/app/views/issue_comments/show.html.erb +0 -0
  77. data/examples/rails-5.0/app/views/issue_comments/show.json.jbuilder +1 -0
  78. data/{example → examples/rails-5.0}/app/views/issues/_form.html.erb +0 -0
  79. data/examples/rails-5.0/app/views/issues/_issue.json.jbuilder +2 -0
  80. data/{example → examples/rails-5.0}/app/views/issues/_table.html.erb +0 -0
  81. data/{example → examples/rails-5.0}/app/views/issues/edit.html.erb +0 -0
  82. data/{example → examples/rails-5.0}/app/views/issues/index.html.erb +0 -0
  83. data/examples/rails-5.0/app/views/issues/index.json.jbuilder +1 -0
  84. data/{example → examples/rails-5.0}/app/views/issues/new.html.erb +0 -0
  85. data/{example → examples/rails-5.0}/app/views/issues/show.html.erb +0 -0
  86. data/examples/rails-5.0/app/views/issues/show.json.jbuilder +1 -0
  87. data/{example → examples/rails-5.0}/app/views/layouts/application.html.erb +0 -0
  88. data/{example → examples/rails-5.0}/app/views/layouts/mailer.html.erb +0 -0
  89. data/{example → examples/rails-5.0}/app/views/layouts/mailer.text.erb +0 -0
  90. data/{example → examples/rails-5.0}/app/views/phases/_form.html.erb +0 -0
  91. data/examples/rails-5.0/app/views/phases/_phase.json.jbuilder +2 -0
  92. data/{example → examples/rails-5.0}/app/views/phases/_table.html.erb +0 -0
  93. data/{example → examples/rails-5.0}/app/views/phases/edit.html.erb +0 -0
  94. data/{example → examples/rails-5.0}/app/views/phases/index.html.erb +0 -0
  95. data/examples/rails-5.0/app/views/phases/index.json.jbuilder +1 -0
  96. data/{example → examples/rails-5.0}/app/views/phases/new.html.erb +0 -0
  97. data/{example → examples/rails-5.0}/app/views/phases/show.html.erb +0 -0
  98. data/examples/rails-5.0/app/views/phases/show.json.jbuilder +1 -0
  99. data/{example → examples/rails-5.0}/app/views/project_assignments/_form.html.erb +0 -0
  100. data/examples/rails-5.0/app/views/project_assignments/_project_assignment.json.jbuilder +2 -0
  101. data/{example → examples/rails-5.0}/app/views/project_assignments/_table.html.erb +0 -0
  102. data/{example → examples/rails-5.0}/app/views/project_assignments/edit.html.erb +0 -0
  103. data/{example → examples/rails-5.0}/app/views/project_assignments/index.html.erb +0 -0
  104. data/examples/rails-5.0/app/views/project_assignments/index.json.jbuilder +1 -0
  105. data/{example → examples/rails-5.0}/app/views/project_assignments/new.html.erb +0 -0
  106. data/{example → examples/rails-5.0}/app/views/project_assignments/show.html.erb +0 -0
  107. data/examples/rails-5.0/app/views/project_assignments/show.json.jbuilder +1 -0
  108. data/{example → examples/rails-5.0}/app/views/projects/_form.html.erb +0 -0
  109. data/examples/rails-5.0/app/views/projects/_project.json.jbuilder +2 -0
  110. data/{example → examples/rails-5.0}/app/views/projects/_table.html.erb +0 -0
  111. data/{example → examples/rails-5.0}/app/views/projects/edit.html.erb +0 -0
  112. data/{example → examples/rails-5.0}/app/views/projects/index.html.erb +0 -0
  113. data/examples/rails-5.0/app/views/projects/index.json.jbuilder +1 -0
  114. data/{example → examples/rails-5.0}/app/views/projects/new.html.erb +0 -0
  115. data/{example → examples/rails-5.0}/app/views/projects/show.html.erb +0 -0
  116. data/examples/rails-5.0/app/views/projects/show.json.jbuilder +1 -0
  117. data/{example → examples/rails-5.0}/bin/bundle +0 -0
  118. data/{example → examples/rails-5.0}/bin/rails +0 -0
  119. data/{example → examples/rails-5.0}/bin/rake +0 -0
  120. data/{example → examples/rails-5.0}/bin/setup +0 -0
  121. data/{example → examples/rails-5.0}/bin/update +0 -0
  122. data/{example → examples/rails-5.0}/config.ru +0 -0
  123. data/{example → examples/rails-5.0}/config/application.rb +1 -2
  124. data/{example → examples/rails-5.0}/config/boot.rb +0 -0
  125. data/{example → examples/rails-5.0}/config/cable.yml +0 -0
  126. data/{example → examples/rails-5.0}/config/database.yml +0 -0
  127. data/{example → examples/rails-5.0}/config/environment.rb +0 -0
  128. data/{example → examples/rails-5.0}/config/environments/development.rb +0 -0
  129. data/{example → examples/rails-5.0}/config/environments/production.rb +0 -0
  130. data/{example → examples/rails-5.0}/config/environments/test.rb +0 -0
  131. data/{example → examples/rails-5.0}/config/initializers/application_controller_renderer.rb +0 -0
  132. data/{example → examples/rails-5.0}/config/initializers/assets.rb +0 -0
  133. data/{example → examples/rails-5.0}/config/initializers/backtrace_silencers.rb +0 -0
  134. data/{example → examples/rails-5.0}/config/initializers/cookies_serializer.rb +0 -0
  135. data/{example → examples/rails-5.0}/config/initializers/devise.rb +0 -0
  136. data/{example → examples/rails-5.0}/config/initializers/filter_parameter_logging.rb +0 -0
  137. data/{example → examples/rails-5.0}/config/initializers/inflections.rb +0 -0
  138. data/{example → examples/rails-5.0}/config/initializers/mime_types.rb +0 -0
  139. data/{example → examples/rails-5.0}/config/initializers/new_framework_defaults.rb +0 -0
  140. data/{example → examples/rails-5.0}/config/initializers/pretty_validation.rb +0 -0
  141. data/{example → examples/rails-5.0}/config/initializers/session_store.rb +0 -0
  142. data/{example → examples/rails-5.0}/config/initializers/wrap_parameters.rb +0 -0
  143. data/{example → examples/rails-5.0}/config/locales/devise.en.yml +0 -0
  144. data/{example → examples/rails-5.0}/config/locales/devise.ja.yml +0 -0
  145. data/{example → examples/rails-5.0}/config/locales/en.yml +0 -0
  146. data/{example → examples/rails-5.0}/config/locales/rails.ja.yml +0 -0
  147. data/{example → examples/rails-5.0}/config/puma.rb +0 -0
  148. data/{example → examples/rails-5.0}/config/routes.rb +0 -0
  149. data/{example → examples/rails-5.0}/config/secrets.yml +0 -0
  150. data/{example → examples/rails-5.0}/config/spring.rb +0 -0
  151. data/{example → examples/rails-5.0}/db/schema.rb +0 -0
  152. data/{example → examples/rails-5.0}/lib/assets/.keep +0 -0
  153. data/{example → examples/rails-5.0}/log/.keep +0 -0
  154. data/{example → examples/rails-5.0}/public/404.html +0 -0
  155. data/{example → examples/rails-5.0}/public/422.html +0 -0
  156. data/{example → examples/rails-5.0}/public/500.html +0 -0
  157. data/{example → examples/rails-5.0}/public/apple-touch-icon-precomposed.png +0 -0
  158. data/{example → examples/rails-5.0}/public/apple-touch-icon.png +0 -0
  159. data/{example → examples/rails-5.0}/public/favicon.ico +0 -0
  160. data/{example → examples/rails-5.0}/spec/controllers/attached_files_controller_spec.rb +6 -6
  161. data/{example → examples/rails-5.0}/spec/controllers/issue_comments_controller_spec.rb +5 -5
  162. data/{example → examples/rails-5.0}/spec/controllers/issues_controller_spec.rb +4 -4
  163. data/{example → examples/rails-5.0}/spec/controllers/phases_controller_spec.rb +4 -4
  164. data/{example → examples/rails-5.0}/spec/controllers/project_assignments_controller_spec.rb +4 -4
  165. data/{example → examples/rails-5.0}/spec/controllers/projects_controller_spec.rb +3 -3
  166. data/{example → examples/rails-5.0}/spec/factories/attached_files.rb +1 -1
  167. data/{example → examples/rails-5.0}/spec/factories/issue_comments.rb +1 -1
  168. data/{example → examples/rails-5.0}/spec/factories/issues.rb +1 -1
  169. data/{example → examples/rails-5.0}/spec/factories/phases.rb +1 -1
  170. data/{example → examples/rails-5.0}/spec/factories/project_assignments.rb +1 -1
  171. data/{example → examples/rails-5.0}/spec/factories/projects.rb +1 -1
  172. data/{example → examples/rails-5.0}/spec/factories/users.rb +1 -1
  173. data/{example → examples/rails-5.0}/spec/helpers/attached_files_helper_spec.rb +0 -0
  174. data/{example → examples/rails-5.0}/spec/helpers/issue_comments_helper_spec.rb +0 -0
  175. data/{example → examples/rails-5.0}/spec/helpers/issues_helper_spec.rb +0 -0
  176. data/{example → examples/rails-5.0}/spec/helpers/phases_helper_spec.rb +0 -0
  177. data/{example → examples/rails-5.0}/spec/helpers/project_assignments_helper_spec.rb +0 -0
  178. data/{example → examples/rails-5.0}/spec/helpers/projects_helper_spec.rb +0 -0
  179. data/{example → examples/rails-5.0}/spec/rails_helper.rb +0 -0
  180. data/{example → examples/rails-5.0}/spec/requests/attached_files_spec.rb +1 -1
  181. data/{example → examples/rails-5.0}/spec/requests/issue_comments_spec.rb +1 -1
  182. data/{example → examples/rails-5.0}/spec/requests/issues_spec.rb +1 -1
  183. data/{example → examples/rails-5.0}/spec/requests/phases_spec.rb +1 -1
  184. data/{example → examples/rails-5.0}/spec/requests/project_assignments_spec.rb +1 -1
  185. data/{example → examples/rails-5.0}/spec/requests/projects_spec.rb +1 -1
  186. data/{example → examples/rails-5.0}/spec/routing/attached_files_routing_spec.rb +0 -0
  187. data/{example → examples/rails-5.0}/spec/routing/issue_comments_routing_spec.rb +0 -0
  188. data/{example → examples/rails-5.0}/spec/routing/issues_routing_spec.rb +0 -0
  189. data/{example → examples/rails-5.0}/spec/routing/phases_routing_spec.rb +0 -0
  190. data/{example → examples/rails-5.0}/spec/routing/project_assignments_routing_spec.rb +0 -0
  191. data/{example → examples/rails-5.0}/spec/routing/projects_routing_spec.rb +0 -0
  192. data/{example → examples/rails-5.0}/spec/spec_helper.rb +0 -0
  193. data/{example → examples/rails-5.0}/spec/support/controller_macros.rb +2 -2
  194. data/{example → examples/rails-5.0}/spec/support/devise.rb +0 -0
  195. data/{example → examples/rails-5.0}/spec/support/field_assertions.rb +0 -0
  196. data/{example → examples/rails-5.0}/spec/support/time_match_support.rb +0 -0
  197. data/{example → examples/rails-5.0}/spec/views/attached_files/edit.html.erb_spec.rb +5 -5
  198. data/examples/rails-5.0/spec/views/attached_files/index.html.erb_spec.rb +22 -0
  199. data/{example → examples/rails-5.0}/spec/views/attached_files/new.html.erb_spec.rb +5 -5
  200. data/examples/rails-5.0/spec/views/attached_files/show.html.erb_spec.rb +19 -0
  201. data/{example → examples/rails-5.0}/spec/views/issue_comments/edit.html.erb_spec.rb +4 -4
  202. data/{example → examples/rails-5.0}/spec/views/issue_comments/index.html.erb_spec.rb +5 -5
  203. data/{example → examples/rails-5.0}/spec/views/issue_comments/new.html.erb_spec.rb +4 -4
  204. data/{example → examples/rails-5.0}/spec/views/issue_comments/show.html.erb_spec.rb +4 -4
  205. data/{example → examples/rails-5.0}/spec/views/issues/edit.html.erb_spec.rb +3 -3
  206. data/{example → examples/rails-5.0}/spec/views/issues/index.html.erb_spec.rb +4 -4
  207. data/{example → examples/rails-5.0}/spec/views/issues/new.html.erb_spec.rb +3 -3
  208. data/{example → examples/rails-5.0}/spec/views/issues/show.html.erb_spec.rb +3 -3
  209. data/{example → examples/rails-5.0}/spec/views/phases/edit.html.erb_spec.rb +3 -3
  210. data/{example → examples/rails-5.0}/spec/views/phases/index.html.erb_spec.rb +4 -4
  211. data/{example → examples/rails-5.0}/spec/views/phases/new.html.erb_spec.rb +3 -3
  212. data/{example → examples/rails-5.0}/spec/views/phases/show.html.erb_spec.rb +3 -3
  213. data/{example → examples/rails-5.0}/spec/views/project_assignments/edit.html.erb_spec.rb +3 -3
  214. data/{example → examples/rails-5.0}/spec/views/project_assignments/index.html.erb_spec.rb +4 -4
  215. data/{example → examples/rails-5.0}/spec/views/project_assignments/new.html.erb_spec.rb +3 -3
  216. data/{example → examples/rails-5.0}/spec/views/project_assignments/show.html.erb_spec.rb +3 -3
  217. data/{example → examples/rails-5.0}/spec/views/projects/edit.html.erb_spec.rb +2 -2
  218. data/{example → examples/rails-5.0}/spec/views/projects/index.html.erb_spec.rb +3 -3
  219. data/{example → examples/rails-5.0}/spec/views/projects/new.html.erb_spec.rb +2 -2
  220. data/{example → examples/rails-5.0}/spec/views/projects/show.html.erb_spec.rb +2 -2
  221. data/examples/rails-5.0/tmp/.keep +0 -0
  222. data/examples/rails-5.1/.gitignore +4 -0
  223. data/examples/rails-5.1/.model_base +1 -0
  224. data/examples/rails-5.1/.rspec +2 -0
  225. data/examples/rails-5.1/Gemfile +87 -0
  226. data/examples/rails-5.1/Gemfile.lock +361 -0
  227. data/examples/rails-5.1/README.md +24 -0
  228. data/examples/rails-5.1/Rakefile +6 -0
  229. data/examples/rails-5.1/app/assets/config/manifest.js +3 -0
  230. data/examples/rails-5.1/app/assets/images/.keep +0 -0
  231. data/examples/rails-5.1/app/assets/javascripts/application.js +15 -0
  232. data/examples/rails-5.1/app/assets/javascripts/bootstrap.js.coffee +3 -0
  233. data/examples/rails-5.1/app/assets/javascripts/cable.js +13 -0
  234. data/examples/rails-5.1/app/assets/javascripts/channels/.keep +0 -0
  235. data/examples/rails-5.1/app/assets/stylesheets/application.css +15 -0
  236. data/examples/rails-5.1/app/assets/stylesheets/bootstrap_and_overrides.css +6 -0
  237. data/examples/rails-5.1/app/channels/application_cable/channel.rb +4 -0
  238. data/examples/rails-5.1/app/channels/application_cable/connection.rb +4 -0
  239. data/examples/rails-5.1/app/controllers/application_controller.rb +3 -0
  240. data/examples/rails-5.1/app/controllers/attached_files_controller.rb +63 -0
  241. data/examples/rails-5.1/app/controllers/concerns/.keep +0 -0
  242. data/examples/rails-5.1/app/controllers/concerns/authentication.rb +13 -0
  243. data/examples/rails-5.1/app/controllers/issue_comments_controller.rb +63 -0
  244. data/examples/rails-5.1/app/controllers/issues_controller.rb +63 -0
  245. data/examples/rails-5.1/app/controllers/phases_controller.rb +63 -0
  246. data/examples/rails-5.1/app/controllers/project_assignments_controller.rb +63 -0
  247. data/examples/rails-5.1/app/controllers/projects_controller.rb +63 -0
  248. data/examples/rails-5.1/app/helpers/application_helper.rb +2 -0
  249. data/examples/rails-5.1/app/helpers/attached_files_helper.rb +3 -0
  250. data/examples/rails-5.1/app/helpers/issue_comments_helper.rb +3 -0
  251. data/examples/rails-5.1/app/helpers/issues_helper.rb +3 -0
  252. data/examples/rails-5.1/app/helpers/phases_helper.rb +3 -0
  253. data/examples/rails-5.1/app/helpers/project_assignments_helper.rb +3 -0
  254. data/examples/rails-5.1/app/helpers/projects_helper.rb +3 -0
  255. data/examples/rails-5.1/app/jobs/application_job.rb +2 -0
  256. data/examples/rails-5.1/app/mailers/application_mailer.rb +4 -0
  257. data/examples/rails-5.1/app/models +1 -0
  258. data/examples/rails-5.1/app/validations +1 -0
  259. data/examples/rails-5.1/app/views/attached_files/_attached_file.json.jbuilder +2 -0
  260. data/examples/rails-5.1/app/views/attached_files/_form.html.erb +48 -0
  261. data/examples/rails-5.1/app/views/attached_files/_table.html.erb +31 -0
  262. data/examples/rails-5.1/app/views/attached_files/edit.html.erb +5 -0
  263. data/examples/rails-5.1/app/views/attached_files/index.html.erb +9 -0
  264. data/examples/rails-5.1/app/views/attached_files/index.json.jbuilder +1 -0
  265. data/examples/rails-5.1/app/views/attached_files/new.html.erb +5 -0
  266. data/examples/rails-5.1/app/views/attached_files/show.html.erb +27 -0
  267. data/examples/rails-5.1/app/views/attached_files/show.json.jbuilder +1 -0
  268. data/examples/rails-5.1/app/views/issue_comments/_form.html.erb +55 -0
  269. data/{example → examples/rails-5.1}/app/views/issue_comments/_issue_comment.json.jbuilder +0 -0
  270. data/examples/rails-5.1/app/views/issue_comments/_table.html.erb +33 -0
  271. data/examples/rails-5.1/app/views/issue_comments/edit.html.erb +5 -0
  272. data/examples/rails-5.1/app/views/issue_comments/index.html.erb +9 -0
  273. data/{example → examples/rails-5.1}/app/views/issue_comments/index.json.jbuilder +0 -0
  274. data/examples/rails-5.1/app/views/issue_comments/new.html.erb +5 -0
  275. data/examples/rails-5.1/app/views/issue_comments/show.html.erb +29 -0
  276. data/examples/rails-5.1/app/views/issue_comments/show.json.jbuilder +1 -0
  277. data/examples/rails-5.1/app/views/issues/_form.html.erb +62 -0
  278. data/examples/rails-5.1/app/views/issues/_issue.json.jbuilder +2 -0
  279. data/examples/rails-5.1/app/views/issues/_table.html.erb +35 -0
  280. data/examples/rails-5.1/app/views/issues/edit.html.erb +5 -0
  281. data/examples/rails-5.1/app/views/issues/index.html.erb +9 -0
  282. data/examples/rails-5.1/app/views/issues/index.json.jbuilder +1 -0
  283. data/examples/rails-5.1/app/views/issues/new.html.erb +5 -0
  284. data/examples/rails-5.1/app/views/issues/show.html.erb +31 -0
  285. data/examples/rails-5.1/app/views/issues/show.json.jbuilder +1 -0
  286. data/examples/rails-5.1/app/views/kaminari/_first_page.html.erb +3 -0
  287. data/examples/rails-5.1/app/views/kaminari/_gap.html.erb +3 -0
  288. data/examples/rails-5.1/app/views/kaminari/_last_page.html.erb +3 -0
  289. data/examples/rails-5.1/app/views/kaminari/_next_page.html.erb +3 -0
  290. data/examples/rails-5.1/app/views/kaminari/_page.html.erb +9 -0
  291. data/examples/rails-5.1/app/views/kaminari/_paginator.html.erb +15 -0
  292. data/examples/rails-5.1/app/views/kaminari/_prev_page.html.erb +3 -0
  293. data/examples/rails-5.1/app/views/layouts/application.html.erb +65 -0
  294. data/examples/rails-5.1/app/views/layouts/mailer.html.erb +13 -0
  295. data/examples/rails-5.1/app/views/layouts/mailer.text.erb +1 -0
  296. data/examples/rails-5.1/app/views/phases/_form.html.erb +55 -0
  297. data/examples/rails-5.1/app/views/phases/_phase.json.jbuilder +2 -0
  298. data/examples/rails-5.1/app/views/phases/_table.html.erb +31 -0
  299. data/examples/rails-5.1/app/views/phases/edit.html.erb +5 -0
  300. data/examples/rails-5.1/app/views/phases/index.html.erb +9 -0
  301. data/examples/rails-5.1/app/views/phases/index.json.jbuilder +1 -0
  302. data/examples/rails-5.1/app/views/phases/new.html.erb +5 -0
  303. data/examples/rails-5.1/app/views/phases/show.html.erb +25 -0
  304. data/examples/rails-5.1/app/views/phases/show.json.jbuilder +1 -0
  305. data/examples/rails-5.1/app/views/project_assignments/_form.html.erb +62 -0
  306. data/examples/rails-5.1/app/views/project_assignments/_project_assignment.json.jbuilder +2 -0
  307. data/examples/rails-5.1/app/views/project_assignments/_table.html.erb +35 -0
  308. data/examples/rails-5.1/app/views/project_assignments/edit.html.erb +5 -0
  309. data/examples/rails-5.1/app/views/project_assignments/index.html.erb +9 -0
  310. data/examples/rails-5.1/app/views/project_assignments/index.json.jbuilder +1 -0
  311. data/examples/rails-5.1/app/views/project_assignments/new.html.erb +5 -0
  312. data/examples/rails-5.1/app/views/project_assignments/show.html.erb +29 -0
  313. data/examples/rails-5.1/app/views/project_assignments/show.json.jbuilder +1 -0
  314. data/examples/rails-5.1/app/views/projects/_form.html.erb +48 -0
  315. data/examples/rails-5.1/app/views/projects/_project.json.jbuilder +2 -0
  316. data/examples/rails-5.1/app/views/projects/_table.html.erb +29 -0
  317. data/examples/rails-5.1/app/views/projects/edit.html.erb +5 -0
  318. data/examples/rails-5.1/app/views/projects/index.html.erb +9 -0
  319. data/examples/rails-5.1/app/views/projects/index.json.jbuilder +1 -0
  320. data/examples/rails-5.1/app/views/projects/new.html.erb +5 -0
  321. data/examples/rails-5.1/app/views/projects/show.html.erb +23 -0
  322. data/examples/rails-5.1/app/views/projects/show.json.jbuilder +1 -0
  323. data/examples/rails-5.1/bin/bundle +3 -0
  324. data/examples/rails-5.1/bin/rails +9 -0
  325. data/examples/rails-5.1/bin/rake +9 -0
  326. data/examples/rails-5.1/bin/setup +38 -0
  327. data/examples/rails-5.1/bin/spring +17 -0
  328. data/examples/rails-5.1/bin/update +29 -0
  329. data/examples/rails-5.1/bin/yarn +11 -0
  330. data/examples/rails-5.1/config.ru +5 -0
  331. data/examples/rails-5.1/config/application.rb +31 -0
  332. data/examples/rails-5.1/config/boot.rb +3 -0
  333. data/examples/rails-5.1/config/cable.yml +10 -0
  334. data/examples/rails-5.1/config/database.yml +25 -0
  335. data/examples/rails-5.1/config/environment.rb +5 -0
  336. data/examples/rails-5.1/config/environments/development.rb +79 -0
  337. data/examples/rails-5.1/config/environments/production.rb +91 -0
  338. data/examples/rails-5.1/config/environments/test.rb +42 -0
  339. data/examples/rails-5.1/config/initializers/application_controller_renderer.rb +8 -0
  340. data/examples/rails-5.1/config/initializers/assets.rb +14 -0
  341. data/examples/rails-5.1/config/initializers/backtrace_silencers.rb +7 -0
  342. data/examples/rails-5.1/config/initializers/cookies_serializer.rb +5 -0
  343. data/examples/rails-5.1/config/initializers/devise.rb +279 -0
  344. data/examples/rails-5.1/config/initializers/filter_parameter_logging.rb +4 -0
  345. data/examples/rails-5.1/config/initializers/inflections.rb +16 -0
  346. data/examples/rails-5.1/config/initializers/mime_types.rb +4 -0
  347. data/examples/rails-5.1/config/initializers/wrap_parameters.rb +14 -0
  348. data/examples/rails-5.1/config/locales/devise.en.yml +64 -0
  349. data/examples/rails-5.1/config/locales/en.bootstrap.yml +23 -0
  350. data/examples/rails-5.1/config/locales/en.yml +33 -0
  351. data/examples/rails-5.1/config/locales/ja.devise.yml +60 -0
  352. data/examples/rails-5.1/config/locales/ja.yml +205 -0
  353. data/examples/rails-5.1/config/puma.rb +56 -0
  354. data/examples/rails-5.1/config/routes.rb +10 -0
  355. data/examples/rails-5.1/config/secrets.yml +32 -0
  356. data/examples/rails-5.1/config/spring.rb +6 -0
  357. data/examples/rails-5.1/db/schema.rb +1 -0
  358. data/examples/rails-5.1/lib/assets/.keep +0 -0
  359. data/examples/rails-5.1/lib/tasks/.keep +0 -0
  360. data/examples/rails-5.1/log/.keep +0 -0
  361. data/examples/rails-5.1/package.json +5 -0
  362. data/examples/rails-5.1/public/404.html +67 -0
  363. data/examples/rails-5.1/public/422.html +67 -0
  364. data/examples/rails-5.1/public/500.html +66 -0
  365. data/examples/rails-5.1/public/apple-touch-icon-precomposed.png +0 -0
  366. data/examples/rails-5.1/public/apple-touch-icon.png +0 -0
  367. data/examples/rails-5.1/public/favicon.ico +0 -0
  368. data/examples/rails-5.1/public/robots.txt +1 -0
  369. data/examples/rails-5.1/spec/controllers/attached_files_controller_spec.rb +181 -0
  370. data/examples/rails-5.1/spec/controllers/issue_comments_controller_spec.rb +179 -0
  371. data/examples/rails-5.1/spec/controllers/issues_controller_spec.rb +181 -0
  372. data/examples/rails-5.1/spec/controllers/phases_controller_spec.rb +183 -0
  373. data/examples/rails-5.1/spec/controllers/project_assignments_controller_spec.rb +178 -0
  374. data/examples/rails-5.1/spec/controllers/projects_controller_spec.rb +180 -0
  375. data/examples/rails-5.1/spec/factories +1 -0
  376. data/examples/rails-5.1/spec/helpers/attached_files_helper_spec.rb +15 -0
  377. data/examples/rails-5.1/spec/helpers/issue_comments_helper_spec.rb +15 -0
  378. data/examples/rails-5.1/spec/helpers/issues_helper_spec.rb +15 -0
  379. data/examples/rails-5.1/spec/helpers/phases_helper_spec.rb +15 -0
  380. data/examples/rails-5.1/spec/helpers/project_assignments_helper_spec.rb +15 -0
  381. data/examples/rails-5.1/spec/helpers/projects_helper_spec.rb +15 -0
  382. data/examples/rails-5.1/spec/models/user_spec.rb +5 -0
  383. data/examples/rails-5.1/spec/rails_helper.rb +69 -0
  384. data/examples/rails-5.1/spec/requests/attached_files_spec.rb +14 -0
  385. data/examples/rails-5.1/spec/requests/issue_comments_spec.rb +14 -0
  386. data/examples/rails-5.1/spec/requests/issues_spec.rb +14 -0
  387. data/examples/rails-5.1/spec/requests/phases_spec.rb +14 -0
  388. data/examples/rails-5.1/spec/requests/project_assignments_spec.rb +14 -0
  389. data/examples/rails-5.1/spec/requests/projects_spec.rb +14 -0
  390. data/examples/rails-5.1/spec/routing/attached_files_routing_spec.rb +38 -0
  391. data/examples/rails-5.1/spec/routing/issue_comments_routing_spec.rb +38 -0
  392. data/examples/rails-5.1/spec/routing/issues_routing_spec.rb +38 -0
  393. data/examples/rails-5.1/spec/routing/phases_routing_spec.rb +38 -0
  394. data/examples/rails-5.1/spec/routing/project_assignments_routing_spec.rb +38 -0
  395. data/examples/rails-5.1/spec/routing/projects_routing_spec.rb +38 -0
  396. data/examples/rails-5.1/spec/spec_helper.rb +96 -0
  397. data/examples/rails-5.1/spec/support/controller_macros.rb +19 -0
  398. data/examples/rails-5.1/spec/support/devise.rb +19 -0
  399. data/examples/rails-5.1/spec/support/field_assertions.rb +6 -0
  400. data/examples/rails-5.1/spec/support/time_match_support.rb +10 -0
  401. data/examples/rails-5.1/spec/views/attached_files/edit.html.erb_spec.rb +23 -0
  402. data/examples/rails-5.1/spec/views/attached_files/index.html.erb_spec.rb +22 -0
  403. data/examples/rails-5.1/spec/views/attached_files/new.html.erb_spec.rb +23 -0
  404. data/examples/rails-5.1/spec/views/attached_files/show.html.erb_spec.rb +19 -0
  405. data/examples/rails-5.1/spec/views/issue_comments/edit.html.erb_spec.rb +23 -0
  406. data/examples/rails-5.1/spec/views/issue_comments/index.html.erb_spec.rb +22 -0
  407. data/examples/rails-5.1/spec/views/issue_comments/new.html.erb_spec.rb +23 -0
  408. data/examples/rails-5.1/spec/views/issue_comments/show.html.erb_spec.rb +19 -0
  409. data/examples/rails-5.1/spec/views/issues/edit.html.erb_spec.rb +23 -0
  410. data/examples/rails-5.1/spec/views/issues/index.html.erb_spec.rb +23 -0
  411. data/examples/rails-5.1/spec/views/issues/new.html.erb_spec.rb +23 -0
  412. data/examples/rails-5.1/spec/views/issues/show.html.erb_spec.rb +20 -0
  413. data/examples/rails-5.1/spec/views/phases/edit.html.erb_spec.rb +22 -0
  414. data/examples/rails-5.1/spec/views/phases/index.html.erb_spec.rb +22 -0
  415. data/examples/rails-5.1/spec/views/phases/new.html.erb_spec.rb +22 -0
  416. data/examples/rails-5.1/spec/views/phases/show.html.erb_spec.rb +19 -0
  417. data/examples/rails-5.1/spec/views/project_assignments/edit.html.erb_spec.rb +23 -0
  418. data/examples/rails-5.1/spec/views/project_assignments/index.html.erb_spec.rb +21 -0
  419. data/examples/rails-5.1/spec/views/project_assignments/new.html.erb_spec.rb +23 -0
  420. data/examples/rails-5.1/spec/views/project_assignments/show.html.erb_spec.rb +19 -0
  421. data/examples/rails-5.1/spec/views/projects/edit.html.erb_spec.rb +20 -0
  422. data/examples/rails-5.1/spec/views/projects/index.html.erb_spec.rb +20 -0
  423. data/examples/rails-5.1/spec/views/projects/new.html.erb_spec.rb +20 -0
  424. data/examples/rails-5.1/spec/views/projects/show.html.erb_spec.rb +17 -0
  425. data/examples/rails-5.1/test/application_system_test_case.rb +5 -0
  426. data/examples/rails-5.1/test/controllers/.keep +0 -0
  427. data/examples/rails-5.1/test/fixtures/.keep +0 -0
  428. data/examples/rails-5.1/test/fixtures/files/.keep +0 -0
  429. data/examples/rails-5.1/test/helpers/.keep +0 -0
  430. data/examples/rails-5.1/test/integration/.keep +0 -0
  431. data/examples/rails-5.1/test/mailers/.keep +0 -0
  432. data/examples/rails-5.1/test/models/.keep +0 -0
  433. data/examples/rails-5.1/test/system/.keep +0 -0
  434. data/examples/rails-5.1/test/test_helper.rb +9 -0
  435. data/examples/rails-5.1/tmp/.keep +0 -0
  436. data/examples/rails-5.1/vendor/.keep +0 -0
  437. data/lib/generators/model_base/templates/spec/factories/users.rb +1 -1
  438. data/lib/generators/model_base/templates/spec/support/controller_macros.rb +2 -2
  439. data/lib/model_base/generators.rb +4 -4
  440. data/lib/model_base/generators/{factory_girl → factory_bot}/model.rb +8 -8
  441. data/lib/model_base/meta_model.rb +12 -12
  442. data/lib/model_base/version.rb +1 -1
  443. data/lib/templates/{factory_girl → factory_bot}/factory.rb +2 -2
  444. data/lib/templates/rspec/integration/request_spec.rb +1 -1
  445. data/lib/templates/rspec/scaffold/controller_spec.rb +3 -3
  446. data/lib/templates/rspec/scaffold/edit_spec.rb +2 -2
  447. data/lib/templates/rspec/scaffold/index_spec.rb +3 -3
  448. data/lib/templates/rspec/scaffold/new_spec.rb +2 -2
  449. data/lib/templates/rspec/scaffold/show_spec.rb +2 -2
  450. data/model_base_generators.gemspec +1 -0
  451. data/rails_template.rb +26 -10
  452. metadata +435 -206
  453. data/example/app/views/issue_comments/show.json.jbuilder +0 -1
  454. data/example/spec/views/attached_files/index.html.erb_spec.rb +0 -22
  455. data/example/spec/views/attached_files/show.html.erb_spec.rb +0 -19
@@ -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,79 @@
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
+ # for devise
32
+ config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
33
+
34
+
35
+ config.action_mailer.perform_caching = false
36
+
37
+ # Print deprecation notices to the Rails logger.
38
+ config.active_support.deprecation = :log
39
+
40
+ # Raise an error on page load if there are pending migrations.
41
+ config.active_record.migration_error = :page_load
42
+
43
+ # Debug mode disables concatenation and preprocessing of assets.
44
+ # This option may cause significant delays in view rendering with a large
45
+ # number of complex assets.
46
+ config.assets.debug = true
47
+
48
+ # Suppress logger output for asset requests.
49
+ config.assets.quiet = true
50
+
51
+ # Raises error for missing translations
52
+ # config.action_view.raise_on_missing_translations = true
53
+ config.after_initialize do
54
+ Bullet.enable = true
55
+ Bullet.alert = false
56
+ Bullet.bullet_logger = true
57
+ Bullet.console = true
58
+ # Bullet.growl = true
59
+ # Bullet.xmpp = { :account => 'bullets_account@jabber.org',
60
+ # :password => 'bullets_password_for_jabber',
61
+ # :receiver => 'your_account@jabber.org',
62
+ # :show_online_status => true }
63
+ Bullet.rails_logger = true
64
+ # Bullet.honeybadger = true
65
+ # Bullet.bugsnag = true
66
+ # Bullet.airbrake = true
67
+ # Bullet.rollbar = true
68
+ # Bullet.add_footer = true
69
+ # Bullet.stacktrace_includes = [ 'your_gem', 'your_middleware' ]
70
+ # Bullet.stacktrace_excludes = [ 'their_gem', 'their_middleware' ]
71
+ # Bullet.slack = { webhook_url: 'http://some.slack.url', foo: 'bar' }
72
+ end
73
+
74
+
75
+
76
+ # Use an evented file watcher to asynchronously detect changes in source code,
77
+ # routes, locales, etc. This feature depends on the listen gem.
78
+ config.file_watcher = ActiveSupport::EventedFileUpdateChecker
79
+ 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,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # ActiveSupport::Reloader.to_prepare do
4
+ # ApplicationController.renderer.defaults.merge!(
5
+ # http_host: 'example.org',
6
+ # https: false
7
+ # )
8
+ # end
@@ -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,279 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Use this hook to configure devise mailer, warden hooks and so forth.
4
+ # Many of these configuration options can be set straight in your model.
5
+ Devise.setup do |config|
6
+ # The secret key used by Devise. Devise uses this key to generate
7
+ # random tokens. Changing this key will render invalid all existing
8
+ # confirmation, reset password and unlock tokens in the database.
9
+ # Devise will use the `secret_key_base` as its `secret_key`
10
+ # by default. You can change it below and use your own secret key.
11
+ # config.secret_key = 'd3a2f8f12c036f5bcd9645c3721efa9d33754d528cd08729155e2df9cc375b9dc761ddd1090f1fc5e29f790168e398fc6a4957a973ec0907a7fb797d69d95c1c'
12
+
13
+ # ==> Mailer Configuration
14
+ # Configure the e-mail address which will be shown in Devise::Mailer,
15
+ # note that it will be overwritten if you use your own mailer class
16
+ # with default "from" parameter.
17
+ config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
18
+
19
+ # Configure the class responsible to send e-mails.
20
+ # config.mailer = 'Devise::Mailer'
21
+
22
+ # Configure the parent class responsible to send e-mails.
23
+ # config.parent_mailer = 'ActionMailer::Base'
24
+
25
+ # ==> ORM configuration
26
+ # Load and configure the ORM. Supports :active_record (default) and
27
+ # :mongoid (bson_ext recommended) by default. Other ORMs may be
28
+ # available as additional gems.
29
+ require 'devise/orm/active_record'
30
+
31
+ # ==> Configuration for any authentication mechanism
32
+ # Configure which keys are used when authenticating a user. The default is
33
+ # just :email. You can configure it to use [:username, :subdomain], so for
34
+ # authenticating a user, both parameters are required. Remember that those
35
+ # parameters are used only when authenticating and not when retrieving from
36
+ # session. If you need permissions, you should implement that in a before filter.
37
+ # You can also supply a hash where the value is a boolean determining whether
38
+ # or not authentication should be aborted when the value is not present.
39
+ # config.authentication_keys = [:email]
40
+
41
+ # Configure parameters from the request object used for authentication. Each entry
42
+ # given should be a request method and it will automatically be passed to the
43
+ # find_for_authentication method and considered in your model lookup. For instance,
44
+ # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
45
+ # The same considerations mentioned for authentication_keys also apply to request_keys.
46
+ # config.request_keys = []
47
+
48
+ # Configure which authentication keys should be case-insensitive.
49
+ # These keys will be downcased upon creating or modifying a user and when used
50
+ # to authenticate or find a user. Default is :email.
51
+ config.case_insensitive_keys = [:email]
52
+
53
+ # Configure which authentication keys should have whitespace stripped.
54
+ # These keys will have whitespace before and after removed upon creating or
55
+ # modifying a user and when used to authenticate or find a user. Default is :email.
56
+ config.strip_whitespace_keys = [:email]
57
+
58
+ # Tell if authentication through request.params is enabled. True by default.
59
+ # It can be set to an array that will enable params authentication only for the
60
+ # given strategies, for example, `config.params_authenticatable = [:database]` will
61
+ # enable it only for database (email + password) authentication.
62
+ # config.params_authenticatable = true
63
+
64
+ # Tell if authentication through HTTP Auth is enabled. False by default.
65
+ # It can be set to an array that will enable http authentication only for the
66
+ # given strategies, for example, `config.http_authenticatable = [:database]` will
67
+ # enable it only for database authentication. The supported strategies are:
68
+ # :database = Support basic authentication with authentication key + password
69
+ # config.http_authenticatable = false
70
+
71
+ # If 401 status code should be returned for AJAX requests. True by default.
72
+ # config.http_authenticatable_on_xhr = true
73
+
74
+ # The realm used in Http Basic Authentication. 'Application' by default.
75
+ # config.http_authentication_realm = 'Application'
76
+
77
+ # It will change confirmation, password recovery and other workflows
78
+ # to behave the same regardless if the e-mail provided was right or wrong.
79
+ # Does not affect registerable.
80
+ # config.paranoid = true
81
+
82
+ # By default Devise will store the user in session. You can skip storage for
83
+ # particular strategies by setting this option.
84
+ # Notice that if you are skipping storage for all authentication paths, you
85
+ # may want to disable generating routes to Devise's sessions controller by
86
+ # passing skip: :sessions to `devise_for` in your config/routes.rb
87
+ config.skip_session_storage = [:http_auth]
88
+
89
+ # By default, Devise cleans up the CSRF token on authentication to
90
+ # avoid CSRF token fixation attacks. This means that, when using AJAX
91
+ # requests for sign in and sign up, you need to get a new CSRF token
92
+ # from the server. You can disable this option at your own risk.
93
+ # config.clean_up_csrf_token_on_authentication = true
94
+
95
+ # When false, Devise will not attempt to reload routes on eager load.
96
+ # This can reduce the time taken to boot the app but if your application
97
+ # requires the Devise mappings to be loaded during boot time the application
98
+ # won't boot properly.
99
+ # config.reload_routes = true
100
+
101
+ # ==> Configuration for :database_authenticatable
102
+ # For bcrypt, this is the cost for hashing the password and defaults to 11. If
103
+ # using other algorithms, it sets how many times you want the password to be hashed.
104
+ #
105
+ # Limiting the stretches to just one in testing will increase the performance of
106
+ # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
107
+ # a value less than 10 in other environments. Note that, for bcrypt (the default
108
+ # algorithm), the cost increases exponentially with the number of stretches (e.g.
109
+ # a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
110
+ config.stretches = Rails.env.test? ? 1 : 11
111
+
112
+ # Set up a pepper to generate the hashed password.
113
+ # config.pepper = '388f66fa9ae396b23728c1393facbc53bcf4fddada68ab195067dcdea6bb0e93039ddbc14055f6c9ac91b4c14983daf67cd5f38b638ac619bfb79d511c920a68'
114
+
115
+ # Send a notification to the original email when the user's email is changed.
116
+ # config.send_email_changed_notification = false
117
+
118
+ # Send a notification email when the user's password is changed.
119
+ # config.send_password_change_notification = false
120
+
121
+ # ==> Configuration for :confirmable
122
+ # A period that the user is allowed to access the website even without
123
+ # confirming their account. For instance, if set to 2.days, the user will be
124
+ # able to access the website for two days without confirming their account,
125
+ # access will be blocked just in the third day. Default is 0.days, meaning
126
+ # the user cannot access the website without confirming their account.
127
+ # config.allow_unconfirmed_access_for = 2.days
128
+
129
+ # A period that the user is allowed to confirm their account before their
130
+ # token becomes invalid. For example, if set to 3.days, the user can confirm
131
+ # their account within 3 days after the mail was sent, but on the fourth day
132
+ # their account can't be confirmed with the token any more.
133
+ # Default is nil, meaning there is no restriction on how long a user can take
134
+ # before confirming their account.
135
+ # config.confirm_within = 3.days
136
+
137
+ # If true, requires any email changes to be confirmed (exactly the same way as
138
+ # initial account confirmation) to be applied. Requires additional unconfirmed_email
139
+ # db field (see migrations). Until confirmed, new email is stored in
140
+ # unconfirmed_email column, and copied to email column on successful confirmation.
141
+ config.reconfirmable = true
142
+
143
+ # Defines which key will be used when confirming an account
144
+ # config.confirmation_keys = [:email]
145
+
146
+ # ==> Configuration for :rememberable
147
+ # The time the user will be remembered without asking for credentials again.
148
+ # config.remember_for = 2.weeks
149
+
150
+ # Invalidates all the remember me tokens when the user signs out.
151
+ config.expire_all_remember_me_on_sign_out = true
152
+
153
+ # If true, extends the user's remember period when remembered via cookie.
154
+ # config.extend_remember_period = false
155
+
156
+ # Options to be passed to the created cookie. For instance, you can set
157
+ # secure: true in order to force SSL only cookies.
158
+ # config.rememberable_options = {}
159
+
160
+ # ==> Configuration for :validatable
161
+ # Range for password length.
162
+ config.password_length = 6..128
163
+
164
+ # Email regex used to validate email formats. It simply asserts that
165
+ # one (and only one) @ exists in the given string. This is mainly
166
+ # to give user feedback and not to assert the e-mail validity.
167
+ config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
168
+
169
+ # ==> Configuration for :timeoutable
170
+ # The time you want to timeout the user session without activity. After this
171
+ # time the user will be asked for credentials again. Default is 30 minutes.
172
+ # config.timeout_in = 30.minutes
173
+
174
+ # ==> Configuration for :lockable
175
+ # Defines which strategy will be used to lock an account.
176
+ # :failed_attempts = Locks an account after a number of failed attempts to sign in.
177
+ # :none = No lock strategy. You should handle locking by yourself.
178
+ # config.lock_strategy = :failed_attempts
179
+
180
+ # Defines which key will be used when locking and unlocking an account
181
+ # config.unlock_keys = [:email]
182
+
183
+ # Defines which strategy will be used to unlock an account.
184
+ # :email = Sends an unlock link to the user email
185
+ # :time = Re-enables login after a certain amount of time (see :unlock_in below)
186
+ # :both = Enables both strategies
187
+ # :none = No unlock strategy. You should handle unlocking by yourself.
188
+ # config.unlock_strategy = :both
189
+
190
+ # Number of authentication tries before locking an account if lock_strategy
191
+ # is failed attempts.
192
+ # config.maximum_attempts = 20
193
+
194
+ # Time interval to unlock the account if :time is enabled as unlock_strategy.
195
+ # config.unlock_in = 1.hour
196
+
197
+ # Warn on the last attempt before the account is locked.
198
+ # config.last_attempt_warning = true
199
+
200
+ # ==> Configuration for :recoverable
201
+ #
202
+ # Defines which key will be used when recovering the password for an account
203
+ # config.reset_password_keys = [:email]
204
+
205
+ # Time interval you can reset your password with a reset password key.
206
+ # Don't put a too small interval or your users won't have the time to
207
+ # change their passwords.
208
+ config.reset_password_within = 6.hours
209
+
210
+ # When set to false, does not sign a user in automatically after their password is
211
+ # reset. Defaults to true, so a user is signed in automatically after a reset.
212
+ # config.sign_in_after_reset_password = true
213
+
214
+ # ==> Configuration for :encryptable
215
+ # Allow you to use another hashing or encryption algorithm besides bcrypt (default).
216
+ # You can use :sha1, :sha512 or algorithms from others authentication tools as
217
+ # :clearance_sha1, :authlogic_sha512 (then you should set stretches above to 20
218
+ # for default behavior) and :restful_authentication_sha1 (then you should set
219
+ # stretches to 10, and copy REST_AUTH_SITE_KEY to pepper).
220
+ #
221
+ # Require the `devise-encryptable` gem when using anything other than bcrypt
222
+ # config.encryptor = :sha512
223
+
224
+ # ==> Scopes configuration
225
+ # Turn scoped views on. Before rendering "sessions/new", it will first check for
226
+ # "users/sessions/new". It's turned off by default because it's slower if you
227
+ # are using only default views.
228
+ # config.scoped_views = false
229
+
230
+ # Configure the default scope given to Warden. By default it's the first
231
+ # devise role declared in your routes (usually :user).
232
+ # config.default_scope = :user
233
+
234
+ # Set this configuration to false if you want /users/sign_out to sign out
235
+ # only the current scope. By default, Devise signs out all scopes.
236
+ # config.sign_out_all_scopes = true
237
+
238
+ # ==> Navigation configuration
239
+ # Lists the formats that should be treated as navigational. Formats like
240
+ # :html, should redirect to the sign in page when the user does not have
241
+ # access, but formats like :xml or :json, should return 401.
242
+ #
243
+ # If you have any extra navigational formats, like :iphone or :mobile, you
244
+ # should add them to the navigational formats lists.
245
+ #
246
+ # The "*/*" below is required to match Internet Explorer requests.
247
+ # config.navigational_formats = ['*/*', :html]
248
+
249
+ # The default HTTP method used to sign out a resource. Default is :delete.
250
+ config.sign_out_via = :delete
251
+
252
+ # ==> OmniAuth
253
+ # Add a new OmniAuth provider. Check the wiki for more information on setting
254
+ # up on your models and hooks.
255
+ # config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
256
+
257
+ # ==> Warden configuration
258
+ # If you want to use other strategies, that are not supported by Devise, or
259
+ # change the failure app, you can configure them inside the config.warden block.
260
+ #
261
+ # config.warden do |manager|
262
+ # manager.intercept_401 = false
263
+ # manager.default_strategies(scope: :user).unshift :some_external_strategy
264
+ # end
265
+
266
+ # ==> Mountable engine configurations
267
+ # When using Devise inside an engine, let's call it `MyEngine`, and this engine
268
+ # is mountable, there are some extra configurations to be taken into account.
269
+ # The following options are available, assuming the engine is mounted as:
270
+ #
271
+ # mount MyEngine, at: '/my_engine'
272
+ #
273
+ # The router that invoked `devise_for`, in the example above, would be:
274
+ # config.router_name = :my_engine
275
+ #
276
+ # When using OmniAuth, Devise cannot automatically set OmniAuth path,
277
+ # so you need to do it manually. For the users scope, it would be:
278
+ # config.omniauth_path_prefix = '/my_engine/users/auth'
279
+ end