jinda 0.7.7.2 → 0.7.7.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (226) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -1
  3. data/app/config/routes.rb +44 -0
  4. data/lib/generators/jinda/templates/README.md +3 -1
  5. data/lib/generators/jinda/templates/app/assets/stylesheets/application.css.scss +2 -2
  6. data/lib/generators/jinda/templates/app/assets/stylesheets/jinda_jqm.css.scss +32 -0
  7. data/lib/generators/jinda/templates/app/mailers/{application_mailer.rb → application_mailer.rb-org} +0 -0
  8. data/lib/generators/jinda/templates/config/mongoid.yml +3 -3
  9. data/lib/jinda/version.rb +1 -1
  10. data/test/Gemfile +2 -0
  11. data/test/dummy/Dockerfile +26 -0
  12. data/test/dummy/Gemfile +99 -0
  13. data/test/dummy/Gemfile.lock +515 -0
  14. data/test/dummy/{db/development.sqlite3 → README.md} +0 -0
  15. data/test/dummy/README.md.bak +24 -0
  16. data/test/dummy/Rakefile +1 -1
  17. data/test/dummy/app/assets/config/manifest.js +2 -1
  18. data/test/dummy/app/assets/config/manifest.js-rails +2 -0
  19. data/test/dummy/app/assets/javascripts/application.js +15 -0
  20. data/test/dummy/app/assets/stylesheets/{application.css → application.css.bak} +3 -3
  21. data/test/dummy/app/assets/stylesheets/application.css.scss +15 -0
  22. data/test/dummy/app/assets/stylesheets/jinda_jqm.css.scss +32 -0
  23. data/test/dummy/app/controllers/admins_controller.rb +6 -0
  24. data/test/dummy/app/controllers/api/v1/notes_controller.rb +81 -0
  25. data/test/dummy/app/controllers/application_controller.rb +39 -0
  26. data/test/dummy/app/controllers/application_controller.rb.bak +2 -0
  27. data/test/dummy/app/controllers/articles_controller.rb +110 -0
  28. data/test/dummy/app/controllers/comments_controller.rb +31 -0
  29. data/test/dummy/app/controllers/docs_controller.rb +56 -0
  30. data/test/dummy/app/controllers/identities_controller.rb +5 -0
  31. data/test/dummy/app/controllers/notes_controller.rb +84 -0
  32. data/test/dummy/app/controllers/password_resets.rb +28 -0
  33. data/test/dummy/app/controllers/password_resets_controller.rb +34 -0
  34. data/test/dummy/app/controllers/sessions_controller.rb +44 -0
  35. data/test/dummy/app/controllers/sitemap_controller.rb +12 -0
  36. data/test/dummy/app/controllers/users_controller.rb +35 -0
  37. data/test/dummy/app/helpers/admins_helper.rb +2 -0
  38. data/test/dummy/app/helpers/application_helper.rb +31 -0
  39. data/test/dummy/app/helpers/application_helper.rb.bak +2 -0
  40. data/test/dummy/app/helpers/articles_helper.rb +2 -0
  41. data/test/dummy/app/helpers/basic_helper.rb +2 -0
  42. data/test/dummy/app/helpers/comments_helper.rb +2 -0
  43. data/test/dummy/app/helpers/ctrs_helper.rb +2 -0
  44. data/test/dummy/app/helpers/devs_helper.rb +2 -0
  45. data/test/dummy/app/helpers/pictures_helper.rb +2 -0
  46. data/test/dummy/app/helpers/sitemap_helper.rb +2 -0
  47. data/test/dummy/app/helpers/users_helper.rb +2 -0
  48. data/test/dummy/app/jinda/index.mm +486 -0
  49. data/test/dummy/app/jinda/template/index.mm +366 -0
  50. data/test/dummy/app/jinda/template/linkview.haml +21 -0
  51. data/test/dummy/app/jinda/template/view.html.erb +34 -0
  52. data/test/dummy/app/mailers/application_mailer.rb +2 -2
  53. data/test/dummy/app/mailers/application_mailer.rb-org +4 -0
  54. data/test/dummy/app/mailers/jinda_mailer.rb +7 -0
  55. data/test/dummy/app/mailers/note_mailer.rb +10 -0
  56. data/test/dummy/app/mailers/user_mailer.rb +15 -0
  57. data/test/dummy/app/models/address.rb +14 -0
  58. data/test/dummy/app/models/article.rb +14 -0
  59. data/test/dummy/app/models/comment.rb +14 -0
  60. data/test/dummy/app/models/identity.rb +18 -0
  61. data/test/dummy/app/models/jinda/doc.rb +36 -0
  62. data/test/dummy/app/models/jinda/module.rb +11 -0
  63. data/test/dummy/app/models/jinda/notice.rb +14 -0
  64. data/test/dummy/app/models/jinda/role.rb +8 -0
  65. data/test/dummy/app/models/jinda/runseq.rb +24 -0
  66. data/test/dummy/app/models/jinda/service.rb +17 -0
  67. data/test/dummy/app/models/jinda/xmain.rb +38 -0
  68. data/test/dummy/app/models/note.rb +22 -0
  69. data/test/dummy/app/models/param.rb +41 -0
  70. data/test/dummy/app/models/person.rb +14 -0
  71. data/test/dummy/app/models/user.rb +66 -0
  72. data/test/dummy/app/views/adminbsbs/content.haml +241 -0
  73. data/test/dummy/app/views/admins/edit_role/edit_role.html.erb +7 -0
  74. data/test/dummy/app/views/admins/edit_role/select_user.html.erb +4 -0
  75. data/test/dummy/app/views/api/v1/note.haml +0 -0
  76. data/test/dummy/app/views/articles/_report.haml +35 -0
  77. data/test/dummy/app/views/articles/edit.haml +23 -0
  78. data/test/dummy/app/views/articles/edit_article/edit_article.html.erb +15 -0
  79. data/test/dummy/app/views/articles/edit_article/select_article.html.erb +12 -0
  80. data/test/dummy/app/views/articles/index.haml +5 -0
  81. data/test/dummy/app/views/articles/my.haml +5 -0
  82. data/test/dummy/app/views/articles/new_article/form_article.html.erb +16 -0
  83. data/test/dummy/app/views/articles/show.html.haml +58 -0
  84. data/test/dummy/app/views/articles/xedit_article/edit_article.html.erb +13 -0
  85. data/test/dummy/app/views/ctrs/vfolder1/viewfile1.html.erb +23 -0
  86. data/test/dummy/app/views/ctrs/vfolder1/viewfile2.html.erb +23 -0
  87. data/test/dummy/app/views/ctrs/vfolder2/viewfile2.html.erb +23 -0
  88. data/test/dummy/app/views/custom/_adsense.haml +6 -0
  89. data/test/dummy/app/views/docs/doc_edit/doc_edit.html.erb +21 -0
  90. data/test/dummy/app/views/docs/doc_edit/doc_select.html.erb +14 -0
  91. data/test/dummy/app/views/docs/doc_new/doc_form.html.erb +32 -0
  92. data/test/dummy/app/views/docs/doc_new/doc_form.md +36 -0
  93. data/test/dummy/app/views/docs/doc_xedit/doc_edit.html.erb +21 -0
  94. data/test/dummy/app/views/docs/edit/select_note.html.erb +14 -0
  95. data/test/dummy/app/views/docs/index.haml +21 -0
  96. data/test/dummy/app/views/docs/my.haml +27 -0
  97. data/test/dummy/app/views/identities/new.html.haml +32 -0
  98. data/test/dummy/app/views/jinda/_activity.md +10 -0
  99. data/test/dummy/app/views/jinda/_menu.haml +27 -0
  100. data/test/dummy/app/views/jinda/_menu_mm.haml +44 -0
  101. data/test/dummy/app/views/jinda/_model.md +5 -0
  102. data/test/dummy/app/views/jinda/_modul.md +9 -0
  103. data/test/dummy/app/views/jinda/_pending_home.haml +5 -0
  104. data/test/dummy/app/views/jinda/_pending_page.haml +24 -0
  105. data/test/dummy/app/views/jinda/_service.md +24 -0
  106. data/test/dummy/app/views/jinda/_static.haml +13 -0
  107. data/test/dummy/app/views/jinda/doc-thai.md +37 -0
  108. data/test/dummy/app/views/jinda/doc.md +36 -0
  109. data/test/dummy/app/views/jinda/error_logs.haml +22 -0
  110. data/test/dummy/app/views/jinda/feed.rss.builder +27 -0
  111. data/test/dummy/app/views/jinda/help.haml +20 -0
  112. data/test/dummy/app/views/jinda/index.html.haml +53 -0
  113. data/test/dummy/app/views/jinda/logs.haml +22 -0
  114. data/test/dummy/app/views/jinda/notice_logs.haml +18 -0
  115. data/test/dummy/app/views/jinda/pending.haml +1 -0
  116. data/test/dummy/app/views/jinda/run_form.haml +42 -0
  117. data/test/dummy/app/views/jinda/run_output.haml +38 -0
  118. data/test/dummy/app/views/jinda/search.haml +20 -0
  119. data/test/dummy/app/views/jinda/status.haml +61 -0
  120. data/test/dummy/app/views/jinda_mailer/gmail.html.erb +9 -0
  121. data/test/dummy/app/views/layouts/_head.html.erb +10 -0
  122. data/test/dummy/app/views/layouts/_meta_tag.html.erb +19 -0
  123. data/test/dummy/app/views/layouts/application.haml +4 -0
  124. data/test/dummy/app/views/layouts/{application.html.erb → application.html.erb.bak} +2 -1
  125. data/test/dummy/app/views/layouts/bsb/_footer.haml +7 -0
  126. data/test/dummy/app/views/layouts/bsb/_header.haml +147 -0
  127. data/test/dummy/app/views/layouts/bsb/_menu.haml +47 -0
  128. data/test/dummy/app/views/layouts/bsb/_menu_mm.haml +34 -0
  129. data/test/dummy/app/views/layouts/bsb/_rightbar.haml +123 -0
  130. data/test/dummy/app/views/layouts/bsb/_sidebar.haml +155 -0
  131. data/test/dummy/app/views/layouts/bsb/application.haml-bsb +47 -0
  132. data/test/dummy/app/views/layouts/gmail.html.erb +9 -0
  133. data/test/dummy/app/views/layouts/jqm/_full.haml +33 -0
  134. data/test/dummy/app/views/layouts/jqm/_page.haml +16 -0
  135. data/test/dummy/app/views/layouts/jqm/application.haml-jqm +4 -0
  136. data/test/dummy/app/views/layouts/mailer.html.haml +3 -0
  137. data/test/dummy/app/views/layouts/mailer.text.haml +1 -0
  138. data/test/dummy/app/views/layouts/mobile.html.erb +13 -0
  139. data/test/dummy/app/views/layouts/mobilejq.html.erb +31 -0
  140. data/test/dummy/app/views/layouts/print.html.erb +22 -0
  141. data/test/dummy/app/views/layouts/utf8.html.erb +22 -0
  142. data/test/dummy/app/views/note_mailer/gmail.html.haml +7 -0
  143. data/test/dummy/app/views/note_mailer/gmail.text.haml +8 -0
  144. data/test/dummy/app/views/notes/delete/select_note.html.erb +14 -0
  145. data/test/dummy/app/views/notes/edit/edit_note.html.erb +10 -0
  146. data/test/dummy/app/views/notes/edit/select_note.html.erb +14 -0
  147. data/test/dummy/app/views/notes/index.haml +71 -0
  148. data/test/dummy/app/views/notes/mail/display_mail.html.erb +20 -0
  149. data/test/dummy/app/views/notes/mail/select_note.html.erb +19 -0
  150. data/test/dummy/app/views/notes/mail/show.html.haml +13 -0
  151. data/test/dummy/app/views/notes/my.haml +21 -0
  152. data/test/dummy/app/views/notes/new/new_note.html.erb +13 -0
  153. data/test/dummy/app/views/notes/show.haml +10 -0
  154. data/test/dummy/app/views/notes/xedit/edit_note.html.erb +10 -0
  155. data/test/dummy/app/views/password_resets/edit.html.erb +21 -0
  156. data/test/dummy/app/views/password_resets/new.html.haml +11 -0
  157. data/test/dummy/app/views/sessions/new.html.haml +22 -0
  158. data/test/dummy/app/views/sitemap/index.xml.haml +10 -0
  159. data/test/dummy/app/views/user_mailer/password_reset.html.haml +3 -0
  160. data/test/dummy/app/views/user_mailer/password_reset.text.erb +3 -0
  161. data/test/dummy/app/views/user_mailer/password_reset.text.haml +3 -0
  162. data/test/dummy/app/views/users/index.haml +13 -0
  163. data/test/dummy/app/views/users/pwd/enter.html.erb +6 -0
  164. data/test/dummy/app/views/users/user/enter_user.html.erb +10 -0
  165. data/test/dummy/bin/rails +3 -3
  166. data/test/dummy/bin/rake +2 -2
  167. data/test/dummy/bin/setup +9 -17
  168. data/test/dummy/config/application.rb +51 -9
  169. data/test/dummy/config/boot.rb +3 -4
  170. data/test/dummy/config/cloudinary.yml +9 -0
  171. data/test/dummy/config/credentials.yml.enc +1 -0
  172. data/test/dummy/config/environment.rb +7 -1
  173. data/test/dummy/config/environments/development.rb +20 -20
  174. data/test/dummy/config/environments/production.rb +16 -40
  175. data/test/dummy/config/environments/test.rb +19 -11
  176. data/test/dummy/config/initializers/assets.rb +1 -1
  177. data/test/dummy/config/initializers/content_security_policy.rb +21 -24
  178. data/test/dummy/config/initializers/filter_parameter_logging.rb +6 -2
  179. data/test/dummy/config/initializers/fix_mongoid_generator.rb-org +14 -0
  180. data/test/dummy/config/initializers/inflections.rb +4 -4
  181. data/test/dummy/config/initializers/jinda.rb +14 -0
  182. data/test/dummy/config/initializers/mongoid.rb +10 -0
  183. data/test/dummy/config/initializers/omniauth.rb +17 -0
  184. data/test/dummy/config/initializers/permissions_policy.rb +11 -0
  185. data/test/dummy/config/locales/en.yml +3 -3
  186. data/test/dummy/config/mongoid.yml +196 -0
  187. data/test/dummy/config/mongoid.yml-docker +182 -0
  188. data/test/dummy/config/mongoid.yml-localhost +182 -0
  189. data/test/dummy/config/puma.rb +7 -2
  190. data/test/dummy/config/routes.rb +5 -1
  191. data/test/dummy/config.ru +2 -1
  192. data/test/dummy/db/seeds.rb +6 -0
  193. data/test/dummy/docker-compose.yml +19 -0
  194. data/test/dummy/dot/dot.env +2 -0
  195. data/test/dummy/entrypoint.sh +13 -0
  196. data/test/dummy/log/development.log +697 -6
  197. data/test/dummy/public/robots.txt +1 -0
  198. data/test/dummy/spec/controllers/api/v1_get_index_spec.rb +23 -0
  199. data/test/dummy/spec/controllers/api/v1_get_my_spec.rb +14 -0
  200. data/test/dummy/spec/controllers/api/v1_post_spec.rb +19 -0
  201. data/test/dummy/spec/controllers/sessions_controller_spec.rb +98 -0
  202. data/test/dummy/spec/features/userlogins_spec.rb +23 -0
  203. data/test/dummy/spec/mailers/note_spec.rb +24 -0
  204. data/test/dummy/spec/mailers/previews/note_preview.rb +9 -0
  205. data/test/dummy/spec/models/note_spec.rb +41 -0
  206. data/test/dummy/spec/models/user_spec.rb +12 -0
  207. data/test/dummy/spec/rails_helper.rb +42 -0
  208. data/test/dummy/spec/spec_helper.rb +80 -0
  209. data/test/dummy/spec/support/authentication_helper.rb +20 -0
  210. data/test/dummy/spec/support/databasecleaner.rb +13 -0
  211. data/test/dummy/spec/support/factory_bot.rb +12 -0
  212. data/test/dummy/spec/support/omniauth_macros.rb +38 -0
  213. data/test/dummy/spec/support/request_spec_helper.rb +8 -0
  214. data/test/dummy/spec/views/articles/_article.html.erb_spec.rbx +14 -0
  215. data/test/dummy/tmp/development_secret.txt +1 -1
  216. metadata +188 -17
  217. data/test/dummy/app/javascript/packs/application.js +0 -15
  218. data/test/dummy/app/models/application_record.rb +0 -3
  219. data/test/dummy/config/database.yml +0 -25
  220. data/test/dummy/config/initializers/application_controller_renderer.rb +0 -8
  221. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  222. data/test/dummy/config/initializers/cookies_serializer.rb +0 -5
  223. data/test/dummy/config/initializers/mime_types.rb +0 -4
  224. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  225. data/test/dummy/config/spring.rb +0 -6
  226. data/test/dummy/config/storage.yml +0 -34
@@ -0,0 +1,13 @@
1
+ - title @note.title
2
+ - description @note.body
3
+
4
+ - @title= 'Show Note'
5
+ - doc = Note.find_by :id => $xvars["select_note"]["id"]
6
+ = fields_for doc do |f|
7
+ = f.label :title, "Title"
8
+ = f.text_field :title
9
+ %br/
10
+ = f.label :body, "Body Content"
11
+ = f.cktext_area :body, :cols=>50, :rows=>6
12
+
13
+ = link_to image_tag('pencil.png', style:'border:none; float:none;'), {controller: "jinda", action: "init", s: 'notes:xedit', note_id: @note.id}, data: { confirm: "Please Confirm" }
@@ -0,0 +1,21 @@
1
+ - @title= "My Notes"
2
+ %P
3
+ - @page_title = 'My Notes'
4
+ = paginate @notes
5
+ %table{:class=>"module-table", :data-mode => "reflow", :data-role => "table"}
6
+ %tr
7
+ %th Title
8
+ %th Body
9
+ %th Created
10
+ %th Updated
11
+ %th Delete
12
+ %th Edit
13
+ - @notes.each do |note|
14
+ %tr
15
+ %td= link_to note.title, :controller=>"notes", :action=>"show", :id=>note.id
16
+ %td= note.body
17
+ %td= note.created_at.strftime('%m/%d/%Y')
18
+ %td= note.updated_at.strftime('%m/%d/%Y')
19
+ %td(align='center')= link_to image_tag('delete.png', style:'border:none; float:none;'), "#", :onclick=>"if (confirm('Please Confirm')) {location.hash='/notes/destroy/#{note.id}';}"
20
+ %td(align='center')= link_to image_tag('pencil.png', style:'border:none; float:none;'), {controller: "jinda", action: "init", s: 'notes:xedit', note_id: note.id}, data: { confirm: "Please Confirm" }
21
+
@@ -0,0 +1,13 @@
1
+ <%- @title= 'New Note' %>
2
+ <%
3
+ doc = Note.new :issue_on=> Date.today, :process_at => Time.now
4
+ %>
5
+ <div name= "note_new">
6
+
7
+ <%= fields_for doc, validate: true do |f| %>
8
+ <%= f.label :title, "Title" %>
9
+ <%= f.text_field :title, :required => true %><Br>
10
+ <%= f.label :body, "Body Content" %>
11
+ <%= f.text_area :body, :cols=>50, :rows=>6, required: true %>
12
+ <% end %>
13
+ </div>
@@ -0,0 +1,10 @@
1
+ - @title= 'Show Note'
2
+ - doc = Note.find_by :id => @note.id
3
+
4
+ %h3.ui-bar.ui-bar-a.ui-corner-all Title: #{@note.title}
5
+       
6
+ .ui-body.ui-body-a.ui-corner-all
7
+           
8
+ %p #{@note.body}
9
+
10
+ = link_to image_tag('pencil.png', style:'border:none; float:none;'), {controller: "jinda", action: "init", s: 'notes:xedit', note_id: @note.id}, data: { confirm: "Please Confirm" }
@@ -0,0 +1,10 @@
1
+ <%- @title= 'Edit Note' %>
2
+ <%
3
+ doc = Note.find_by :id=> $xvars["p"]["note_id"]
4
+ %>
5
+ <%= fields_for doc do |f| %>
6
+ <%= f.label :title, "Title" %>
7
+ <%= f.text_field :title %><Br>
8
+ <%= f.label :body, "Body Content" %>
9
+ <%= f.text_area :body, :cols=>50, :rows=>6 %>
10
+ <% end %>
@@ -0,0 +1,21 @@
1
+ <%= form_for @user, :url => password_reset_path(params[:id]) do |f| %>
2
+ <% if @user.errors.any? %>
3
+ <div class="error_messages">
4
+ <h2>Form is invalid</h2>
5
+ <ul>
6
+ <% for message in @user.errors.full_messages %>
7
+ <li><%= message %></li>
8
+ <% end %>
9
+ </ul>
10
+ </div>
11
+ <% end %>
12
+ <div class="field">
13
+ <%= f.label :password %>
14
+ <%= f.password_field :password %>
15
+ </div>
16
+ <div class="field">
17
+ <%= f.label :password_confirmation %>
18
+ <%= f.password_field :password_confirmation %>
19
+ </div>
20
+ <div class="actions"><%= f.submit "Update Password" %></div>
21
+ <% end %>
@@ -0,0 +1,11 @@
1
+ .container
2
+ .signup-form
3
+ .sign_in
4
+ = form_tag password_resets_path, :method => :post do
5
+ .form-group.form-control
6
+ = label_tag :email
7
+ = text_field_tag :email, params[:email]
8
+ %button.btn.btn-success.btn-block.actions{:type => "submit"}
9
+ %i.fas.fa-sign-in-alt
10
+ Reset Password
11
+
@@ -0,0 +1,22 @@
1
+ .container
2
+ .signup-form
3
+ = form_tag "/auth/identity/callback", {'data-ajax'=>'false'} do
4
+ %h1.h3.mb-3.font-weight-normal{:style => "text-align: center"} Sign in
5
+ .sign_in
6
+ .label-warning
7
+ = flash[:alert]
8
+ .form-group.form-control
9
+ = label_tag :auth_key, "User name"
10
+ = text_field_tag :auth_key
11
+ .form-group.form-control
12
+ = label_tag :password, "Password"
13
+ = password_field_tag :password
14
+ .form-group
15
+ = label_tag :remember_me
16
+ = check_box_tag :remember_me, 1, params.permit[:remember_me]
17
+ %button.btn.btn-success.btn-block.actions{:type => "submit"}
18
+ %i.fas.fa-sign-in-alt
19
+ Sign in
20
+ = link_to 'Forgotten password?', new_password_reset_path, data: {icon: 'info', mini: 'true', role: 'button'}
21
+ %hr/
22
+
@@ -0,0 +1,10 @@
1
+ /= From https://makandracards.com/makandra/689-know-your-haml-comments
2
+
3
+ !!! XML
4
+ %urlset{:xmlns => "http://www.sitemaps.org/schemas/sitemap/0.9"}
5
+ - for article in @articles
6
+ %url
7
+ %loc #{article_url(article)}
8
+ %lastmod=article.updated_at.strftime('%Y-%m-%d')
9
+ %changefreq monthly
10
+ %priority 0.5
@@ -0,0 +1,3 @@
1
+ To reset your password, click the URL below.
2
+ = edit_password_reset_url(@user.password_reset_token)
3
+ If you did not request your password to be reset, just ignore this email and your password will continue to stay the same.
@@ -0,0 +1,3 @@
1
+ To reset your password, click the URL below.
2
+ = edit_password_reset_url(@user.password_reset_token)
3
+ If you did not request your password to be reset, just ignore this email and your password will continue to stay the same.
@@ -0,0 +1,3 @@
1
+ UserMailer#password_reset
2
+
3
+ = @greeting + ", find me in app/views/user_mailer/password_reset.text.haml"
@@ -0,0 +1,13 @@
1
+ .field(data-role="fieldcontain")
2
+ %label.ui-input-text Name
3
+ = b current_ma_user.code
4
+ .field(data-role="fieldcontain")
5
+ %label.ui-input-text Email
6
+ = b current_ma_user.email
7
+ .field(data-role="fieldcontain")
8
+ %label.ui-input-text Role
9
+ = b current_ma_user.role
10
+
11
+ - if @xmains
12
+ %h2 Pending Tasks
13
+ = render :partial=>"jinda/pending_page", :locals=>{:xmains=>@xmains}
@@ -0,0 +1,6 @@
1
+ <%= label_tag :epass, "Existing password" %>
2
+ <%= password_field_tag :epass %>
3
+ <%= label_tag :npass, "New password" %>
4
+ <%= password_field_tag :npass %>
5
+ <%= label_tag :npass_confirm, "New password confirmation" %>
6
+ <%= password_field_tag :npass_confirm %>
@@ -0,0 +1,10 @@
1
+ <%
2
+ user = current_ma_user
3
+ %>
4
+ <h3><%= user.code %></h3>
5
+ <%= fields_for user do |f| %>
6
+ <%= f.label :email, "Email" %>
7
+ <%= f.text_field :email %>
8
+ <%= f.label :image, "image link" %>
9
+ <%= f.text_field :image%>
10
+ <% end %>
data/test/dummy/bin/rails CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- APP_PATH = File.expand_path('../config/application', __dir__)
3
- require_relative '../config/boot'
4
- require 'rails/commands'
2
+ APP_PATH = File.expand_path("../config/application", __dir__)
3
+ require_relative "../config/boot"
4
+ require "rails/commands"
data/test/dummy/bin/rake CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- require_relative '../config/boot'
3
- require 'rake'
2
+ require_relative "../config/boot"
3
+ require "rake"
4
4
  Rake.application.run
data/test/dummy/bin/setup CHANGED
@@ -1,33 +1,25 @@
1
1
  #!/usr/bin/env ruby
2
- require 'fileutils'
2
+ require "fileutils"
3
3
 
4
4
  # path to your application root.
5
- APP_ROOT = File.expand_path('..', __dir__)
5
+ APP_ROOT = File.expand_path("..", __dir__)
6
6
 
7
7
  def system!(*args)
8
8
  system(*args) || abort("\n== Command #{args} failed ==")
9
9
  end
10
10
 
11
11
  FileUtils.chdir APP_ROOT do
12
- # This script is a way to setup or update your development environment automatically.
13
- # This script is idempotent, so that you can run it at anytime and get an expectable outcome.
12
+ # This script is a way to set up or update your development environment automatically.
13
+ # This script is idempotent, so that you can run it at any time and get an expectable outcome.
14
14
  # Add necessary setup steps to this file.
15
15
 
16
- puts '== Installing dependencies =='
17
- system! 'gem install bundler --conservative'
18
- system('bundle check') || system!('bundle install')
19
-
20
- # puts "\n== Copying sample files =="
21
- # unless File.exist?('config/database.yml')
22
- # FileUtils.cp 'config/database.yml.sample', 'config/database.yml'
23
- # end
24
-
25
- puts "\n== Preparing database =="
26
- system! 'bin/rails db:prepare'
16
+ puts "== Installing dependencies =="
17
+ system! "gem install bundler --conservative"
18
+ system("bundle check") || system!("bundle install")
27
19
 
28
20
  puts "\n== Removing old logs and tempfiles =="
29
- system! 'bin/rails log:clear tmp:clear'
21
+ system! "bin/rails log:clear tmp:clear"
30
22
 
31
23
  puts "\n== Restarting application server =="
32
- system! 'bin/rails restart'
24
+ system! "bin/rails restart"
33
25
  end
@@ -1,19 +1,61 @@
1
- require_relative 'boot'
1
+ require_relative "boot"
2
2
 
3
- require 'rails/all'
3
+ require "rails"
4
+ # Pick the frameworks you want:
5
+ require "active_model/railtie"
6
+ require "active_job/railtie"
7
+ # require "active_record/railtie"
8
+ # require "active_storage/engine"
9
+ require "action_controller/railtie"
10
+ require "action_mailer/railtie"
11
+ # require "action_mailbox/engine"
12
+ # require "action_text/engine"
13
+ require "action_view/railtie"
14
+ require "action_cable/engine"
15
+ # require "rails/test_unit/railtie"
4
16
 
17
+ # Require the gems listed in Gemfile, including any gems
18
+ # you've limited to :test, :development, or :production.
5
19
  Bundler.require(*Rails.groups)
6
- require "jinda"
7
20
 
8
21
  module Dummy
9
22
  class Application < Rails::Application
23
+
24
+ # Jinda default
25
+ config.generators do |g|
26
+ g.orm :mongoid
27
+ g.template_engine :haml
28
+ g.test_framework :rspec
29
+ g.integration_tool :rspec
30
+ end
31
+
32
+ # config time zone
33
+ config.time_zone = "Central Time (US & Canada)"
34
+
35
+ # gmail config
36
+ # config.action_mailer.delivery_method = :smtp
37
+ # config.action_mailer.smtp_settings = {
38
+ # :address => "smtp.gmail.com",
39
+ # :port => 587,
40
+ # :user_name => 'user@gmail.com',
41
+ # :password => 'secret',
42
+ # :authentication => 'plain',
43
+ # :enable_starttls_auto => true }
44
+ # config.action_mailer.raise_delivery_errors = true
45
+ # config.action_mailer.perform_deliveries = true
46
+
10
47
  # Initialize configuration defaults for originally generated Rails version.
11
- config.load_defaults 6.0
48
+ config.load_defaults 7.0
12
49
 
13
- # Settings in config/environments/* take precedence over those specified here.
14
- # Application configuration can go into files in config/initializers
15
- # -- all .rb files in that directory are automatically loaded after loading
16
- # the framework and any gems in your application.
50
+ # Configuration for the application, engines, and railties goes here.
51
+ #
52
+ # These settings can be overridden in specific environments using the files
53
+ # in config/environments, which are processed later.
54
+ #
55
+ # config.time_zone = "Central Time (US & Canada)"
56
+ # config.eager_load_paths << Rails.root.join("extras")
57
+
58
+ # Don't generate system test files.
59
+ config.generators.system_tests = nil
17
60
  end
18
61
  end
19
-
@@ -1,5 +1,4 @@
1
- # Set up gems listed in the Gemfile.
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../Gemfile', __dir__)
1
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
3
2
 
4
- require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5
- $LOAD_PATH.unshift File.expand_path('../../../lib', __dir__)
3
+ require "bundler/setup" # Set up gems listed in the Gemfile.
4
+ require "bootsnap/setup" # Speed up boot time by caching expensive operations.
@@ -0,0 +1,9 @@
1
+ development:
2
+ cloud_name: "sample"
3
+ api_key: "874837483274837"
4
+ api_secret: "a676b67565c6767a6767d6767f676fe1"
5
+
6
+ production:
7
+ cloud_name: "sample"
8
+ api_key: "874837483274837"
9
+ api_secret: "a676b67565c6767a6767d6767f676fe1"
@@ -0,0 +1 @@
1
+ xOGPelyaT1v3CYb4FMvcnfeMGaZCqYxH+8aLnGqPEUiT3xTZ4p//+p7hk+9nCg4OlSf41OEZ1NXk3i0w0hB1dxEBuRmJ753h8RFqyYpUIRK0spp4IT0yco7a7n5Ga0Mk2GKjI30umX7mIZceXgaYXTGh8eZPBFhnXy7tB3uT8wC2Xj9L14MzgGb4BuVi+ahzJSEyt/4UhkrDDp1Fhp3jkGTl9dANcDQCl3OG1Dm2i9jhpGeJtX+XkPhUNquZ/OxnIYjdKdchiBIsLITsMEff0F/etO4Lhe6C42eqi4jaoiSTtgRht0dRe1IaqajIkq3R4MEf1QYUDZvzBTnJwtpsaBNx5H8nITuhrCa9Mf/kMecjP/qyhsKnJx+cjL7Qf8qm917sCahQr3AKHW8zKFz7MovZfuW6A2u4YxSJ--PIknWU8u9P4xf4A6--0GSRBaYsp1y2hRpDTuQ5GQ==
@@ -1,5 +1,11 @@
1
1
  # Load the Rails application.
2
- require_relative 'application'
2
+ require_relative "application"
3
3
 
4
4
  # Initialize the Rails application.
5
5
  Rails.application.initialize!
6
+
7
+ # hack to fix cloudinary error https://github.com/archiloque/rest-client/issues/141
8
+ class Hash
9
+ remove_method :read
10
+ rescue
11
+ end
@@ -1,8 +1,10 @@
1
+ require "active_support/core_ext/integer/time"
2
+
1
3
  Rails.application.configure do
2
4
  # Settings specified here will take precedence over those in config/application.rb.
3
5
 
4
- # In the development environment your application's code is reloaded on
5
- # every request. This slows down response time but is perfect for development
6
+ # In the development environment your application's code is reloaded any time
7
+ # it changes. This slows down response time but is perfect for development
6
8
  # since you don't have to restart the web server when you make code changes.
7
9
  config.cache_classes = false
8
10
 
@@ -12,15 +14,18 @@ Rails.application.configure do
12
14
  # Show full error reports.
13
15
  config.consider_all_requests_local = true
14
16
 
17
+ # Enable server timing
18
+ config.server_timing = true
19
+
15
20
  # Enable/disable caching. By default caching is disabled.
16
21
  # Run rails dev:cache to toggle caching.
17
- if Rails.root.join('tmp', 'caching-dev.txt').exist?
22
+ if Rails.root.join("tmp/caching-dev.txt").exist?
18
23
  config.action_controller.perform_caching = true
19
24
  config.action_controller.enable_fragment_cache_logging = true
20
25
 
21
26
  config.cache_store = :memory_store
22
27
  config.public_file_server.headers = {
23
- 'Cache-Control' => "public, max-age=#{2.days.to_i}"
28
+ "Cache-Control" => "public, max-age=#{2.days.to_i}"
24
29
  }
25
30
  else
26
31
  config.action_controller.perform_caching = false
@@ -28,35 +33,30 @@ Rails.application.configure do
28
33
  config.cache_store = :null_store
29
34
  end
30
35
 
31
- # Store uploaded files on the local file system (see config/storage.yml for options).
32
- config.active_storage.service = :local
33
-
34
36
  # Don't care if the mailer can't send.
35
37
  config.action_mailer.raise_delivery_errors = false
38
+ config.assets.check_precompiled_asset = false
36
39
 
37
40
  config.action_mailer.perform_caching = false
38
41
 
39
42
  # Print deprecation notices to the Rails logger.
40
43
  config.active_support.deprecation = :log
41
44
 
42
- # Raise an error on page load if there are pending migrations.
43
- config.active_record.migration_error = :page_load
45
+ # Raise exceptions for disallowed deprecations.
46
+ config.active_support.disallowed_deprecation = :raise
44
47
 
45
- # Highlight code that triggered database queries in logs.
46
- config.active_record.verbose_query_logs = true
47
-
48
- # Debug mode disables concatenation and preprocessing of assets.
49
- # This option may cause significant delays in view rendering with a large
50
- # number of complex assets.
51
- config.assets.debug = true
48
+ # Tell Active Support which deprecation messages to disallow.
49
+ config.active_support.disallowed_deprecation_warnings = []
52
50
 
53
51
  # Suppress logger output for asset requests.
54
52
  config.assets.quiet = true
55
53
 
56
54
  # Raises error for missing translations.
57
- # config.action_view.raise_on_missing_translations = true
55
+ # config.i18n.raise_on_missing_translations = true
56
+
57
+ # Annotate rendered view with file names.
58
+ # config.action_view.annotate_rendered_view_with_filenames = true
58
59
 
59
- # Use an evented file watcher to asynchronously detect changes in source code,
60
- # routes, locales, etc. This feature depends on the listen gem.
61
- # config.file_watcher = ActiveSupport::EventedFileUpdateChecker
60
+ # Uncomment if you wish to allow Action Cable access from any origin.
61
+ # config.action_cable.disable_request_forgery_protection = true
62
62
  end
@@ -1,3 +1,5 @@
1
+ require "active_support/core_ext/integer/time"
2
+
1
3
  Rails.application.configure do
2
4
  # Settings specified here will take precedence over those in config/application.rb.
3
5
 
@@ -20,35 +22,33 @@ Rails.application.configure do
20
22
 
21
23
  # Disable serving static files from the `/public` folder by default since
22
24
  # Apache or NGINX already handles this.
23
- config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
25
+ config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
24
26
 
25
27
  # Compress CSS using a preprocessor.
26
28
  # config.assets.css_compressor = :sass
27
29
 
28
30
  # Do not fallback to assets pipeline if a precompiled asset is missed.
29
31
  config.assets.compile = false
32
+ config.assets.compile = true
30
33
 
31
34
  # Enable serving of images, stylesheets, and JavaScripts from an asset server.
32
- # config.action_controller.asset_host = 'http://assets.example.com'
35
+ # config.asset_host = "http://assets.example.com"
33
36
 
34
37
  # Specifies the header that your server uses for sending files.
35
- # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
36
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
37
-
38
- # Store uploaded files on the local file system (see config/storage.yml for options).
39
- config.active_storage.service = :local
38
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
39
+ # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
40
40
 
41
41
  # Mount Action Cable outside main process or domain.
42
42
  # config.action_cable.mount_path = nil
43
- # config.action_cable.url = 'wss://example.com/cable'
44
- # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
43
+ # config.action_cable.url = "wss://example.com/cable"
44
+ # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ]
45
45
 
46
46
  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
47
47
  # config.force_ssl = true
48
48
 
49
- # Use the lowest log level to ensure availability of diagnostic information
50
- # when problems arise.
51
- config.log_level = :debug
49
+ # Include generic and useful information about system operation, but avoid logging too much
50
+ # information to avoid inadvertent exposure of personally identifiable information (PII).
51
+ config.log_level = :info
52
52
 
53
53
  # Prepend all log lines with the following tags.
54
54
  config.log_tags = [ :request_id ]
@@ -70,43 +70,19 @@ Rails.application.configure do
70
70
  # the I18n.default_locale when a translation cannot be found).
71
71
  config.i18n.fallbacks = true
72
72
 
73
- # Send deprecation notices to registered listeners.
74
- config.active_support.deprecation = :notify
73
+ # Don't log any deprecations.
74
+ config.active_support.report_deprecations = false
75
75
 
76
76
  # Use default logging formatter so that PID and timestamp are not suppressed.
77
77
  config.log_formatter = ::Logger::Formatter.new
78
78
 
79
79
  # Use a different logger for distributed setups.
80
- # require 'syslog/logger'
81
- # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
80
+ # require "syslog/logger"
81
+ # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name")
82
82
 
83
83
  if ENV["RAILS_LOG_TO_STDOUT"].present?
84
84
  logger = ActiveSupport::Logger.new(STDOUT)
85
85
  logger.formatter = config.log_formatter
86
86
  config.logger = ActiveSupport::TaggedLogging.new(logger)
87
87
  end
88
-
89
- # Do not dump schema after migrations.
90
- config.active_record.dump_schema_after_migration = false
91
-
92
- # Inserts middleware to perform automatic connection switching.
93
- # The `database_selector` hash is used to pass options to the DatabaseSelector
94
- # middleware. The `delay` is used to determine how long to wait after a write
95
- # to send a subsequent read to the primary.
96
- #
97
- # The `database_resolver` class is used by the middleware to determine which
98
- # database is appropriate to use based on the time delay.
99
- #
100
- # The `database_resolver_context` class is used by the middleware to set
101
- # timestamps for the last write to the primary. The resolver uses the context
102
- # class timestamps to determine how long to wait before reading from the
103
- # replica.
104
- #
105
- # By default Rails will store a last write timestamp in the session. The
106
- # DatabaseSelector middleware is designed as such you can define your own
107
- # strategy for connection switching and pass that into the middleware through
108
- # these configuration options.
109
- # config.active_record.database_selector = { delay: 2.seconds }
110
- # config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
111
- # config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
112
88
  end
@@ -1,3 +1,5 @@
1
+ require "active_support/core_ext/integer/time"
2
+
1
3
  # The test environment is used exclusively to run your application's
2
4
  # test suite. You never need to work with it otherwise. Remember that
3
5
  # your test database is "scratch space" for the test suite and is wiped
@@ -6,18 +8,18 @@
6
8
  Rails.application.configure do
7
9
  # Settings specified here will take precedence over those in config/application.rb.
8
10
 
9
- config.cache_classes = false
10
- config.action_view.cache_template_loading = true
11
+ # Turn false under Spring and add config.action_view.cache_template_loading = true.
12
+ config.cache_classes = true
11
13
 
12
- # Do not eager load code on boot. This avoids loading your whole application
13
- # just for the purpose of running a single test. If you are using a tool that
14
- # preloads Rails for running tests, you may have to set it to true.
15
- config.eager_load = false
14
+ # Eager loading loads your whole application. When running a single test locally,
15
+ # this probably isn't necessary. It's a good idea to do in a continuous integration
16
+ # system, or in some way before deploying your code.
17
+ config.eager_load = ENV["CI"].present?
16
18
 
17
19
  # Configure public file server for tests with Cache-Control for performance.
18
20
  config.public_file_server.enabled = true
19
21
  config.public_file_server.headers = {
20
- 'Cache-Control' => "public, max-age=#{1.hour.to_i}"
22
+ "Cache-Control" => "public, max-age=#{1.hour.to_i}"
21
23
  }
22
24
 
23
25
  # Show full error reports and disable caching.
@@ -31,9 +33,6 @@ Rails.application.configure do
31
33
  # Disable request forgery protection in test environment.
32
34
  config.action_controller.allow_forgery_protection = false
33
35
 
34
- # Store uploaded files on the local file system in a temporary directory.
35
- config.active_storage.service = :test
36
-
37
36
  config.action_mailer.perform_caching = false
38
37
 
39
38
  # Tell Action Mailer not to deliver emails to the real world.
@@ -44,6 +43,15 @@ Rails.application.configure do
44
43
  # Print deprecation notices to the stderr.
45
44
  config.active_support.deprecation = :stderr
46
45
 
46
+ # Raise exceptions for disallowed deprecations.
47
+ config.active_support.disallowed_deprecation = :raise
48
+
49
+ # Tell Active Support which deprecation messages to disallow.
50
+ config.active_support.disallowed_deprecation_warnings = []
51
+
47
52
  # Raises error for missing translations.
48
- # config.action_view.raise_on_missing_translations = true
53
+ # config.i18n.raise_on_missing_translations = true
54
+
55
+ # Annotate rendered view with file names.
56
+ # config.action_view.annotate_rendered_view_with_filenames = true
49
57
  end
@@ -1,7 +1,7 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
3
  # Version of your assets, change this if you want to expire all your assets.
4
- Rails.application.config.assets.version = '1.0'
4
+ Rails.application.config.assets.version = "1.0"
5
5
 
6
6
  # Add additional assets to the asset load path.
7
7
  # Rails.application.config.assets.paths << Emoji.images_path