jinda_engine 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (492) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/README.md +173 -0
  4. data/Rakefile +32 -0
  5. data/app/assets/config/jinda_engine/manifest.js +4 -0
  6. data/app/assets/images/jinda_engine/4dcity-old.ico +0 -0
  7. data/app/assets/images/jinda_engine/4dcity.ico +0 -0
  8. data/app/assets/images/jinda_engine/account.png +0 -0
  9. data/app/assets/images/jinda_engine/add.png +0 -0
  10. data/app/assets/images/jinda_engine/ajax-loader-circle.gif +0 -0
  11. data/app/assets/images/jinda_engine/ajax-loader.gif +0 -0
  12. data/app/assets/images/jinda_engine/anchor.png +0 -0
  13. data/app/assets/images/jinda_engine/application_double.png +0 -0
  14. data/app/assets/images/jinda_engine/application_form_edit.png +0 -0
  15. data/app/assets/images/jinda_engine/arrow_left.png +0 -0
  16. data/app/assets/images/jinda_engine/arrow_right.png +0 -0
  17. data/app/assets/images/jinda_engine/arrow_turn_left.png +0 -0
  18. data/app/assets/images/jinda_engine/arrow_turn_right.png +0 -0
  19. data/app/assets/images/jinda_engine/calendar.png +0 -0
  20. data/app/assets/images/jinda_engine/cancel.png +0 -0
  21. data/app/assets/images/jinda_engine/chart_bar.png +0 -0
  22. data/app/assets/images/jinda_engine/clock.png +0 -0
  23. data/app/assets/images/jinda_engine/cog.png +0 -0
  24. data/app/assets/images/jinda_engine/control_fastforward.png +0 -0
  25. data/app/assets/images/jinda_engine/control_play.png +0 -0
  26. data/app/assets/images/jinda_engine/cross.png +0 -0
  27. data/app/assets/images/jinda_engine/delete.png +0 -0
  28. data/app/assets/images/jinda_engine/external-link.png +0 -0
  29. data/app/assets/images/jinda_engine/facebook-continue-button.png +0 -0
  30. data/app/assets/images/jinda_engine/facebooksmall.png +0 -0
  31. data/app/assets/images/jinda_engine/favicon.ico +0 -0
  32. data/app/assets/images/jinda_engine/freemind(mm).png +0 -0
  33. data/app/assets/images/jinda_engine/google-continue-button.png +0 -0
  34. data/app/assets/images/jinda_engine/help.png +0 -0
  35. data/app/assets/images/jinda_engine/highway-menu.png +0 -0
  36. data/app/assets/images/jinda_engine/highway.png +0 -0
  37. data/app/assets/images/jinda_engine/house.png +0 -0
  38. data/app/assets/images/jinda_engine/icons-18-black.png +0 -0
  39. data/app/assets/images/jinda_engine/icons-18-white.png +0 -0
  40. data/app/assets/images/jinda_engine/icons-36-black.png +0 -0
  41. data/app/assets/images/jinda_engine/icons-36-white.png +0 -0
  42. data/app/assets/images/jinda_engine/logo.png +0 -0
  43. data/app/assets/images/jinda_engine/logo_jinda.png +0 -0
  44. data/app/assets/images/jinda_engine/logout.png +0 -0
  45. data/app/assets/images/jinda_engine/new.gif +0 -0
  46. data/app/assets/images/jinda_engine/new.png +0 -0
  47. data/app/assets/images/jinda_engine/page.png +0 -0
  48. data/app/assets/images/jinda_engine/page_attach.png +0 -0
  49. data/app/assets/images/jinda_engine/page_green.png +0 -0
  50. data/app/assets/images/jinda_engine/page_output.png +0 -0
  51. data/app/assets/images/jinda_engine/page_pdf.png +0 -0
  52. data/app/assets/images/jinda_engine/pencil.png +0 -0
  53. data/app/assets/images/jinda_engine/printer.png +0 -0
  54. data/app/assets/images/jinda_engine/refresh.png +0 -0
  55. data/app/assets/images/jinda_engine/report.png +0 -0
  56. data/app/assets/images/jinda_engine/rssmall.png +0 -0
  57. data/app/assets/images/jinda_engine/tick.png +0 -0
  58. data/app/assets/images/jinda_engine/twittersmall.png +0 -0
  59. data/app/assets/images/jinda_engine/user.png +0 -0
  60. data/app/assets/images/jinda_engine/user_admin_gear.png +0 -0
  61. data/app/assets/images/jinda_engine/view_code.png +0 -0
  62. data/app/assets/javascripts/jinda_engine/application.js +24 -0
  63. data/app/assets/javascripts/jinda_engine/application.js-jqm +27 -0
  64. data/app/assets/javascripts/jinda_engine/cable.js +13 -0
  65. data/app/assets/javascripts/jinda_engine/disable_enter_key.js +10 -0
  66. data/app/assets/javascripts/jinda_engine/iscroll-wrapper.js +32 -0
  67. data/app/assets/javascripts/jinda_engine/iscroll.js +1084 -0
  68. data/app/assets/javascripts/jinda_engine/jinda.js +14 -0
  69. data/app/assets/javascripts/jinda_engine/jquery.mobile-1.2.1.js +9272 -0
  70. data/app/assets/javascripts/jinda_engine/jquery.mobile.datebox.js +1778 -0
  71. data/app/assets/javascripts/jinda_engine/jquery.mobile.splitview.js +695 -0
  72. data/app/assets/stylesheets/jinda_engine/app.scss +90 -0
  73. data/app/assets/stylesheets/jinda_engine/application.css.scss +34 -0
  74. data/app/assets/stylesheets/jinda_engine/articles.scss +94 -0
  75. data/app/assets/stylesheets/jinda_engine/fonts/sarabun.eot +0 -0
  76. data/app/assets/stylesheets/jinda_engine/fonts/sarabun.ttf +0 -0
  77. data/app/assets/stylesheets/jinda_engine/fonts/sarabun.woff +0 -0
  78. data/app/assets/stylesheets/jinda_engine/fonts/sarabun_bold.ttf +0 -0
  79. data/app/assets/stylesheets/jinda_engine/fonts/sarabun_bolditalic.ttf +0 -0
  80. data/app/assets/stylesheets/jinda_engine/fonts/sarabun_italic.ttf +0 -0
  81. data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew-webfont.eot +0 -0
  82. data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew-webfont.ttf +0 -0
  83. data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew-webfont.woff +0 -0
  84. data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew.css +47 -0
  85. data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew_bold-webfont.eot +0 -0
  86. data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew_bold-webfont.ttf +0 -0
  87. data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew_bold-webfont.woff +0 -0
  88. data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew_bolditalic-webfont.eot +0 -0
  89. data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew_bolditalic-webfont.ttf +0 -0
  90. data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew_bolditalic-webfont.woff +0 -0
  91. data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew_italic-webfont.eot +0 -0
  92. data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew_italic-webfont.ttf +0 -0
  93. data/app/assets/stylesheets/jinda_engine/fonts/thsarabunnew_italic-webfont.woff +0 -0
  94. data/app/assets/stylesheets/jinda_engine/images/ajax-loader.gif +0 -0
  95. data/app/assets/stylesheets/jinda_engine/images/button_black.png +0 -0
  96. data/app/assets/stylesheets/jinda_engine/images/button_blue.png +0 -0
  97. data/app/assets/stylesheets/jinda_engine/images/button_red.png +0 -0
  98. data/app/assets/stylesheets/jinda_engine/images/icons-18-black.png +0 -0
  99. data/app/assets/stylesheets/jinda_engine/images/icons-18-white.png +0 -0
  100. data/app/assets/stylesheets/jinda_engine/images/icons-36-black.png +0 -0
  101. data/app/assets/stylesheets/jinda_engine/images/icons-36-white.png +0 -0
  102. data/app/assets/stylesheets/jinda_engine/images/indicator.gif +0 -0
  103. data/app/assets/stylesheets/jinda_engine/jinda.css +52 -0
  104. data/app/assets/stylesheets/jinda_engine/jquery.mobile-1.2.1.css +2339 -0
  105. data/app/assets/stylesheets/jinda_engine/jquery.mobile.datebox.css +65 -0
  106. data/app/assets/stylesheets/jinda_engine/jquery.mobile.grids.collapsible.css +122 -0
  107. data/app/assets/stylesheets/jinda_engine/jquery.mobile.splitview.css +128 -0
  108. data/app/assets/stylesheets/jinda_engine/kul-4.2.css +1516 -0
  109. data/app/assets/stylesheets/jinda_engine/kul-4.2.min.css +11 -0
  110. data/app/assets/stylesheets/jinda_engine/modules.scss +84 -0
  111. data/app/assets/stylesheets/jinda_engine/sarabun.css +37 -0
  112. data/app/assets/stylesheets/jinda_engine/social.scss +133 -0
  113. data/app/controllers/jindra_engine/admins_controller.rb +9 -0
  114. data/app/controllers/jindra_engine/api/v1/notes_controller.rb +81 -0
  115. data/app/controllers/jindra_engine/application_controller.rb +44 -0
  116. data/app/controllers/jindra_engine/articles_controller.rb +112 -0
  117. data/app/controllers/jindra_engine/comments_controller.rb +21 -0
  118. data/app/controllers/jindra_engine/concerns/jinda_general_concern.rb +179 -0
  119. data/app/controllers/jindra_engine/concerns/jinda_run_concern.rb +365 -0
  120. data/app/controllers/jindra_engine/devs_controller.rb +4 -0
  121. data/app/controllers/jindra_engine/docs_controller.rb +59 -0
  122. data/app/controllers/jindra_engine/identities_controller.rb +7 -0
  123. data/app/controllers/jindra_engine/jinda_controller.rb +71 -0
  124. data/app/controllers/jindra_engine/notes_controller.rb +87 -0
  125. data/app/controllers/jindra_engine/password_resets.rb +30 -0
  126. data/app/controllers/jindra_engine/password_resets_controller.rb +35 -0
  127. data/app/controllers/jindra_engine/sessions_controller.rb +45 -0
  128. data/app/controllers/jindra_engine/sitemap_controller.rb +15 -0
  129. data/app/controllers/jindra_engine/users_controller.rb +35 -0
  130. data/app/helpers/jinda_engine/jinda_helper.rb +1005 -0
  131. data/app/jinda/index.mm +366 -0
  132. data/app/jinda/template/index.mm +366 -0
  133. data/app/jinda/template/linkview.haml +21 -0
  134. data/app/jinda/template/view.html.erb +26 -0
  135. data/app/mailers/jinda_engine/application_mailer.rb +4 -0
  136. data/app/mailers/jinda_engine/jinda_mailer.rb +7 -0
  137. data/app/mailers/jinda_engine/note_mailer.rb +10 -0
  138. data/app/mailers/jinda_engine/user_mailer.rb +15 -0
  139. data/app/views/jinda_engine/adminbsbs/content.haml +241 -0
  140. data/app/views/jinda_engine/admins/edit_role/edit_role.html.erb +7 -0
  141. data/app/views/jinda_engine/admins/edit_role/select_user.html.erb +4 -0
  142. data/app/views/jinda_engine/api/v1/note.haml +0 -0
  143. data/app/views/jinda_engine/articles/edit.haml +12 -0
  144. data/app/views/jinda_engine/articles/edit_article/edit_article.html.erb +13 -0
  145. data/app/views/jinda_engine/articles/edit_article/select_article.html.erb +12 -0
  146. data/app/views/jinda_engine/articles/index.haml +23 -0
  147. data/app/views/jinda_engine/articles/my.haml +20 -0
  148. data/app/views/jinda_engine/articles/new_article/form_article.html.erb +16 -0
  149. data/app/views/jinda_engine/articles/show.html.haml +25 -0
  150. data/app/views/jinda_engine/articles/xedit_article/edit_article.html.erb +13 -0
  151. data/app/views/jinda_engine/ctrs/vfolder1/viewfile1.html.erb +23 -0
  152. data/app/views/jinda_engine/ctrs/vfolder1/viewfile2.html.erb +23 -0
  153. data/app/views/jinda_engine/ctrs/vfolder2/viewfile2.html.erb +23 -0
  154. data/app/views/jinda_engine/custom/_adsense.haml +6 -0
  155. data/app/views/jinda_engine/docs/doc_edit/doc_edit.html.erb +21 -0
  156. data/app/views/jinda_engine/docs/doc_edit/doc_select.html.erb +14 -0
  157. data/app/views/jinda_engine/docs/doc_new/doc_form.html.erb +26 -0
  158. data/app/views/jinda_engine/docs/doc_new/doc_form.md +36 -0
  159. data/app/views/jinda_engine/docs/doc_xedit/doc_edit.html.erb +21 -0
  160. data/app/views/jinda_engine/docs/edit/select_note.html.erb +14 -0
  161. data/app/views/jinda_engine/docs/index.haml +21 -0
  162. data/app/views/jinda_engine/docs/my.haml +27 -0
  163. data/app/views/jinda_engine/identities/new.html.erb +32 -0
  164. data/app/views/jinda_engine/jinda/_activity.md +10 -0
  165. data/app/views/jinda_engine/jinda/_menu.haml +27 -0
  166. data/app/views/jinda_engine/jinda/_menu_mm.haml +44 -0
  167. data/app/views/jinda_engine/jinda/_model.md +5 -0
  168. data/app/views/jinda_engine/jinda/_modul.md +9 -0
  169. data/app/views/jinda_engine/jinda/_pending_home.haml +5 -0
  170. data/app/views/jinda_engine/jinda/_pending_page.haml +24 -0
  171. data/app/views/jinda_engine/jinda/_service.md +24 -0
  172. data/app/views/jinda_engine/jinda/_static.haml +13 -0
  173. data/app/views/jinda_engine/jinda/doc-thai.md +37 -0
  174. data/app/views/jinda_engine/jinda/doc.md +36 -0
  175. data/app/views/jinda_engine/jinda/error_logs.haml +22 -0
  176. data/app/views/jinda_engine/jinda/feed.rss.builder +27 -0
  177. data/app/views/jinda_engine/jinda/help.haml +20 -0
  178. data/app/views/jinda_engine/jinda/index.html.haml +53 -0
  179. data/app/views/jinda_engine/jinda/logs.haml +22 -0
  180. data/app/views/jinda_engine/jinda/notice_logs.haml +18 -0
  181. data/app/views/jinda_engine/jinda/pending.haml +1 -0
  182. data/app/views/jinda_engine/jinda/run_form.haml +42 -0
  183. data/app/views/jinda_engine/jinda/run_output.haml +38 -0
  184. data/app/views/jinda_engine/jinda/search.haml +20 -0
  185. data/app/views/jinda_engine/jinda/status.haml +61 -0
  186. data/app/views/jinda_engine/jinda_mailer/gmail.html.erb +9 -0
  187. data/app/views/jinda_engine/layouts/_head.html.erb +10 -0
  188. data/app/views/jinda_engine/layouts/_meta_tag.html.erb +19 -0
  189. data/app/views/jinda_engine/layouts/application.haml +4 -0
  190. data/app/views/jinda_engine/layouts/bsb/_footer.haml +7 -0
  191. data/app/views/jinda_engine/layouts/bsb/_header.haml +147 -0
  192. data/app/views/jinda_engine/layouts/bsb/_menu.haml +47 -0
  193. data/app/views/jinda_engine/layouts/bsb/_menu_mm.haml +34 -0
  194. data/app/views/jinda_engine/layouts/bsb/_rightbar.haml +123 -0
  195. data/app/views/jinda_engine/layouts/bsb/_sidebar.haml +155 -0
  196. data/app/views/jinda_engine/layouts/bsb/application.haml-bsb +47 -0
  197. data/app/views/jinda_engine/layouts/gmail.html.erb +9 -0
  198. data/app/views/jinda_engine/layouts/jqm/_full.haml +33 -0
  199. data/app/views/jinda_engine/layouts/jqm/_page.haml +16 -0
  200. data/app/views/jinda_engine/layouts/jqm/application.haml-jqm +4 -0
  201. data/app/views/jinda_engine/layouts/mailer.html.erb +13 -0
  202. data/app/views/jinda_engine/layouts/mailer.html.haml +3 -0
  203. data/app/views/jinda_engine/layouts/mailer.text.erb +1 -0
  204. data/app/views/jinda_engine/layouts/mailer.text.haml +1 -0
  205. data/app/views/jinda_engine/layouts/mobile.html.erb +13 -0
  206. data/app/views/jinda_engine/layouts/mobilejq.html.erb +31 -0
  207. data/app/views/jinda_engine/layouts/print.html.erb +22 -0
  208. data/app/views/jinda_engine/layouts/utf8.html.erb +22 -0
  209. data/app/views/jinda_engine/note_mailer/gmail.html.haml +7 -0
  210. data/app/views/jinda_engine/note_mailer/gmail.text.haml +8 -0
  211. data/app/views/jinda_engine/notes/delete/select_note.html.erb +14 -0
  212. data/app/views/jinda_engine/notes/edit/edit_note.html.erb +10 -0
  213. data/app/views/jinda_engine/notes/edit/select_note.html.erb +14 -0
  214. data/app/views/jinda_engine/notes/index.haml +71 -0
  215. data/app/views/jinda_engine/notes/mail/display_mail.html.erb +20 -0
  216. data/app/views/jinda_engine/notes/mail/select_note.html.erb +19 -0
  217. data/app/views/jinda_engine/notes/mail/show.html.haml +13 -0
  218. data/app/views/jinda_engine/notes/my.haml +21 -0
  219. data/app/views/jinda_engine/notes/new/new_note.html.erb +13 -0
  220. data/app/views/jinda_engine/notes/show.haml +10 -0
  221. data/app/views/jinda_engine/notes/xedit/edit_note.html.erb +10 -0
  222. data/app/views/jinda_engine/password_resets/edit.html.erb +21 -0
  223. data/app/views/jinda_engine/password_resets/new.html.erb +7 -0
  224. data/app/views/jinda_engine/sessions/new.html.erb +20 -0
  225. data/app/views/jinda_engine/sitemap/index.xml.haml +10 -0
  226. data/app/views/jinda_engine/user_mailer/password_reset.html.haml +3 -0
  227. data/app/views/jinda_engine/user_mailer/password_reset.text.erb +3 -0
  228. data/app/views/jinda_engine/user_mailer/password_reset.text.haml +3 -0
  229. data/app/views/jinda_engine/users/index.haml +13 -0
  230. data/app/views/jinda_engine/users/pwd/enter.html.erb +6 -0
  231. data/app/views/jinda_engine/users/user/enter_user.html.erb +8 -0
  232. data/config/application.rb +58 -0
  233. data/config/initializers/jinda_engine/assets.rb +14 -0
  234. data/config/initializers/jinda_engine/jinda.rb +13 -0
  235. data/config/initializers/jinda_engine/mongoid.rb +9 -0
  236. data/config/initializers/jinda_engine/mongoid.rb-org +9 -0
  237. data/config/initializers/jinda_engine/omniauth.rb-org +17 -0
  238. data/config/jinda_engine/cloudinary.yml +9 -0
  239. data/config/routes.rb +18 -0
  240. data/db/jinda_engine/seeds.rb +6 -0
  241. data/lib/generators/jinda_engine/USAGE +2 -0
  242. data/lib/generators/jinda_engine/config_generator.rb +95 -0
  243. data/lib/generators/jinda_engine/install_generator.rb +237 -0
  244. data/lib/generators/jinda_engine/minitest_generator.rb +30 -0
  245. data/lib/generators/jinda_engine/rspec_generator.rb +30 -0
  246. data/lib/generators/jinda_engine/templates/README.md +173 -0
  247. data/lib/generators/jinda_engine/templates/app/assets/config/manifest.js +4 -0
  248. data/lib/generators/jinda_engine/templates/app/assets/images/4dcity-old.ico +0 -0
  249. data/lib/generators/jinda_engine/templates/app/assets/images/4dcity.ico +0 -0
  250. data/lib/generators/jinda_engine/templates/app/assets/images/account.png +0 -0
  251. data/lib/generators/jinda_engine/templates/app/assets/images/add.png +0 -0
  252. data/lib/generators/jinda_engine/templates/app/assets/images/ajax-loader-circle.gif +0 -0
  253. data/lib/generators/jinda_engine/templates/app/assets/images/ajax-loader.gif +0 -0
  254. data/lib/generators/jinda_engine/templates/app/assets/images/anchor.png +0 -0
  255. data/lib/generators/jinda_engine/templates/app/assets/images/application_double.png +0 -0
  256. data/lib/generators/jinda_engine/templates/app/assets/images/application_form_edit.png +0 -0
  257. data/lib/generators/jinda_engine/templates/app/assets/images/arrow_left.png +0 -0
  258. data/lib/generators/jinda_engine/templates/app/assets/images/arrow_right.png +0 -0
  259. data/lib/generators/jinda_engine/templates/app/assets/images/arrow_turn_left.png +0 -0
  260. data/lib/generators/jinda_engine/templates/app/assets/images/arrow_turn_right.png +0 -0
  261. data/lib/generators/jinda_engine/templates/app/assets/images/calendar.png +0 -0
  262. data/lib/generators/jinda_engine/templates/app/assets/images/cancel.png +0 -0
  263. data/lib/generators/jinda_engine/templates/app/assets/images/chart_bar.png +0 -0
  264. data/lib/generators/jinda_engine/templates/app/assets/images/clock.png +0 -0
  265. data/lib/generators/jinda_engine/templates/app/assets/images/cog.png +0 -0
  266. data/lib/generators/jinda_engine/templates/app/assets/images/control_fastforward.png +0 -0
  267. data/lib/generators/jinda_engine/templates/app/assets/images/control_play.png +0 -0
  268. data/lib/generators/jinda_engine/templates/app/assets/images/cross.png +0 -0
  269. data/lib/generators/jinda_engine/templates/app/assets/images/delete.png +0 -0
  270. data/lib/generators/jinda_engine/templates/app/assets/images/external-link.png +0 -0
  271. data/lib/generators/jinda_engine/templates/app/assets/images/facebook-continue-button.png +0 -0
  272. data/lib/generators/jinda_engine/templates/app/assets/images/facebooksmall.png +0 -0
  273. data/lib/generators/jinda_engine/templates/app/assets/images/favicon.ico +0 -0
  274. data/lib/generators/jinda_engine/templates/app/assets/images/freemind(mm).png +0 -0
  275. data/lib/generators/jinda_engine/templates/app/assets/images/google-continue-button.png +0 -0
  276. data/lib/generators/jinda_engine/templates/app/assets/images/help.png +0 -0
  277. data/lib/generators/jinda_engine/templates/app/assets/images/highway-menu.png +0 -0
  278. data/lib/generators/jinda_engine/templates/app/assets/images/highway.png +0 -0
  279. data/lib/generators/jinda_engine/templates/app/assets/images/house.png +0 -0
  280. data/lib/generators/jinda_engine/templates/app/assets/images/icons-18-black.png +0 -0
  281. data/lib/generators/jinda_engine/templates/app/assets/images/icons-18-white.png +0 -0
  282. data/lib/generators/jinda_engine/templates/app/assets/images/icons-36-black.png +0 -0
  283. data/lib/generators/jinda_engine/templates/app/assets/images/icons-36-white.png +0 -0
  284. data/lib/generators/jinda_engine/templates/app/assets/images/logo.png +0 -0
  285. data/lib/generators/jinda_engine/templates/app/assets/images/logo_jinda.png +0 -0
  286. data/lib/generators/jinda_engine/templates/app/assets/images/logout.png +0 -0
  287. data/lib/generators/jinda_engine/templates/app/assets/images/new.gif +0 -0
  288. data/lib/generators/jinda_engine/templates/app/assets/images/new.png +0 -0
  289. data/lib/generators/jinda_engine/templates/app/assets/images/page.png +0 -0
  290. data/lib/generators/jinda_engine/templates/app/assets/images/page_attach.png +0 -0
  291. data/lib/generators/jinda_engine/templates/app/assets/images/page_green.png +0 -0
  292. data/lib/generators/jinda_engine/templates/app/assets/images/page_output.png +0 -0
  293. data/lib/generators/jinda_engine/templates/app/assets/images/page_pdf.png +0 -0
  294. data/lib/generators/jinda_engine/templates/app/assets/images/pencil.png +0 -0
  295. data/lib/generators/jinda_engine/templates/app/assets/images/printer.png +0 -0
  296. data/lib/generators/jinda_engine/templates/app/assets/images/refresh.png +0 -0
  297. data/lib/generators/jinda_engine/templates/app/assets/images/report.png +0 -0
  298. data/lib/generators/jinda_engine/templates/app/assets/images/rssmall.png +0 -0
  299. data/lib/generators/jinda_engine/templates/app/assets/images/tick.png +0 -0
  300. data/lib/generators/jinda_engine/templates/app/assets/images/twittersmall.png +0 -0
  301. data/lib/generators/jinda_engine/templates/app/assets/images/user.png +0 -0
  302. data/lib/generators/jinda_engine/templates/app/assets/images/user_admin_gear.png +0 -0
  303. data/lib/generators/jinda_engine/templates/app/assets/images/view_code.png +0 -0
  304. data/lib/generators/jinda_engine/templates/app/assets/javascripts/application.js +24 -0
  305. data/lib/generators/jinda_engine/templates/app/assets/javascripts/application.js-jqm +27 -0
  306. data/lib/generators/jinda_engine/templates/app/assets/javascripts/cable.js +13 -0
  307. data/lib/generators/jinda_engine/templates/app/assets/javascripts/disable_enter_key.js +10 -0
  308. data/lib/generators/jinda_engine/templates/app/assets/javascripts/iscroll-wrapper.js +32 -0
  309. data/lib/generators/jinda_engine/templates/app/assets/javascripts/iscroll.js +1084 -0
  310. data/lib/generators/jinda_engine/templates/app/assets/javascripts/jinda.js +14 -0
  311. data/lib/generators/jinda_engine/templates/app/assets/javascripts/jquery.mobile-1.2.1.js +9272 -0
  312. data/lib/generators/jinda_engine/templates/app/assets/javascripts/jquery.mobile.datebox.js +1778 -0
  313. data/lib/generators/jinda_engine/templates/app/assets/javascripts/jquery.mobile.splitview.js +695 -0
  314. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/app.scss +90 -0
  315. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/application.css.scss +34 -0
  316. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/articles.scss +94 -0
  317. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/sarabun.eot +0 -0
  318. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/sarabun.ttf +0 -0
  319. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/sarabun.woff +0 -0
  320. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/sarabun_bold.ttf +0 -0
  321. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/sarabun_bolditalic.ttf +0 -0
  322. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/sarabun_italic.ttf +0 -0
  323. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew-webfont.eot +0 -0
  324. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew-webfont.ttf +0 -0
  325. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew-webfont.woff +0 -0
  326. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew.css +47 -0
  327. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew_bold-webfont.eot +0 -0
  328. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew_bold-webfont.ttf +0 -0
  329. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew_bold-webfont.woff +0 -0
  330. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew_bolditalic-webfont.eot +0 -0
  331. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew_bolditalic-webfont.ttf +0 -0
  332. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew_bolditalic-webfont.woff +0 -0
  333. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew_italic-webfont.eot +0 -0
  334. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew_italic-webfont.ttf +0 -0
  335. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/fonts/thsarabunnew_italic-webfont.woff +0 -0
  336. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/images/ajax-loader.gif +0 -0
  337. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/images/button_black.png +0 -0
  338. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/images/button_blue.png +0 -0
  339. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/images/button_red.png +0 -0
  340. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/images/icons-18-black.png +0 -0
  341. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/images/icons-18-white.png +0 -0
  342. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/images/icons-36-black.png +0 -0
  343. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/images/icons-36-white.png +0 -0
  344. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/images/indicator.gif +0 -0
  345. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/jinda.css +52 -0
  346. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/jquery.mobile-1.2.1.css +2339 -0
  347. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/jquery.mobile.datebox.css +65 -0
  348. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/jquery.mobile.grids.collapsible.css +122 -0
  349. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/jquery.mobile.splitview.css +128 -0
  350. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/kul-4.2.css +1516 -0
  351. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/kul-4.2.min.css +11 -0
  352. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/modules.scss +84 -0
  353. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/sarabun.css +37 -0
  354. data/lib/generators/jinda_engine/templates/app/assets/stylesheets/social.scss +133 -0
  355. data/lib/generators/jinda_engine/templates/app/channels/application_cable/channel.rb +4 -0
  356. data/lib/generators/jinda_engine/templates/app/channels/application_cable/connection.rb +4 -0
  357. data/lib/generators/jinda_engine/templates/app/controllers/api/v1/notes_controller.rb +81 -0
  358. data/lib/generators/jinda_engine/templates/app/controllers/concerns/jinda_general_concern.rb-org +179 -0
  359. data/lib/generators/jinda_engine/templates/app/controllers/concerns/jinda_run_concern.rb-org +365 -0
  360. data/lib/generators/jinda_engine/templates/app/helpers/admins_helper.rb +2 -0
  361. data/lib/generators/jinda_engine/templates/app/helpers/application_helper.rb +33 -0
  362. data/lib/generators/jinda_engine/templates/app/helpers/articles_helper.rb +2 -0
  363. data/lib/generators/jinda_engine/templates/app/helpers/basic_helper.rb +2 -0
  364. data/lib/generators/jinda_engine/templates/app/helpers/comments_helper.rb +2 -0
  365. data/lib/generators/jinda_engine/templates/app/helpers/ctrs_helper.rb +2 -0
  366. data/lib/generators/jinda_engine/templates/app/helpers/devs_helper.rb +2 -0
  367. data/lib/generators/jinda_engine/templates/app/helpers/pictures_helper.rb +2 -0
  368. data/lib/generators/jinda_engine/templates/app/helpers/sitemap_helper.rb +2 -0
  369. data/lib/generators/jinda_engine/templates/app/helpers/users_helper.rb +2 -0
  370. data/lib/generators/jinda_engine/templates/app/jinda/index.mm +366 -0
  371. data/lib/generators/jinda_engine/templates/app/jinda/template/index.mm +366 -0
  372. data/lib/generators/jinda_engine/templates/app/jinda/template/linkview.haml +21 -0
  373. data/lib/generators/jinda_engine/templates/app/jinda/template/view.html.erb +26 -0
  374. data/lib/generators/jinda_engine/templates/app/mailers/application_mailer.rb +4 -0
  375. data/lib/generators/jinda_engine/templates/app/mailers/jinda_mailer.rb +7 -0
  376. data/lib/generators/jinda_engine/templates/app/mailers/note_mailer.rb +10 -0
  377. data/lib/generators/jinda_engine/templates/app/mailers/user_mailer.rb +15 -0
  378. data/lib/generators/jinda_engine/templates/app/models/address.rb +14 -0
  379. data/lib/generators/jinda_engine/templates/app/models/article.rb +14 -0
  380. data/lib/generators/jinda_engine/templates/app/models/comment.rb +11 -0
  381. data/lib/generators/jinda_engine/templates/app/models/identity.rb +18 -0
  382. data/lib/generators/jinda_engine/templates/app/models/jinda/doc.rb +36 -0
  383. data/lib/generators/jinda_engine/templates/app/models/jinda/module.rb +11 -0
  384. data/lib/generators/jinda_engine/templates/app/models/jinda/notice.rb +14 -0
  385. data/lib/generators/jinda_engine/templates/app/models/jinda/role.rb +8 -0
  386. data/lib/generators/jinda_engine/templates/app/models/jinda/runseq.rb +24 -0
  387. data/lib/generators/jinda_engine/templates/app/models/jinda/service.rb +17 -0
  388. data/lib/generators/jinda_engine/templates/app/models/jinda/xmain.rb +38 -0
  389. data/lib/generators/jinda_engine/templates/app/models/note.rb +22 -0
  390. data/lib/generators/jinda_engine/templates/app/models/param.rb +41 -0
  391. data/lib/generators/jinda_engine/templates/app/models/person.rb +14 -0
  392. data/lib/generators/jinda_engine/templates/app/models/user.rb +66 -0
  393. data/lib/generators/jinda_engine/templates/app/views/adminbsbs/content.haml +241 -0
  394. data/lib/generators/jinda_engine/templates/app/views/admins/edit_role/edit_role.html.erb +7 -0
  395. data/lib/generators/jinda_engine/templates/app/views/admins/edit_role/select_user.html.erb +4 -0
  396. data/lib/generators/jinda_engine/templates/app/views/api/v1/note.haml +0 -0
  397. data/lib/generators/jinda_engine/templates/app/views/ctrs/vfolder1/viewfile1.html.erb +23 -0
  398. data/lib/generators/jinda_engine/templates/app/views/ctrs/vfolder1/viewfile2.html.erb +23 -0
  399. data/lib/generators/jinda_engine/templates/app/views/ctrs/vfolder2/viewfile2.html.erb +23 -0
  400. data/lib/generators/jinda_engine/templates/app/views/custom/_adsense.haml +6 -0
  401. data/lib/generators/jinda_engine/templates/app/views/docs/doc_edit/doc_edit.html.erb +21 -0
  402. data/lib/generators/jinda_engine/templates/app/views/docs/doc_edit/doc_select.html.erb +14 -0
  403. data/lib/generators/jinda_engine/templates/app/views/docs/doc_new/doc_form.html.erb +26 -0
  404. data/lib/generators/jinda_engine/templates/app/views/docs/doc_new/doc_form.md +36 -0
  405. data/lib/generators/jinda_engine/templates/app/views/docs/doc_xedit/doc_edit.html.erb +21 -0
  406. data/lib/generators/jinda_engine/templates/app/views/docs/edit/select_note.html.erb +14 -0
  407. data/lib/generators/jinda_engine/templates/app/views/docs/index.haml +21 -0
  408. data/lib/generators/jinda_engine/templates/app/views/docs/my.haml +27 -0
  409. data/lib/generators/jinda_engine/templates/app/views/identities/new.html.erb +32 -0
  410. data/lib/generators/jinda_engine/templates/app/views/jinda_mailer/gmail.html.erb +9 -0
  411. data/lib/generators/jinda_engine/templates/app/views/layouts/_head.html.erb +10 -0
  412. data/lib/generators/jinda_engine/templates/app/views/layouts/_meta_tag.html.erb +19 -0
  413. data/lib/generators/jinda_engine/templates/app/views/layouts/application.haml +4 -0
  414. data/lib/generators/jinda_engine/templates/app/views/layouts/bsb/_footer.haml +7 -0
  415. data/lib/generators/jinda_engine/templates/app/views/layouts/bsb/_header.haml +147 -0
  416. data/lib/generators/jinda_engine/templates/app/views/layouts/bsb/_menu.haml +47 -0
  417. data/lib/generators/jinda_engine/templates/app/views/layouts/bsb/_menu_mm.haml +34 -0
  418. data/lib/generators/jinda_engine/templates/app/views/layouts/bsb/_rightbar.haml +123 -0
  419. data/lib/generators/jinda_engine/templates/app/views/layouts/bsb/_sidebar.haml +155 -0
  420. data/lib/generators/jinda_engine/templates/app/views/layouts/bsb/application.haml-bsb +47 -0
  421. data/lib/generators/jinda_engine/templates/app/views/layouts/gmail.html.erb +9 -0
  422. data/lib/generators/jinda_engine/templates/app/views/layouts/jqm/_full.haml +33 -0
  423. data/lib/generators/jinda_engine/templates/app/views/layouts/jqm/_page.haml +16 -0
  424. data/lib/generators/jinda_engine/templates/app/views/layouts/jqm/application.haml-jqm +4 -0
  425. data/lib/generators/jinda_engine/templates/app/views/layouts/mailer.html.erb +13 -0
  426. data/lib/generators/jinda_engine/templates/app/views/layouts/mailer.html.haml +3 -0
  427. data/lib/generators/jinda_engine/templates/app/views/layouts/mailer.text.erb +1 -0
  428. data/lib/generators/jinda_engine/templates/app/views/layouts/mailer.text.haml +1 -0
  429. data/lib/generators/jinda_engine/templates/app/views/layouts/mobile.html.erb +13 -0
  430. data/lib/generators/jinda_engine/templates/app/views/layouts/mobilejq.html.erb +31 -0
  431. data/lib/generators/jinda_engine/templates/app/views/layouts/print.html.erb +22 -0
  432. data/lib/generators/jinda_engine/templates/app/views/layouts/utf8.html.erb +22 -0
  433. data/lib/generators/jinda_engine/templates/app/views/note_mailer/gmail.html.haml +7 -0
  434. data/lib/generators/jinda_engine/templates/app/views/note_mailer/gmail.text.haml +8 -0
  435. data/lib/generators/jinda_engine/templates/app/views/notes/delete/select_note.html.erb +14 -0
  436. data/lib/generators/jinda_engine/templates/app/views/notes/edit/edit_note.html.erb +10 -0
  437. data/lib/generators/jinda_engine/templates/app/views/notes/edit/select_note.html.erb +14 -0
  438. data/lib/generators/jinda_engine/templates/app/views/notes/index.haml +71 -0
  439. data/lib/generators/jinda_engine/templates/app/views/notes/mail/display_mail.html.erb +20 -0
  440. data/lib/generators/jinda_engine/templates/app/views/notes/mail/select_note.html.erb +19 -0
  441. data/lib/generators/jinda_engine/templates/app/views/notes/mail/show.html.haml +13 -0
  442. data/lib/generators/jinda_engine/templates/app/views/notes/my.haml +21 -0
  443. data/lib/generators/jinda_engine/templates/app/views/notes/new/new_note.html.erb +13 -0
  444. data/lib/generators/jinda_engine/templates/app/views/notes/show.haml +10 -0
  445. data/lib/generators/jinda_engine/templates/app/views/notes/xedit/edit_note.html.erb +10 -0
  446. data/lib/generators/jinda_engine/templates/app/views/password_resets/edit.html.erb +21 -0
  447. data/lib/generators/jinda_engine/templates/app/views/password_resets/new.html.erb +7 -0
  448. data/lib/generators/jinda_engine/templates/app/views/sessions/new.html.erb +20 -0
  449. data/lib/generators/jinda_engine/templates/app/views/sitemap/index.xml.haml +10 -0
  450. data/lib/generators/jinda_engine/templates/app/views/user_mailer/password_reset.html.haml +3 -0
  451. data/lib/generators/jinda_engine/templates/app/views/user_mailer/password_reset.text.erb +3 -0
  452. data/lib/generators/jinda_engine/templates/app/views/user_mailer/password_reset.text.haml +3 -0
  453. data/lib/generators/jinda_engine/templates/app/views/users/index.haml +13 -0
  454. data/lib/generators/jinda_engine/templates/app/views/users/pwd/enter.html.erb +6 -0
  455. data/lib/generators/jinda_engine/templates/app/views/users/user/enter_user.html.erb +8 -0
  456. data/lib/generators/jinda_engine/templates/config/cloudinary.yml +9 -0
  457. data/lib/generators/jinda_engine/templates/db/seeds.rb +6 -0
  458. data/lib/generators/jinda_engine/templates/dot/dot.env +2 -0
  459. data/lib/generators/jinda_engine/templates/dotrspec +3 -0
  460. data/lib/generators/jinda_engine/templates/jinda.yml +10 -0
  461. data/lib/generators/jinda_engine/templates/public/404.html +67 -0
  462. data/lib/generators/jinda_engine/templates/public/422.html +67 -0
  463. data/lib/generators/jinda_engine/templates/public/500.html +66 -0
  464. data/lib/generators/jinda_engine/templates/public/assets/images/logo.png +0 -0
  465. data/lib/generators/jinda_engine/templates/public/favicon.ico +0 -0
  466. data/lib/generators/jinda_engine/templates/public/robots.txt +3 -0
  467. data/lib/generators/jinda_engine/templates/spec/controllers/api/v1_get_index_spec.rb +23 -0
  468. data/lib/generators/jinda_engine/templates/spec/controllers/api/v1_get_my_spec.rb +14 -0
  469. data/lib/generators/jinda_engine/templates/spec/controllers/api/v1_post_spec.rb +19 -0
  470. data/lib/generators/jinda_engine/templates/spec/controllers/sessions_controller_spec.rb +96 -0
  471. data/lib/generators/jinda_engine/templates/spec/features/userlogins_spec.rb +23 -0
  472. data/lib/generators/jinda_engine/templates/spec/mailers/note_spec.rb +24 -0
  473. data/lib/generators/jinda_engine/templates/spec/mailers/previews/note_preview.rb +9 -0
  474. data/lib/generators/jinda_engine/templates/spec/models/note_spec.rb +41 -0
  475. data/lib/generators/jinda_engine/templates/spec/models/user_spec.rb +12 -0
  476. data/lib/generators/jinda_engine/templates/spec/rails_helper.rb +44 -0
  477. data/lib/generators/jinda_engine/templates/spec/spec_helper.rb +77 -0
  478. data/lib/generators/jinda_engine/templates/spec/support/authentication_helper.rb +20 -0
  479. data/lib/generators/jinda_engine/templates/spec/support/factory_bot.rb +12 -0
  480. data/lib/generators/jinda_engine/templates/spec/support/omniauth_macros.rb +38 -0
  481. data/lib/generators/jinda_engine/templates/spec/support/request_spec_helper.rb +8 -0
  482. data/lib/generators/jinda_engine/templates/spec/views/articles/_article.html.erb_spec.rbx +14 -0
  483. data/lib/generators/jinda_engine/templates/test/application_system_test_case.rb +5 -0
  484. data/lib/generators/jinda_engine/templates/test/integration/jinda_routes_test.rb +42 -0
  485. data/lib/generators/jinda_engine/templates/test/test_helper.rb +6 -0
  486. data/lib/jinda_engine.rb +7 -0
  487. data/lib/jinda_engine/engine.rb +6 -0
  488. data/lib/jinda_engine/gemhelpers.rb +50 -0
  489. data/lib/jinda_engine/helpers.rb +1005 -0
  490. data/lib/jinda_engine/version.rb +3 -0
  491. data/lib/tasks/jinda_engine.rake +33 -0
  492. metadata +1203 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 8c037e222b5f3a3c7e8cb25ba68a90fe6f60d64ca50fbe431796148f25ef54e9
4
+ data.tar.gz: 65532c8a691e825c5a6b8ab6442546be073b0ba0459465ce265bb7abfd63c4b8
5
+ SHA512:
6
+ metadata.gz: 444c04e1ba891e10a9433cf0f4f2acf94e0146721dff162cfa127511253d949638fe95e1098c8b3dbc142a447b292fc0e1262f3494704799ed7839e559107121
7
+ data.tar.gz: 34988959e582f52900f7b074aaaf4f8aa30c0c836043604970d7674c4d58a7ff3b7d8e7bc5fe69d4388caecff28da7794f386d54718a76555d094f3f35914e3f
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,173 @@
1
+ # Jinda
2
+ Rails Application Generator using Freemind
3
+
4
+ * [jinda](https://github.com/kul1/jinda)
5
+ - ![jinda-screen](https://user-images.githubusercontent.com/3953832/41832753-0143339a-7813-11e8-9ef9-c1601443c604.png)
6
+
7
+ ## Additional Extension themes also available at
8
+ * [jinda_adminlte](https://github.com/kul1/jinda_adminlte)
9
+ - ![j18-screen](https://user-images.githubusercontent.com/3953832/34298172-faa7e962-e6e1-11e7-93e2-19dfd4ab42af.png)
10
+
11
+ * [jinda_adminbsb](https://github.com/kul1/jinda_adminbsb)
12
+ - ![jinda-bsb](https://user-images.githubusercontent.com/3953832/34320779-bb0980d2-e7c6-11e7-855c-fafc23487ba5.png)
13
+
14
+ ## Prerequisites
15
+
16
+ These versions works for sure but others may do.
17
+
18
+ * Ruby 2.7.0
19
+ * Rails 6.0.2
20
+ * MongoDB 6
21
+ * Freemind 1.0.1
22
+
23
+ ## Convention
24
+
25
+ * database is MongoDB
26
+ * images stored in upload directory, unset IMAGE_LOCATION in `initializer/jinda.rb` to use Cloudinary
27
+ * mail use Gmail SMTP, config in `config/application.rb`
28
+ * authentication use omniauth-identity
29
+
30
+ ## Sample Application
31
+
32
+ Supposed we want to create ecommerce web site, first create a Rails
33
+ app without ActiveRecord
34
+
35
+ $ rails new YOURAPP -BOTJ
36
+
37
+ ## Add jinda to your Gemfile:
38
+
39
+ gem 'jinda', '~> 0.5.3'
40
+
41
+ For Development (most updated)
42
+
43
+ gem 'jinda', github:'kul1/jinda'
44
+
45
+ depend on your operating system, you may need to uncomment
46
+
47
+ gem 'therubyracer', :platforms => :ruby
48
+
49
+ install gems
50
+
51
+ $ bundle
52
+
53
+ generate jinda application
54
+
55
+ $ rails generate jinda:install
56
+
57
+ Then run bundle again to install additional gems added by jinda
58
+
59
+ $ bundle
60
+
61
+ (or run all with "sh install.sh" )
62
+
63
+ configure mongoid, omniauth
64
+
65
+ $ rails generate jinda:config
66
+
67
+ Please make sure mongod is running then create admin user
68
+
69
+ $ rails jinda:seed
70
+
71
+ now the application is ready, start it as any Rails application
72
+
73
+ $ rails server
74
+
75
+ go to http://localhost:3000, click *Sign In* on the left menu, and enter user name `admin` and password `secret`
76
+
77
+ ![login](https://user-images.githubusercontent.com/3953832/41832924-d868f8f0-7813-11e8-93bb-19c0357cf604.png)
78
+
79
+ Now open file `app/jinda/index.mm` using Freemind
80
+
81
+ ![index mm](https://user-images.githubusercontent.com/3953832/34680350-7906fbe8-f45e-11e7-8df5-969b4c735c6e.png)
82
+
83
+ The 3 main branches are
84
+
85
+ * models - this defines all the models to use in the application
86
+ * services - this defines services which will be come the menu on the left of the screen. There will be 2 levels; the first sub branch is the main menu (modules) and the second sub branch is the sub menu (services)
87
+ * roles - this defines role for all users
88
+
89
+ ### models
90
+
91
+ Fiirst, we need to create some product so we click on models we'll see 2 models person and address. These are sample only. You can delete them or modify them however you want. We'll take a look at them first
92
+
93
+ ![models](https://user-images.githubusercontent.com/3953832/34681380-50b27dd6-f461-11e7-8472-3a14d76e0f16.png)
94
+
95
+ The first sub branch (e.g. person) is the model name. According to Rails convention, this should be a singular word. The next sub branch are columns in the database. Let's take a look at each:
96
+
97
+ * `fname` - this create a column (field) called fname which is a String by default
98
+ * `sex: integer` - this create a column called sex, it is integer so must be explicity defined. The next sub branch (1: male) is disregarded by Jinda so we can put whatever we want. Here I just put some reminder.
99
+ * `belongs_to :address` - here we have ![pen](https://cloud.githubusercontent.com/assets/3953832/25600038/3a4ffb66-2f0b-11e7-9f03-b875e550eefe.png)
100
+ icon. this means whatever text on this line will be added as is to the model Jinda generates. You use this to specify anything you want such as association, index, remarks in code, etc. according to mongoid gem. To draw the icon, rest mouse on the branch and hit &ltAlt-I&gt.
101
+ * `dob: date` - use any type that mongoid provides.
102
+ * `photo` - for file field, just use String here. Jinda will receive the binary file and store in file system or cloudinary then generate a url link to it.
103
+
104
+ In this example we just want a product model, so delete the person and address model and add a product branch like so
105
+
106
+ ![freemind1](https://user-images.githubusercontent.com/3953832/34680349-78f1eea6-f45e-11e7-8e43-50d9025bb449.png)
107
+
108
+ Save the mind map then run:
109
+
110
+ rake jinda:update
111
+
112
+ This will create file `app/models/product.rb`. In this file, note the comment lines `# jinda begin` and ` # jinda end`. Everything inside these comments will get overwritten when you change the models branch in the mind map so if you need to put anything inside here, use the mind map instead. You can add anything outside these comment lines which will be preserved when doing jinda:update.
113
+
114
+ ### services
115
+
116
+ Next we'll add some product into the database, we'll first take a look at the services branch, which already has 3 sub branches; users, admins, and devs. Unlike models person and address branches, these branches are actively used by the system so I recommend that you leave them alone. Let's open the users branch
117
+
118
+ ![image](https://cloud.githubusercontent.com/assets/3953832/25599895/ecf46466-2f09-11e7-82aa-81ade6b9cd83.png)
119
+
120
+ The text `users:User` on the sub branch has these implications:
121
+
122
+ * `users` correspond to `app/controllers/users_controller.rb` which already exist when you do rails generate jinda:install. New branch will create new controller if not exist. In Jinda term, this will be called module.
123
+ * `User` will create entry in main menu on the left of the screen. You don't see it in the screenshot above because it's controlled by the sub branch `role:m` which means this menu only available for login member. If you already signed in as admin, you should see it now.
124
+
125
+ The next sub branches has the following:
126
+
127
+ * `role: m` - means that this module (menu) is available only to user who has role m (if you open the role branch now will see that role m is member). All registered user has role m by default. User who is not log on would not be able to access this module.
128
+ * `link:info: /users` - means that this is a link, the format is link: *submenu label* : *url* where submenu label is the text to show in the submenu and url is the link to go to, in this case, it woud go to http://localhost:3000/users which will perform index action of UsersController.
129
+ * `user:edit` the branch that do not start with role:, rule:, nor link: will be a Jinda service. You will then specify the sequence of the execution as in this example there are 3 sub branches - enter_user, update_user, and rule:login? Let's take a look at them:
130
+
131
+ * `enter_user:edit` - the first step is to display a form to input user information, this is accompanied by icon ![image](https://cloud.githubusercontent.com/assets/3953832/25599946/47c32cf6-2f0a-11e7-80a8-2c02c6294c9a.png)
132
+ which means user interface screen. and will correspond to a view file `app/views/users/user/enter_user.html.erb` where `/users` comes from the module name (the sub branch of services), `/user` comes from the service name (the sub branch of users), and `enter_user.html.erb` comes from the first part of this branch. The `edit` after the colon is just a description of this step. This branch also has sub branch `rule:login? && own_xmain?` which specify rule for this step that the user must be login and can continue this task if he is the one who started it. *task* in here means each instance of service.
133
+ * `update_user` - this icon ![image](https://cloud.githubusercontent.com/assets/3953832/25599976/87b69ad2-2f0a-11e7-9aba-1bd4e9546d3e.png) means to execute method update_user within `users_controller.rb`
134
+
135
+ Armed with this knowledge, we are ready to add new product into our application like so:
136
+
137
+ ![add_enter](https://cloud.githubusercontent.com/assets/3953832/25600158/582d1fbe-2f0c-11e7-9bde-01a195a45b6c.png)
138
+
139
+
140
+ To generate controller and views we save this mind map and run
141
+
142
+ rake jinda:update
143
+
144
+ open file `app/views/products/add/enter.html.erb` you'll see some sample view already in there but commented. edit the file so it look like this
145
+
146
+
147
+ ![product_enter](https://cloud.githubusercontent.com/assets/3953832/25600363/e5cc8282-2f0d-11e7-81f7-273c9bdc1a63.png)
148
+
149
+
150
+ Note that we do not specify form_tag and submit_tag, these will be supplied by Jinda.
151
+
152
+ then open file `app/controllers/products_controller.rb` and add `create` method as follow. The method name has to be correspond to the ![bookmark](http://songrit.googlecode.com/files/bookmark.png) branch.
153
+
154
+ ![products_controller](http://songrit.googlecode.com/files/products_controller.png)
155
+
156
+ ## Testing
157
+
158
+ run following command:
159
+
160
+ rails generate jinda:rspec
161
+ guard init
162
+ guard
163
+
164
+ ![rspec](https://user-images.githubusercontent.com/3953832/34680352-7931d426-f45e-11e7-9f40-8b85b94c61bf.png)
165
+
166
+
167
+ ## Contributing
168
+
169
+ 1. Fork it
170
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
171
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
172
+ 4. Push to the branch (`git push origin my-new-feature`)
173
+ 5. Create new Pull Request
@@ -0,0 +1,32 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'Jinda_engine'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.md')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+ APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
18
+ load 'rails/tasks/engine.rake'
19
+
20
+ load 'rails/tasks/statistics.rake'
21
+
22
+ require 'bundler/gem_tasks'
23
+
24
+ require 'rake/testtask'
25
+
26
+ Rake::TestTask.new(:test) do |t|
27
+ t.libs << 'test'
28
+ t.pattern = 'test/**/*_test.rb'
29
+ t.verbose = false
30
+ end
31
+
32
+ task default: :test
@@ -0,0 +1,4 @@
1
+ //= link_tree ../images
2
+ //= link_directory ../stylesheets .css
3
+ //= link application.js
4
+
@@ -0,0 +1,24 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // the compiled file.
9
+ //
10
+ // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11
+ // GO AFTER THE REQUIRES BELOW.
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
23
+
24
+
@@ -0,0 +1,27 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // the compiled file.
9
+ //
10
+ // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11
+ // GO AFTER THE REQUIRES BELOW.
12
+ //
13
+ //= require jquery
14
+ //= require jquery.turbolinks
15
+ //= require jquery_ujs
16
+ //= require jqm/jquery.mobile.splitview
17
+ //= require jqm/jquery.mobile-1.2.1
18
+ //= require jqm/jquery.mobile.datebox
19
+ //= require jqm/iscroll-wrapper
20
+ //= require jqm/iscroll
21
+ //= require jqm/jinda
22
+ //= require turbolinks
23
+ //= require jqm/disable_enter_key.js
24
+ //= require disable_enter_key.js
25
+ //= require notes.js
26
+
27
+
@@ -0,0 +1,13 @@
1
+ // Action Cable provides the framework to deal with WebSockets in Rails.
2
+ // You can generate new channels where WebSocket features live using the `rails generate channel` command.
3
+ //
4
+ //= require action_cable
5
+ //= require_self
6
+ //= require_tree ./channels
7
+
8
+ (function() {
9
+ this.App || (this.App = {});
10
+
11
+ App.cable = ActionCable.createConsumer();
12
+
13
+ }).call(this);
@@ -0,0 +1,10 @@
1
+ $(function() {
2
+ $("input").keypress(function (evt) {
3
+ //Deterime where our character code is coming from within the event
4
+ var charCode = evt.charCode || evt.keyCode;
5
+ if (charCode == 13) { //Enter key's keycode
6
+ alert("Please click the button");
7
+ return false;
8
+ }
9
+ });
10
+ })
@@ -0,0 +1,32 @@
1
+ /*
2
+ * iscroll-wrapper for jQquery.
3
+ * http://sanraul.com/projects/jqloader/
4
+ *
5
+ * Copyright (c) 2011 Raul Sanchez (http://www.sanraul.com)
6
+ *
7
+ * Dual licensed under the MIT and GPL licenses:
8
+ * http://www.opensource.org/licenses/mit-license.php
9
+ * http://www.gnu.org/licenses/gpl.html
10
+ */
11
+
12
+ (function($){
13
+ $.fn.iscroll = function(options){
14
+ if(this.data('iScrollReady') == null){
15
+ var that = this;
16
+ var options = $.extend({}, options);
17
+ options.onScrollEnd = function(){
18
+ that.triggerHandler('onScrollEnd', [this]);
19
+ };
20
+ arguments.callee.object = new iScroll(this.get(0), options);
21
+ // NOTE: for some reason in a complex page the plugin does not register
22
+ // the size of the element. This will fix that in the meantime.
23
+ setTimeout(function(scroller){
24
+ scroller.refresh();
25
+ }, 1000, arguments.callee.object);
26
+ this.data('iScrollReady', true);
27
+ }else{
28
+ arguments.callee.object.refresh();
29
+ }
30
+ return arguments.callee.object;
31
+ };
32
+ })(jQuery);