jinda 0.6.2 → 0.6.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (220) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/assets/config/manifest.js +4 -0
  4. data/{lib/generators/jinda/templates/app → app}/assets/images/4dcity-old.ico +0 -0
  5. data/{lib/generators/jinda/templates/app → app}/assets/images/4dcity.ico +0 -0
  6. data/{lib/generators/jinda/templates/app → app}/assets/images/account.png +0 -0
  7. data/{lib/generators/jinda/templates/app → app}/assets/images/add.png +0 -0
  8. data/{lib/generators/jinda/templates/app → app}/assets/images/ajax-loader-circle.gif +0 -0
  9. data/{lib/generators/jinda/templates/app → app}/assets/images/ajax-loader.gif +0 -0
  10. data/{lib/generators/jinda/templates/app → app}/assets/images/anchor.png +0 -0
  11. data/{lib/generators/jinda/templates/app → app}/assets/images/application_double.png +0 -0
  12. data/{lib/generators/jinda/templates/app → app}/assets/images/application_form_edit.png +0 -0
  13. data/{lib/generators/jinda/templates/app → app}/assets/images/arrow_left.png +0 -0
  14. data/{lib/generators/jinda/templates/app → app}/assets/images/arrow_right.png +0 -0
  15. data/{lib/generators/jinda/templates/app → app}/assets/images/arrow_turn_left.png +0 -0
  16. data/{lib/generators/jinda/templates/app → app}/assets/images/arrow_turn_right.png +0 -0
  17. data/{lib/generators/jinda/templates/app → app}/assets/images/calendar.png +0 -0
  18. data/{lib/generators/jinda/templates/app → app}/assets/images/cancel.png +0 -0
  19. data/{lib/generators/jinda/templates/app → app}/assets/images/chart_bar.png +0 -0
  20. data/{lib/generators/jinda/templates/app → app}/assets/images/clock.png +0 -0
  21. data/{lib/generators/jinda/templates/app → app}/assets/images/cog.png +0 -0
  22. data/{lib/generators/jinda/templates/app → app}/assets/images/control_fastforward.png +0 -0
  23. data/{lib/generators/jinda/templates/app → app}/assets/images/control_play.png +0 -0
  24. data/{lib/generators/jinda/templates/app → app}/assets/images/cross.png +0 -0
  25. data/{lib/generators/jinda/templates/app → app}/assets/images/delete.png +0 -0
  26. data/{lib/generators/jinda/templates/app → app}/assets/images/external-link.png +0 -0
  27. data/{lib/generators/jinda/templates/app → app}/assets/images/facebook-continue-button.png +0 -0
  28. data/{lib/generators/jinda/templates/app → app}/assets/images/facebooksmall.png +0 -0
  29. data/{lib/generators/jinda/templates/app → app}/assets/images/favicon.ico +0 -0
  30. data/{lib/generators/jinda/templates/app → app}/assets/images/freemind(mm).png +0 -0
  31. data/{lib/generators/jinda/templates/app → app}/assets/images/google-continue-button.png +0 -0
  32. data/{lib/generators/jinda/templates/app → app}/assets/images/help.png +0 -0
  33. data/{lib/generators/jinda/templates/app → app}/assets/images/highway-menu.png +0 -0
  34. data/{lib/generators/jinda/templates/app → app}/assets/images/highway.png +0 -0
  35. data/{lib/generators/jinda/templates/app → app}/assets/images/house.png +0 -0
  36. data/{lib/generators/jinda/templates/app → app}/assets/images/icons-18-black.png +0 -0
  37. data/{lib/generators/jinda/templates/app → app}/assets/images/icons-18-white.png +0 -0
  38. data/{lib/generators/jinda/templates/app → app}/assets/images/icons-36-black.png +0 -0
  39. data/{lib/generators/jinda/templates/app → app}/assets/images/icons-36-white.png +0 -0
  40. data/{lib/generators/jinda/templates/app → app}/assets/images/logo.png +0 -0
  41. data/{lib/generators/jinda/templates/app → app}/assets/images/logo_jinda.png +0 -0
  42. data/{lib/generators/jinda/templates/app → app}/assets/images/logout.png +0 -0
  43. data/{lib/generators/jinda/templates/app → app}/assets/images/new.gif +0 -0
  44. data/{lib/generators/jinda/templates/app → app}/assets/images/new.png +0 -0
  45. data/{lib/generators/jinda/templates/app → app}/assets/images/page.png +0 -0
  46. data/{lib/generators/jinda/templates/app → app}/assets/images/page_attach.png +0 -0
  47. data/{lib/generators/jinda/templates/app → app}/assets/images/page_green.png +0 -0
  48. data/{lib/generators/jinda/templates/app → app}/assets/images/page_output.png +0 -0
  49. data/{lib/generators/jinda/templates/app → app}/assets/images/page_pdf.png +0 -0
  50. data/{lib/generators/jinda/templates/app → app}/assets/images/pencil.png +0 -0
  51. data/{lib/generators/jinda/templates/app → app}/assets/images/printer.png +0 -0
  52. data/{lib/generators/jinda/templates/app → app}/assets/images/refresh.png +0 -0
  53. data/{lib/generators/jinda/templates/app → app}/assets/images/report.png +0 -0
  54. data/{lib/generators/jinda/templates/app → app}/assets/images/rssmall.png +0 -0
  55. data/{lib/generators/jinda/templates/app → app}/assets/images/tick.png +0 -0
  56. data/{lib/generators/jinda/templates/app → app}/assets/images/twittersmall.png +0 -0
  57. data/{lib/generators/jinda/templates/app → app}/assets/images/user.png +0 -0
  58. data/{lib/generators/jinda/templates/app → app}/assets/images/user_admin_gear.png +0 -0
  59. data/{lib/generators/jinda/templates/app → app}/assets/images/view_code.png +0 -0
  60. data/{lib/generators/jinda/templates/app/assets/javascripts/application.js-jqm → app/assets/javascripts/application.js-org} +8 -11
  61. data/{lib/generators/jinda/templates/app → app}/assets/javascripts/cable.js +0 -0
  62. data/{lib/generators/jinda/templates/app → app}/assets/javascripts/disable_enter_key.js +0 -0
  63. data/{lib/generators/jinda/templates/app → app}/assets/javascripts/iscroll-wrapper.js +0 -0
  64. data/{lib/generators/jinda/templates/app → app}/assets/javascripts/iscroll.js +0 -0
  65. data/{lib/generators/jinda/templates/app → app}/assets/javascripts/jinda.js +0 -0
  66. data/app/assets/javascripts/jinda_jqm.js +24 -0
  67. data/{lib/generators/jinda/templates/app → app}/assets/javascripts/jquery.mobile-1.2.1.js +0 -0
  68. data/{lib/generators/jinda/templates/app → app}/assets/javascripts/jquery.mobile.datebox.js +0 -0
  69. data/{lib/generators/jinda/templates/app → app}/assets/javascripts/jquery.mobile.splitview.js +0 -0
  70. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/app.scss +0 -0
  71. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/articles.scss +0 -0
  72. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/sarabun.eot +0 -0
  73. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/sarabun.ttf +0 -0
  74. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/sarabun.woff +0 -0
  75. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/sarabun_bold.ttf +0 -0
  76. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/sarabun_bolditalic.ttf +0 -0
  77. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/sarabun_italic.ttf +0 -0
  78. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/thsarabunnew-webfont.eot +0 -0
  79. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/thsarabunnew-webfont.ttf +0 -0
  80. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/thsarabunnew-webfont.woff +0 -0
  81. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/thsarabunnew.css +0 -0
  82. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/thsarabunnew_bold-webfont.eot +0 -0
  83. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/thsarabunnew_bold-webfont.ttf +0 -0
  84. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/thsarabunnew_bold-webfont.woff +0 -0
  85. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/thsarabunnew_bolditalic-webfont.eot +0 -0
  86. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/thsarabunnew_bolditalic-webfont.ttf +0 -0
  87. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/thsarabunnew_bolditalic-webfont.woff +0 -0
  88. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/thsarabunnew_italic-webfont.eot +0 -0
  89. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/thsarabunnew_italic-webfont.ttf +0 -0
  90. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/fonts/thsarabunnew_italic-webfont.woff +0 -0
  91. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/images/ajax-loader.gif +0 -0
  92. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/images/button_black.png +0 -0
  93. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/images/button_blue.png +0 -0
  94. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/images/button_red.png +0 -0
  95. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/images/icons-18-black.png +0 -0
  96. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/images/icons-18-white.png +0 -0
  97. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/images/icons-36-black.png +0 -0
  98. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/images/icons-36-white.png +0 -0
  99. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/images/indicator.gif +0 -0
  100. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/jinda.css +0 -0
  101. data/app/assets/stylesheets/jinda_jqm.css.scss +32 -0
  102. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/jquery.mobile-1.2.1.css +0 -0
  103. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/jquery.mobile.datebox.css +0 -0
  104. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/jquery.mobile.grids.collapsible.css +0 -0
  105. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/jquery.mobile.splitview.css +0 -0
  106. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/kul-4.2.css +0 -0
  107. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/kul-4.2.min.css +0 -0
  108. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/modules.scss +0 -0
  109. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/sarabun.css +0 -0
  110. data/{lib/generators/jinda/templates/app → app}/assets/stylesheets/social.scss +0 -0
  111. data/{lib/generators/jinda/templates/app → app}/controllers/concerns/jinda_general_concern.rb +0 -0
  112. data/{lib/generators/jinda/templates/app → app}/controllers/concerns/jinda_run_concern.rb +0 -0
  113. data/{lib/generators/jinda/templates/app/controllers/jinda_org → app/controllers}/jinda_controller.rb +0 -0
  114. data/app/jinda/index.mm +369 -0
  115. data/app/jinda/template/index.mm +366 -0
  116. data/app/jinda/template/linkview.haml +21 -0
  117. data/app/jinda/template/view.html.erb +26 -0
  118. data/{lib/generators/jinda/templates/app → app}/views/jinda/_activity.md +0 -0
  119. data/{lib/generators/jinda/templates/app → app}/views/jinda/_menu.haml +0 -0
  120. data/{lib/generators/jinda/templates/app → app}/views/jinda/_menu_mm.haml +0 -0
  121. data/{lib/generators/jinda/templates/app → app}/views/jinda/_model.md +0 -0
  122. data/{lib/generators/jinda/templates/app → app}/views/jinda/_modul.md +0 -0
  123. data/{lib/generators/jinda/templates/app → app}/views/jinda/_pending_home.haml +0 -0
  124. data/{lib/generators/jinda/templates/app → app}/views/jinda/_pending_page.haml +0 -0
  125. data/{lib/generators/jinda/templates/app → app}/views/jinda/_service.md +0 -0
  126. data/{lib/generators/jinda/templates/app → app}/views/jinda/_static.haml +0 -0
  127. data/{lib/generators/jinda/templates/app → app}/views/jinda/doc-thai.md +0 -0
  128. data/{lib/generators/jinda/templates/app → app}/views/jinda/doc.md +0 -0
  129. data/{lib/generators/jinda/templates/app → app}/views/jinda/error_logs.haml +0 -0
  130. data/{lib/generators/jinda/templates/app → app}/views/jinda/feed.rss.builder +0 -0
  131. data/{lib/generators/jinda/templates/app → app}/views/jinda/help.haml +0 -0
  132. data/{lib/generators/jinda/templates/app → app}/views/jinda/index.html.haml +1 -1
  133. data/{lib/generators/jinda/templates/app → app}/views/jinda/logs.haml +0 -0
  134. data/{lib/generators/jinda/templates/app → app}/views/jinda/notice_logs.haml +0 -0
  135. data/{lib/generators/jinda/templates/app → app}/views/jinda/pending.haml +0 -0
  136. data/{lib/generators/jinda/templates/app → app}/views/jinda/run_form.haml +0 -0
  137. data/{lib/generators/jinda/templates/app → app}/views/jinda/run_output.haml +0 -0
  138. data/{lib/generators/jinda/templates/app → app}/views/jinda/search.haml +0 -0
  139. data/{lib/generators/jinda/templates/app → app}/views/jinda/status.haml +0 -0
  140. data/lib/generators/jinda/config_generator.rb +7 -0
  141. data/lib/generators/jinda/install_generator.rb +45 -42
  142. data/lib/generators/jinda/templates/Dockerfile +24 -0
  143. data/lib/generators/jinda/templates/app/assets/javascripts/application.js +1 -10
  144. data/lib/generators/jinda/templates/app/assets/stylesheets/application.css.scss +1 -20
  145. data/lib/generators/jinda/templates/config/mongoid.yml-docker +182 -0
  146. data/lib/generators/jinda/templates/config/mongoid.yml-localhost +182 -0
  147. data/lib/generators/jinda/templates/docker-compose.yml +16 -0
  148. data/lib/generators/jinda/templates/entrypoint.sh +12 -0
  149. data/lib/jinda.rb +2 -1
  150. data/lib/jinda/date_helpers.rb +109 -0
  151. data/lib/jinda/{gemhelpers.rb → gem_helpers.rb} +0 -1
  152. data/lib/jinda/gen_class.rb +13 -0
  153. data/lib/jinda/gen_controller.rb +10 -0
  154. data/lib/jinda/gen_freemind.rb +33 -0
  155. data/lib/jinda/gen_helpers.rb +141 -0
  156. data/lib/jinda/gen_models.rb +137 -0
  157. data/lib/jinda/gen_runseq.rb +71 -0
  158. data/lib/jinda/gen_services.rb +90 -0
  159. data/lib/jinda/gen_xmain.rb +38 -0
  160. data/lib/jinda/get_app.rb +34 -0
  161. data/lib/jinda/helpers.rb +17 -998
  162. data/lib/jinda/init_vars.rb +36 -0
  163. data/lib/jinda/rake_views.rb +59 -0
  164. data/lib/jinda/refresh.rb +67 -0
  165. data/lib/jinda/themes.rb +163 -0
  166. data/lib/jinda/version.rb +1 -1
  167. data/test/dummy/Rakefile +6 -0
  168. data/test/dummy/app/assets/config/manifest.js +3 -0
  169. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  170. data/test/dummy/app/channels/application_cable/channel.rb +4 -0
  171. data/test/dummy/app/channels/application_cable/connection.rb +4 -0
  172. data/test/dummy/app/controllers/application_controller.rb +2 -0
  173. data/test/dummy/app/helpers/application_helper.rb +2 -0
  174. data/test/dummy/app/javascript/packs/application.js +15 -0
  175. data/test/dummy/app/jobs/application_job.rb +7 -0
  176. data/test/dummy/app/mailers/application_mailer.rb +4 -0
  177. data/test/dummy/app/models/application_record.rb +3 -0
  178. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  179. data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
  180. data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
  181. data/test/dummy/bin/rails +4 -0
  182. data/test/dummy/bin/rake +4 -0
  183. data/test/dummy/bin/setup +33 -0
  184. data/test/dummy/config.ru +5 -0
  185. data/test/dummy/config/application.rb +19 -0
  186. data/test/dummy/config/boot.rb +5 -0
  187. data/test/dummy/config/cable.yml +10 -0
  188. data/test/dummy/config/database.yml +25 -0
  189. data/test/dummy/config/environment.rb +5 -0
  190. data/test/dummy/config/environments/development.rb +62 -0
  191. data/test/dummy/config/environments/production.rb +112 -0
  192. data/test/dummy/config/environments/test.rb +49 -0
  193. data/test/dummy/config/initializers/application_controller_renderer.rb +8 -0
  194. data/test/dummy/config/initializers/assets.rb +12 -0
  195. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  196. data/test/dummy/config/initializers/content_security_policy.rb +28 -0
  197. data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
  198. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  199. data/test/dummy/config/initializers/inflections.rb +16 -0
  200. data/test/dummy/config/initializers/mime_types.rb +4 -0
  201. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  202. data/test/dummy/config/locales/en.yml +33 -0
  203. data/test/dummy/config/puma.rb +38 -0
  204. data/test/dummy/config/routes.rb +3 -0
  205. data/test/dummy/config/spring.rb +6 -0
  206. data/test/dummy/config/storage.yml +34 -0
  207. data/test/dummy/db/development.sqlite3 +0 -0
  208. data/test/dummy/log/development.log +8 -0
  209. data/test/dummy/public/404.html +67 -0
  210. data/test/dummy/public/422.html +67 -0
  211. data/test/dummy/public/500.html +66 -0
  212. data/test/dummy/public/apple-touch-icon-precomposed.png +0 -0
  213. data/test/dummy/public/apple-touch-icon.png +0 -0
  214. data/test/dummy/public/favicon.ico +0 -0
  215. data/test/dummy/tmp/development_secret.txt +1 -0
  216. data/test/integration/navigation_test.rb +7 -0
  217. data/test/jinda_test.rb +7 -0
  218. data/test/test_helper.rb +19 -0
  219. metadata +232 -161
  220. data/lib/generators/jinda/templates/app/controllers/jinda_org/devs_controller.rb +0 -2
@@ -65,6 +65,13 @@ module Jinda
65
65
  end
66
66
  end
67
67
 
68
+ # desc "Setup Dockerfile"
69
+ # def setup_docker
70
+ # FileUtils.mv "Dockerfile", "Dockerfile"
71
+ # FileUtils.mv "docker-compose.yml", "docker-compose.yml"
72
+ # FileUtils.mv "entrypoint.sh", "entrypoint.sh"
73
+ # end
74
+
68
75
  def finish
69
76
  puts " configured omniauth.\n"
70
77
  puts " configured Mongoid.\n"
@@ -79,13 +79,14 @@ module Jinda
79
79
  # inside("app/assets/javascripts") {(File.file? "application.js") ? ( say "Please include application-org.js in application.js", :red) : (FileUtils.mv 'application-org.js', 'application.js')}
80
80
  # inside("app/assets/stylesheets") {(File.file? "application.css") ? ( say "Please include application-org.css in application.css", :red) : (FileUtils.mv 'application-org.css', 'application.css')}
81
81
  # inside("app/assets/stylesheets") {(File.file? "application.css.scss") ? ( say "Please include application-org.css.scss in application.css.scss", :red) : (FileUtils.mv 'application-org.css.scss', 'application.css.scss')}
82
- inside("app/controllers") {(File.file? "application_controller.rb") ? ( say "Pleas merge existing jinda_org/application_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/application_controller.rb', 'application_controller.rb')}
83
82
  inside("app/controllers") {(File.file? "admins_controller.rb") ? ( say "Please merge existing jinda_org/admins_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/admins_controller.rb', 'admins_controller.rb')}
84
83
  inside("app/controllers") {(File.file? "articles_controller.rb") ? ( say "Please merge existing jinda_org/articles_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/articles_controller.rb', 'articles_controller.rb')}
85
84
  inside("app/controllers") {(File.file? "comments_controller.rb") ? ( say "Please merge existing jinda_org/comments_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/comments_controller.rb', 'comments_controller.rb')}
86
85
  inside("app/controllers") {(File.file? "docs_controller.rb") ? ( say "Please merge existing jinda_org/docs_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/docs_controller.rb', 'docs_controller.rb')}
87
86
  inside("app/controllers") {(File.file? "identities_controller.rb") ? ( say "Please merge existing jinda_org/identities_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/identities_controller.rb', 'identities_controller.rb')}
88
- inside("app/controllers") {(File.file? "jinda_controller.rb") ? ( say "Please merge existing jinda_org/jinda_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/jinda_controller.rb', 'jinda_controller.rb')}
87
+ inside("app/controllers") {(File.file? "application_controller.rb") ? ( say "Pleas merge existing jinda_org/application_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/application_controller.rb', 'application_controller.rb')}
88
+ ## Moved to Engine
89
+ # inside("app/controllers") {(File.file? "jinda_controller.rb") ? ( say "Please merge existing jinda_org/jinda_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/jinda_controller.rb', 'jinda_controller.rb')}
89
90
  inside("app/controllers") {(File.file? "password_resets_controller.rb") ? ( say "Please merge existing jinda_org/password_resets_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/password_resets_controller.rb', 'password_resets_controller.rb')}
90
91
  inside("app/controllers") {(File.file? "password_resets.rb") ? ( say "Please merge existing jinda_org/password_resets.rb after this installation", :red) : (FileUtils.mv 'jinda_org/password_resets.rb', 'password_resets.rb')}
91
92
  inside("app/controllers") {(File.file? "sessions_controller.rb") ? ( say "Please merge existing jinda_org/sessions_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/sessions_controller.rb', 'sessions_controller.rb')}
@@ -94,49 +95,50 @@ module Jinda
94
95
  inside("app/controllers") {(File.file? "notes_controller.rb") ? ( say "Please merge existing jinda_org/notes_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/notes_controller.rb', 'notes_controller.rb')}
95
96
  end
96
97
  # routes created each line as reversed order in routes
98
+ # Moved routes to Engine
97
99
  def setup_routes
98
100
  # route "end"
99
- route " end"
100
- route " namespace :v1 do resources :notes, :only => [:index] end"
101
- route " namespace :api do"
102
- route "post '/api/v1/notes' => 'api/v1/notes#create', as: 'api_v1_notes'"
103
- route "get '/api/v1/notes/my' => 'api/v1/notes#my'"
104
- route "\# api"
101
+ # route " end"
102
+ # route " namespace :v1 do resources :notes, :only => [:index] end"
103
+ # route " namespace :api do"
104
+ # route "post '/api/v1/notes' => 'api/v1/notes#create', as: 'api_v1_notes'"
105
+ # route "get '/api/v1/notes/my' => 'api/v1/notes#my'"
106
+ # route "\# api"
105
107
  route "root :to => 'jinda#index'"
106
- route "resources :jinda, :only => [:index, :new]"
107
- route "resources :password_resets"
108
- route "resources :sessions"
109
- route "resources :identities"
110
- route "resources :users"
111
- route "resources :docs"
112
- route "resources :notes"
113
- route "resources :comments"
114
- route "resources :articles do resources :comments end"
115
- route "get '/jinda/document/:id' => 'jinda#document'"
116
- route "get '/notes/destroy/:id' => 'notes#destroy'"
117
- route "get '/notes/my/destroy/:id' => 'notes#destroy'"
118
- route "get '/docs/my/destroy' => 'docs#destroy'"
119
- route "get '/notes/my' => 'notes/my'"
120
- route "get '/docs/my' => 'docs/my'"
121
- route "get '/articles/edit' => 'articles/edit'"
122
- route "get '/articles/show' => 'articles/show'"
123
- route "get '/articles/my/destroy' => 'articles#destroy'"
124
- route "get '/articles/my' => 'articles#my'"
125
- route "get '/logout' => 'sessions#destroy', :as => 'logout'"
126
- route "get '/auth/failure' => 'sessions#destroy'"
127
- route "get '/auth/:provider/callback' => 'sessions#create'"
128
- route "post '/auth/:provider/callback' => 'sessions#create'"
129
- route "\# end jinda method routes"
130
- route "post '/jinda/end_output' => 'jinda#end_output'"
131
- route "post '/jinda/end_form' => 'jinda#end_form'"
132
- route "post '/jinda/pending' => 'jinda#index'"
133
- route "post '/jinda/init' => 'jinda#init'"
134
- route "jinda_methods.each do \|aktion\| get \"/jinda/\#\{aktion\}\" => \"jinda#\#\{aktion\}\" end"
135
- route "jinda_methods += ['error_logs', 'notice_logs', 'cancel', 'run_output', 'end_output']"
136
- route "jinda_methods += ['run_redirect', 'run_direct_to','run_if']"
137
- route "jinda_methods += ['init', 'run', 'run_mail', 'document', 'run_do', 'run_form', 'end_form']"
138
- route "jinda_methods = ['pending', 'status', 'search', 'doc', 'doc_print', 'logs', 'ajax_notice']"
139
- route "\# start jiinda method routes"
108
+ # route "resources :jinda, :only => [:index, :new]"
109
+ # route "resources :password_resets"
110
+ # route "resources :sessions"
111
+ # route "resources :identities"
112
+ # route "resources :users"
113
+ # route "resources :docs"
114
+ # route "resources :notes"
115
+ # route "resources :comments"
116
+ # route "resources :articles do resources :comments end"
117
+ # route "get '/jinda/document/:id' => 'jinda#document'"
118
+ # route "get '/notes/destroy/:id' => 'notes#destroy'"
119
+ # route "get '/notes/my/destroy/:id' => 'notes#destroy'"
120
+ # route "get '/docs/my/destroy' => 'docs#destroy'"
121
+ # route "get '/notes/my' => 'notes/my'"
122
+ # route "get '/docs/my' => 'docs/my'"
123
+ # route "get '/articles/edit' => 'articles/edit'"
124
+ # route "get '/articles/show' => 'articles/show'"
125
+ # route "get '/articles/my/destroy' => 'articles#destroy'"
126
+ # route "get '/articles/my' => 'articles#my'"
127
+ # route "get '/logout' => 'sessions#destroy', :as => 'logout'"
128
+ # route "get '/auth/failure' => 'sessions#destroy'"
129
+ # route "get '/auth/:provider/callback' => 'sessions#create'"
130
+ # route "post '/auth/:provider/callback' => 'sessions#create'"
131
+ # route "\# end jinda method routes"
132
+ # route "post '/jinda/end_output' => 'jinda#end_output'"
133
+ # route "post '/jinda/end_form' => 'jinda#end_form'"
134
+ # route "post '/jinda/pending' => 'jinda#index'"
135
+ # route "post '/jinda/init' => 'jinda#init'"
136
+ # route "jinda_methods.each do \|aktion\| get \"/jinda/\#\{aktion\}\" => \"jinda#\#\{aktion\}\" end"
137
+ # route "jinda_methods += ['error_logs', 'notice_logs', 'cancel', 'run_output', 'end_output']"
138
+ # route "jinda_methods += ['run_redirect', 'run_direct_to','run_if']"
139
+ # route "jinda_methods += ['init', 'run', 'run_mail', 'document', 'run_do', 'run_form', 'end_form']"
140
+ # route "jinda_methods = ['pending', 'status', 'search', 'doc', 'doc_print', 'logs', 'ajax_notice']"
141
+ # route "\# start jiinda method routes"
140
142
  end
141
143
 
142
144
  def setup_env
@@ -210,6 +212,7 @@ Mongoid::Config.belongs_to_required_by_default = false
210
212
  end
211
213
  inject_into_file 'config/environments/development.rb', :after => 'config.action_mailer.raise_delivery_errors = false' do
212
214
  "\n config.action_mailer.default_url_options = { :host => 'localhost:3000' }"
215
+ "\n config.assets.check_precompiled_asset = false"
213
216
  end
214
217
  inject_into_file 'config/environments/production.rb', :after => 'config.assets.compile = false' do
215
218
  "\n config.assets.compile = true"
@@ -0,0 +1,24 @@
1
+ # https://docs.docker.com/compose/rails/
2
+ FROM ruby:2.6.3
3
+ RUN apt-get update -qq
4
+ RUN mkdir /myapp
5
+ WORKDIR /myapp
6
+ COPY Gemfile /myapp/Gemfile
7
+ # COPY Gemfile.lock /myapp/Gemfile.lock
8
+
9
+ RUN bundle install
10
+ COPY . /myapp
11
+
12
+ # Set Rails environment to production
13
+ # ENV RAILS_ENV production
14
+ # RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
15
+ # && apt install -y nodejs
16
+
17
+ # Add a script to be executed every time the container starts.
18
+ COPY entrypoint.sh /usr/bin/
19
+ RUN chmod +x /usr/bin/entrypoint.sh
20
+ ENTRYPOINT ["entrypoint.sh"]
21
+ EXPOSE 3000
22
+
23
+ # Start the main process.
24
+ CMD ["rails", "server", "-b", "0.0.0.0"]
@@ -10,15 +10,6 @@
10
10
  // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11
11
  // GO AFTER THE REQUIRES BELOW.
12
12
  //
13
- //= require jquery
14
- //= require jquery_ujs
15
- //= require jquery.mobile.splitview
16
- //= require jquery.mobile-1.2.1
17
- //= require jquery.mobile.datebox
18
- //= require iscroll-wrapper
19
- //= require iscroll
20
- //= require jinda
21
- // require turbolinks
22
- // require disable_enter_key.js
13
+ //= require jinda_jqm
23
14
 
24
15
 
@@ -12,23 +12,4 @@
12
12
  *= require_self
13
13
  *= require normalize-rails
14
14
  */
15
-
16
- @import "jquery.mobile-1.2.1";
17
- @import "jquery.mobile.splitview";
18
- @import "jquery.mobile.grids.collapsible";
19
- @import "jquery.mobile.datebox.css";
20
- @import "sarabun";
21
- @import "jinda";
22
- @import "kul-4.2";
23
- @import "articles";
24
- @import "app.scss";
25
- @import "font-awesome-sprockets";
26
- @import "font-awesome";
27
- @import "social";
28
-
29
-
30
-
31
-
32
-
33
-
34
-
15
+ @import "jinda_jqm"
@@ -0,0 +1,182 @@
1
+ development:
2
+ # Configure available database clients. (required)
3
+ clients:
4
+ # Defines the default client. (required)
5
+ default:
6
+ # Mongoid can connect to a URI accepted by the driver:
7
+ # uri: mongodb://user:password@mongodb.domain.com:27017/shop263603_development
8
+
9
+ # Otherwise define the parameters separately.
10
+ # This defines the name of the default database that Mongoid can connect to.
11
+ # (required).
12
+ database: shop263603_development
13
+ # Provides the hosts the default client can connect to. Must be an array
14
+ # of host:port pairs. (required)
15
+ hosts:
16
+ # - localhost:27017
17
+ - mongodb
18
+ options:
19
+ # Note that all options listed below are Ruby driver client options (the mongo gem).
20
+ # Please refer to the driver documentation of the version of the mongo gem you are using
21
+ # for the most up-to-date list of options.
22
+ #
23
+ # Change the default write concern. (default = { w: 1 })
24
+ # write:
25
+ # w: 1
26
+
27
+ # Change the default read preference. Valid options for mode are: :secondary,
28
+ # :secondary_preferred, :primary, :primary_preferred, :nearest
29
+ # (default: primary)
30
+ # read:
31
+ # mode: :secondary_preferred
32
+ # tag_sets:
33
+ # - use: web
34
+
35
+ # The name of the user for authentication.
36
+ # user: 'user'
37
+
38
+ # The password of the user for authentication.
39
+ # password: 'password'
40
+
41
+ # The user's database roles.
42
+ # roles:
43
+ # - 'dbOwner'
44
+
45
+ # Change the default authentication mechanism. Valid options are: :scram,
46
+ # :mongodb_cr, :mongodb_x509, and :plain. Note that all authentication
47
+ # mechanisms require username and password, with the exception of :mongodb_x509.
48
+ # Default on mongoDB 3.0 is :scram, default on 2.4 and 2.6 is :plain.
49
+ # auth_mech: :scram
50
+
51
+ # The database or source to authenticate the user against.
52
+ # (default: the database specified above or admin)
53
+ # auth_source: admin
54
+
55
+ # Force a the driver cluster to behave in a certain manner instead of auto-
56
+ # discovering. Can be one of: :direct, :replica_set, :sharded. Set to :direct
57
+ # when connecting to hidden members of a replica set.
58
+ # connect: :direct
59
+
60
+ # Changes the default time in seconds the server monitors refresh their status
61
+ # via ismaster commands. (default: 10)
62
+ # heartbeat_frequency: 10
63
+
64
+ # The time in seconds for selecting servers for a near read preference. (default: 0.015)
65
+ # local_threshold: 0.015
66
+
67
+ # The timeout in seconds for selecting a server for an operation. (default: 30)
68
+ # server_selection_timeout: 30
69
+
70
+ # The maximum number of connections in the connection pool. (default: 5)
71
+ # max_pool_size: 5
72
+
73
+ # The minimum number of connections in the connection pool. (default: 1)
74
+ # min_pool_size: 1
75
+
76
+ # The time to wait, in seconds, in the connection pool for a connection
77
+ # to be checked in before timing out. (default: 5)
78
+ # wait_queue_timeout: 5
79
+
80
+ # The time to wait to establish a connection before timing out, in seconds.
81
+ # (default: 10)
82
+ # connect_timeout: 10
83
+
84
+ # The timeout to wait to execute operations on a socket before raising an error.
85
+ # (default: 5)
86
+ # socket_timeout: 5
87
+
88
+ # The name of the replica set to connect to. Servers provided as seeds that do
89
+ # not belong to this replica set will be ignored.
90
+ # replica_set: name
91
+
92
+ # Whether to connect to the servers via ssl. (default: false)
93
+ # ssl: true
94
+
95
+ # The certificate file used to identify the connection against MongoDB.
96
+ # ssl_cert: /path/to/my.cert
97
+
98
+ # The private keyfile used to identify the connection against MongoDB.
99
+ # Note that even if the key is stored in the same file as the certificate,
100
+ # both need to be explicitly specified.
101
+ # ssl_key: /path/to/my.key
102
+
103
+ # A passphrase for the private key.
104
+ # ssl_key_pass_phrase: password
105
+
106
+ # Whether to do peer certification validation. (default: true)
107
+ # ssl_verify: true
108
+
109
+ # The file containing concatenated certificate authority certificates
110
+ # used to validate certs passed from the other end of the connection.
111
+ # ssl_ca_cert: /path/to/ca.cert
112
+
113
+ # Whether to truncate long log lines. (default: true)
114
+ # truncate_logs: true
115
+
116
+ # Configure Mongoid specific options. (optional)
117
+ options:
118
+ # Includes the root model name in json serialization. (default: false)
119
+ # include_root_in_json: false
120
+
121
+ # Include the _type field in serialization. (default: false)
122
+ # include_type_for_serialization: false
123
+
124
+ # Preload all models in development, needed when models use
125
+ # inheritance. (default: false)
126
+ # preload_models: false
127
+
128
+ # Raise an error when performing a #find and the document is not found.
129
+ # (default: true)
130
+ # raise_not_found_error: true
131
+ raise_not_found_error: false
132
+
133
+ # Raise an error when defining a scope with the same name as an
134
+ # existing method. (default: false)
135
+ # scope_overwrite_exception: false
136
+
137
+ # Raise an error when defining a field with the same name as an
138
+ # existing method. (default: false)
139
+ # duplicate_fields_exception: false
140
+
141
+ # Use Active Support's time zone in conversions. (default: true)
142
+ # use_activesupport_time_zone: true
143
+
144
+ # Ensure all times are UTC in the app side. (default: false)
145
+ # use_utc: false
146
+
147
+ # Set the Mongoid and Ruby driver log levels when not in a Rails
148
+ # environment. The Mongoid logger will be set to the Rails logger
149
+ # otherwise.(default: :info)
150
+ # log_level: :info
151
+
152
+ # Control whether `belongs_to` association is required. By default
153
+ # `belongs_to` will trigger a validation error if the association
154
+ # is not present. (default: true)
155
+ # belongs_to_required_by_default: true
156
+ belongs_to_required_by_default: false
157
+
158
+ # Application name that is printed to the mongodb logs upon establishing a
159
+ # connection in server versions >= 3.4. Note that the name cannot exceed 128 bytes.
160
+ # app_name: MyApplicationName
161
+
162
+ production:
163
+ clients:
164
+ default:
165
+ uri: <%= ENV['MONGODB_URI'] %>
166
+ options:
167
+ raise_not_found_error: false
168
+ belongs_to_required_by_default: false
169
+
170
+
171
+ # Use background indexes by default if `background` option not specified. (default: false)
172
+ # background_indexing: false
173
+ test:
174
+ clients:
175
+ default:
176
+ database: shop263603_test
177
+ hosts:
178
+ - localhost:27017
179
+ options:
180
+ read:
181
+ mode: :primary
182
+ max_pool_size: 1
@@ -0,0 +1,182 @@
1
+ development:
2
+ # Configure available database clients. (required)
3
+ clients:
4
+ # Defines the default client. (required)
5
+ default:
6
+ # Mongoid can connect to a URI accepted by the driver:
7
+ # uri: mongodb://user:password@mongodb.domain.com:27017/shop263603_development
8
+
9
+ # Otherwise define the parameters separately.
10
+ # This defines the name of the default database that Mongoid can connect to.
11
+ # (required).
12
+ database: shop263603_development
13
+ # Provides the hosts the default client can connect to. Must be an array
14
+ # of host:port pairs. (required)
15
+ hosts:
16
+ - localhost:27017
17
+ # - mongodb
18
+ options:
19
+ # Note that all options listed below are Ruby driver client options (the mongo gem).
20
+ # Please refer to the driver documentation of the version of the mongo gem you are using
21
+ # for the most up-to-date list of options.
22
+ #
23
+ # Change the default write concern. (default = { w: 1 })
24
+ # write:
25
+ # w: 1
26
+
27
+ # Change the default read preference. Valid options for mode are: :secondary,
28
+ # :secondary_preferred, :primary, :primary_preferred, :nearest
29
+ # (default: primary)
30
+ # read:
31
+ # mode: :secondary_preferred
32
+ # tag_sets:
33
+ # - use: web
34
+
35
+ # The name of the user for authentication.
36
+ # user: 'user'
37
+
38
+ # The password of the user for authentication.
39
+ # password: 'password'
40
+
41
+ # The user's database roles.
42
+ # roles:
43
+ # - 'dbOwner'
44
+
45
+ # Change the default authentication mechanism. Valid options are: :scram,
46
+ # :mongodb_cr, :mongodb_x509, and :plain. Note that all authentication
47
+ # mechanisms require username and password, with the exception of :mongodb_x509.
48
+ # Default on mongoDB 3.0 is :scram, default on 2.4 and 2.6 is :plain.
49
+ # auth_mech: :scram
50
+
51
+ # The database or source to authenticate the user against.
52
+ # (default: the database specified above or admin)
53
+ # auth_source: admin
54
+
55
+ # Force a the driver cluster to behave in a certain manner instead of auto-
56
+ # discovering. Can be one of: :direct, :replica_set, :sharded. Set to :direct
57
+ # when connecting to hidden members of a replica set.
58
+ # connect: :direct
59
+
60
+ # Changes the default time in seconds the server monitors refresh their status
61
+ # via ismaster commands. (default: 10)
62
+ # heartbeat_frequency: 10
63
+
64
+ # The time in seconds for selecting servers for a near read preference. (default: 0.015)
65
+ # local_threshold: 0.015
66
+
67
+ # The timeout in seconds for selecting a server for an operation. (default: 30)
68
+ # server_selection_timeout: 30
69
+
70
+ # The maximum number of connections in the connection pool. (default: 5)
71
+ # max_pool_size: 5
72
+
73
+ # The minimum number of connections in the connection pool. (default: 1)
74
+ # min_pool_size: 1
75
+
76
+ # The time to wait, in seconds, in the connection pool for a connection
77
+ # to be checked in before timing out. (default: 5)
78
+ # wait_queue_timeout: 5
79
+
80
+ # The time to wait to establish a connection before timing out, in seconds.
81
+ # (default: 10)
82
+ # connect_timeout: 10
83
+
84
+ # The timeout to wait to execute operations on a socket before raising an error.
85
+ # (default: 5)
86
+ # socket_timeout: 5
87
+
88
+ # The name of the replica set to connect to. Servers provided as seeds that do
89
+ # not belong to this replica set will be ignored.
90
+ # replica_set: name
91
+
92
+ # Whether to connect to the servers via ssl. (default: false)
93
+ # ssl: true
94
+
95
+ # The certificate file used to identify the connection against MongoDB.
96
+ # ssl_cert: /path/to/my.cert
97
+
98
+ # The private keyfile used to identify the connection against MongoDB.
99
+ # Note that even if the key is stored in the same file as the certificate,
100
+ # both need to be explicitly specified.
101
+ # ssl_key: /path/to/my.key
102
+
103
+ # A passphrase for the private key.
104
+ # ssl_key_pass_phrase: password
105
+
106
+ # Whether to do peer certification validation. (default: true)
107
+ # ssl_verify: true
108
+
109
+ # The file containing concatenated certificate authority certificates
110
+ # used to validate certs passed from the other end of the connection.
111
+ # ssl_ca_cert: /path/to/ca.cert
112
+
113
+ # Whether to truncate long log lines. (default: true)
114
+ # truncate_logs: true
115
+
116
+ # Configure Mongoid specific options. (optional)
117
+ options:
118
+ # Includes the root model name in json serialization. (default: false)
119
+ # include_root_in_json: false
120
+
121
+ # Include the _type field in serialization. (default: false)
122
+ # include_type_for_serialization: false
123
+
124
+ # Preload all models in development, needed when models use
125
+ # inheritance. (default: false)
126
+ # preload_models: false
127
+
128
+ # Raise an error when performing a #find and the document is not found.
129
+ # (default: true)
130
+ # raise_not_found_error: true
131
+ raise_not_found_error: false
132
+
133
+ # Raise an error when defining a scope with the same name as an
134
+ # existing method. (default: false)
135
+ # scope_overwrite_exception: false
136
+
137
+ # Raise an error when defining a field with the same name as an
138
+ # existing method. (default: false)
139
+ # duplicate_fields_exception: false
140
+
141
+ # Use Active Support's time zone in conversions. (default: true)
142
+ # use_activesupport_time_zone: true
143
+
144
+ # Ensure all times are UTC in the app side. (default: false)
145
+ # use_utc: false
146
+
147
+ # Set the Mongoid and Ruby driver log levels when not in a Rails
148
+ # environment. The Mongoid logger will be set to the Rails logger
149
+ # otherwise.(default: :info)
150
+ # log_level: :info
151
+
152
+ # Control whether `belongs_to` association is required. By default
153
+ # `belongs_to` will trigger a validation error if the association
154
+ # is not present. (default: true)
155
+ # belongs_to_required_by_default: true
156
+ belongs_to_required_by_default: false
157
+
158
+ # Application name that is printed to the mongodb logs upon establishing a
159
+ # connection in server versions >= 3.4. Note that the name cannot exceed 128 bytes.
160
+ # app_name: MyApplicationName
161
+
162
+ production:
163
+ clients:
164
+ default:
165
+ uri: <%= ENV['MONGODB_URI'] %>
166
+ options:
167
+ raise_not_found_error: false
168
+ belongs_to_required_by_default: false
169
+
170
+
171
+ # Use background indexes by default if `background` option not specified. (default: false)
172
+ # background_indexing: false
173
+ test:
174
+ clients:
175
+ default:
176
+ database: shop263603_test
177
+ hosts:
178
+ - localhost:27017
179
+ options:
180
+ read:
181
+ mode: :primary
182
+ max_pool_size: 1