diff --git a/app/assets/images/.keep b/app/assets/images/jinda/.keep similarity index 100% rename from app/assets/images/.keep rename to app/assets/images/jinda/.keep diff --git a/app/assets/images/4dcity-old.ico b/app/assets/images/jinda/4dcity-old.ico similarity index 100% rename from app/assets/images/4dcity-old.ico rename to app/assets/images/jinda/4dcity-old.ico diff --git a/app/assets/images/4dcity.ico b/app/assets/images/jinda/4dcity.ico similarity index 100% rename from app/assets/images/4dcity.ico rename to app/assets/images/jinda/4dcity.ico diff --git a/app/assets/images/account.png b/app/assets/images/jinda/account.png similarity index 100% rename from app/assets/images/account.png rename to app/assets/images/jinda/account.png diff --git a/app/assets/images/add.png b/app/assets/images/jinda/add.png similarity index 100% rename from app/assets/images/add.png rename to app/assets/images/jinda/add.png diff --git a/app/assets/images/ajax-loader-circle.gif b/app/assets/images/jinda/ajax-loader-circle.gif similarity index 100% rename from app/assets/images/ajax-loader-circle.gif rename to app/assets/images/jinda/ajax-loader-circle.gif diff --git a/app/assets/images/ajax-loader.gif b/app/assets/images/jinda/ajax-loader.gif similarity index 100% rename from app/assets/images/ajax-loader.gif rename to app/assets/images/jinda/ajax-loader.gif diff --git a/app/assets/images/anchor.png b/app/assets/images/jinda/anchor.png similarity index 100% rename from app/assets/images/anchor.png rename to app/assets/images/jinda/anchor.png diff --git a/app/assets/images/application_double.png b/app/assets/images/jinda/application_double.png similarity index 100% rename from app/assets/images/application_double.png rename to app/assets/images/jinda/application_double.png diff --git a/app/assets/images/application_form_edit.png b/app/assets/images/jinda/application_form_edit.png similarity index 100% rename from app/assets/images/application_form_edit.png rename to app/assets/images/jinda/application_form_edit.png diff --git a/app/assets/images/arrow_left.png b/app/assets/images/jinda/arrow_left.png similarity index 100% rename from app/assets/images/arrow_left.png rename to app/assets/images/jinda/arrow_left.png diff --git a/app/assets/images/arrow_right.png b/app/assets/images/jinda/arrow_right.png similarity index 100% rename from app/assets/images/arrow_right.png rename to app/assets/images/jinda/arrow_right.png diff --git a/app/assets/images/arrow_turn_left.png b/app/assets/images/jinda/arrow_turn_left.png similarity index 100% rename from app/assets/images/arrow_turn_left.png rename to app/assets/images/jinda/arrow_turn_left.png diff --git a/app/assets/images/arrow_turn_right.png b/app/assets/images/jinda/arrow_turn_right.png similarity index 100% rename from app/assets/images/arrow_turn_right.png rename to app/assets/images/jinda/arrow_turn_right.png diff --git a/app/assets/images/calendar.png b/app/assets/images/jinda/calendar.png similarity index 100% rename from app/assets/images/calendar.png rename to app/assets/images/jinda/calendar.png diff --git a/app/assets/images/cancel.png b/app/assets/images/jinda/cancel.png similarity index 100% rename from app/assets/images/cancel.png rename to app/assets/images/jinda/cancel.png diff --git a/app/assets/images/chart_bar.png b/app/assets/images/jinda/chart_bar.png similarity index 100% rename from app/assets/images/chart_bar.png rename to app/assets/images/jinda/chart_bar.png diff --git a/app/assets/images/clock.png b/app/assets/images/jinda/clock.png similarity index 100% rename from app/assets/images/clock.png rename to app/assets/images/jinda/clock.png diff --git a/app/assets/images/cog.png b/app/assets/images/jinda/cog.png similarity index 100% rename from app/assets/images/cog.png rename to app/assets/images/jinda/cog.png diff --git a/app/assets/images/control_fastforward.png b/app/assets/images/jinda/control_fastforward.png similarity index 100% rename from app/assets/images/control_fastforward.png rename to app/assets/images/jinda/control_fastforward.png diff --git a/app/assets/images/control_play.png b/app/assets/images/jinda/control_play.png similarity index 100% rename from app/assets/images/control_play.png rename to app/assets/images/jinda/control_play.png diff --git a/app/assets/images/cross.png b/app/assets/images/jinda/cross.png similarity index 100% rename from app/assets/images/cross.png rename to app/assets/images/jinda/cross.png diff --git a/app/assets/images/delete.png b/app/assets/images/jinda/delete.png similarity index 100% rename from app/assets/images/delete.png rename to app/assets/images/jinda/delete.png diff --git a/app/assets/images/external-link.png b/app/assets/images/jinda/external-link.png similarity index 100% rename from app/assets/images/external-link.png rename to app/assets/images/jinda/external-link.png diff --git a/app/assets/images/facebook-continue-button.png b/app/assets/images/jinda/facebook-continue-button.png similarity index 100% rename from app/assets/images/facebook-continue-button.png rename to app/assets/images/jinda/facebook-continue-button.png diff --git a/app/assets/images/facebooksmall.png b/app/assets/images/jinda/facebooksmall.png similarity index 100% rename from app/assets/images/facebooksmall.png rename to app/assets/images/jinda/facebooksmall.png diff --git a/app/assets/images/favicon.ico b/app/assets/images/jinda/favicon.ico similarity index 100% rename from app/assets/images/favicon.ico rename to app/assets/images/jinda/favicon.ico diff --git a/app/assets/images/freemind(mm).png b/app/assets/images/jinda/freemind(mm).png similarity index 100% rename from app/assets/images/freemind(mm).png rename to app/assets/images/jinda/freemind(mm).png diff --git a/app/assets/images/google-continue-button.png b/app/assets/images/jinda/google-continue-button.png similarity index 100% rename from app/assets/images/google-continue-button.png rename to app/assets/images/jinda/google-continue-button.png diff --git a/app/assets/images/help.png b/app/assets/images/jinda/help.png similarity index 100% rename from app/assets/images/help.png rename to app/assets/images/jinda/help.png diff --git a/app/assets/images/highway-menu.png b/app/assets/images/jinda/highway-menu.png similarity index 100% rename from app/assets/images/highway-menu.png rename to app/assets/images/jinda/highway-menu.png diff --git a/app/assets/images/highway.png b/app/assets/images/jinda/highway.png similarity index 100% rename from app/assets/images/highway.png rename to app/assets/images/jinda/highway.png diff --git a/app/assets/images/house.png b/app/assets/images/jinda/house.png similarity index 100% rename from app/assets/images/house.png rename to app/assets/images/jinda/house.png diff --git a/app/assets/images/icons-18-black.png b/app/assets/images/jinda/icons-18-black.png similarity index 100% rename from app/assets/images/icons-18-black.png rename to app/assets/images/jinda/icons-18-black.png diff --git a/app/assets/images/icons-18-white.png b/app/assets/images/jinda/icons-18-white.png similarity index 100% rename from app/assets/images/icons-18-white.png rename to app/assets/images/jinda/icons-18-white.png diff --git a/app/assets/images/icons-36-black.png b/app/assets/images/jinda/icons-36-black.png similarity index 100% rename from app/assets/images/icons-36-black.png rename to app/assets/images/jinda/icons-36-black.png diff --git a/app/assets/images/icons-36-white.png b/app/assets/images/jinda/icons-36-white.png similarity index 100% rename from app/assets/images/icons-36-white.png rename to app/assets/images/jinda/icons-36-white.png diff --git a/app/assets/images/logo.png b/app/assets/images/jinda/logo.png similarity index 100% rename from app/assets/images/logo.png rename to app/assets/images/jinda/logo.png diff --git a/app/assets/images/logo_jinda.png b/app/assets/images/jinda/logo_jinda.png similarity index 100% rename from app/assets/images/logo_jinda.png rename to app/assets/images/jinda/logo_jinda.png diff --git a/app/assets/images/logout.png b/app/assets/images/jinda/logout.png similarity index 100% rename from app/assets/images/logout.png rename to app/assets/images/jinda/logout.png diff --git a/app/assets/images/new.gif b/app/assets/images/jinda/new.gif similarity index 100% rename from app/assets/images/new.gif rename to app/assets/images/jinda/new.gif diff --git a/app/assets/images/new.png b/app/assets/images/jinda/new.png similarity index 100% rename from app/assets/images/new.png rename to app/assets/images/jinda/new.png diff --git a/app/assets/images/page.png b/app/assets/images/jinda/page.png similarity index 100% rename from app/assets/images/page.png rename to app/assets/images/jinda/page.png diff --git a/app/assets/images/page_attach.png b/app/assets/images/jinda/page_attach.png similarity index 100% rename from app/assets/images/page_attach.png rename to app/assets/images/jinda/page_attach.png diff --git a/app/assets/images/page_green.png b/app/assets/images/jinda/page_green.png similarity index 100% rename from app/assets/images/page_green.png rename to app/assets/images/jinda/page_green.png diff --git a/app/assets/images/page_output.png b/app/assets/images/jinda/page_output.png similarity index 100% rename from app/assets/images/page_output.png rename to app/assets/images/jinda/page_output.png diff --git a/app/assets/images/page_pdf.png b/app/assets/images/jinda/page_pdf.png similarity index 100% rename from app/assets/images/page_pdf.png rename to app/assets/images/jinda/page_pdf.png diff --git a/app/assets/images/pencil.png b/app/assets/images/jinda/pencil.png similarity index 100% rename from app/assets/images/pencil.png rename to app/assets/images/jinda/pencil.png diff --git a/app/assets/images/printer.png b/app/assets/images/jinda/printer.png similarity index 100% rename from app/assets/images/printer.png rename to app/assets/images/jinda/printer.png diff --git a/app/assets/images/refresh.png b/app/assets/images/jinda/refresh.png similarity index 100% rename from app/assets/images/refresh.png rename to app/assets/images/jinda/refresh.png diff --git a/app/assets/images/report.png b/app/assets/images/jinda/report.png similarity index 100% rename from app/assets/images/report.png rename to app/assets/images/jinda/report.png diff --git a/app/assets/images/rssmall.png b/app/assets/images/jinda/rssmall.png similarity index 100% rename from app/assets/images/rssmall.png rename to app/assets/images/jinda/rssmall.png diff --git a/app/assets/images/tick.png b/app/assets/images/jinda/tick.png similarity index 100% rename from app/assets/images/tick.png rename to app/assets/images/jinda/tick.png diff --git a/app/assets/images/twittersmall.png b/app/assets/images/jinda/twittersmall.png similarity index 100% rename from app/assets/images/twittersmall.png rename to app/assets/images/jinda/twittersmall.png diff --git a/app/assets/images/user.png b/app/assets/images/jinda/user.png similarity index 100% rename from app/assets/images/user.png rename to app/assets/images/jinda/user.png diff --git a/app/assets/images/user_admin_gear.png b/app/assets/images/jinda/user_admin_gear.png similarity index 100% rename from app/assets/images/user_admin_gear.png rename to app/assets/images/jinda/user_admin_gear.png diff --git a/app/assets/images/view_code.png b/app/assets/images/jinda/view_code.png similarity index 100% rename from app/assets/images/view_code.png rename to app/assets/images/jinda/view_code.png diff --git a/app/assets/javascripts/application.js-org b/app/assets/javascripts/jinda/application.js-org similarity index 100% rename from app/assets/javascripts/application.js-org rename to app/assets/javascripts/jinda/application.js-org diff --git a/app/assets/javascripts/cable.js b/app/assets/javascripts/jinda/cable.js similarity index 100% rename from app/assets/javascripts/cable.js rename to app/assets/javascripts/jinda/cable.js diff --git a/app/assets/javascripts/channels/.keep b/app/assets/javascripts/jinda/channels/.keep similarity index 100% rename from app/assets/javascripts/channels/.keep rename to app/assets/javascripts/jinda/channels/.keep diff --git a/app/assets/javascripts/disable_enter_key.js b/app/assets/javascripts/jinda/disable_enter_key.js similarity index 100% rename from app/assets/javascripts/disable_enter_key.js rename to app/assets/javascripts/jinda/disable_enter_key.js diff --git a/app/assets/javascripts/iscroll-wrapper.js b/app/assets/javascripts/jinda/iscroll-wrapper.js similarity index 100% rename from app/assets/javascripts/iscroll-wrapper.js rename to app/assets/javascripts/jinda/iscroll-wrapper.js diff --git a/app/assets/javascripts/iscroll.js b/app/assets/javascripts/jinda/iscroll.js similarity index 100% rename from app/assets/javascripts/iscroll.js rename to app/assets/javascripts/jinda/iscroll.js diff --git a/app/assets/javascripts/jinda.js b/app/assets/javascripts/jinda/jinda.js similarity index 100% rename from app/assets/javascripts/jinda.js rename to app/assets/javascripts/jinda/jinda.js diff --git a/app/assets/javascripts/jinda_jqm.js b/app/assets/javascripts/jinda/jinda_jqm.js similarity index 100% rename from app/assets/javascripts/jinda_jqm.js rename to app/assets/javascripts/jinda/jinda_jqm.js diff --git a/app/assets/javascripts/jquery.mobile-1.2.1.js b/app/assets/javascripts/jinda/jquery.mobile-1.2.1.js similarity index 100% rename from app/assets/javascripts/jquery.mobile-1.2.1.js rename to app/assets/javascripts/jinda/jquery.mobile-1.2.1.js diff --git a/app/assets/javascripts/jquery.mobile.datebox.js b/app/assets/javascripts/jinda/jquery.mobile.datebox.js similarity index 100% rename from app/assets/javascripts/jquery.mobile.datebox.js rename to app/assets/javascripts/jinda/jquery.mobile.datebox.js diff --git a/app/assets/javascripts/jquery.mobile.splitview.js b/app/assets/javascripts/jinda/jquery.mobile.splitview.js similarity index 100% rename from app/assets/javascripts/jquery.mobile.splitview.js rename to app/assets/javascripts/jinda/jquery.mobile.splitview.js diff --git a/app/assets/stylesheets/app.scss b/app/assets/stylesheets/jinda/app.scss similarity index 100% rename from app/assets/stylesheets/app.scss rename to app/assets/stylesheets/jinda/app.scss diff --git a/app/assets/stylesheets/articles.scss b/app/assets/stylesheets/jinda/articles.scss similarity index 100% rename from app/assets/stylesheets/articles.scss rename to app/assets/stylesheets/jinda/articles.scss diff --git a/app/assets/stylesheets/fonts/sarabun.eot b/app/assets/stylesheets/jinda/fonts/sarabun.eot similarity index 100% rename from app/assets/stylesheets/fonts/sarabun.eot rename to app/assets/stylesheets/jinda/fonts/sarabun.eot diff --git a/app/assets/stylesheets/fonts/sarabun.ttf b/app/assets/stylesheets/jinda/fonts/sarabun.ttf similarity index 100% rename from app/assets/stylesheets/fonts/sarabun.ttf rename to app/assets/stylesheets/jinda/fonts/sarabun.ttf diff --git a/app/assets/stylesheets/fonts/sarabun.woff b/app/assets/stylesheets/jinda/fonts/sarabun.woff similarity index 100% rename from app/assets/stylesheets/fonts/sarabun.woff rename to app/assets/stylesheets/jinda/fonts/sarabun.woff diff --git a/app/assets/stylesheets/fonts/sarabun_bold.ttf b/app/assets/stylesheets/jinda/fonts/sarabun_bold.ttf similarity index 100% rename from app/assets/stylesheets/fonts/sarabun_bold.ttf rename to app/assets/stylesheets/jinda/fonts/sarabun_bold.ttf diff --git a/app/assets/stylesheets/fonts/sarabun_bolditalic.ttf b/app/assets/stylesheets/jinda/fonts/sarabun_bolditalic.ttf similarity index 100% rename from app/assets/stylesheets/fonts/sarabun_bolditalic.ttf rename to app/assets/stylesheets/jinda/fonts/sarabun_bolditalic.ttf diff --git a/app/assets/stylesheets/fonts/sarabun_italic.ttf b/app/assets/stylesheets/jinda/fonts/sarabun_italic.ttf similarity index 100% rename from app/assets/stylesheets/fonts/sarabun_italic.ttf rename to app/assets/stylesheets/jinda/fonts/sarabun_italic.ttf diff --git a/app/assets/stylesheets/fonts/thsarabunnew-webfont.eot b/app/assets/stylesheets/jinda/fonts/thsarabunnew-webfont.eot similarity index 100% rename from app/assets/stylesheets/fonts/thsarabunnew-webfont.eot rename to app/assets/stylesheets/jinda/fonts/thsarabunnew-webfont.eot diff --git a/app/assets/stylesheets/fonts/thsarabunnew-webfont.ttf b/app/assets/stylesheets/jinda/fonts/thsarabunnew-webfont.ttf similarity index 100% rename from app/assets/stylesheets/fonts/thsarabunnew-webfont.ttf rename to app/assets/stylesheets/jinda/fonts/thsarabunnew-webfont.ttf diff --git a/app/assets/stylesheets/fonts/thsarabunnew-webfont.woff b/app/assets/stylesheets/jinda/fonts/thsarabunnew-webfont.woff similarity index 100% rename from app/assets/stylesheets/fonts/thsarabunnew-webfont.woff rename to app/assets/stylesheets/jinda/fonts/thsarabunnew-webfont.woff diff --git a/app/assets/stylesheets/fonts/thsarabunnew.css b/app/assets/stylesheets/jinda/fonts/thsarabunnew.css similarity index 100% rename from app/assets/stylesheets/fonts/thsarabunnew.css rename to app/assets/stylesheets/jinda/fonts/thsarabunnew.css diff --git a/app/assets/stylesheets/fonts/thsarabunnew_bold-webfont.eot b/app/assets/stylesheets/jinda/fonts/thsarabunnew_bold-webfont.eot similarity index 100% rename from app/assets/stylesheets/fonts/thsarabunnew_bold-webfont.eot rename to app/assets/stylesheets/jinda/fonts/thsarabunnew_bold-webfont.eot diff --git a/app/assets/stylesheets/fonts/thsarabunnew_bold-webfont.ttf b/app/assets/stylesheets/jinda/fonts/thsarabunnew_bold-webfont.ttf similarity index 100% rename from app/assets/stylesheets/fonts/thsarabunnew_bold-webfont.ttf rename to app/assets/stylesheets/jinda/fonts/thsarabunnew_bold-webfont.ttf diff --git a/app/assets/stylesheets/fonts/thsarabunnew_bold-webfont.woff b/app/assets/stylesheets/jinda/fonts/thsarabunnew_bold-webfont.woff similarity index 100% rename from app/assets/stylesheets/fonts/thsarabunnew_bold-webfont.woff rename to app/assets/stylesheets/jinda/fonts/thsarabunnew_bold-webfont.woff diff --git a/app/assets/stylesheets/fonts/thsarabunnew_bolditalic-webfont.eot b/app/assets/stylesheets/jinda/fonts/thsarabunnew_bolditalic-webfont.eot similarity index 100% rename from app/assets/stylesheets/fonts/thsarabunnew_bolditalic-webfont.eot rename to app/assets/stylesheets/jinda/fonts/thsarabunnew_bolditalic-webfont.eot diff --git a/app/assets/stylesheets/fonts/thsarabunnew_bolditalic-webfont.ttf b/app/assets/stylesheets/jinda/fonts/thsarabunnew_bolditalic-webfont.ttf similarity index 100% rename from app/assets/stylesheets/fonts/thsarabunnew_bolditalic-webfont.ttf rename to app/assets/stylesheets/jinda/fonts/thsarabunnew_bolditalic-webfont.ttf diff --git a/app/assets/stylesheets/fonts/thsarabunnew_bolditalic-webfont.woff b/app/assets/stylesheets/jinda/fonts/thsarabunnew_bolditalic-webfont.woff similarity index 100% rename from app/assets/stylesheets/fonts/thsarabunnew_bolditalic-webfont.woff rename to app/assets/stylesheets/jinda/fonts/thsarabunnew_bolditalic-webfont.woff diff --git a/app/assets/stylesheets/fonts/thsarabunnew_italic-webfont.eot b/app/assets/stylesheets/jinda/fonts/thsarabunnew_italic-webfont.eot similarity index 100% rename from app/assets/stylesheets/fonts/thsarabunnew_italic-webfont.eot rename to app/assets/stylesheets/jinda/fonts/thsarabunnew_italic-webfont.eot diff --git a/app/assets/stylesheets/fonts/thsarabunnew_italic-webfont.ttf b/app/assets/stylesheets/jinda/fonts/thsarabunnew_italic-webfont.ttf similarity index 100% rename from app/assets/stylesheets/fonts/thsarabunnew_italic-webfont.ttf rename to app/assets/stylesheets/jinda/fonts/thsarabunnew_italic-webfont.ttf diff --git a/app/assets/stylesheets/fonts/thsarabunnew_italic-webfont.woff b/app/assets/stylesheets/jinda/fonts/thsarabunnew_italic-webfont.woff similarity index 100% rename from app/assets/stylesheets/fonts/thsarabunnew_italic-webfont.woff rename to app/assets/stylesheets/jinda/fonts/thsarabunnew_italic-webfont.woff diff --git a/app/assets/stylesheets/images/ajax-loader.gif b/app/assets/stylesheets/jinda/images/ajax-loader.gif similarity index 100% rename from app/assets/stylesheets/images/ajax-loader.gif rename to app/assets/stylesheets/jinda/images/ajax-loader.gif diff --git a/app/assets/stylesheets/images/button_black.png b/app/assets/stylesheets/jinda/images/button_black.png similarity index 100% rename from app/assets/stylesheets/images/button_black.png rename to app/assets/stylesheets/jinda/images/button_black.png diff --git a/app/assets/stylesheets/images/button_blue.png b/app/assets/stylesheets/jinda/images/button_blue.png similarity index 100% rename from app/assets/stylesheets/images/button_blue.png rename to app/assets/stylesheets/jinda/images/button_blue.png diff --git a/app/assets/stylesheets/images/button_red.png b/app/assets/stylesheets/jinda/images/button_red.png similarity index 100% rename from app/assets/stylesheets/images/button_red.png rename to app/assets/stylesheets/jinda/images/button_red.png diff --git a/app/assets/stylesheets/images/gears.png b/app/assets/stylesheets/jinda/images/gears.png similarity index 100% rename from app/assets/stylesheets/images/gears.png rename to app/assets/stylesheets/jinda/images/gears.png diff --git a/app/assets/stylesheets/images/icons-18-black.png b/app/assets/stylesheets/jinda/images/icons-18-black.png similarity index 100% rename from app/assets/stylesheets/images/icons-18-black.png rename to app/assets/stylesheets/jinda/images/icons-18-black.png diff --git a/app/assets/stylesheets/images/icons-18-white.png b/app/assets/stylesheets/jinda/images/icons-18-white.png similarity index 100% rename from app/assets/stylesheets/images/icons-18-white.png rename to app/assets/stylesheets/jinda/images/icons-18-white.png diff --git a/app/assets/stylesheets/images/icons-36-black.png b/app/assets/stylesheets/jinda/images/icons-36-black.png similarity index 100% rename from app/assets/stylesheets/images/icons-36-black.png rename to app/assets/stylesheets/jinda/images/icons-36-black.png diff --git a/app/assets/stylesheets/images/icons-36-white.png b/app/assets/stylesheets/jinda/images/icons-36-white.png similarity index 100% rename from app/assets/stylesheets/images/icons-36-white.png rename to app/assets/stylesheets/jinda/images/icons-36-white.png diff --git a/app/assets/stylesheets/images/indicator.gif b/app/assets/stylesheets/jinda/images/indicator.gif similarity index 100% rename from app/assets/stylesheets/images/indicator.gif rename to app/assets/stylesheets/jinda/images/indicator.gif diff --git a/app/assets/stylesheets/jinda.scss b/app/assets/stylesheets/jinda/jinda.scss similarity index 100% rename from app/assets/stylesheets/jinda.scss rename to app/assets/stylesheets/jinda/jinda.scss diff --git a/app/assets/stylesheets/jinda_jqm.css.scss b/app/assets/stylesheets/jinda/jinda_jqm.css.scss similarity index 100% rename from app/assets/stylesheets/jinda_jqm.css.scss rename to app/assets/stylesheets/jinda/jinda_jqm.css.scss diff --git a/app/assets/stylesheets/jquery.mobile-1.2.1.css b/app/assets/stylesheets/jinda/jquery.mobile-1.2.1.css similarity index 100% rename from app/assets/stylesheets/jquery.mobile-1.2.1.css rename to app/assets/stylesheets/jinda/jquery.mobile-1.2.1.css diff --git a/app/assets/stylesheets/jquery.mobile.datebox.css b/app/assets/stylesheets/jinda/jquery.mobile.datebox.css similarity index 100% rename from app/assets/stylesheets/jquery.mobile.datebox.css rename to app/assets/stylesheets/jinda/jquery.mobile.datebox.css diff --git a/app/assets/stylesheets/jquery.mobile.grids.collapsible.css b/app/assets/stylesheets/jinda/jquery.mobile.grids.collapsible.css similarity index 100% rename from app/assets/stylesheets/jquery.mobile.grids.collapsible.css rename to app/assets/stylesheets/jinda/jquery.mobile.grids.collapsible.css diff --git a/app/assets/stylesheets/jquery.mobile.splitview.css b/app/assets/stylesheets/jinda/jquery.mobile.splitview.css similarity index 100% rename from app/assets/stylesheets/jquery.mobile.splitview.css rename to app/assets/stylesheets/jinda/jquery.mobile.splitview.css diff --git a/app/assets/stylesheets/kul-4.2.css b/app/assets/stylesheets/jinda/kul-4.2.css similarity index 100% rename from app/assets/stylesheets/kul-4.2.css rename to app/assets/stylesheets/jinda/kul-4.2.css diff --git a/app/assets/stylesheets/kul-4.2.min.css b/app/assets/stylesheets/jinda/kul-4.2.min.css similarity index 100% rename from app/assets/stylesheets/kul-4.2.min.css rename to app/assets/stylesheets/jinda/kul-4.2.min.css diff --git a/app/assets/stylesheets/modules.scss b/app/assets/stylesheets/jinda/modules.scss similarity index 100% rename from app/assets/stylesheets/modules.scss rename to app/assets/stylesheets/jinda/modules.scss diff --git a/app/assets/stylesheets/sarabun.css b/app/assets/stylesheets/jinda/sarabun.css similarity index 100% rename from app/assets/stylesheets/sarabun.css rename to app/assets/stylesheets/jinda/sarabun.css diff --git a/app/assets/stylesheets/social.scss b/app/assets/stylesheets/jinda/social.scss similarity index 100% rename from app/assets/stylesheets/social.scss rename to app/assets/stylesheets/jinda/social.scss diff --git a/app/config/routes.rb b/app/config/jinda/routes.rb similarity index 100% rename from app/config/routes.rb rename to app/config/jinda/routes.rb diff --git a/app/controllers/jinda/concerns/jinda_general_concern.rb b/app/controllers/jinda/concerns/jinda_general_concern.rb new file mode 100644 index 0000000..8ebe89d --- /dev/null +++ b/app/controllers/jinda/concerns/jinda_general_concern.rb @@ -0,0 +1,179 @@ +module JindaGeneralConcern + extend ActiveSupport::Concern + + def index + end + + def logs + @xmains = Jinda::Xmain.all.desc(:created_at).page(params[:page]).per(10) + end + + def error_logs + @xmains = Jinda::Xmain.in(status:['E']).desc(:created_at).page(params[:page]).per(10) + end + + def notice_logs + @notices= Jinda::Notice.desc(:created_at).page(params[:page]).per(10) + end + + def pending + @title= "Pending Tasks" + @xmains = Jinda::Xmain.in(status:['R','I']).asc(:created_at) + end + + def cancel + Jinda::Xmain.find(params[:id]).update_attributes :status=>'X' + if params[:return] + redirect_to params[:return] + else + redirect_to action:"pending" + end + end + + # process images from first level + def get_image(key, params) + doc = Jinda::Doc.create( + :name=> key.to_s, + :xmain=> @xmain.id, + :runseq=> @runseq.id, + :filename=> params.original_filename, + :content_type => params.content_type || 'application/zip', + :data_text=> '', + :ma_display=>true, + :ma_secured => @xmain.service.ma_secured ) + if defined?(IMAGE_LOCATION) + filename = "#{IMAGE_LOCATION}/f#{Param.gen(:asset_id)}" + File.open(filename,"wb") { |f| f.write(params.read) } + # File.open(filename,"wb") { |f| f.puts(params.read) } + eval "@xvars[@runseq.code][key] = '#{url_for(:action=>'document', :id=>doc.id, :only_path => true )}' " + doc.update_attributes :url => filename, :basename => File.basename(filename), :cloudinary => false + else + result = Cloudinary::Uploader.upload(params) + eval %Q{ @xvars[@runseq.code][key] = '#{result["url"]}' } + doc.update_attributes :url => result["url"], :basename => File.basename(result["url"]), :cloudinary => true + end + end + + # process images from second level, e.g,, fields_for + # save uploaded file info to Doc + def get_image1(key, key1, params) + doc = Jinda::Doc.create( + :name=> "#{key}_#{key1}", + :xmain=> @xmain.id, + :runseq=> @runseq.id, + :filename=> params.original_filename, + :content_type => params.content_type || 'application/zip', + :data_text=> '', + :dscan=> '', + :description=>'', + :keywords=>'', + :category=>'', + :ma_display=>true, :ma_secured => @xmain.service.ma_secured ) + if defined?(IMAGE_LOCATION) + filename = "#{IMAGE_LOCATION}/f#{Param.gen(:asset_id)}" + File.open(filename,"wb") { |f| f.write(params.read) } + eval "@xvars[@runseq.code][key][key1] = '#{url_for(:action=>'document', :id=>doc.id, :only_path => true)}' " + doc.update_attributes :url => filename, + :basename => File.basename(filename), + :cloudinary => false, + :dscan => @xvars[@runseq.code][key][key1], + :user_id => @xvars["user_id"] + else + result = Cloudinary::Uploader.upload(params) + eval %Q{ @xvars[@runseq.code][key][key1] = '#{result["url"]}' } + doc.update_attributes :url => result["url"], :basename => File.basename(result["url"]), :cloudinary => true, :dscan => @xvars[@runseq.code][key][key1] + end + end + + def doc_print + render :file=>'public/doc.html', :layout=>'layouts/print' + end + + # generate documentation for application + # search data from Doc + def document + doc = Jinda::Doc.find params[:id] + if doc.cloudinary + require 'net/http' + require "uri" + uri = URI.parse(doc.url) + data = Net::HTTP.get_response(uri) + send_data(data.body, :filename=>doc.filename, :type=>doc.content_type, :disposition=>"inline") + else + data= read_binary(doc.url) + send_data(data, :filename=>doc.filename, :type=>doc.content_type, :disposition=>"inline") + end + end + + def doc + require 'rdoc' + @app= get_app + @intro = File.read('README.md') + @print= "
Print
" + doc= render_to_string 'doc.md', :layout => false + html= Maruku.new(doc).to_html + File.open('public/doc.html','w') {|f| f.puts html } + respond_to do |format| + format.html { + render :plain=> @print+html, :layout => 'layouts/jqm/_page' + # render :text=> Maruku.new(doc).to_html, :layout => false + # format.html { + # h = RDoc::Markup::ToHtml.new + # render :text=> h.convert(doc), :layout => 'layouts/_page' + } + format.pdf { + latex= Maruku.new(doc).to_latex + File.open('tmp/doc.md','w') {|f| f.puts doc} + File.open('tmp/doc.tex','w') {|f| f.puts latex} + # system('pdflatex tmp/doc.tex ') + # send_file( 'tmp/doc.pdf', :type => ‘application/pdf’, + # :disposition => ‘inline’, :filename => 'doc.pdf') + render :plain=>'done' + } + end + end + + def status + @xmain= Jinda::Xmain.where(:xid=>params[:xid]).first + @title= "Task number #{params[:xid]} #{@xmain.name}" + @backbtn= true + @xvars= @xmain.xvars + # flash.now[:notice]= "รายการ #{@xmain.id} ได้ถูกยกเลิกแล้ว" if @xmain.status=='X' + ma_log "Task #{@xmain.id} is cancelled" if @xmain.status=='X' + # flash.now[:notice]= "transaction #{@xmain.id} was cancelled" if @xmain.status=='X' + rescue + refresh_to "/", :alert => "Could not find task number #{params[:xid]} " + end + + def help + end + + def search + @q = params[:q] || params[:ma_search][:q] || "" + @title = "Search Result #{@q}" + @backbtn= true + @cache= true + if @q.blank? + redirect_to "/" + else + s= GmaSearch.create :q=>@q, :ip=> request.env["REMOTE_ADDR"] + do_search + end + end + + def err404 + # ma_log 'ERROR', 'main/err404' + flash[:notice] = "We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly." + ma_log "We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly." + redirect_to '/' + end + + def err500 + # ma_log 'ERROR', 'main/err500' + flash[:notice] = "We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly." + ma_log "We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly." + redirect_to '/' + end + +end + diff --git a/app/controllers/jinda/concerns/jinda_run_concern.rb b/app/controllers/jinda/concerns/jinda_run_concern.rb new file mode 100644 index 0000000..18d44bf --- /dev/null +++ b/app/controllers/jinda/concerns/jinda_run_concern.rb @@ -0,0 +1,368 @@ +module JindaRunConcern + extend ActiveSupport::Concern + + def run_form + init_vars(params[:id]) + if authorize? + if ['F', 'X'].include? @xmain.status + redirect_to_root + else + service= @xmain.service + ############################################################################################### + # Run View Form f created template by jinda rake follow freemind mm file + ############################################################################################### + if service + @title= "Transaction ID #{@xmain.xid}: #{@xmain.name} / #{@runseq.name}" + fhelp= "app/views/#{service.module.code}/#{service.code}/#{@runseq.code}.md" + ############################################################################################### + # Check if help file available for this form + ############################################################################################### + @help = File.read(fhelp) if File.exists?(fhelp) + f1= "app/views/#{service.module.code}/#{service.code}/#{@runseq.code}.html.erb" + f2= "app/views/#{service.module.code}/#{service.code}/#{@runseq.code}.html.haml" + if File.file?(f1) + @ui= File.read(f1) + elsif File.file?(f2) + @ui= File.read(f2) + else + # flash[:notice]= "Error: Can not find the view file for this controller" + ma_log "Error: Can not find the view file for this controller" + redirect_to_root + end + end + init_vars(params[:id]) + end + else + redirect_to_root + end + end + + def run_if + init_vars(params[:id]) + condition= eval(@runseq.code).to_s + match_found= false + if condition + xml= REXML::Document.new(@runseq.xml).root + next_runseq= nil + text = xml.elements['//node/node'].attributes['TEXT'] + match, name= text.split(':',2) + label= name2code(name.strip) + if condition==match + if label=="end" + @end_job= true + else + next_runseq= @xmain.runseqs.where(:code=> label, :action.ne=>'redirect').first + match_found= true if next_runseq + @runseq_not_f= false + end + end + end + unless match_found || @end_job + next_runseq= @xmain.runseqs.where( rstep:(@xvars['current_step']+1) ).first + end + end_action(next_runseq) + end + + # redirect when finish last runseq + # eg: http://localhost:3000/notes/my + def run_direct_to + init_vars(params[:id]) + next_runseq= @xmain.runseqs.where(:id.ne=>@runseq.id, :code=>@runseq.code).first + if !@runseq.code.blank? + @xvars['p']['return'] = @runseq.code + else + flash[:notice]= "Error: missing required forward path in Freemind" + ma_log "Error: require forward path in Freemind" + end + end_action(next_runseq) + end + + def run_redirect + init_vars(params[:id]) + # next_runseq= @xmain.runseqs.first :conditions=>["id != ? AND code = ?",@runseq.id, @runseq.code] + next_runseq= @xmain.runseqs.where(:id.ne=>@runseq.id, :code=>@runseq.code).first + @xmain.current_runseq= next_runseq.id + end_action(next_runseq) + end + + # call controller to do the freemind task using Star symbol eg: Update + # not for run_form + def run_do + init_vars(params[:id]) + @runseq.start ||= Time.now + @runseq.status= 'R' # running + $runseq_id= @runseq.id + $user_id= current_ma_user.try(:id) + # $xmain, $runseq, $user, $xvars, $ip from local + set_global + controller = Kernel.const_get(@xvars['custom_controller']).new + result = controller.send(@runseq.code) + # save local var to database + init_vars_by_runseq($runseq_id) + @xvars = $xvars + @xvars[@runseq.code.to_sym]= result.to_s + @xvars['current_step']= @runseq.rstep + @runseq.status= 'F' #finish + @runseq.stop= Time.now + @runseq.save + end_action + rescue => e + @xmain.status='E' + @xvars['error']= e.to_s+e.backtrace.to_s + @xmain.xvars= $xvars + @xmain.save + @runseq.status= 'F' #finish + @runseq.stop= Time.now + @runseq.save + refresh_to "/", :alert => "Sorry opeation error at #{@xmain.id} #{@xvars['error']}" + end + + def run_list + init_vars(params[:id]) + service= @xmain.service + # disp= get_option("display") + # disp = Nil or :"??????" + # get option from last node: rule, role, display + disp= get_option("display") + # change from Nil to false and string to true + ma_display = (disp && !affirm(disp)) ? false : true + # Todo check if file is available + # if service and file exist + # ma_display from disp of 3rd level node as rule, role, display + if service && !@runseq.code.blank? + f= "app/views/#{service.module.code}/#{service.code}/#{@runseq.code}.html.erb" + @ui= File.read(f) + if Jinda::Doc.where(:runseq_id=>@runseq.id).exists? + @doc= Jinda::Doc.where(:runseq_id=>@runseq.id).first + @doc.update_attributes :data_text=> render_to_string(:inline=>@ui, :layout=>"utf8"), + :xmain=>@xmain, :runseq=>@runseq, :user=>current_ma_user, + :ip=> get_ip, :service=>service, :ma_display=>ma_display, + :ma_secured => @xmain.service.ma_secured, + :filename => "#{@runseq.code}.html.erb" + else + @doc= Jinda::Doc.create :name=> @runseq.name, + :content_type=>"output", :data_text=> render_to_string(:inline=>@ui, :layout=>"utf8"), + :xmain=>@xmain, :runseq=>@runseq, :user=>current_ma_user, + :ip=> get_ip, :service=>service, :ma_display=>ma_display, + :ma_secured => @xmain.service.ma_secured, + :filename => "#{@runseq.code}.html.erb" + end + # @message = defined?(MSG_NEXT) ? MSG_NEXT : "Next >" + @message = defined?(MSG_NEXT) ? MSG_NEXT : "Next >>" + @message = "Finish" if @runseq.end + ma_log("Todo defined?(NSG_NEXT : Next >>)") + eval "@xvars[@runseq.code] = url_for(:controller=>'jinda', :action=>'document', :id=>@doc.id)" + else + flash[:notice]= "Error: Can not find the view file for this controller" + ma_log "Error: Can not find the view file for this controller" + redirect_to_root + end + # Check if ma_display available + # ma_display= get_option("display") + # if not ma_display then no display both controller-view and content then end back to root + unless ma_display + end_action + end + # controller display from @ui + end + + def run_folder + init_vars(params[:id]) + service= @xmain.service + # disp= get_option("display") + # disp = Nil or :"??????" + disp= get_option("display") + ma_display = (disp && !affirm(disp)) ? false : true + # Todo check if file is available + # if service and file exist + if service && !@runseq.code.blank? + f= "app/views/#{service.module.code}/#{service.code}/#{@runseq.code}.html.erb" + @ui= File.read(f) + if Jinda::Doc.where(:runseq_id=>@runseq.id).exists? + @doc= Jinda::Doc.where(:runseq_id=>@runseq.id).first + @doc.update_attributes :data_text=> render_to_string(:inline=>@ui, :layout=>"utf8"), + :xmain=>@xmain, :runseq=>@runseq, :user=>current_ma_user, + :ip=> get_ip, :service=>service, :ma_display=>ma_display, + :ma_secured => @xmain.service.ma_secured, + :filename => "#{@runseq.code}.html.erb" + else + @doc= Jinda::Doc.create :name=> @runseq.name, + :content_type=>"output", :data_text=> render_to_string(:inline=>@ui, :layout=>"utf8"), + :xmain=>@xmain, :runseq=>@runseq, :user=>current_ma_user, + :ip=> get_ip, :service=>service, :ma_display=>ma_display, + :ma_secured => @xmain.service.ma_secured, + :filename => "#{@runseq.code}.html.erb" + end + # @message = defined?(MSG_NEXT) ? MSG_NEXT : "Next >" + @message = defined?(MSG_NEXT) ? MSG_NEXT : "Next >>" + @message = "Finish" if @runseq.end + ma_log("Todo defined?(NSG_NEXT : Next >>)") + eval "@xvars[@runseq.code] = url_for(:controller=>'jinda', :action=>'document', :id=>@doc.id)" + else + flash[:notice]= "Error: Can not find the view file for this controller" + ma_log "Error: Can not find the view file for this controller" + redirect_to_root + end + # Check if ma_display available + # ma_display= get_option("display") + unless ma_display + end_action + end + # controller display from @ui + end + + def run_output + init_vars(params[:id]) + service= @xmain.service + # disp= get_option("display") + # disp = Nil or :"??????" + disp= get_option("display") + ma_display = (disp && !affirm(disp)) ? false : true + # Todo check if file is available + # if service and file exist + if service && !@runseq.code.blank? + f= "app/views/#{service.module.code}/#{service.code}/#{@runseq.code}.html.erb" + @ui= File.read(f) + if Jinda::Doc.where(:runseq_id=>@runseq.id).exists? + @doc= Jinda::Doc.where(:runseq_id=>@runseq.id).first + @doc.update_attributes :data_text=> render_to_string(:inline=>@ui, :layout=>"utf8"), + :xmain=>@xmain, :runseq=>@runseq, :user=>current_ma_user, + :ip=> get_ip, :service=>service, :ma_display=>ma_display, + :ma_secured => @xmain.service.ma_secured, + :filename => "#{@runseq.code}.html.erb" + else + @doc= Jinda::Doc.create :name=> @runseq.name, + :content_type=>"output", :data_text=> render_to_string(:inline=>@ui, :layout=>"utf8"), + :xmain=>@xmain, :runseq=>@runseq, :user=>current_ma_user, + :ip=> get_ip, :service=>service, :ma_display=>ma_display, + :ma_secured => @xmain.service.ma_secured, + :filename => "#{@runseq.code}.html.erb" + end + # @message = defined?(MSG_NEXT) ? MSG_NEXT : "Next >" + @message = defined?(MSG_NEXT) ? MSG_NEXT : "Next >>" + @message = "Finish" if @runseq.end + ma_log("Todo defined?(NSG_NEXT : Next >>)") + eval "@xvars[@runseq.code] = url_for(:controller=>'jinda', :action=>'document', :id=>@doc.id)" + else + flash[:notice]= "Error: Can not find the view file for this controller" + ma_log "Error: Can not find the view file for this controller" + redirect_to_root + end + # Check if ma_display available + # ma_display= get_option("display") + unless ma_display + end_action + end + # controller display from @ui + end + + def run_mail + init_vars(params[:id]) + service= @xmain.service + f= "app/views/#{service.module.code}/#{service.code}/#{@runseq.code}.html.erb" + @ui= File.read(f).html_safe + @doc= Jinda::Doc.create :name=> @runseq.name, + :content_type=>"mail", :data_text=> render_to_string(:inline=>@ui, :layout=>false), + :xmain=>@xmain, :runseq=>@runseq, :user=>current_ma_user, + :ip=> get_ip, :service=>service, :ma_display=>false, + :ma_secured => @xmain.service.ma_secured + eval "@xvars[:#{@runseq.code}] = url_for(:controller=>'jinda', :action=>'document', :id=>@doc.id)" + mail_from = get_option('from') + # sender= render_to_string(:inline=>mail_from) if mail_from + mail_to = get_option('to') + recipients= render_to_string(:inline=>mail_to) if mail_to + mail_subject = get_option('subject') + subject= render_to_string(:inline=>mail_subject) || "#{@runseq.name}" + JindaMailer.gmail(@doc.data_text, recipients, subject).deliver unless DONT_SEND_MAIL + end_action + end + + def end_output + init_vars(params[:xmain_id]) + end_action + end + + # Store params to @xvars[@runseq] + # Perform task from the form input eg: attach file + # replace end_action (for form) + # Store params attach file to @xvars to use in get_image + def end_form + if params[:xmain_id] + init_vars(params[:xmain_id]) + else + ma_log "Known Bug : repeated end_form " + redirect_to_root and return + end + eval "@xvars[@runseq.code] = {} unless @xvars[@runseq.code]" + # Search for uploaded file name if exist + params.each { |k,v| + if params[k].respond_to? :original_filename + get_image(k, params[k]) + # check if params of array in form eg: edit_article + elsif params[k].is_a?(ActionController::Parameters) + eval "@xvars[@runseq.code][k] = {} unless @xvars[@runseq.code][k]" + params[k].each { |k1,v1| + # eval "@xvars[@runseq.code][k1] = params.require(k1).permit(k1)" + eval "@xvars[@runseq.code][k][k1] = v1" + next unless v1.respond_to?(:original_filename) + doc = {} + get_image1(k, k1, params[k][k1]) + } + else + # No file attached + # + # https://stackoverflow.com/questions/34949505/rails-5-unable-to- retrieve-hash-values-from-parameter # bug in to_unsalfe_h rails 5.1.6 https://github.com/getsentry/raven-ruby/issues/799 + # Solution: + # https://stackoverflow.com/questions/34949505/rails-5-unable-to-retrieve-hash-values-from-parameter + # v = v.to_unsafe_h unless v.class == String + # v = params.require[k] unless v.class == String + v = v.to_s unless v.class == String + # Create @xvars[@runseq.code] + eval "@xvars[@runseq.code][k] = v" + end + } + end_action + rescue => e + @xmain.status='E' + @xvars['error']= e.to_s+e.backtrace.to_s + @xmain.xvars= $xvars + @xmain.save + @runseq.status= 'F' #finish + @runseq.stop= Time.now + @runseq.save + ma_log "Error:end_form " + refresh_to "/", :alert => "Sorry opeation error at #{@xmain.id} #{@xvars['error']}" + end + + def end_action(next_runseq = nil) + # not for form + # @runseq.status='F' unless @runseq_not_f + @xmain.xvars= @xvars + @xmain.status= 'R' # running + @xmain.save! + @runseq.status='F' + @runseq.user= current_ma_user + @runseq.stop= Time.now + @runseq.save + next_runseq= @xmain.runseqs.where(:rstep=> @runseq.rstep+1).first unless next_runseq + if @end_job || !next_runseq # job finish + @xmain.xvars= @xvars + @xmain.status= 'F' unless @xmain.status== 'E' # finish + @xmain.stop= Time.now + @xmain.save + if @xvars['p']['return'] + redirect_to @xvars['p']['return'] and return + else + if @user + redirect_to :action=>'index' and return + else + redirect_to_root and return + end + end + else + @xmain.update_attribute :current_runseq, next_runseq.id + redirect_to :action=>'run', :id=>@xmain.id and return + end + end + +end diff --git a/app/controllers/jinda/jinda_controller.rb b/app/controllers/jinda/jinda_controller.rb new file mode 100644 index 0000000..995ae33 --- /dev/null +++ b/app/controllers/jinda/jinda_controller.rb @@ -0,0 +1,67 @@ +# -*- encoding : utf-8 -*- +module Jinda + class JindaController < ApplicationController + include JindaRunConcern + include JindaGeneralConcern + # view menu by user selected what service (module and code) to run (not all services like menu did + # Its only one service + + def init + module_code, code = params[:s].split(":") + @service= Jinda::Service.where(:module_code=> module_code, :code=> code).first + if @service && authorize_init? + xmain = create_xmain(@service) + result = create_runseq(xmain) + unless result + message = "Node missing action icon: cannot find action for xmain #{xmain.id}, the node required action(icon) in freemind eg: form, list, method" + ma_log(message) + flash[:notice]= message + redirect_to "pending" and return + end + xmain.update_attribute(:xvars, @xvars) + xmain.runseqs.last.update_attribute(:end,true) + #Above line cause error update_attribute in heroku shown in logs and it was proposed to fixed in github:'kul1/g241502' + # Main action run with :id + redirect_to :action=>'run', :id=>xmain.id + + else + refresh_to "/", :alert => "Error: cannot process" + error_run_xmain = "Error_run_xmain" + ma_log(error_run_xmain) + end + end + + ########################################################################] + # run if, form, mail, output etc depend on icon in freemind + # action from @r.action == do, form, if, output + # Then will call def run_do, run_form, run_if, run_output + ########################################################################] + # + # run + # init_vars + # To get all var from global and runseq, action + # (@runseq.action) + # + # run_do, run_form, run_if, run_output + # run_do => controller => action eg: update, create, document + # run_form => + # run_form.haml => - next step => def end_form + # - next_step = end_form + # run_if => + # run_output => + # + # end_action + # => save local var to database :current_runseq + # :current_runseq => next_runseq + # + def run + init_vars(params[:id]) + if authorize? + # session[:full_layout]= false + redirect_to(:action=>"run_#{@runseq.action}", :id=>@xmain.id) + else + redirect_to_root + end + end + end +end diff --git a/config/mongoid.yml b/config-org/mongoid.yml similarity index 100% rename from config/mongoid.yml rename to config-org/mongoid.yml diff --git a/config-org/readme.txt b/config-org/readme.txt new file mode 100644 index 0000000..63e9449 --- /dev/null +++ b/config-org/readme.txt @@ -0,0 +1 @@ +rount for installed app diff --git a/config/routes.rb b/config-org/routes.rb similarity index 100% rename from config/routes.rb rename to config-org/routes.rb diff --git a/jinda.gemspec b/jinda.gemspec index 51da7f6..4338f5a 100755 --- a/jinda.gemspec +++ b/jinda.gemspec @@ -2,6 +2,7 @@ lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'jinda/version' +require 'jinda/engine' Gem::Specification.new do |spec| spec.name = 'jinda' diff --git a/lib/jinda/engine.rb b/lib/jinda/engine.rb new file mode 100755 index 0000000..ab196d7 --- /dev/null +++ b/lib/jinda/engine.rb @@ -0,0 +1,9 @@ +require 'jinda/version' +require 'jinda/railtie' +require 'jinda/engine' + +module Jinda + class Engine < ::Rails::Engine + isolate_namespace Jinda + end +end diff --git a/test/dummy-2/.gitattributes b/test/dummy-2/.gitattributes new file mode 100644 index 0000000..285e9e9 --- /dev/null +++ b/test/dummy-2/.gitattributes @@ -0,0 +1,5 @@ +# See https://git-scm.com/docs/gitattributes for more about git attribute files. + + +# Mark any vendored files as having been vendored. +vendor/* linguist-vendored diff --git a/test/dummy-2/.gitignore b/test/dummy-2/.gitignore new file mode 100644 index 0000000..2f76000 --- /dev/null +++ b/test/dummy-2/.gitignore @@ -0,0 +1,25 @@ +# See https://help.github.com/articles/ignoring-files for more about ignoring files. +# +# If you find yourself ignoring temporary files generated by your text editor +# or operating system, you probably want to add a global ignore instead: +# git config --global core.excludesfile '~/.gitignore_global' + +# Ignore bundler config. +/.bundle + +# Ignore all logfiles and tempfiles. +/log/* +/tmp/* +!/log/.keep +!/tmp/.keep + +# Ignore pidfiles, but keep the directory. +/tmp/pids/* +!/tmp/pids/ +!/tmp/pids/.keep + + +/public/assets + +# Ignore master key for decrypting credentials and more. +/config/master.key diff --git a/test/dummy-2/.ruby-version b/test/dummy-2/.ruby-version new file mode 100644 index 0000000..7bde84d --- /dev/null +++ b/test/dummy-2/.ruby-version @@ -0,0 +1 @@ +ruby-3.1.2 diff --git a/test/dummy/Dockerfile b/test/dummy-2/Dockerfile similarity index 100% rename from test/dummy/Dockerfile rename to test/dummy-2/Dockerfile diff --git a/test/dummy-2/Gemfile b/test/dummy-2/Gemfile new file mode 100644 index 0000000..504edd9 --- /dev/null +++ b/test/dummy-2/Gemfile @@ -0,0 +1,100 @@ +source "https://rubygems.org" +git_source(:github) { |repo| "https://github.com/#{repo}.git" } + +ruby "3.1.2" + +# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" +gem "rails", "~> 7.0.4" + +# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails] +gem "sprockets-rails" + +# Use the Puma web server [https://github.com/puma/puma] +gem "puma", "~> 5.0" + +# Build JSON APIs with ease [https://github.com/rails/jbuilder] +gem "jbuilder" + +# Use Redis adapter to run Action Cable in production +# gem "redis", "~> 4.0" + +# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis] +# gem "kredis" + +# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword] +# gem "bcrypt", "~> 3.1.7" + +# Windows does not include zoneinfo files, so bundle the tzinfo-data gem +gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ] + +# Reduces boot times through caching; required in config/boot.rb +gem "bootsnap", require: false + +# Use Sass to process CSS +# gem "sassc-rails" + +group :development, :test do + # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem + gem "debug", platforms: %i[ mri mingw x64_mingw ] +end + +group :development do + # Use console on exceptions pages [https://github.com/rails/web-console] + gem "web-console" + + # Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler] + # gem "rack-mini-profiler" + + # Speed up commands on slow machines / big apps [https://github.com/rails/spring] + # gem "spring" +end +gem 'jinda', path: '../../../jinda' +gem 'jinda_adminlte' , path: '../../../jinda_adminlte' +gem "bson", "4.4.2" +gem "maruku", "~> 0.7.3" +gem "bcrypt" +gem "rouge" +gem "normalize-rails" +gem "font-awesome-rails" +gem "font-awesome-sass", "~> 5.12.0" +gem "meta-tags" +gem "jquery-turbolinks", "2.1.0" +gem "mongo", "2.11.3" +gem "turbolinks_render" +gem "haml-rails", "~> 2.0.1" +gem "prawn" +gem "redcarpet" +gem "oauth2", "1.4.4" +gem "omniauth", "1.9.1" +gem "omniauth-oauth2", "1.6.0" +gem "omniauth-identity", "~> 1.1.1" +gem "omniauth-facebook", "6.0.0" +gem "omniauth-google-oauth2", "0.8.0" +gem "dotenv-rails" +gem "cloudinary", "1.13.2" +gem "kaminari", "1.2.0" +gem "jquery-rails", "4.3.5" +gem "mongoid" +gem "rexml", "~> 3.2.4" + +group :development, :test do + gem "shoulda" + gem "rspec" + gem "rspec-rails" + gem "better_errors" + gem "binding_of_caller" + gem "pry-byebug" + gem "factory_bot_rails" + gem "database_cleaner-mongoid" + gem "guard" + gem "guard-rspec" + gem "guard-minitest" + gem "capybara" + gem "selenium-webdriver" + gem "rb-fsevent" + gem "valid_attribute" + gem "faker" +end +gem "mongoid-paperclip", require: "mongoid_paperclip" +gem "kaminari-mongoid", "1.0.1" +gem 'rspec_junit_formatter' diff --git a/test/dummy-2/Gemfile.lock b/test/dummy-2/Gemfile.lock new file mode 100644 index 0000000..9d57dfd --- /dev/null +++ b/test/dummy-2/Gemfile.lock @@ -0,0 +1,518 @@ +PATH + remote: ../../../jinda_adminlte + specs: + jinda_adminlte (0.7.5.1) + +PATH + remote: ../.. + specs: + jinda (0.7.7.2) + rexml (~> 3.2) + +GEM + remote: https://rubygems.org/ + specs: + actioncable (7.0.4) + actionpack (= 7.0.4) + activesupport (= 7.0.4) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + actionmailbox (7.0.4) + actionpack (= 7.0.4) + activejob (= 7.0.4) + activerecord (= 7.0.4) + activestorage (= 7.0.4) + activesupport (= 7.0.4) + mail (>= 2.7.1) + net-imap + net-pop + net-smtp + actionmailer (7.0.4) + actionpack (= 7.0.4) + actionview (= 7.0.4) + activejob (= 7.0.4) + activesupport (= 7.0.4) + mail (~> 2.5, >= 2.5.4) + net-imap + net-pop + net-smtp + rails-dom-testing (~> 2.0) + actionpack (7.0.4) + actionview (= 7.0.4) + activesupport (= 7.0.4) + rack (~> 2.0, >= 2.2.0) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actiontext (7.0.4) + actionpack (= 7.0.4) + activerecord (= 7.0.4) + activestorage (= 7.0.4) + activesupport (= 7.0.4) + globalid (>= 0.6.0) + nokogiri (>= 1.8.5) + actionview (7.0.4) + activesupport (= 7.0.4) + builder (~> 3.1) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.1, >= 1.2.0) + activejob (7.0.4) + activesupport (= 7.0.4) + globalid (>= 0.3.6) + activemodel (7.0.4) + activesupport (= 7.0.4) + activerecord (7.0.4) + activemodel (= 7.0.4) + activesupport (= 7.0.4) + activestorage (7.0.4) + actionpack (= 7.0.4) + activejob (= 7.0.4) + activerecord (= 7.0.4) + activesupport (= 7.0.4) + marcel (~> 1.0) + mini_mime (>= 1.1.0) + activesupport (7.0.4) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + addressable (2.8.1) + public_suffix (>= 2.0.2, < 6.0) + aws_cf_signer (0.1.3) + bcrypt (3.1.18) + bcrypt-ruby (3.1.5) + bcrypt (>= 3.1.3) + better_errors (2.9.1) + coderay (>= 1.0.0) + erubi (>= 1.0.0) + rack (>= 0.9.0) + bindex (0.8.1) + binding_of_caller (1.0.0) + debug_inspector (>= 0.0.1) + bootsnap (1.14.0) + msgpack (~> 1.2) + bson (4.4.2) + builder (3.2.4) + byebug (11.1.3) + capybara (3.38.0) + addressable + matrix + mini_mime (>= 0.1.3) + nokogiri (~> 1.8) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (>= 1.5, < 3.0) + xpath (~> 3.2) + childprocess (4.1.0) + climate_control (0.2.0) + cloudinary (1.13.2) + aws_cf_signer + rest-client + coderay (1.1.3) + concurrent-ruby (1.1.10) + crass (1.0.6) + database_cleaner-core (2.0.1) + database_cleaner-mongoid (2.0.1) + database_cleaner-core (~> 2.0.0) + mongoid + debug (1.6.3) + irb (>= 1.3.6) + reline (>= 0.3.1) + debug_inspector (1.1.0) + diff-lcs (1.5.0) + domain_name (0.5.20190701) + unf (>= 0.0.5, < 1.0.0) + dotenv (2.8.1) + dotenv-rails (2.8.1) + dotenv (= 2.8.1) + railties (>= 3.2) + erubi (1.11.0) + erubis (2.7.0) + factory_bot (6.2.1) + activesupport (>= 5.0.0) + factory_bot_rails (6.2.0) + factory_bot (~> 6.2.0) + railties (>= 5.0.0) + faker (3.0.0) + i18n (>= 1.8.11, < 2) + faraday (1.10.2) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0) + faraday-multipart (~> 1.0) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.0) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) + faraday-retry (~> 1.0) + ruby2_keywords (>= 0.0.4) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) + faraday-httpclient (1.0.1) + faraday-multipart (1.0.4) + multipart-post (~> 2) + faraday-net_http (1.0.1) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + faraday-retry (1.0.3) + ffi (1.15.5) + font-awesome-rails (4.7.0.8) + railties (>= 3.2, < 8.0) + font-awesome-sass (5.12.0) + sassc (>= 1.11) + formatador (1.1.0) + globalid (1.0.0) + activesupport (>= 5.0) + guard (2.18.0) + formatador (>= 0.2.4) + listen (>= 2.7, < 4.0) + lumberjack (>= 1.0.12, < 2.0) + nenv (~> 0.1) + notiffany (~> 0.0) + pry (>= 0.13.0) + shellany (~> 0.0) + thor (>= 0.18.1) + guard-compat (1.2.1) + guard-minitest (2.4.6) + guard-compat (~> 1.2) + minitest (>= 3.0) + guard-rspec (4.7.3) + guard (~> 2.1) + guard-compat (~> 1.1) + rspec (>= 2.99.0, < 4.0) + haml (5.2.2) + temple (>= 0.8.0) + tilt + haml-rails (2.0.1) + actionpack (>= 5.1) + activesupport (>= 5.1) + haml (>= 4.0.6, < 6.0) + html2haml (>= 1.0.1) + railties (>= 5.1) + hashie (5.0.0) + html2haml (2.3.0) + erubis (~> 2.7.0) + haml (>= 4.0) + nokogiri (>= 1.6.0) + ruby_parser (~> 3.5) + http-accept (1.7.0) + http-cookie (1.0.5) + domain_name (~> 0.5) + i18n (1.12.0) + concurrent-ruby (~> 1.0) + io-console (0.5.11) + irb (1.4.3) + reline (>= 0.3.0) + jbuilder (2.11.5) + actionview (>= 5.0.0) + activesupport (>= 5.0.0) + jquery-rails (4.3.5) + rails-dom-testing (>= 1, < 3) + railties (>= 4.2.0) + thor (>= 0.14, < 2.0) + jquery-turbolinks (2.1.0) + railties (>= 3.1.0) + turbolinks + jwt (2.5.0) + kaminari (1.2.0) + activesupport (>= 4.1.0) + kaminari-actionview (= 1.2.0) + kaminari-activerecord (= 1.2.0) + kaminari-core (= 1.2.0) + kaminari-actionview (1.2.0) + actionview + kaminari-core (= 1.2.0) + kaminari-activerecord (1.2.0) + activerecord + kaminari-core (= 1.2.0) + kaminari-core (1.2.0) + kaminari-mongoid (1.0.1) + kaminari-core (~> 1.0) + mongoid + kt-paperclip (7.1.1) + activemodel (>= 4.2.0) + activesupport (>= 4.2.0) + marcel (~> 1.0.1) + mime-types + terrapin (~> 0.6.0) + listen (3.7.1) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + loofah (2.19.0) + crass (~> 1.0.2) + nokogiri (>= 1.5.9) + lumberjack (1.2.8) + mail (2.7.1) + mini_mime (>= 0.1.1) + marcel (1.0.2) + maruku (0.7.3) + matrix (0.4.2) + meta-tags (2.18.0) + actionpack (>= 3.2.0, < 7.1) + method_source (1.0.0) + mime-types (3.4.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2022.0105) + mini_mime (1.1.2) + minitest (5.16.3) + mongo (2.11.3) + bson (>= 4.4.2, < 5.0.0) + mongoid (7.5.2) + activemodel (>= 5.1, < 7.1, != 7.0.0) + mongo (>= 2.10.5, < 3.0.0) + ruby2_keywords (~> 0.0.5) + mongoid-paperclip (0.1.0) + kt-paperclip + mongoid + msgpack (1.6.0) + multi_json (1.15.0) + multi_xml (0.6.0) + multipart-post (2.2.3) + nenv (0.3.0) + net-imap (0.3.1) + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.1.3) + timeout + net-smtp (0.3.3) + net-protocol + netrc (0.11.0) + nio4r (2.5.8) + nokogiri (1.13.9-arm64-darwin) + racc (~> 1.4) + normalize-rails (8.0.1) + notiffany (0.1.3) + nenv (~> 0.1) + shellany (~> 0.0) + oauth2 (1.4.4) + faraday (>= 0.8, < 2.0) + jwt (>= 1.0, < 3.0) + multi_json (~> 1.3) + multi_xml (~> 0.5) + rack (>= 1.2, < 3) + omniauth (1.9.1) + hashie (>= 3.4.6) + rack (>= 1.6.2, < 3) + omniauth-facebook (6.0.0) + omniauth-oauth2 (~> 1.2) + omniauth-google-oauth2 (0.8.0) + jwt (>= 2.0) + omniauth (>= 1.1.1) + omniauth-oauth2 (>= 1.6) + omniauth-identity (1.1.1) + bcrypt-ruby (~> 3.0) + omniauth (~> 1.0) + omniauth-oauth2 (1.6.0) + oauth2 (~> 1.1) + omniauth (~> 1.9) + pdf-core (0.9.0) + prawn (2.4.0) + pdf-core (~> 0.9.0) + ttfunk (~> 1.7) + pry (0.14.1) + coderay (~> 1.1) + method_source (~> 1.0) + pry-byebug (3.10.1) + byebug (~> 11.0) + pry (>= 0.13, < 0.15) + public_suffix (5.0.0) + puma (5.6.5) + nio4r (~> 2.0) + racc (1.6.0) + rack (2.2.4) + rack-test (2.0.2) + rack (>= 1.3) + rails (7.0.4) + actioncable (= 7.0.4) + actionmailbox (= 7.0.4) + actionmailer (= 7.0.4) + actionpack (= 7.0.4) + actiontext (= 7.0.4) + actionview (= 7.0.4) + activejob (= 7.0.4) + activemodel (= 7.0.4) + activerecord (= 7.0.4) + activestorage (= 7.0.4) + activesupport (= 7.0.4) + bundler (>= 1.15.0) + railties (= 7.0.4) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) + rails-html-sanitizer (1.4.3) + loofah (~> 2.3) + railties (7.0.4) + actionpack (= 7.0.4) + activesupport (= 7.0.4) + method_source + rake (>= 12.2) + thor (~> 1.0) + zeitwerk (~> 2.5) + rake (13.0.6) + rb-fsevent (0.11.2) + rb-inotify (0.10.1) + ffi (~> 1.0) + redcarpet (3.5.1) + regexp_parser (2.6.1) + reline (0.3.1) + io-console (~> 0.5) + rest-client (2.1.0) + http-accept (>= 1.7.0, < 2.0) + http-cookie (>= 1.0.2, < 2.0) + mime-types (>= 1.16, < 4.0) + netrc (~> 0.8) + rexml (3.2.5) + rouge (4.0.0) + rspec (3.12.0) + rspec-core (~> 3.12.0) + rspec-expectations (~> 3.12.0) + rspec-mocks (~> 3.12.0) + rspec-core (3.12.0) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-mocks (3.12.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.12.0) + rspec-rails (6.0.1) + actionpack (>= 6.1) + activesupport (>= 6.1) + railties (>= 6.1) + rspec-core (~> 3.11) + rspec-expectations (~> 3.11) + rspec-mocks (~> 3.11) + rspec-support (~> 3.11) + rspec-support (3.12.0) + rspec_junit_formatter (0.6.0) + rspec-core (>= 2, < 4, != 2.12.0) + ruby2_keywords (0.0.5) + ruby_parser (3.19.1) + sexp_processor (~> 4.16) + rubyzip (2.3.2) + sassc (2.4.0) + ffi (~> 1.9) + selenium-webdriver (4.6.1) + childprocess (>= 0.5, < 5.0) + rexml (~> 3.2, >= 3.2.5) + rubyzip (>= 1.2.2, < 3.0) + websocket (~> 1.0) + sexp_processor (4.16.1) + shellany (0.0.1) + shoulda (4.0.0) + shoulda-context (~> 2.0) + shoulda-matchers (~> 4.0) + shoulda-context (2.0.0) + shoulda-matchers (4.5.1) + activesupport (>= 4.2.0) + sprockets (4.1.1) + concurrent-ruby (~> 1.0) + rack (> 1, < 3) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) + sprockets (>= 3.0.0) + temple (0.9.1) + terrapin (0.6.0) + climate_control (>= 0.0.3, < 1.0) + thor (1.2.1) + tilt (2.0.11) + timeout (0.3.0) + ttfunk (1.7.0) + turbolinks (5.2.1) + turbolinks-source (~> 5.2) + turbolinks-source (5.2.0) + turbolinks_render (0.9.21) + actionpack (>= 5.2.0) + activesupport (>= 5.2.0) + railties (>= 5.2.0) + turbolinks-source (~> 5.1) + tzinfo (2.0.5) + concurrent-ruby (~> 1.0) + unf (0.1.4) + unf_ext + unf_ext (0.0.8.2) + valid_attribute (2.0.0) + web-console (4.2.0) + actionview (>= 6.0.0) + activemodel (>= 6.0.0) + bindex (>= 0.4.0) + railties (>= 6.0.0) + websocket (1.2.9) + websocket-driver (0.7.5) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) + xpath (3.2.0) + nokogiri (~> 1.8) + zeitwerk (2.6.6) + +PLATFORMS + arm64-darwin-22 + +DEPENDENCIES + bcrypt + better_errors + binding_of_caller + bootsnap + bson (= 4.4.2) + capybara + cloudinary (= 1.13.2) + database_cleaner-mongoid + debug + dotenv-rails + factory_bot_rails + faker + font-awesome-rails + font-awesome-sass (~> 5.12.0) + guard + guard-minitest + guard-rspec + haml-rails (~> 2.0.1) + jbuilder + jinda! + jinda_adminlte! + jquery-rails (= 4.3.5) + jquery-turbolinks (= 2.1.0) + kaminari (= 1.2.0) + kaminari-mongoid (= 1.0.1) + maruku (~> 0.7.3) + meta-tags + mongo (= 2.11.3) + mongoid + mongoid-paperclip + normalize-rails + oauth2 (= 1.4.4) + omniauth (= 1.9.1) + omniauth-facebook (= 6.0.0) + omniauth-google-oauth2 (= 0.8.0) + omniauth-identity (~> 1.1.1) + omniauth-oauth2 (= 1.6.0) + prawn + pry-byebug + puma (~> 5.0) + rails (~> 7.0.4) + rb-fsevent + redcarpet + rexml (~> 3.2.4) + rouge + rspec + rspec-rails + rspec_junit_formatter + selenium-webdriver + shoulda + sprockets-rails + turbolinks_render + tzinfo-data + valid_attribute + web-console + +RUBY VERSION + ruby 3.1.2p20 + +BUNDLED WITH + 2.3.25 diff --git a/test/dummy-2/README.md b/test/dummy-2/README.md new file mode 100644 index 0000000..e69de29 diff --git a/test/dummy-2/README.md.bak b/test/dummy-2/README.md.bak new file mode 100644 index 0000000..7db80e4 --- /dev/null +++ b/test/dummy-2/README.md.bak @@ -0,0 +1,24 @@ +# README + +This README would normally document whatever steps are necessary to get the +application up and running. + +Things you may want to cover: + +* Ruby version + +* System dependencies + +* Configuration + +* Database creation + +* Database initialization + +* How to run the test suite + +* Services (job queues, cache servers, search engines, etc.) + +* Deployment instructions + +* ... diff --git a/test/dummy-2/Rakefile b/test/dummy-2/Rakefile new file mode 100644 index 0000000..9a5ea73 --- /dev/null +++ b/test/dummy-2/Rakefile @@ -0,0 +1,6 @@ +# Add your own tasks in files placed in lib/tasks ending in .rake, +# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. + +require_relative "config/application" + +Rails.application.load_tasks diff --git a/test/dummy-2/app/assets/config/manifest.js b/test/dummy-2/app/assets/config/manifest.js new file mode 100644 index 0000000..4481a9c --- /dev/null +++ b/test/dummy-2/app/assets/config/manifest.js @@ -0,0 +1,4 @@ +//= link_tree ../images +//= link_directory ../stylesheets .css +//= link application.js + diff --git a/test/dummy-2/app/assets/config/manifest.js-rails b/test/dummy-2/app/assets/config/manifest.js-rails new file mode 100644 index 0000000..5918193 --- /dev/null +++ b/test/dummy-2/app/assets/config/manifest.js-rails @@ -0,0 +1,2 @@ +//= link_tree ../images +//= link_directory ../stylesheets .css diff --git a/test/dummy-2/app/assets/images/.keep b/test/dummy-2/app/assets/images/.keep new file mode 100644 index 0000000..e69de29 diff --git a/test/dummy-2/app/assets/javascripts/application.js b/test/dummy-2/app/assets/javascripts/application.js new file mode 100644 index 0000000..87a9a81 --- /dev/null +++ b/test/dummy-2/app/assets/javascripts/application.js @@ -0,0 +1,15 @@ +// This is a manifest file that'll be compiled into application.js, which will include all the files +// listed below. +// +// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's +// vendor/assets/javascripts directory can be referenced here using a relative path. +// +// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the +// compiled file. JavaScript code in this file should be added after the last require_* statement. +// +// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details +// about supported directives. +// +//= require rails-ujs +// require turbolinks +//= require jindalte.js diff --git a/test/dummy/app/assets/stylesheets/application.scss b/test/dummy-2/app/assets/stylesheets/application.scss similarity index 100% rename from test/dummy/app/assets/stylesheets/application.scss rename to test/dummy-2/app/assets/stylesheets/application.scss diff --git a/test/dummy/app/assets/stylesheets/jinda.scss b/test/dummy-2/app/assets/stylesheets/jinda.scss similarity index 100% rename from test/dummy/app/assets/stylesheets/jinda.scss rename to test/dummy-2/app/assets/stylesheets/jinda.scss diff --git a/test/dummy-2/app/channels/application_cable/channel.rb b/test/dummy-2/app/channels/application_cable/channel.rb new file mode 100644 index 0000000..d672697 --- /dev/null +++ b/test/dummy-2/app/channels/application_cable/channel.rb @@ -0,0 +1,4 @@ +module ApplicationCable + class Channel < ActionCable::Channel::Base + end +end diff --git a/test/dummy-2/app/channels/application_cable/connection.rb b/test/dummy-2/app/channels/application_cable/connection.rb new file mode 100644 index 0000000..0ff5442 --- /dev/null +++ b/test/dummy-2/app/channels/application_cable/connection.rb @@ -0,0 +1,4 @@ +module ApplicationCable + class Connection < ActionCable::Connection::Base + end +end diff --git a/test/dummy/app/controllers/adminltes_controller.rb b/test/dummy-2/app/controllers/adminltes_controller.rb similarity index 100% rename from test/dummy/app/controllers/adminltes_controller.rb rename to test/dummy-2/app/controllers/adminltes_controller.rb diff --git a/test/dummy-2/app/controllers/admins_controller.rb b/test/dummy-2/app/controllers/admins_controller.rb new file mode 100644 index 0000000..ed2ae9e --- /dev/null +++ b/test/dummy-2/app/controllers/admins_controller.rb @@ -0,0 +1,6 @@ +class AdminsController < ApplicationController + def update_role + user = User.find_by :code=> $xvars["select_user"]["code"] + user.update_attribute :role, $xvars["edit_role"]["role"] + end +end diff --git a/test/dummy-2/app/controllers/api/v1/notes_controller.rb b/test/dummy-2/app/controllers/api/v1/notes_controller.rb new file mode 100644 index 0000000..b8f7bde --- /dev/null +++ b/test/dummy-2/app/controllers/api/v1/notes_controller.rb @@ -0,0 +1,81 @@ +class Api::V1::NotesController < ApplicationController + before_action :load_note, only: [:show, :destroy] + # before_action :xload_current_ma_user, only: [:destroy] + + def index + @notes = Note.desc(:created_at).page(params[:page]).per(10) + render json: @notes + end + + def my + @notes = Note.where(user_id: current_ma_user).desc(:created_at).page(params[:page]).per(10) + render json: @notes + end + + def show + end + + def edit + @note = Note.find(params[:id]) + @page_title = 'Edit Note' + end + + def create + @note = Note.new( + title: params[:title], + body: params[:body], + user_id: params[:user]) + + @note.save! + render json: @note, status: :created + end + + + def update + # $xvars["select_note"] and $xvars["edit_note"] + # These are variables. + # They contain everything that we get their forms select_note and edit_note + note_id = $xvars["select_note"] ? $xvars["select_note"]["id"] : $xvars["p"]["note_id"] + @note = Note.find(note_id) + @note.update(title: $xvars["edit_note"]["title"], + body: $xvars["edit_note"]["body"]) + redirect_to @note + + end + + def delete + # called by freemind + # Tobe called from other controller:jinda + @note_id = $xvars["select_note"] ? $xvars["select_note"]["id"] : $xvars["p"]["note_id"] + @note = Note.find(@note_id) + @note.destroy + end + + def destroy + # called by rails menu my + if current_ma_user.role.upcase.split(',').include?("A") || current_ma_user == @note.user + @note.destroy + end + redirect_to :action=>'my' + end + + def mail + NoteMailer.gmail( + $xvars["display_mail"]["body"], + $xvars["select_note"]["email"], + $xvars["display_mail"]["title"], + xload_current_ma_user.email) + end + + private + + # Tobe called from other controller:jinda + def xload_current_ma_user + @current_ma_user = User.find($xvars["user_id"]) + end + + def load_note + @note = Note.find(params[:id]) + end + +end diff --git a/test/dummy-2/app/controllers/application_controller.rb b/test/dummy-2/app/controllers/application_controller.rb new file mode 100644 index 0000000..7100089 --- /dev/null +++ b/test/dummy-2/app/controllers/application_controller.rb @@ -0,0 +1,41 @@ +class ApplicationController < ActionController::Base + before_action :prepare_meta_tags, if: -> { request.get? } + # CSRF protection is turned on with the protect_from_forgery method. + protect_from_forgery unless: -> { request.format.json? } + def prepare_meta_tags(options={}) + site_name = DEFAULT_TITLE + title = [controller_name, action_name].join(" ") + description = DEFAULT_DESCRIPTION + image = options[:image] || href="/assets/images/logo.png" + keywords = DEFAULT_KEYWORDS + current_url = request.url + + # Let's prepare a nice set of defaults + defaults = { + site: site_name, + title: title, + image: image, + description: description, + keywords: keywords, + twitter: { + site_name: site_name, + site: site_name, + card: 'summary', + description: description, + image: image + }, + og: { + url: current_url, + site_name: site_name, + title: title, + image: image, + description: description, + type: 'website' + } + } + + options.reverse_merge!(defaults) + + set_meta_tags options + end +end diff --git a/test/dummy-2/app/controllers/application_controller.rb.bak b/test/dummy-2/app/controllers/application_controller.rb.bak new file mode 100644 index 0000000..09705d1 --- /dev/null +++ b/test/dummy-2/app/controllers/application_controller.rb.bak @@ -0,0 +1,2 @@ +class ApplicationController < ActionController::Base +end diff --git a/test/dummy-2/app/controllers/articles_controller.rb b/test/dummy-2/app/controllers/articles_controller.rb new file mode 100644 index 0000000..f257402 --- /dev/null +++ b/test/dummy-2/app/controllers/articles_controller.rb @@ -0,0 +1,110 @@ +class ArticlesController < ApplicationController + before_action :load_articles, except: [:destroy] + before_action :load_my_articles, only: [:my] + before_action :load_article, only: [:destroy, :edit] + + def index + # before_action + end + + def my + # before_action + end + + def show + @article = Article.find(article_params) + @commentable = @article + @comments = @commentable.comments.desc(:created_at).page(params[:page]).per(10) + @user = User.find(@article.user_id) + @show = Hash.new + @show = {:article => @article, :comments => @comments, :user => @user} + prepare_meta_tags(title: @article.title, + description: @article.text, + keywords: @article.keywords) + end + + def edit + @page_title = 'Edit Article' + end + + def create + # Use Jinda $xvars + @article = Article.new( + title: $xvars["form_article"]["title"], + text: $xvars["form_article"]["text"], + keywords: $xvars["form_article"]["keywords"], + body: $xvars["form_article"]["body"], + user_id: $xvars["user_id"]) + @article.save! + end + + def update + @article = Article.find(params[:id]) + @article.update( + title: params["article"]["title"], + text: params["article"]["text"], + keywords: params["article"]["keywords"], + body: params["article"]["body"] + ) + redirect_to :action=> 'show', :article_id => @article.id + end + + def j_update + # Use Jinda $xvars + @article_id = $xvars["select_article"] ? $xvars["select_article"]["title"] : $xvars["p"]["article_id"] + @article = Article.find_by :id => @article_id + @article.update(title: $xvars["edit_article"]["article"]["title"], + text: $xvars["edit_article"]["article"]["text"], + keywords: $xvars["edit_article"]["article"]["keywords"], + body: $xvars["edit_article"]["article"]["body"] + ) + end + + def destroy + # Use Rails + # before_action + + if current_admin? || current_ma_user == @article.user + @article.destroy + end + + action = (current_admin? ? 'index' : 'my') + redirect_to :action=> (current_admin? ? 'index' : 'my') + end + + private + + def current_admin? + if current_ma_user.role.upcase.split(',').include?("A") + return true + else + return false + end + end + + + def load_articles + @articles = Article.desc(:created_at).page(params[:page]).per(10) + end + + def load_my_articles + @my_articles = @articles.where(user: current_ma_user) + end + + def load_article + @article = Article.find(params[:article_id]) + end + + def article_params + [params[:article_id], params[:id]].detect { |p| !p.nil? } + end + + def load_edit_article + @article = Article.find(params.require(:article).permit(:article_id)) + end + + def load_comments + @comments = @article.comments.find_all + end + +end diff --git a/test/dummy-2/app/controllers/comments_controller.rb b/test/dummy-2/app/controllers/comments_controller.rb new file mode 100644 index 0000000..0ffff27 --- /dev/null +++ b/test/dummy-2/app/controllers/comments_controller.rb @@ -0,0 +1,31 @@ +class CommentsController < ApplicationController + before_action :comment_params, only: [:create] + before_action :load_commmentable + + def index + @comments = @commentable.comments + end + + def create + @comment = @commentable.comments.new comment_params + @comment.save! + redirect_to [@commentable], notice: "Comment created" + end + + private + + # def article_params + # params.require(:comment).permit(:article_id) + # end + + def comment_params + resource = request.path.split('/')[1] + commentable_id = "#{resource.singularize.to_sym}_id" #:article_id + params.require(:comment).permit(:body, :user_id, commentable_id.to_sym) + end + + def load_commmentable + resource, id = request.path.split('/')[1,2] + @commentable = resource.singularize.classify.constantize.find(id) + end +end diff --git a/test/dummy-2/app/controllers/concerns/.keep b/test/dummy-2/app/controllers/concerns/.keep new file mode 100644 index 0000000..e69de29 diff --git a/test/dummy-2/app/controllers/docs_controller.rb b/test/dummy-2/app/controllers/docs_controller.rb new file mode 100644 index 0000000..e1c8b68 --- /dev/null +++ b/test/dummy-2/app/controllers/docs_controller.rb @@ -0,0 +1,56 @@ +class DocsController < ApplicationController + before_action :load_doc, only: [:destroy] + before_action :load_doc_form, only: [:doc_update, :edit, :my] + + def index + @documents = Jinda::Doc.desc(:created_at).page(params[:page]).per(10) + end + + def edit + end + + def my + @page_title = 'My Document' + end + + def doc_update + # Instead of creaete, Doc record was created in form, when upload file + + if Jinda::Doc.where(:runseq_id => $xvars["doc_form"]["runseq_id"]).exists? + @doc = Jinda::Doc.where(:runseq_id => $xvars["doc_form"]["runseq_id"]).first + @doc.update(description: $xvars["doc_form"]["description"], + category: $xvars["doc_form"]["jinda_doc"]["category"], + keywords: $xvars["doc_form"]["keywords"], + user_id: $xvars["user_id"] + ) + else + # create here + # Todo + end + end + + def destroy + # duplicated from jinda_controller + # Expected to use in jinda_controller + current_ma_user = User.where(:auth_token => cookies[:auth_token]).first if cookies[:auth_token] + + if Rails.env.test? #Temp solution until fix test of current_ma_user + current_ma_user = $xvars["current_ma_user"] + #current_ma_user = @doc.user + end + + if current_ma_user.role.upcase.split(',').include?("A") || current_ma_user == @doc.user + @doc.destroy + end + redirect_to :action=>'my' + end + + private + + def load_doc_form + @docs = Jinda::Doc.all.desc(:created_at).page(params[:page]).per(10) + end + def load_doc + @doc = Jinda::Doc.find(params[:doc_id]) + end +end diff --git a/test/dummy-2/app/controllers/identities_controller.rb b/test/dummy-2/app/controllers/identities_controller.rb new file mode 100644 index 0000000..33a5623 --- /dev/null +++ b/test/dummy-2/app/controllers/identities_controller.rb @@ -0,0 +1,5 @@ +class IdentitiesController < ApplicationController + def new + @identity =request.env['omniauth.identity'] + end +end diff --git a/test/dummy-2/app/controllers/notes_controller.rb b/test/dummy-2/app/controllers/notes_controller.rb new file mode 100644 index 0000000..d48f824 --- /dev/null +++ b/test/dummy-2/app/controllers/notes_controller.rb @@ -0,0 +1,84 @@ +class NotesController < ApplicationController + before_action :load_note, only: [:show, :destroy] + # before_action :xload_current_ma_user, only: [:destroy] + + def index + # @notes = Note.desc(:created_at).page(params[:page]).per(10) + @notes = Note + end + + def my + @notes = Note.where(user_id: current_ma_user).desc(:created_at).page(params[:page]).per(10) + end + + def show + end + + def edit + @note = Note.find(params[:id]) + @page_title = 'Edit Note' + end + + def create + @note = Note.new( + title: $xvars["new_note"]["note"]["title"], + body: $xvars["new_note"]["note"]["body"], + user_id: $xvars["user_id"]) + @note.save! + # if @note.save! + # format.html { redirect_to @note, notice: 'Sample was successfully created.' } + # format.json { render :show, status: :created, location: @note } + # else + # format.html { render :new } + # format.json { render json: @note.errors, status: :unprocessable_entity } + # end + + end + + + def update + # $xvars["select_note"] and $xvars["edit_note"] + # These are variables. + # They contain everything that we get their forms select_note and edit_note + note_id = $xvars["select_note"] ? $xvars["select_note"]["id"] : $xvars["p"]["note_id"] + @note = Note.find(note_id) + @note.update(title: $xvars["edit_note"]["note"]["title"], + body: $xvars["edit_note"]["note"]["body"]) + end + + def delete + # called by freemind + # Tobe called from other controller:jinda + @note_id = $xvars["select_note"] ? $xvars["select_note"]["id"] : $xvars["p"]["note_id"] + @note = Note.find(@note_id) + @note.destroy + end + + def destroy + # called by rails menu my + if current_ma_user.role.upcase.split(',').include?("A") || current_ma_user == @note.user + @note.destroy + end + redirect_to :action=>'my' + end + + def mail + NoteMailer.gmail( + $xvars["display_mail"]["body"], + $xvars["select_note"]["email"], + $xvars["display_mail"]["title"], + xload_current_ma_user.email) + end + + private + + # Tobe called from other controller:jinda + def xload_current_ma_user + @current_ma_user = User.find($xvars["user_id"]) + end + + def load_note + @note = Note.find(params[:id]) + end + +end diff --git a/test/dummy-2/app/controllers/password_resets.rb b/test/dummy-2/app/controllers/password_resets.rb new file mode 100644 index 0000000..13840bd --- /dev/null +++ b/test/dummy-2/app/controllers/password_resets.rb @@ -0,0 +1,28 @@ +class PasswordResetsController < ApplicationController + + def create + ##user = User.find_by_email(params[:email]) + user = User.where(:email => params[:email]).first + + user.send_password_reset if user + redirect_to root_url, :notice => "Email sent with password reset instructions." + end + + def edit + ##@user = User.find_by_password_reset_token!(params[:id]) + @user = User.where(:password_reset_token => params[:id]).first + end + + def update + ##@user = User.find_by_password_reset_token!(params[:id]) + @user = User.where(:password_reset_token => params[:id]).first + if @user.password_reset_sent_at < 2.hours.ago + redirect_to new_password_reset_path, :alert => "Password reset has expired." + elsif @user.update_attributes(params[:user]) + redirect_to root_url, :notice => "Password has been reset!" + else + render :edit + end + end +end + diff --git a/test/dummy-2/app/controllers/password_resets_controller.rb b/test/dummy-2/app/controllers/password_resets_controller.rb new file mode 100644 index 0000000..f6c428d --- /dev/null +++ b/test/dummy-2/app/controllers/password_resets_controller.rb @@ -0,0 +1,34 @@ +class PasswordResetsController < ApplicationController + + def index + end + + def create + #user = User.find_by_email(params[:email]) + user = User.where(:email => params[:email]).first + + user.send_password_reset if user + redirect_to root_url, :ma_notice => "Email sent with password reset instructions." + end + + def edit + ## Deprecated syntax in rail 5 + ##@user = User.find_by_password_reset_token!(params[:id]) + @user = User.where(:password_reset_token => params[:id]).first + end + + def update + ##@user = User.find_by_password_reset_token!(params[:id]) + @user = User.where(:password_reset_token => params[:id]).first + if @user.password_reset_sent_at < 2.hours.ago + redirect_to new_password_reset_path, :alert => "Password ↵ + reset has expired." + elsif @user.update_attributes(params[:user]) + redirect_to root_url, :notice => "Password has been reset." + else + render :edit + end + end + +end + diff --git a/test/dummy-2/app/controllers/sessions_controller.rb b/test/dummy-2/app/controllers/sessions_controller.rb new file mode 100644 index 0000000..663a1c7 --- /dev/null +++ b/test/dummy-2/app/controllers/sessions_controller.rb @@ -0,0 +1,44 @@ +# encoding: utf-8 +class SessionsController < ApplicationController + def new + @title= 'Sign In' + end + + def failure + # redirect_to login_path, alert: "Authentication failed, please try again." + redirect_to login_path, alert: "Authentication failed, please try again." + end + + # to refresh the page, must know BEFOREHAND that the action needs refresh + # then use attribute 'data-ajax'=>'false' + # see app/views/sessions/new.html.erb for sample + def create + auth = request.env["omniauth.auth"] + user = User.from_omniauth(auth) + session[:user_id] = user.id + if params.permit[:remember_me] + cookies.permanent[:auth_token] = user.auth_token + else + cookies[:auth_token] = user.auth_token + end + # refresh_to root_path, :ma_notice => "Logged in" # Called by jinda_conroller + redirect_to root_path + # redirect_to articles_my_path + + rescue + redirect_to root_path, :alert=> "Authentication failed, please try again." + end + + def destroy + session[:user_id] = nil + cookies.delete(:auth_token) + refresh_to root_path, :ma_notice => "Logged Out" # called by jinda_controller, not pass tested + # redirect_to root_path # Ok with test + + end + + def failure + ma_log "Authentication failed, please try again." + redirect_to new_session_path, :alert=> "Authentication failed, please try again." + end +end diff --git a/test/dummy-2/app/controllers/sitemap_controller.rb b/test/dummy-2/app/controllers/sitemap_controller.rb new file mode 100644 index 0000000..44ead3d --- /dev/null +++ b/test/dummy-2/app/controllers/sitemap_controller.rb @@ -0,0 +1,12 @@ +class SitemapController < ApplicationController +# From https://makandracards.com/makandra/689-know-your-haml-comments + SitemapController < ApplicationController + layout nil + def index + headers['Content-Type'] = 'application/xml' + respond_to do |format| + format.xml {@articles = Article.all} + end + end + +end diff --git a/test/dummy-2/app/controllers/users_controller.rb b/test/dummy-2/app/controllers/users_controller.rb new file mode 100644 index 0000000..53ec5da --- /dev/null +++ b/test/dummy-2/app/controllers/users_controller.rb @@ -0,0 +1,35 @@ +# -*- encoding : utf-8 -*- +class UsersController < ApplicationController + def index + @today = Date.today + @xmains = current_ma_user.xmains.in(status:['R','I']).asc(:created_at) + end + + # jinda methods + def update_user + # can't use session, current_ma_user inside jinda methods + $user.update_attribute :email, $xvars["enter_user"]["user"]["email"] + $user.update_attribute :image, $xvars["enter_user"]["user"]["image"] + end + def change_password + # check if old password correct + identity = Identity.find_by :code=> $user.code + if identity.authenticate($xvars["enter"]["epass"]) + identity.password = $xvars["enter"]["npass"] + identity.password_confirmation = $xvars["enter"]["npass_confirm"] + identity.save + ma_log "Password changed" + else + ma_log "Unauthorized access" + end + end + + def send_password_reset + generate_token(:password_reset_token) + self.password_reset_sent_at = Time.zone.now + save! + UserMailer.password_reset(self).deliver + end + +end + diff --git a/test/dummy-2/app/helpers/admins_helper.rb b/test/dummy-2/app/helpers/admins_helper.rb new file mode 100644 index 0000000..d4f7b34 --- /dev/null +++ b/test/dummy-2/app/helpers/admins_helper.rb @@ -0,0 +1,2 @@ +module AdminsHelper +end diff --git a/test/dummy-2/app/helpers/application_helper.rb b/test/dummy-2/app/helpers/application_helper.rb new file mode 100644 index 0000000..7a13993 --- /dev/null +++ b/test/dummy-2/app/helpers/application_helper.rb @@ -0,0 +1,33 @@ +module ApplicationHelper + + def title(blog_title) + content_for(:title) { blog_title } + end + + def meta_description(blog_text) + content_for(:meta_description) { blog_text } + end + +require 'redcarpet' +require 'rouge' +require 'rouge/plugins/redcarpet' + +class CodeRayify < Redcarpet::Render::HTML + def block_code(code, language) + CodeRay.scan(code, language).div + end +end + +def markdown(text) + coderayified = CodeRayify.new(:filter_html => true, + :hard_wrap => true) + options = { + :fenced_code_blocks => true, + :no_intra_emphasis => true, + :autolink => true, + :lax_html_blocks => true, + } + markdown_to_html = Redcarpet::Markdown.new(coderayified, options) + markdown_to_html.render(text).html_safe +end +end \ No newline at end of file diff --git a/test/dummy-2/app/helpers/application_helper.rb.bak b/test/dummy-2/app/helpers/application_helper.rb.bak new file mode 100644 index 0000000..de6be79 --- /dev/null +++ b/test/dummy-2/app/helpers/application_helper.rb.bak @@ -0,0 +1,2 @@ +module ApplicationHelper +end diff --git a/test/dummy-2/app/helpers/articles_helper.rb b/test/dummy-2/app/helpers/articles_helper.rb new file mode 100644 index 0000000..2968277 --- /dev/null +++ b/test/dummy-2/app/helpers/articles_helper.rb @@ -0,0 +1,2 @@ +module ArticlesHelper +end diff --git a/test/dummy-2/app/helpers/basic_helper.rb b/test/dummy-2/app/helpers/basic_helper.rb new file mode 100644 index 0000000..bf821f5 --- /dev/null +++ b/test/dummy-2/app/helpers/basic_helper.rb @@ -0,0 +1,2 @@ +module BasicHelper +end diff --git a/test/dummy-2/app/helpers/comments_helper.rb b/test/dummy-2/app/helpers/comments_helper.rb new file mode 100644 index 0000000..0ec9ca5 --- /dev/null +++ b/test/dummy-2/app/helpers/comments_helper.rb @@ -0,0 +1,2 @@ +module CommentsHelper +end diff --git a/test/dummy-2/app/helpers/ctrs_helper.rb b/test/dummy-2/app/helpers/ctrs_helper.rb new file mode 100644 index 0000000..101f2a6 --- /dev/null +++ b/test/dummy-2/app/helpers/ctrs_helper.rb @@ -0,0 +1,2 @@ +module CtrsHelper +end diff --git a/test/dummy-2/app/helpers/devs_helper.rb b/test/dummy-2/app/helpers/devs_helper.rb new file mode 100644 index 0000000..3535bad --- /dev/null +++ b/test/dummy-2/app/helpers/devs_helper.rb @@ -0,0 +1,2 @@ +module DevsHelper +end diff --git a/test/dummy-2/app/helpers/pictures_helper.rb b/test/dummy-2/app/helpers/pictures_helper.rb new file mode 100644 index 0000000..f1a9d9c --- /dev/null +++ b/test/dummy-2/app/helpers/pictures_helper.rb @@ -0,0 +1,2 @@ +module PicturesHelper +end diff --git a/test/dummy-2/app/helpers/sitemap_helper.rb b/test/dummy-2/app/helpers/sitemap_helper.rb new file mode 100644 index 0000000..39a6711 --- /dev/null +++ b/test/dummy-2/app/helpers/sitemap_helper.rb @@ -0,0 +1,2 @@ +module SitemapHelper +end diff --git a/test/dummy-2/app/helpers/users_helper.rb b/test/dummy-2/app/helpers/users_helper.rb new file mode 100644 index 0000000..2310a24 --- /dev/null +++ b/test/dummy-2/app/helpers/users_helper.rb @@ -0,0 +1,2 @@ +module UsersHelper +end diff --git a/test/dummy-2/app/jinda/index.mm b/test/dummy-2/app/jinda/index.mm new file mode 100644 index 0000000..bf59038 --- /dev/null +++ b/test/dummy-2/app/jinda/index.mm @@ -0,0 +1,486 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/dummy-2/app/jinda/template/index.mm b/test/dummy-2/app/jinda/template/index.mm new file mode 100644 index 0000000..91aef51 --- /dev/null +++ b/test/dummy-2/app/jinda/template/index.mm @@ -0,0 +1,366 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/dummy-2/app/jinda/template/linkview.haml b/test/dummy-2/app/jinda/template/linkview.haml new file mode 100644 index 0000000..0ca2597 --- /dev/null +++ b/test/dummy-2/app/jinda/template/linkview.haml @@ -0,0 +1,21 @@ +- @title= "My Articles" +%p +- @page_title = 'All Articlces' += paginate @articles +%table#article-table + %tr + %th Title + %th Description + %th Created + %th Updated + %th Delete + %th Edit + - @articles.each do |article| + %tr + %td= link_to article.title, :controller=>"articles", :action=>"show", :id=>article.id + %td= article.text.html_safe + %td= article.created_at.strftime('%m/%d/%Y') + %td= article.updated_at.strftime('%m/%d/%Y') + %td(align='center')= link_to image_tag('delete.png', style:'border:none; float:none;'), "#", :onclick=>"if (confirm('Please Confirm')) {location.hash='/articles/destroy/#{article.id}';}" + %td(align='center')= link_to image_tag('pencil.png', style:'border:none; float:none;'), {controller: "jinda", action: "init", s: 'articles:xedit_article', article_id: article.id}, data: { confirm: "Please Confirm" } + diff --git a/test/dummy-2/app/jinda/template/view.html.erb b/test/dummy-2/app/jinda/template/view.html.erb new file mode 100644 index 0000000..3193882 --- /dev/null +++ b/test/dummy-2/app/jinda/template/view.html.erb @@ -0,0 +1,34 @@ + +<%- @title= 'Template for Document' %> +<% + doc = Jinda::Doc.new :issue_on=> Date.today, :process_at => Time.now + %> + +

+ <%= @title %> +

+ +
+ <%= fields_for doc do |f| %> + <%= f.label :category, "Category" %> + <%= f.select :category, [["Book", "book"], ["Letter", "letter"], ["Brochure", "brochure"]] %> + <%= f.label :issue_on, "Dated" %> + <%= f.date_field :issue_on, "blackDays"=>[0,6] %> + + <%= f.label :dscan, "Attached document" %> + <%= f.file_field :dscan %> + <% end %> +
+ <%= label_tag :description, "Description" %> + <%= text_field_tag :description %> +
+
+ <%= label_tag :ma_display, "Display", :class=>"ui-input-text" %> + <%= select_tag :ma_display, options_for_select([['Yes', 'y'], ['No', 'n']],'y'), 'data-role'=>"slider" %> +
+
+ <%= label_tag :keywords, "Search Keywords" %> + <%= text_field_tag :keywords %> +
+
+ diff --git a/test/dummy-2/app/jobs/application_job.rb b/test/dummy-2/app/jobs/application_job.rb new file mode 100644 index 0000000..d394c3d --- /dev/null +++ b/test/dummy-2/app/jobs/application_job.rb @@ -0,0 +1,7 @@ +class ApplicationJob < ActiveJob::Base + # Automatically retry jobs that encountered a deadlock + # retry_on ActiveRecord::Deadlocked + + # Most jobs are safe to ignore if the underlying records are no longer available + # discard_on ActiveJob::DeserializationError +end diff --git a/test/dummy-2/app/mailers/application_mailer.rb b/test/dummy-2/app/mailers/application_mailer.rb new file mode 100644 index 0000000..286b223 --- /dev/null +++ b/test/dummy-2/app/mailers/application_mailer.rb @@ -0,0 +1,4 @@ +class ApplicationMailer < ActionMailer::Base + default from: 'from@example.com' + layout 'mailer' +end diff --git a/test/dummy-2/app/mailers/jinda_mailer.rb b/test/dummy-2/app/mailers/jinda_mailer.rb new file mode 100644 index 0000000..f759b61 --- /dev/null +++ b/test/dummy-2/app/mailers/jinda_mailer.rb @@ -0,0 +1,7 @@ +class JindaMailer < ActionMailer::Base + default from: "from@example.com" + def gmail(ui, to="", subject="", from="") + @ui = ui + mail(:to => to, :subject => subject, :from => from) + end +end diff --git a/test/dummy-2/app/mailers/note_mailer.rb b/test/dummy-2/app/mailers/note_mailer.rb new file mode 100644 index 0000000..702d8fe --- /dev/null +++ b/test/dummy-2/app/mailers/note_mailer.rb @@ -0,0 +1,10 @@ +class NoteMailer < ActionMailer::Base + default from: "from@example.com" + + def gmail(body , to="", subject="", from="") + @body = body + @title = subject + @from = from + mail(:to => to, :subject => subject, :from => from) + end +end diff --git a/test/dummy-2/app/mailers/user_mailer.rb b/test/dummy-2/app/mailers/user_mailer.rb new file mode 100644 index 0000000..37e957d --- /dev/null +++ b/test/dummy-2/app/mailers/user_mailer.rb @@ -0,0 +1,15 @@ +class UserMailer < ApplicationMailer + + # Subject can be set in your I18n file at config/locales/en.yml + # with the following lookup: + # + # en.user_mailer.password_reset.subject + # + def password_reset(user) + + @greeting = "Hi" + + @user = user + mail :to => user.email, :subject => "Password Reset" end + end + diff --git a/test/dummy-2/app/models/address.rb b/test/dummy-2/app/models/address.rb new file mode 100644 index 0000000..36259a5 --- /dev/null +++ b/test/dummy-2/app/models/address.rb @@ -0,0 +1,14 @@ +# encoding: utf-8 +class Address + include Mongoid::Document + # jinda begin + include Mongoid::Timestamps + field :address_street, :type => String + field :city, :type => String + field :state, :type => String + field :zip, :type => String + field :phone, :type => String + field :lat, :type => Float + field :lng, :type => Float + # jinda end +end diff --git a/test/dummy-2/app/models/article.rb b/test/dummy-2/app/models/article.rb new file mode 100644 index 0000000..e175d84 --- /dev/null +++ b/test/dummy-2/app/models/article.rb @@ -0,0 +1,14 @@ +# encoding: utf-8 +class Article + include Mongoid::Document + # jinda begin + include Mongoid::Timestamps + field :title, :type => String + field :text, :type => String + belongs_to :user, :class_name => "User" + has_many :comments + validates :title, :text, :user_id, presence: true + field :body, :type => String + field :keywords, :type => String + # jinda end +end diff --git a/test/dummy-2/app/models/comment.rb b/test/dummy-2/app/models/comment.rb new file mode 100644 index 0000000..d852194 --- /dev/null +++ b/test/dummy-2/app/models/comment.rb @@ -0,0 +1,14 @@ +# encoding: utf-8 +class Comment + include Mongoid::Document + # jinda begin + include Mongoid::Timestamps + field :body, :type => String + field :name, :type => String + field :image, :type => String + belongs_to :article, :class_name => "Article" + belongs_to :user, :class_name => "User" + belongs_to :commentable, polymorphic: true + index({ commentable_id: 1, commentable_type: 1}) + # jinda end +end diff --git a/test/dummy-2/app/models/concerns/.keep b/test/dummy-2/app/models/concerns/.keep new file mode 100644 index 0000000..e69de29 diff --git a/test/dummy-2/app/models/identity.rb b/test/dummy-2/app/models/identity.rb new file mode 100644 index 0000000..d99982b --- /dev/null +++ b/test/dummy-2/app/models/identity.rb @@ -0,0 +1,18 @@ +class Identity + include Mongoid::Document + include OmniAuth::Identity::Models::Mongoid + self.auth_key 'code' + + field :code, :type => String + field :email, :type => String + field :password_digest, :type => String + field :auth_token, :type => String + field :image, :type => String + + + + validates_presence_of :code + validates_uniqueness_of :code + validates_uniqueness_of :email + # validates_format_of :email, :with => /^[-a-z0-9_+\.]+\@([-a-z0-9]+\.)+[a-z0-9]{2,4}$/i +end diff --git a/test/dummy-2/app/models/jinda/doc.rb b/test/dummy-2/app/models/jinda/doc.rb new file mode 100644 index 0000000..afb2b66 --- /dev/null +++ b/test/dummy-2/app/models/jinda/doc.rb @@ -0,0 +1,36 @@ +# -*- encoding : utf-8 -*- +class Jinda::Doc + include Mongoid::Document + include Mongoid::Timestamps + include Mongoid::Attributes::Dynamic + field :name, :type => String + field :filename, :type => String + field :content_type, :type => String + field :data_text, :type => String + field :url, :type => String + field :basename, :type => String + field :cloudinary, :type => Boolean + belongs_to :xmain, :class_name => "Jinda::Xmain" + belongs_to :runseq, :class_name => "Jinda::Runseq" + belongs_to :user + belongs_to :service, :class_name => "Jinda::Service" + field :ip, :type => String + field :description, :type => String + field :category, :type => String + field :ma_display, :type => Boolean + field :ma_secured, :type => Boolean + field :dscan, :type => String + field :keywords, :type => String + + def self.search(q, page, per_page=PER_PAGE) + paginate :per_page=>per_page, :page => page, :conditions => + ["content_type=? AND data_text LIKE ? AND (ma_secured=? OR ma_user_id=?)", + "output", "%#{q}%", false, session[:user_id] ], + :order=>'ma_xmain_id DESC', :select=>'DISTINCT ma_xmain_id' + end + def self.search_ma_secured(q, page, per_page=PER_PAGE) + paginate :per_page=>per_page, :page => page, :conditions => + ["content_type=? AND data_text LIKE ?", "output", "%#{q}%" ], + :order=>'ma_xmain_id DESC', :select=>'DISTINCT ma_xmain_id' + end +end diff --git a/test/dummy-2/app/models/jinda/module.rb b/test/dummy-2/app/models/jinda/module.rb new file mode 100644 index 0000000..55ed54f --- /dev/null +++ b/test/dummy-2/app/models/jinda/module.rb @@ -0,0 +1,11 @@ +# -*- encoding : utf-8 -*- +class Jinda::Module + include Mongoid::Document + field :uid, :type => String + field :code, :type => String + field :name, :type => String + field :role, :type => String + field :seq, :type => Integer + field :icon, :type => String + has_many :services, :class_name => "Jinda::Service" +end diff --git a/test/dummy-2/app/models/jinda/notice.rb b/test/dummy-2/app/models/jinda/notice.rb new file mode 100644 index 0000000..3ae3b64 --- /dev/null +++ b/test/dummy-2/app/models/jinda/notice.rb @@ -0,0 +1,14 @@ +# -*- encoding : utf-8 -*- +class Jinda::Notice + include Mongoid::Document + include Mongoid::Timestamps + field :message, :type => String + field :unread, :type => Boolean + field :ip, :type => String + belongs_to :user, :class_name => "User" + + def self.recent(user_id, ip) + where(unread: true, ip: ip).last + # where(unread: true, user_id: user_id, ip: ip).last + end +end diff --git a/test/dummy-2/app/models/jinda/role.rb b/test/dummy-2/app/models/jinda/role.rb new file mode 100644 index 0000000..dc3cc68 --- /dev/null +++ b/test/dummy-2/app/models/jinda/role.rb @@ -0,0 +1,8 @@ +# -*- encoding : utf-8 -*- +class Jinda::Role + include Mongoid::Document + include Mongoid::Timestamps + field :code, :type => String + field :name, :type => String + belongs_to :user, :class_name => "User" +end diff --git a/test/dummy-2/app/models/jinda/runseq.rb b/test/dummy-2/app/models/jinda/runseq.rb new file mode 100644 index 0000000..abdb094 --- /dev/null +++ b/test/dummy-2/app/models/jinda/runseq.rb @@ -0,0 +1,24 @@ +# -*- encoding : utf-8 -*- +class Jinda::Runseq + include Mongoid::Document + include Mongoid::Timestamps + belongs_to :user, :class_name => "User" + belongs_to :xmain, :class_name => "Jinda::Xmain" + + field :action, :type => String + field :status, :type => String + field :code, :type => String + field :name, :type => String + field :role, :type => String + field :rule, :type => String + field :rstep, :type => Integer + field :form_step, :type => Integer + field :start, :type => DateTime + field :stop, :type => DateTime + field :end, :type => Boolean + field :xml, :type => String + field :ip, :type => String + + scope :form_action, ->{where(:action.in=> ['form','output','pdf'])} + +end diff --git a/test/dummy-2/app/models/jinda/service.rb b/test/dummy-2/app/models/jinda/service.rb new file mode 100644 index 0000000..7f13429 --- /dev/null +++ b/test/dummy-2/app/models/jinda/service.rb @@ -0,0 +1,17 @@ +# -*- encoding : utf-8 -*- +class Jinda::Service + include Mongoid::Document + field :uid, :type => String + field :module_code, :type => String + field :code, :type => String + field :name, :type => String + field :xml, :type => String + field :role, :type => String + field :rule, :type => String + field :seq, :type => Integer + field :list, :type => Boolean + field :ma_secured, :type => Boolean + field :confirm, :type => Boolean + + belongs_to :module, :class_name => "Jinda::Module" +end diff --git a/test/dummy-2/app/models/jinda/xmain.rb b/test/dummy-2/app/models/jinda/xmain.rb new file mode 100644 index 0000000..ec3bff4 --- /dev/null +++ b/test/dummy-2/app/models/jinda/xmain.rb @@ -0,0 +1,38 @@ +# -*- encoding : utf-8 -*- +class Jinda::Xmain + include Mongoid::Document + field :xid, :type => String + # Jinda begin + include Mongoid::Timestamps + belongs_to :service, :class_name => "Jinda::Service" + field :start, :type => DateTime + field :stop, :type => DateTime + field :name, :type => String + field :ip, :type => String + field :status, :type => String + belongs_to :user, :class_name => "User" + field :xvars, :type => Hash + field :current_runseq, :type => String + # Jinda end + + has_many :runseqs, :class_name => "Jinda::Runseq" + has_many :docs, :class_name => "Jinda::Doc" + before_create :assign_xid + + + # number of xmains on the specified date + def self.get(xid) + find_by(xid:xid) + end + def assign_xid + self.xid = Param.gen(:xid) + end + def self.number(d) + all(:conditions=>['DATE(created_at) =?', d.to_date]).count + end + def self.search(q, page, per_page=10) + paginate :per_page=>per_page, :page => page, :conditions => + ["LOWER(xvars) LIKE ?", "%#{q}%" ], + :order=>'created_at DESC' + end +end diff --git a/test/dummy-2/app/models/note.rb b/test/dummy-2/app/models/note.rb new file mode 100644 index 0000000..409f4b9 --- /dev/null +++ b/test/dummy-2/app/models/note.rb @@ -0,0 +1,22 @@ +# encoding: utf-8 +class Note + include Mongoid::Document + # jinda begin + include Mongoid::Timestamps + include Mongoid::Attributes::Dynamic + field :title, :type => String + field :body, :type => String + belongs_to :user + before_validation :ensure_title_has_a_value + validates :title, length: { maximum: (MAX_TITLE_LENGTH = 30), message: "Must be less than 30 characters" }, presence: true + validates :body, length: { maximum: (MAX_BODY_LENGTH = 1000), message: "Must be less than 1000 characters"} + private + def ensure_title_has_a_value + if title.blank? + self.title = body[0..(MAX_TITLE_LENGTH-1)] unless body.blank? + end + end + + + # jinda end +end diff --git a/test/dummy-2/app/models/param.rb b/test/dummy-2/app/models/param.rb new file mode 100644 index 0000000..6ae8710 --- /dev/null +++ b/test/dummy-2/app/models/param.rb @@ -0,0 +1,41 @@ +# encoding: utf-8 +class Param + include Mongoid::Document + validates_uniqueness_of :code + # jinda begin + include Mongoid::Timestamps + field :code, :type => String + field :pid, :type => String + field :yearly, :type => Boolean + field :description, :type => String + # jinda end + + def self.get(code) + p= where(:code=> code).first + p.pid + end + def self.set(code, pid) + p= where(:code=> code).first + p.pid = pid.to_s + p.save + end + def self.gen(code) + p= where(:code=> code).first + unless p + p= self.create! :code => code, :pid => '0', :yearly => false, :description => 'auto' + end + if p.yearly + num, year = p.pid.split('/') + y_now = (Time.now.year.to_i) -1957 + if year.to_i==y_now + p.pid = "#{num.to_i+1}/#{y_now}" + else # new year, restart counter + p.pid = "1/#{y_now}" + end + else + p.pid = (p.pid.to_i+1).to_s + end + p.save + return p.pid + end +end diff --git a/test/dummy-2/app/models/person.rb b/test/dummy-2/app/models/person.rb new file mode 100644 index 0000000..f42e563 --- /dev/null +++ b/test/dummy-2/app/models/person.rb @@ -0,0 +1,14 @@ +# encoding: utf-8 +class Person + include Mongoid::Document + # jinda begin + include Mongoid::Timestamps + field :fname, :type => String + field :lname, :type => String + field :sex, :type => Integer + belongs_to :address + field :dob, :type => Date + field :phone, :type => String + field :photo, :type => String + # jinda end +end diff --git a/test/dummy-2/app/models/user.rb b/test/dummy-2/app/models/user.rb new file mode 100644 index 0000000..fb5222a --- /dev/null +++ b/test/dummy-2/app/models/user.rb @@ -0,0 +1,66 @@ +class User + include Mongoid::Document + # https://docs.mongodb.com/mongoid/master/tutorials/mongoid-indexes/ + index({ code: 1 }, { unique: true, name: "code_index" }) + before_create {generate_token(:auth_token)} + field :provider, :type => String + field :uid, :type => String + field :code, :type => String + field :email, :type => String + field :role, :type => String + field :user, :type => String + field :auth_token, :type => String + field :password_reset_token, :type => String + field :password_reset_sent_at,:type => DateTime + field :image, :type => String + + belongs_to :identity, :polymorphic => true, :optional => true + has_many :xmains, :class_name => "Jinda::Xmain" + validates :code, + presence: true, + uniqueness: true + + ## Add to create forgot password + def generate_token(column) + begin + self[column] = SecureRandom.urlsafe_base64 + end + #end while User.exists?(column => self[column]) + end + + def has_role(role1) + return role.upcase.split(',').include?(role1.upcase) + end + + def self.from_omniauth(auth) + # Rails now no longer support slice + # where(auth.slice(:uid, :provider, :email)).first_or_create do |user| + where(uid: auth.uid, provider: auth.provider, email: auth.info.email).first_or_create do |user| + case auth.provider + when 'identity' + identity = Identity.find auth.uid + user.code = identity.code + user.email = identity.email + else + user.email = auth.info.email + user.uid = auth.uid + user.provider = auth.provider + user.code = auth.info.name + user.role = "M" + user.image = auth.info.image + end + end + end + + def ma_secured? + role.upcase.split(',').include?(ma_secured_ROLE) + end + + def send_password_reset + generate_token(:password_reset_token) + self.password_reset_sent_at = Time.zone.now + save! + UserMailer.password_reset(self).deliver + end + +end diff --git a/test/dummy-2/app/views/adminbsbs/content.haml b/test/dummy-2/app/views/adminbsbs/content.haml new file mode 100644 index 0000000..e0bc819 --- /dev/null +++ b/test/dummy-2/app/views/adminbsbs/content.haml @@ -0,0 +1,241 @@ +%section.content + .container-fluid + .block-header + %h2 DASHBOARD + / Widgets + .row.clearfix + .col-lg-3.col-md-3.col-sm-6.col-xs-12 + .info-box.bg-pink.hover-expand-effect + .icon + %i.material-icons playlist_add_check + .content + .text NEW TASKS + .number.count-to{"data-fresh-interval" => "20", "data-from" => "0", "data-speed" => "15", "data-to" => "125"} + .col-lg-3.col-md-3.col-sm-6.col-xs-12 + .info-box.bg-cyan.hover-expand-effect + .icon + %i.material-icons help + .content + .text NEW TICKETS + .number.count-to{"data-fresh-interval" => "20", "data-from" => "0", "data-speed" => "1000", "data-to" => "257"} + .col-lg-3.col-md-3.col-sm-6.col-xs-12 + .info-box.bg-light-green.hover-expand-effect + .icon + %i.material-icons forum + .content + .text NEW COMMENTS + .number.count-to{"data-fresh-interval" => "20", "data-from" => "0", "data-speed" => "1000", "data-to" => "243"} + .col-lg-3.col-md-3.col-sm-6.col-xs-12 + .info-box.bg-orange.hover-expand-effect + .icon + %i.material-icons person_add + .content + .text NEW VISITORS + .number.count-to{"data-fresh-interval" => "20", "data-from" => "0", "data-speed" => "1000", "data-to" => "1225"} + / #END# Widgets + / CPU Usage + .row.clearfix + .col-xs-12.col-sm-12.col-md-12.col-lg-12 + .card + .header + .row.clearfix + .col-xs-12.col-sm-6 + %h2 CPU USAGE (%) + .col-xs-12.col-sm-6.align-right + .switch.panel-switch-btn + %span.m-r-10.font-12 REAL TIME + %label + OFF + %input#realtime{:checked => "checked", :type => "checkbox"}/ + = succeed "ON" do + %span.lever.switch-col-cyan + %ul.header-dropdown.m-r--5 + %li.dropdown + %a.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", :href => "javascript:void(0);", :role => "button"} + %i.material-icons more_vert + %ul.dropdown-menu.pull-right + %li + %a{:href => "javascript:void(0);"} Action + %li + %a{:href => "javascript:void(0);"} Another action + %li + %a{:href => "javascript:void(0);"} Something else here + .body + #real_time_chart.dashboard-flot-chart + / #END# CPU Usage + .row.clearfix + / Visitors + .col-xs-12.col-sm-12.col-md-4.col-lg-4 + .card + .body.bg-pink + .sparkline{"data-fill-color" => "rgba(0, 188, 212, 0)", "data-height" => "92px", "data-highlight-line-color" => "#fff", "data-highlight-spot-color" => "rgb(233, 30, 99)", "data-line-color" => "rgba(255,255,255,0.7)", "data-line-width" => "2", "data-max-spot-color" => "rgb(255,255,255)", "data-min-spot-color" => "rgb(255,255,255)", "data-offset" => "90", "data-spot-color" => "rgb(255,255,255)", "data-spot-radius" => "4", "data-type" => "line", "data-width" => "100%"} + 12,10,9,6,5,6,10,5,7,5,12,13,7,12,11 + %ul.dashboard-stat-list + %li + TODAY + %span.pull-right + %b 1 200 + %small USERS + %li + YESTERDAY + %span.pull-right + %b 3 872 + %small USERS + %li + LAST WEEK + %span.pull-right + %b 26 582 + %small USERS + / #END# Visitors + / Latest Social Trends + .col-xs-12.col-sm-12.col-md-4.col-lg-4 + .card + .body.bg-cyan + .m-b--35.font-bold LATEST SOCIAL TRENDS + %ul.dashboard-stat-list + %li + \#socialtrends + %span.pull-right + %i.material-icons trending_up + %li + \#materialdesign + %span.pull-right + %i.material-icons trending_up + %li #adminbsb + %li #freeadmintemplate + %li #bootstraptemplate + %li + \#freehtmltemplate + %span.pull-right + %i.material-icons trending_up + / #END# Latest Social Trends + / Answered Tickets + .col-xs-12.col-sm-12.col-md-4.col-lg-4 + .card + .body.bg-teal + .font-bold.m-b--35 ANSWERED TICKETS + %ul.dashboard-stat-list + %li + TODAY + %span.pull-right + %b 12 + %small TICKETS + %li + YESTERDAY + %span.pull-right + %b 15 + %small TICKETS + %li + LAST WEEK + %span.pull-right + %b 90 + %small TICKETS + %li + LAST MONTH + %span.pull-right + %b 342 + %small TICKETS + %li + LAST YEAR + %span.pull-right + %b 4 225 + %small TICKETS + %li + ALL + %span.pull-right + %b 8 752 + %small TICKETS + / #END# Answered Tickets + .row.clearfix + / Task Info + .col-xs-12.col-sm-12.col-md-8.col-lg-8 + .card + .header + %h2 TASK INFOS + %ul.header-dropdown.m-r--5 + %li.dropdown + %a.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", :href => "javascript:void(0);", :role => "button"} + %i.material-icons more_vert + %ul.dropdown-menu.pull-right + %li + %a{:href => "javascript:void(0);"} Action + %li + %a{:href => "javascript:void(0);"} Another action + %li + %a{:href => "javascript:void(0);"} Something else here + .body + .table-responsive + %table.table.table-hover.dashboard-task-infos + %thead + %tr + %th # + %th Task + %th Status + %th Manager + %th Progress + %tbody + %tr + %td 1 + %td Task A + %td + %span.label.bg-green Doing + %td John Doe + %td + .progress + .progress-bar.bg-green{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => "62", :role => "progressbar", :style => "width: 62%"} + %tr + %td 2 + %td Task B + %td + %span.label.bg-blue To Do + %td John Doe + %td + .progress + .progress-bar.bg-blue{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => "40", :role => "progressbar", :style => "width: 40%"} + %tr + %td 3 + %td Task C + %td + %span.label.bg-light-blue On Hold + %td John Doe + %td + .progress + .progress-bar.bg-light-blue{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => "72", :role => "progressbar", :style => "width: 72%"} + %tr + %td 4 + %td Task D + %td + %span.label.bg-orange Wait Approvel + %td John Doe + %td + .progress + .progress-bar.bg-orange{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => "95", :role => "progressbar", :style => "width: 95%"} + %tr + %td 5 + %td Task E + %td + %span.label.bg-red Suspended + %td John Doe + %td + .progress + .progress-bar.bg-red{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => "87", :role => "progressbar", :style => "width: 87%"} + / #END# Task Info + / Browser Usage + .col-xs-12.col-sm-12.col-md-4.col-lg-4 + .card + .header + %h2 BROWSER USAGE + %ul.header-dropdown.m-r--5 + %li.dropdown + %a.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", :href => "javascript:void(0);", :role => "button"} + %i.material-icons more_vert + %ul.dropdown-menu.pull-right + %li + %a{:href => "javascript:void(0);"} Action + %li + %a{:href => "javascript:void(0);"} Another action + %li + %a{:href => "javascript:void(0);"} Something else here + .body + #donut_chart.dashboard-donut-chart + / #END# Browser Usage \ No newline at end of file diff --git a/test/dummy/app/views/adminltes/dashboard1.haml b/test/dummy-2/app/views/adminltes/dashboard1.haml similarity index 100% rename from test/dummy/app/views/adminltes/dashboard1.haml rename to test/dummy-2/app/views/adminltes/dashboard1.haml diff --git a/test/dummy/app/views/adminltes/dashboard2.haml b/test/dummy-2/app/views/adminltes/dashboard2.haml similarity index 100% rename from test/dummy/app/views/adminltes/dashboard2.haml rename to test/dummy-2/app/views/adminltes/dashboard2.haml diff --git a/test/dummy-2/app/views/admins/edit_role/edit_role.html.erb b/test/dummy-2/app/views/admins/edit_role/edit_role.html.erb new file mode 100644 index 0000000..ec223cb --- /dev/null +++ b/test/dummy-2/app/views/admins/edit_role/edit_role.html.erb @@ -0,0 +1,7 @@ +<% + user = User.find_by :code=> $xvars["select_user"]["code"] +%> +Role codes seperated by comma +

+<%= label_tag :role, "Role" %> +<%= text_field_tag :role, user.role %> diff --git a/test/dummy-2/app/views/admins/edit_role/select_user.html.erb b/test/dummy-2/app/views/admins/edit_role/select_user.html.erb new file mode 100644 index 0000000..0753b3a --- /dev/null +++ b/test/dummy-2/app/views/admins/edit_role/select_user.html.erb @@ -0,0 +1,4 @@ +

+ <%= label_tag :code, 'User code' %> + <%= select_tag :code, options_from_collection_for_select(User.all.asc(:code), :code, :code), "data-native-menu"=>"false" %> +
diff --git a/test/dummy-2/app/views/api/v1/note.haml b/test/dummy-2/app/views/api/v1/note.haml new file mode 100644 index 0000000..e69de29 diff --git a/test/dummy-2/app/views/articles/_report.haml b/test/dummy-2/app/views/articles/_report.haml new file mode 100644 index 0000000..2321958 --- /dev/null +++ b/test/dummy-2/app/views/articles/_report.haml @@ -0,0 +1,35 @@ +.box.box-info + .box-header.with-border + .box-tools.pull-right + %button.btn.btn-box-tool{"data-widget" => "collapse", :type => "button"} + %i.fa.fa-minus + %button.btn.btn-box-tool{"data-widget" => "remove", :type => "button"} + %i.fa.fa-times + / /.box-header + .box-body + .table-responsive + %table.table.no-margin + %thead + %tr + - unless current_ma_user.nil? + - if current_ma_user.role.include?"A" + %th Author + %th Title + %th Description + %th Created + %th Updated + %th Delete + %th Edit + - report.each do |article| + - user = User.find(article.user_id) + %tr + -# if current_ma_user.role.include?"A" + - unless current_ma_user.nil? + - if current_ma_user.role.include?"A" + %td= user.code + %td= link_to article.title, :controller=>"articles", :action=>"show", :article_id => article.id + %td= article.text.html_safe + %td= article.created_at.strftime('%m/%d/%Y') + %td= article.updated_at.strftime('%m/%d/%Y') + %td(align='center')= link_to image_tag('delete.png', style:'border:none; float:none;'), {controller: "articles", action: "destroy", article_id: article.id}, data: { confirm: "Please Confirm" } + %td(align='center')= link_to image_tag('pencil.png', style:'border:none; float:none;'), {controller: "jinda", action: "init", s: 'articles:xedit_article', article_id: article.id}, data: { confirm: "Please Confirm" } diff --git a/test/dummy-2/app/views/articles/edit.haml b/test/dummy-2/app/views/articles/edit.haml new file mode 100644 index 0000000..41f946e --- /dev/null +++ b/test/dummy-2/app/views/articles/edit.haml @@ -0,0 +1,23 @@ +- @title= "Edit" +- @page_title = 'Edit' +.container + %div.row::before + %div.col-md-12 + %h2.display-3.mt-5.pt-5 + = @article.title + %hr + = @article.text + %h4.display-5 + = @article.body.html_safe + + .container + .card + = form_for @article, :html => {:class => "form-horizontal center"} , :article_id => @article.id do |f| + .form-group + = f.text_field :title, class: "form-control", :required => true + .form-group + = f.text_field :text, class: "form-control", :required => true + .form-group + = f.text_area :body, rows: 10, class: "form-control" + .form-group + = f.submit "Submit", class: "btn btn-default btn-success" diff --git a/test/dummy-2/app/views/articles/edit_article/edit_article.html.erb b/test/dummy-2/app/views/articles/edit_article/edit_article.html.erb new file mode 100644 index 0000000..9f48ada --- /dev/null +++ b/test/dummy-2/app/views/articles/edit_article/edit_article.html.erb @@ -0,0 +1,15 @@ +<% + article = Article.find_by :id=> $xvars["select_article"]["title"] + %> +
+ <%= fields_for article do |f| %> + <%= f.label :title, "Title" %> + <%= f.text_field :title %> + <%= f.label :text, "Text" %> + <%= f.text_field :text %> + <%= f.label :text, "Keywords" %> + <%= f.text_field :keywords %> + <%= f.label :body, "Body Content" %> + <%= f.text_area :body %> + <% end %> +
diff --git a/test/dummy-2/app/views/articles/edit_article/select_article.html.erb b/test/dummy-2/app/views/articles/edit_article/select_article.html.erb new file mode 100644 index 0000000..5c825f0 --- /dev/null +++ b/test/dummy-2/app/views/articles/edit_article/select_article.html.erb @@ -0,0 +1,12 @@ +<% + if current_ma_user.role.upcase.split(',').include?("A") + article = Article.all.desc(:created_at) + else + article = Article.where(user: current_ma_user).desc(:created_at) + end +%> +
+ <%= label_tag :title, 'Article title' %> + <%= select_tag :title, options_from_collection_for_select(article, :id, :title), "data-native-menu"=>"false" %> +
+ diff --git a/test/dummy-2/app/views/articles/index.haml b/test/dummy-2/app/views/articles/index.haml new file mode 100644 index 0000000..7f05ab8 --- /dev/null +++ b/test/dummy-2/app/views/articles/index.haml @@ -0,0 +1,5 @@ +- @title= "All Articles" +%p +- @page_title = 'All Articlces' += render :partial => 'report', locals: { report: @articles} += paginate @articles diff --git a/test/dummy-2/app/views/articles/my.haml b/test/dummy-2/app/views/articles/my.haml new file mode 100644 index 0000000..6323325 --- /dev/null +++ b/test/dummy-2/app/views/articles/my.haml @@ -0,0 +1,5 @@ +- @title= "My Articles" +%p +- @page_title = 'All Articlces' += render :partial => 'report', locals: { report: @my_articles} += paginate @my_articles diff --git a/test/dummy-2/app/views/articles/new_article/form_article.html.erb b/test/dummy-2/app/views/articles/new_article/form_article.html.erb new file mode 100644 index 0000000..2a1900c --- /dev/null +++ b/test/dummy-2/app/views/articles/new_article/form_article.html.erb @@ -0,0 +1,16 @@ +<%- @title= 'New Article' %> +<% + article = @article +%> +
+<%= fields_for article do |f| %> + <%= f.label :title, "Title" %> + <%= f.text_field :title, :required => true %> + <%= f.label :text, "Description" %> + <%= f.text_field :text, :required => true %> + <%= f.label :text, "Keywords" %> + <%= f.text_field :keywords %> + <%= f.label :body, "Body Content" %> + <%= f.text_area :body, :required => true %> +<% end %> +
diff --git a/test/dummy-2/app/views/articles/show.html.haml b/test/dummy-2/app/views/articles/show.html.haml new file mode 100644 index 0000000..88de868 --- /dev/null +++ b/test/dummy-2/app/views/articles/show.html.haml @@ -0,0 +1,58 @@ +- title @show[:article][:title] +- description @show[:article][:text] +- keywords @show[:article][:keywords] +.container + %div.row::before + %div.col-md-12 + .row-description + %h2.display-3.mt-5.pt-5 + = @show[:article][:title] + = link_to image_tag('pencil.png', style:'border:none; float:right;', id: 'article_pen'), {controller: "articles", action: "edit", article_id: @article.id}, data: { confirm: "Please Confirm" } + %div.font-weight-light + by + %img.img-circle{:alt => "User Image", src: @show[:user][:image] }/ + %div.font-weight-light + = @show[:user][:code] + %div.font-weight-light + = @show[:article][:created_at] + %hr + = @show[:article][:text] + %h4.row-body + = @show[:article][:body].html_safe + %hr + - @show[:comments].each do |comment| + %div#article-comment.ui-corner-all + .col-md-12 + %div.small-box.bg-white.text-info + %div.inner + %div.font-weight-light + - user_image = get_user_image(comment.user_id) + %img.comment-user-image{:alt => "User Image", src: user_image}/ + + %div.font-weight-light + Author: + %b= comment.name if comment.name + %div.right-date + 12/12/2021 + %div#comment-body + %i= comment.body + + - if login? + %hr + %h4.col-md-12 + Add a comment: + = form_with(model: [@show[:article], Comment.new], local: true) do |f| + .form-group + = f.hidden_field :article_id, :value => @show[:article][:id] + .form-group + = f.label :body, "Comment" + .form-group + = f.text_area :body, rows: 5, class: "form-control" + .form-group + = f.hidden_field :user_id, :value => current_ma_user.id + .form-group + = f.hidden_field :name, :value => current_ma_user.code + .form-group + = f.hidden_field :image, :value => current_ma_user.image + .form-group + = f.submit "Submit", class: "btn btn-default btn-success" diff --git a/test/dummy-2/app/views/articles/xedit_article/edit_article.html.erb b/test/dummy-2/app/views/articles/xedit_article/edit_article.html.erb new file mode 100644 index 0000000..1864e1c --- /dev/null +++ b/test/dummy-2/app/views/articles/xedit_article/edit_article.html.erb @@ -0,0 +1,13 @@ +<% + article = Article.find_by :id=> $xvars["p"]["article_id"] +%> +<%= fields_for article do |f| %> + <%= f.label :title, "Title" %> + <%= f.text_field :title %> + <%= f.label :text, "Description" %> + <%= f.text_field :text %> + <%= f.label :text, "Keywords" %> + <%= f.text_field :keywords %> + <%= f.label :body, "Body Content" %> + <%= f.text_area :body %> +<% end %> diff --git a/test/dummy-2/app/views/ctrs/vfolder1/viewfile1.html.erb b/test/dummy-2/app/views/ctrs/vfolder1/viewfile1.html.erb new file mode 100644 index 0000000..9dbcb29 --- /dev/null +++ b/test/dummy-2/app/views/ctrs/vfolder1/viewfile1.html.erb @@ -0,0 +1,23 @@ +<%# + doc = Doc.new :issue_on=> Date.today, :process_at => Time.now +%> +<%#= fields_for doc do |f| %> + <%#= f.label :rnum, "Reference number" %> + <%#= f.text_field :rnum %> + + <%#= f.label :issue_on, "Dated" %> + <%#= f.date_field :issue_on, "blackDays"=>[0,6] %> + <%#= f.label :summary, "Summary" %> + <%#= f.text_area :summary, :cols=>50, :rows=>6 %> + <%#= f.label :dscan, "Attached document" %> + <%#= f.file_field :dscan %> +<%# end %> +<%#= label_tag :hotel, "Ungroup field" %> +<%#= text_field_tag :hotel %> + diff --git a/test/dummy-2/app/views/ctrs/vfolder1/viewfile2.html.erb b/test/dummy-2/app/views/ctrs/vfolder1/viewfile2.html.erb new file mode 100644 index 0000000..9dbcb29 --- /dev/null +++ b/test/dummy-2/app/views/ctrs/vfolder1/viewfile2.html.erb @@ -0,0 +1,23 @@ +<%# + doc = Doc.new :issue_on=> Date.today, :process_at => Time.now +%> +<%#= fields_for doc do |f| %> + <%#= f.label :rnum, "Reference number" %> + <%#= f.text_field :rnum %> + + <%#= f.label :issue_on, "Dated" %> + <%#= f.date_field :issue_on, "blackDays"=>[0,6] %> + <%#= f.label :summary, "Summary" %> + <%#= f.text_area :summary, :cols=>50, :rows=>6 %> + <%#= f.label :dscan, "Attached document" %> + <%#= f.file_field :dscan %> +<%# end %> +<%#= label_tag :hotel, "Ungroup field" %> +<%#= text_field_tag :hotel %> + diff --git a/test/dummy-2/app/views/ctrs/vfolder2/viewfile2.html.erb b/test/dummy-2/app/views/ctrs/vfolder2/viewfile2.html.erb new file mode 100644 index 0000000..9dbcb29 --- /dev/null +++ b/test/dummy-2/app/views/ctrs/vfolder2/viewfile2.html.erb @@ -0,0 +1,23 @@ +<%# + doc = Doc.new :issue_on=> Date.today, :process_at => Time.now +%> +<%#= fields_for doc do |f| %> + <%#= f.label :rnum, "Reference number" %> + <%#= f.text_field :rnum %> + + <%#= f.label :issue_on, "Dated" %> + <%#= f.date_field :issue_on, "blackDays"=>[0,6] %> + <%#= f.label :summary, "Summary" %> + <%#= f.text_area :summary, :cols=>50, :rows=>6 %> + <%#= f.label :dscan, "Attached document" %> + <%#= f.file_field :dscan %> +<%# end %> +<%#= label_tag :hotel, "Ungroup field" %> +<%#= text_field_tag :hotel %> + diff --git a/test/dummy-2/app/views/custom/_adsense.haml b/test/dummy-2/app/views/custom/_adsense.haml new file mode 100644 index 0000000..f95d08a --- /dev/null +++ b/test/dummy-2/app/views/custom/_adsense.haml @@ -0,0 +1,6 @@ +%script{:async => "", :src => "//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"} +:javascript + (adsbygoogle = window.adsbygoogle || []).push({ + google_ad_client: "ca-pub-5479990040644502", + enable_page_level_ads: true + }); diff --git a/test/dummy-2/app/views/docs/doc_edit/doc_edit.html.erb b/test/dummy-2/app/views/docs/doc_edit/doc_edit.html.erb new file mode 100644 index 0000000..41e60b2 --- /dev/null +++ b/test/dummy-2/app/views/docs/doc_edit/doc_edit.html.erb @@ -0,0 +1,21 @@ +<% + doc = Jinda::Doc.new :issue_on=> Date.today, :process_at => Time.now +%> +<%= fields_for doc do |f| %> + <%= f.label :content_type, "Content type" %> + <%= f.select :content_type, [["pdf file", "pdf"], ["png file", "png"], ["html file", "html"]] %> + + <%= f.label :issue_on, "Dated" %> + <%= f.date_field :issue_on, "blackDays"=>[0,6] %> + + <%= f.label :dscan, "Attached document" %> + <%= f.file_field :dscan %> + <%= f.label :filename, "File Name" %> + <% end %> + <%= label_tag :x, "x field" %> + <%= text_field_tag :x %> +
+ <%= label_tag :ma_display, "Display", :class=>"ui-input-text" %> + <%= select_tag :ma_display, options_for_select([['Yes', 'y'], ['No', 'n']],'y'), 'data-role'=>"slider" %> +
diff --git a/test/dummy-2/app/views/docs/doc_edit/doc_select.html.erb b/test/dummy-2/app/views/docs/doc_edit/doc_select.html.erb new file mode 100644 index 0000000..abb7be7 --- /dev/null +++ b/test/dummy-2/app/views/docs/doc_edit/doc_select.html.erb @@ -0,0 +1,14 @@ + +<% + if current_ma_user.role.upcase.split(',').include?("A") + note= Jinda::Doc.all.desc(:created_at) + else + note= Jinda::Doc.where(user: current_ma_user).desc(:created_at) + end +%> +
+ <%= label_tag :filename, 'Select Document' %> +
+
+ <%= select_tag :id, options_from_collection_for_select(note, :id, :filename), "notee-menu"=>"false" %> +
diff --git a/test/dummy-2/app/views/docs/doc_new/doc_form.html.erb b/test/dummy-2/app/views/docs/doc_new/doc_form.html.erb new file mode 100644 index 0000000..27480c8 --- /dev/null +++ b/test/dummy-2/app/views/docs/doc_new/doc_form.html.erb @@ -0,0 +1,32 @@ +<% + doc = Jinda::Doc.new :issue_on=> Date.today, :process_at => Time.now + %> +<%= fields_for doc do |f| %> +
+ <%= f.label :category, "Category" %> + <%= f.select :category, [["Book", "book"], ["Letter", "letter"], ["Brochure", "brochure"]] %> +
+
+ <%= f.label :issue_on, "Dated" %> + <%= f.date_field :issue_on, "blackDays"=>[0,6] %> +
+
+ <%= f.label :dscan, "Attached document" %> +
+
+ <%= f.file_field :dscan %> +
+<% end %> +
+ <%= label_tag :description, "Description" %> + <%= text_field_tag :description %> +
+
+ <%= label_tag :ma_display, "Display", :class=>"ui-input-text" %> + <%= select_tag :ma_display, options_for_select([['Yes', 'y'], ['No', 'n']],'y'), 'data-role'=>"slider" %> +
+
+ <%= label_tag :ma_display, "Display", :class=>"ui-input-text" %> + <%= label_tag :keywords, "Search Keywords" %> + <%= text_field_tag :keywords %> +
diff --git a/test/dummy-2/app/views/docs/doc_new/doc_form.md b/test/dummy-2/app/views/docs/doc_new/doc_form.md new file mode 100644 index 0000000..6820c88 --- /dev/null +++ b/test/dummy-2/app/views/docs/doc_new/doc_form.md @@ -0,0 +1,36 @@ + + +<%= File.read('README.md') %> + +*** + +# Help (UNDER CONSTRUCTION: DUI) + +<%= render :partial=>'jinda/modul.md', :collection=> Jinda::Module.all.asc(:seq) %> + +*** + +# Admin + +## Data Structure + +<%- models= @app.elements["//node[@TEXT='models']"] %> + +<%= render :partial=>'jinda/model.md', :collection=> models.map {|m| m.attributes["TEXT"] } %> + +*** + +# Contents + +## markdown + +This document created and edited with +markdown + +Contents: + +* Requirement at `README.md` +* Controller Help at `app/controllers/system.md` +* Project at `app/views/project/<งาน>.md` +* +* diff --git a/test/dummy-2/app/views/docs/doc_xedit/doc_edit.html.erb b/test/dummy-2/app/views/docs/doc_xedit/doc_edit.html.erb new file mode 100644 index 0000000..41e60b2 --- /dev/null +++ b/test/dummy-2/app/views/docs/doc_xedit/doc_edit.html.erb @@ -0,0 +1,21 @@ +<% + doc = Jinda::Doc.new :issue_on=> Date.today, :process_at => Time.now +%> +<%= fields_for doc do |f| %> + <%= f.label :content_type, "Content type" %> + <%= f.select :content_type, [["pdf file", "pdf"], ["png file", "png"], ["html file", "html"]] %> + + <%= f.label :issue_on, "Dated" %> + <%= f.date_field :issue_on, "blackDays"=>[0,6] %> + + <%= f.label :dscan, "Attached document" %> + <%= f.file_field :dscan %> + <%= f.label :filename, "File Name" %> + <% end %> + <%= label_tag :x, "x field" %> + <%= text_field_tag :x %> +
+ <%= label_tag :ma_display, "Display", :class=>"ui-input-text" %> + <%= select_tag :ma_display, options_for_select([['Yes', 'y'], ['No', 'n']],'y'), 'data-role'=>"slider" %> +
diff --git a/test/dummy-2/app/views/docs/edit/select_note.html.erb b/test/dummy-2/app/views/docs/edit/select_note.html.erb new file mode 100644 index 0000000..e3b9a49 --- /dev/null +++ b/test/dummy-2/app/views/docs/edit/select_note.html.erb @@ -0,0 +1,14 @@ + +<% + if current_ma_user.role.upcase.split(',').include?("A") + note= Note.all.desc(:created_at) + else + note= Note.where(user: current_ma_user).desc(:created_at) + end +%> +
+ <%= label_tag :title, 'Select Note' %> +
+
+ <%= select_tag :id, options_from_collection_for_select(note, :id, :title), "notee-menu"=>"false" %> +
diff --git a/test/dummy-2/app/views/docs/index.haml b/test/dummy-2/app/views/docs/index.haml new file mode 100644 index 0000000..0ca2597 --- /dev/null +++ b/test/dummy-2/app/views/docs/index.haml @@ -0,0 +1,21 @@ +- @title= "My Articles" +%p +- @page_title = 'All Articlces' += paginate @articles +%table#article-table + %tr + %th Title + %th Description + %th Created + %th Updated + %th Delete + %th Edit + - @articles.each do |article| + %tr + %td= link_to article.title, :controller=>"articles", :action=>"show", :id=>article.id + %td= article.text.html_safe + %td= article.created_at.strftime('%m/%d/%Y') + %td= article.updated_at.strftime('%m/%d/%Y') + %td(align='center')= link_to image_tag('delete.png', style:'border:none; float:none;'), "#", :onclick=>"if (confirm('Please Confirm')) {location.hash='/articles/destroy/#{article.id}';}" + %td(align='center')= link_to image_tag('pencil.png', style:'border:none; float:none;'), {controller: "jinda", action: "init", s: 'articles:xedit_article', article_id: article.id}, data: { confirm: "Please Confirm" } + diff --git a/test/dummy-2/app/views/docs/my.haml b/test/dummy-2/app/views/docs/my.haml new file mode 100644 index 0000000..251516b --- /dev/null +++ b/test/dummy-2/app/views/docs/my.haml @@ -0,0 +1,27 @@ +- @title= "My Documents" +%p +- @page_title = 'All Documents' += paginate @docs +%table#document-table + %tr + %th File Name + %th Description + %th Category + %th Created + %th Delete + %th Edit + - @docs.each do |doc| + %tr + - @temp = doc.dscan + - if !@temp.blank? + - @dscan = @temp.scan(/document\/([^*]*)/).last.last + %td= link_to doc.filename, "#{jinda_document_path}?id=#{@dscan}", target: :_blank + - else + %td= doc.filename + %td= doc.description + %td= doc.category + %td= doc.created_at.strftime('%m/%d/%Y') + %td(align='center')= link_to image_tag('delete.png', style:'border:none; float:none;'), {controller: "docs", action: "destroy", doc_id: doc.id}, data: { confirm: "Please Confirm" } + %td(align='center')= image_tag('pencil.png', style:'border:none; float:none;') + - # To do + - # %td(align='center')= link_to image_tag('pencil.png', style:'border:none; float:none;'), {controller: "jinda", action: "init", s: 'docs:xedit_doc', doc_id: doc.id}, data: { confirm: "Please Confirm" } diff --git a/test/dummy/app/views/identities/new-bak.html.haml b/test/dummy-2/app/views/identities/new-bak.html.haml similarity index 100% rename from test/dummy/app/views/identities/new-bak.html.haml rename to test/dummy-2/app/views/identities/new-bak.html.haml diff --git a/test/dummy-2/app/views/identities/new.html.haml b/test/dummy-2/app/views/identities/new.html.haml new file mode 100644 index 0000000..d0cb298 --- /dev/null +++ b/test/dummy-2/app/views/identities/new.html.haml @@ -0,0 +1,45 @@ +.container + .signup-form + - @title= 'Sign Up' + = form_tag "/auth/identity/register", {'data-ajax'=>'false'} do + %h1.h3.mb-3.font-weight-normal{:style => "text-align: center"} Sign Up + %p.hint-text Sign Up with your social media account or Username + .social-btn.text-center + %a.btn.btn-primary.btn-lg{:href => "/auth/facebook"} + %i.fa.fa-facebook + Facebook + %a.btn.btn-info.btn-lg{:href => "#"} + %i.fa.fa-twitter + Twitter + %a.btn.btn-danger.btn-lg{:href => "/auth/google_oauth2"} + %i.fa.fa-google + Google + .or-seperator + %b or + .sign_in + .label-warning + = flash[:alert] + - if @identity && @identity.errors.any? + .error_messages + %h3 + = pluralize(@identity.errors.count, "error") + prohibited this account from being saved: + %ul + - @identity.errors.full_messages.each do |msg| + %li= msg + .form-group.form-control + = label_tag :code, 'Username' + = text_field_tag :code, @identity.try(:code) + .form-group.form-control + = label_tag :email + = text_field_tag :email, @identity.try(:email) + .form-group.form-control + = label_tag :password, 'Password' + = password_field_tag :password + .form-group.form-control + = label_tag :password_confirmation, 'Confirm password' + = password_field_tag :password_confirmation + %button.btn.btn-success.btn-block.actions{:type => "submit"} + %i.fas.fa-sign-up-alt + Sign Up + diff --git a/test/dummy-2/app/views/jinda/_activity.md b/test/dummy-2/app/views/jinda/_activity.md new file mode 100644 index 0000000..eea102a --- /dev/null +++ b/test/dummy-2/app/views/jinda/_activity.md @@ -0,0 +1,10 @@ +<%- code, name = activity['TEXT'].split(':',2) %> +##### งาน <%= service.name %> ขั้นตอนที่ <%= j %> <%= name %> +<%- img_file= "#{Rails.root}/app/views/#{service.module}/#{service.code}/#{code}.png" %> +<%- if File.exist?(img_file)%> + <%- img = Base64.encode64(File.read(img_file)) %> + +<%- end %> +<%- md_file= "#{Rails.root}/app/views/#{service.module}/#{service.code}/#{code}.md" %> + +<%= File.read md_file if File.exist?(md_file) %> diff --git a/test/dummy-2/app/views/jinda/_menu.haml b/test/dummy-2/app/views/jinda/_menu.haml new file mode 100644 index 0000000..ccf9e16 --- /dev/null +++ b/test/dummy-2/app/views/jinda/_menu.haml @@ -0,0 +1,27 @@ +- head = login? ? current_ma_user.code : DEFAULT_HEADER +%div{"data-context" => "a#default", "data-hash" => "crumbs", "data-id" => "menu", "data-role" => "panel"} + #main{"data-role" => "page"} + %div{"data-role" => "header", "data-theme" => "b", "data-backbtn"=>"false"} + %h1= head + %div{"data-role" => "content", "data-id" => "menu_mm"} + %form.ui-filterable + %ul{"data-role" => "listview", "data-theme" => "g", "data-filter" => "true"} + %li + %a{"data-panel" => "main", "data-id" => "home", :href => "/jinda"} Home + = render :partial => "jinda/menu_mm" + - if login? + %li + %a{:href=>"/jinda/pending", "data-panel" => "main"} Pending Tasks + %li + %a{"data-panel" => "main", :href => logout_path, "data-ajax"=>"false"} Sign Out + - else + %li + %a{:href=>new_session_path, "data-panel" => "main"} Sign In + %li + %a{:href=>new_identity_path, "data-panel" => "main"} Sign Up + %li + = link_to "Refresh", "#", :onclick=>"window.location.replace('/')" + - if !login? + .login-box + = link_to image_tag( 'facebook-continue-button.png'), '/auth/facebook', rel: "external", class: "facebook-connect.social-button" + = link_to image_tag( 'google-continue-button.png'), '/auth/google_oauth2', rel: "external", class: "google-connect.social-button" diff --git a/test/dummy-2/app/views/jinda/_menu_mm.haml b/test/dummy-2/app/views/jinda/_menu_mm.haml new file mode 100644 index 0000000..6a61186 --- /dev/null +++ b/test/dummy-2/app/views/jinda/_menu_mm.haml @@ -0,0 +1,44 @@ +- process_services +- Jinda::Module.all.asc(:seq).each do |m| + - unless m.role.blank? + - next unless login? + - next unless current_ma_user.role + -# next unless current_ma_user.role.upcase.split(',').include?(m.role.upcase) + -# ####################### Remove w space in role ################### + - next unless current_ma_user.role.upcase.split(",").map!(&:strip).include?(m.role.upcase) + + %li + -# ########################### Main Display Menu #################### + = m.name + -# ################################################################## + -# Code to display current login user role and required role for menu + -# ################################################################## + + -# if defined?(current_ma_user.role) && !current_ma_user.role.blank? + =# current_ma_user.role + -# if m.role? + =# m.role.upcase + + -# ################################################################## + + %ul + - m.services.asc(:seq).each do |s| + - next unless s.list + - xml= REXML::Document.new(s.xml).root + - unless s.rule.blank? + - next if (!eval(s.rule)) + - unless s.role.blank? + - next unless login? + - next unless current_ma_user.role + - next unless current_ma_user.role.upcase.split(",").map!(&:strip).include?(s.role.upcase) + - if s.code.downcase=="link" + - name, url = s.name.split(":", 2) + - url.strip! + - else + - name= s.name; url= "/jinda/init?s=#{s.module_code}:#{s.code}" + - if s.confirm + %li + %a{"data-panel"=>"main", :onclick=>"if (confirm('Please Confirm')) {location.hash='#{url}'};"}= name + - else + %li + %a{"data-panel"=>"main", :href=> url}= name diff --git a/test/dummy-2/app/views/jinda/_model.md b/test/dummy-2/app/views/jinda/_model.md new file mode 100644 index 0000000..0c87ce0 --- /dev/null +++ b/test/dummy-2/app/views/jinda/_model.md @@ -0,0 +1,5 @@ + +### <%= model %> + +<% model_file= "#{Rails.root}/app/models/#{model}.rb" %> +<%= code_div File.read(model_file) %> diff --git a/test/dummy-2/app/views/jinda/_modul.md b/test/dummy-2/app/views/jinda/_modul.md new file mode 100644 index 0000000..44bbb8f --- /dev/null +++ b/test/dummy-2/app/views/jinda/_modul.md @@ -0,0 +1,9 @@ + +### ระบบงาน<%= modul.name %> + +<%- controller_file= "#{Rails.root}/app/controllers/#{modul.code}_controller.rb" %> +<%- md_file= "#{Rails.root}/app/controllers/#{modul.code}.md" %> + +<%= File.read md_file if File.exist?(md_file) %> + +<%= render :partial=>'jinda/service.md', :collection=> modul.services.asc(:seq) %> diff --git a/test/dummy-2/app/views/jinda/_pending_home.haml b/test/dummy-2/app/views/jinda/_pending_home.haml new file mode 100644 index 0000000..5898810 --- /dev/null +++ b/test/dummy-2/app/views/jinda/_pending_home.haml @@ -0,0 +1,5 @@ +#pending{"data-role" => "page"} + %div{"data-role" => "header" , "data-backbtn"=>"false"} + %h1 Pending Tasks + %div{"data-role" => "content"} + = render :partial => "pending_page", :locals=>{:xmains=>@xmains} diff --git a/test/dummy-2/app/views/jinda/_pending_page.haml b/test/dummy-2/app/views/jinda/_pending_page.haml new file mode 100644 index 0000000..a5a5f06 --- /dev/null +++ b/test/dummy-2/app/views/jinda/_pending_page.haml @@ -0,0 +1,24 @@ +- @xmains= xmains +%table{:id=>"pending-table", :width=>"100%"} + %tr{:style=>"color:white; background-color:#97BF60;"} + %th id + %th task + %th step + %th starter + %th begin + %th cancel + - @xmains.each do |xmain| + - @xmain= xmain + - next unless xmain.current_runseq + - @runseq= Jinda::Runseq.find(xmain.current_runseq) + - next unless @runseq + - next unless %w(form output pdf).include?(@runseq.action) + - next if @xmain.runseqs.first==@xmain.current_runseq && @xmain.user!=current_ma_user + - next unless authorize? + %tr + %td= link_to xmain.xid, :controller=>"jinda", :action=>"run", :id=>xmain.id + %td= link_to xmain.name, :controller=>"jinda", :action=>"run", :id=>xmain.id + %td= @runseq.name + %td{:align=>'center'}= xmain.user.try :code + %td= xmain.start.strftime("%c") + %td(align='center')= link_to image_tag('delete.png', style:'border:none; float:none;'), "#", :onclick=>"if (confirm('Please Confirm')) {location.hash='/jinda/cancel/#{xmain.id}';}" diff --git a/test/dummy-2/app/views/jinda/_service.md b/test/dummy-2/app/views/jinda/_service.md new file mode 100644 index 0000000..fe6dfa0 --- /dev/null +++ b/test/dummy-2/app/views/jinda/_service.md @@ -0,0 +1,24 @@ +<%- d= Nokogiri::XML(service.xml) %> +<%- if service.code=="link" %> +#### งาน<%= service.name.split(':')[0] %> + <%- if !(d/'node/node').blank? && (d/'node/node')[0]['TEXT'] %> +<%= uncomment (d/'node/node')[0]['TEXT'] %> + <%- end %> +<%- else %> +#### งาน<%= service.name %> + <%- md_file= "#{Rails.root}/app/views/#{service.module.code}/#{service.code}.md" %> + + <%= File.read md_file if File.exist?(md_file) %> + <%- j= 1 %> + <%- (d/'/node/node').each do |activity| %> + <%- next unless (activity/'icon')[0] %> + <%- action= freemind2action((activity/'icon')[0]['BUILTIN']) %> + <%- next unless (action=='form') %> + <%= render :partial=>'jinda/activity.md', :locals=>{:activity=>activity, :j=>j, :service=>service} %> + <%- j= j + 1 %> + <%- end %> +<%- end %> + + + + diff --git a/test/dummy-2/app/views/jinda/_static.haml b/test/dummy-2/app/views/jinda/_static.haml new file mode 100644 index 0000000..adb610d --- /dev/null +++ b/test/dummy-2/app/views/jinda/_static.haml @@ -0,0 +1,13 @@ +#search{"data-role" => "page"} + %div{"data-role" => "header", "data-backbtn" => "false"} + %h1 Search + %div{"data-role" => "content"} + - form_tag({:controller=>"jinda", :action=>"search"}, :method => "get" ) do + = text_field_tag :q, "", :type=>"search", :required=>true, :placeholder=>"key word", :onkeypress=>"$('input').unbind('keypress');" + = submit_tag "Search", "data-inline"=>"true" + - form_tag({:controller=>"jinda", :action=>"status"}, :method => "get" ) do + = text_field_tag :id, nil, :required=>true, :placeholder=>"task number", :onkeypress=>"$('input').unbind('keypress');" + = submit_tag "Status", "data-inline"=>"true" + = link_to "Pending Tasks", "#", :onclick=>"location.hash='/jinda/pending'", "data-role"=>"button" + = link_to "Refresh", "#", :onclick=>"window.location.replace('/')", "data-role"=>"button" + = link_to "About", "#", :onclick=>"location.hash='#about'", "data-role"=>"button" diff --git a/test/dummy-2/app/views/jinda/doc-thai.md b/test/dummy-2/app/views/jinda/doc-thai.md new file mode 100644 index 0000000..c289a1f --- /dev/null +++ b/test/dummy-2/app/views/jinda/doc-thai.md @@ -0,0 +1,37 @@ + + +<%= File.read('README.md') %> + +*** + +# คู่มือการใช้งาน + +<%= render :partial=>'jinda/modul.md', :collection=> Jinda::Module.all.asc(:seq) %> + +*** + +# คู่มือผู้ดูแลระบบ + +## โครงสร้างข้อมูล + +<%- models= @app.elements["//node[@TEXT='models']"] %> + +<%= render :partial=>'jinda/model.md', :collection=> models.map {|m| m.attributes["TEXT"] } %> + +*** + +# ภาคผนวก + +## markdown + +คู่มือนี้จัดทำขึ้นโดยอัตโนมัติจาก mind map และส่วนต่างๆ ของรหัสโปรแกรม +ผู้เกี่ยวข้องสามารถเขียนวิธีการใช้งานได้อย่างอิสระ โดยใช้คำสั่ง +markdown +ในการเขียนคู่มือประกอบเข้ากับส่วนต่างๆของระบบงาน ดังต่อไปนี้ + +* คำอธิบายระบบในภาพรวม อยู่ในไฟล์ `README.md` +* คำอธิบายระบบงาน อยู่ในไฟล์ `app/controllers/<ระบบงาน>.md` +* คำอธิบายงาน อยู่ในไฟล์ `app/views/<ระบบงาน>/<งาน>.md` +* คำอธิบายงานของ link สร้างเป็นกิ่งลูกต่อจาก link นั้น +* คำอธิบายขั้นตอน อยู่ในไฟล์ `app/views/<ระบบงาน>/<งาน>/<ขั้นตอน>.md` +* ตัวอย่างหน้าจอ อยู่ในไฟล์ `app/views/<ระบบงาน>/<งาน>/<ขั้นตอน>.png` diff --git a/test/dummy-2/app/views/jinda/doc.md b/test/dummy-2/app/views/jinda/doc.md new file mode 100644 index 0000000..6820c88 --- /dev/null +++ b/test/dummy-2/app/views/jinda/doc.md @@ -0,0 +1,36 @@ + + +<%= File.read('README.md') %> + +*** + +# Help (UNDER CONSTRUCTION: DUI) + +<%= render :partial=>'jinda/modul.md', :collection=> Jinda::Module.all.asc(:seq) %> + +*** + +# Admin + +## Data Structure + +<%- models= @app.elements["//node[@TEXT='models']"] %> + +<%= render :partial=>'jinda/model.md', :collection=> models.map {|m| m.attributes["TEXT"] } %> + +*** + +# Contents + +## markdown + +This document created and edited with +markdown + +Contents: + +* Requirement at `README.md` +* Controller Help at `app/controllers/system.md` +* Project at `app/views/project/<งาน>.md` +* +* diff --git a/test/dummy-2/app/views/jinda/error_logs.haml b/test/dummy-2/app/views/jinda/error_logs.haml new file mode 100644 index 0000000..6a45657 --- /dev/null +++ b/test/dummy-2/app/views/jinda/error_logs.haml @@ -0,0 +1,22 @@ +- @title= "Error Logs" += paginate @xmains +%table{:id=>"pending-table", :width=>"100%"} + %tr{:style=>"color:white; background-color:#97BF60;"} + %th id + %th task + %th step + %th starter + %th begin + %th message + - @xmains.each do |xmain| + - @xmain= xmain + - next unless xmain.current_runseq + - @runseq= Jinda::Runseq.find(xmain.current_runseq) + - next unless @runseq + %tr + %td(style='vertical-align:top;')= xmain.xid + %td(style='vertical-align:top;')= xmain.name + %td(style='vertical-align:top;')= @runseq.name + %td(align="center" style='vertical-align:top;')= xmain.user.try :code + %td(style='vertical-align:top;')= xmain.start.strftime("%c") + %td(style="vertical-align:top;width:40%")= truncate(xmain.xvars["error"], :length=> 100) diff --git a/test/dummy-2/app/views/jinda/feed.rss.builder b/test/dummy-2/app/views/jinda/feed.rss.builder new file mode 100644 index 0000000..5297db3 --- /dev/null +++ b/test/dummy-2/app/views/jinda/feed.rss.builder @@ -0,0 +1,27 @@ +xml.instruct! # +xml.comment! "a comment" # +xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do + xml.title "My Atom Feed" +# xml.subtitle h(@feed.subtitle), "type" => 'html' + xml.link url_for( :only_path => false, + :controller => 'main', + :action => 'atom' ) + xml.updated Time.now.iso8601 + xml.author do + xml.name "Jens-Christian Fischer" + xml.email "jcfischer@gmail.com" + end + @waypoints.each do |entry| + xml.entry do + xml.code entry.code + xml.title entry.name + xml.link "href" => url_for( :only_path => false, + :controller => 'entries', + :action => 'show', + :id => entry ) + xml.id entry.uid + xml.updated entry.updated_at.iso8601 + xml.summary h(entry.description) + end + end +end diff --git a/test/dummy-2/app/views/jinda/help.haml b/test/dummy-2/app/views/jinda/help.haml new file mode 100644 index 0000000..2c1acee --- /dev/null +++ b/test/dummy-2/app/views/jinda/help.haml @@ -0,0 +1,20 @@ +%div(style="text-align:center") + = image_tag "logo_jinda.png" +%h2 การติดตั้ง +%ul + %li + ติดตั้ง Google Chrome โดยดาวน์โหลดจาก + = link_to "https://www.google.com/chrome", "https://www.google.com/chrome", :target=>"_blank" + %li etc. +%h2 การใช้งาน +%ul + %li aaa + %li + bbb + %ul + %li bb1 + %li bb2 +%h2 ผู้ดูแลระบบ +%ul + %li การทำสำรองข้อมูล + %li การบูรณาการข้อมูลกลาง diff --git a/test/dummy-2/app/views/jinda/index.html.haml b/test/dummy-2/app/views/jinda/index.html.haml new file mode 100644 index 0000000..8c353ea --- /dev/null +++ b/test/dummy-2/app/views/jinda/index.html.haml @@ -0,0 +1,53 @@ +.content-header + %div(style="text-align:center") + = image_tag "logo_jinda.png" + %ol.breadcrumb + %li.fa.fa-dashboard + Dashboard +.content + %div.row::before + %div.col-lg-4.col-md-4.col-xs-12 + %div.small-box.bg-aqua + %div.inner + %b Current gems version found: + %ul + %li Ruby Version #{RUBY_VERSION } + %li Rails Version #{Rails.version } + %li gem jinda #{Gem.loaded_specs['jinda'].version} + %div.col-lg-4.col-md-4.col-xs-12 + %div.small-box.bg-green + %div.inner + %b Recently tested with: + %ul + %li Rubygems 2.7.1 + %li Rails 6.1.0 + %div.col-lg-4.col-md-4.col-xs-12 + %div.small-box.bg-yellow + %div.inner + %b Create New Rails: + %ul + %li rails new YOURAPP --skip-test-unit --skip-bundle --skip-active-record --skip-javascript --skip-turbolinks + %li (rails new YOURAPP -BOTJ) + %div.col-lg-6.col-md-12.col-xs-12 + %div.small-box.bg-red + %div.inner + %b Installation + %ul + %li add gem 'jinda' # to Gemfile then $ bundle + %li rails generate jinda:install, then bundle + %li rails generate jinda:config + %li rails jinda:seed, will create initial user:password admin:secret + %li when update app/jinda/index.mm, run rake jinda:update + %div.col-lg-6.col-md-12.col-xs-12 + %div.small-box.bg-blue + %div.inner + %b Option: Themes available: Jinda_adminbsb, Jinda_adminlte + %ul + %li To install gem 'jinda_adminlte' + %li Install + %li gem 'jinda_adminlte' + %li Then + %li $ bundle + %li $ rails generate jinda_adminlte:install + + diff --git a/test/dummy-2/app/views/jinda/logs.haml b/test/dummy-2/app/views/jinda/logs.haml new file mode 100644 index 0000000..7e1d779 --- /dev/null +++ b/test/dummy-2/app/views/jinda/logs.haml @@ -0,0 +1,22 @@ +- @title= "Jinda Logs" += paginate @xmains +%table{:id=>"pending-table", :width=>"100%"} + %tr{:style=>"color:white; background-color:#97BF60;"} + %th id + %th task + %th step + %th starter + %th begin + %th status + - @xmains.each do |xmain| + - @xmain= xmain + - next unless xmain.current_runseq + - @runseq= Jinda::Runseq.find(xmain.current_runseq) + - next unless @runseq + %tr + %td= link_to xmain.xid, "/jinda/status?xid=#{xmain.xid}" + %td= xmain.name + %td= @runseq.name + %td(align="center")= xmain.user.try :code + %td= xmain.start.strftime("%c") + %td(align="center")= status_icon(xmain.status) diff --git a/test/dummy-2/app/views/jinda/notice_logs.haml b/test/dummy-2/app/views/jinda/notice_logs.haml new file mode 100644 index 0000000..266a70a --- /dev/null +++ b/test/dummy-2/app/views/jinda/notice_logs.haml @@ -0,0 +1,18 @@ +- @title= "Notice Error Logs" += paginate @notices +%table{:id=>"pending-table", :width=>"100%"} + %tr{:style=>"color:white; background-color:#97BF60;"} + %th created + %th user + %th message + - @notices.each do |notice| + - @notice= notice + - current_notice = @notice.id + - #current_notice_user = @notice.user + - notice_user = (User.find @notice.user ? notice.user : 0) + - (notice_user_name = notice_user.code) if notice_user + + %tr + %td(style='vertical-align:top;')= notice.created_at + %td(style='vertical-align:top;')= notice_user_name + %td(style='vertical-align:top;')= notice.message diff --git a/test/dummy-2/app/views/jinda/pending.haml b/test/dummy-2/app/views/jinda/pending.haml new file mode 100644 index 0000000..6d9452d --- /dev/null +++ b/test/dummy-2/app/views/jinda/pending.haml @@ -0,0 +1 @@ += render :partial=>"pending_page", :locals=>{:xmains=>@xmains} diff --git a/test/dummy-2/app/views/jinda/run_form.haml b/test/dummy-2/app/views/jinda/run_form.haml new file mode 100644 index 0000000..f126d3c --- /dev/null +++ b/test/dummy-2/app/views/jinda/run_form.haml @@ -0,0 +1,42 @@ +.container + .head + = step(@runseq.form_step, @xvars['total_form_steps']) + %p + - user = current_ma_user || User.new + - form_class = 'formtastic' + - next_step = 'end_form' + - if @help + %div(data-role="collapsible" data-theme="e" data-content-theme="c" data-mini="true") + %h3 Help + %p= markdown(@help) + = form_tag({ :action => next_step } , {:multipart => true, :onSubmit=>'return validate()', :class=>form_class, "data-ajax"=>"#{ajax?(@ui)}"}) do + = hidden_field_tag 'xmain_id', @xmain.id + = hidden_field_tag 'ajax', ajax?(@ui) + = hidden_field_tag 'runseq_id', @runseq.id + = hidden_field_tag 'step', @xvars[:current_step] + %div(data-role="fieldcontain") + = render :inline=> @ui + %p + = submit_tag NEXT + %p + :javascript + $(function() { + $('.required').append(' *'); + $('.refresh').append(" "); + $("input").keypress(function (evt) { + //Deterime where our character code is coming from within the event + var charCode = evt.charCode || evt.keyCode; + if (charCode == 13) { //Enter key's keycode + alert("Please click the button"); + return false; + } + }); + }); + $( document ).one( "pagechange", function(){ + $('input[type="file"]').textinput({theme: 'c'}); + }); + + function validate() { + // alert("Validate"); + } + diff --git a/test/dummy-2/app/views/jinda/run_output.haml b/test/dummy-2/app/views/jinda/run_output.haml new file mode 100644 index 0000000..075c6d5 --- /dev/null +++ b/test/dummy-2/app/views/jinda/run_output.haml @@ -0,0 +1,38 @@ +.head + - @title= @xmain.name + = step(@runseq.form_step, @xvars['total_form_steps']) + #title(style='text-align:right;')= "click '#{@runseq.name}' to print" + %p + =javascript_include_tag "disable_enter_key" += form_tag({ :action => 'end_output' } , {:multipart => true, :onKeyPress=>'return disableEnterKey(event)', :class=>'formtastic'}) do + = hidden_field_tag 'xmain_id', @xmain.id + = hidden_field_tag 'runseq_id', @runseq.id + = hidden_field_tag 'step', @xvars[:current_step] + #output_link + = link_to @runseq.name, url_for(:controller=>'jinda', :action=>'document', :id=>@doc.id), :target=>'_blank' + %p + .label + = image_tag "cog.png" + = t "documents" + %table{:width=>"100%"} + %tr{:style=>"color:white; background-color:#6A6A6A;"} + %th= t "id" + %th= t "document" + %th= t "file name" + %th= t "user" + %th= "date" + - @xmain.docs.each do |doc| + - next unless doc.ma_display + %tr + %td= doc.id + %td + - if doc.content_type=='output' + = image_tag 'page_output.png' + - else + = image_tag 'page_attach.png' + = link_to_blank align_text(doc.name), :controller=>"jinda", :action=>:document, :id=>doc.id + %td= doc.filename + %td= doc.user.code + %td= doc.updated_at + = submit_tag @message +%p diff --git a/test/dummy-2/app/views/jinda/search.haml b/test/dummy-2/app/views/jinda/search.haml new file mode 100644 index 0000000..55c8818 --- /dev/null +++ b/test/dummy-2/app/views/jinda/search.haml @@ -0,0 +1,20 @@ +/%h3= "Search #{@q}" += will_paginate @docs, :class=>'flickr_pagination', :params=>{:q=>@q} +/= will_paginate @xmains, :class=>'flickr_pagination', :params=>{:q=>@q} + +%table{:width=>"100%"} + %tr{:style=>"color:white; background-color:#6A6A6A; text-shadow:none;"} + %th id + %th task + %th starter + %th begin + %th end + %th status + - @xmains.each do |xmain| + %tr + %td= link_to xmain.id, :action=>"status", :id=>xmain.id + %td= link_to xmain.name, :action=>"status", :id=>xmain.id + %td{:align=>'center'}= xmain.ma_user.full_name + %td= date_thai xmain.start, :date_only=>true + %td= xmain.stop ? date_thai(xmain.stop, :date_only=>true) : ' ' + %td(align='center')= status_icon xmain diff --git a/test/dummy-2/app/views/jinda/status.haml b/test/dummy-2/app/views/jinda/status.haml new file mode 100644 index 0000000..2069237 --- /dev/null +++ b/test/dummy-2/app/views/jinda/status.haml @@ -0,0 +1,61 @@ +%table{:width=>"100%"} + %tr{:style=>"color:white; background-color:#6A6A6A;"} + %th Status + %th Step + %th Starter + %th Begin + %th End + - @xmain.runseqs.form_action.each do |r| + %tr + - if @xmain.status=='X' + %td{:align=>'center'}= image_tag 'cancel.png' + - else + %td{:align=>'center'}= status_icon(r.status) + %td= r.name + %td{:align=>'center'} + - if r.role.blank? && @xvars[:action] + - u = @xvars[:action][:assign].blank? ? ' ' : User.find(@xvars[:action][:assign]).full_name + = u + - if @xvars[:action][:final]=='n' + %td{:align=>'center'} - + %td{:align=>'center'} - + - else + - if r.start + %td= r.start.strftime('%c') + - else + %td{:align=>'center'} - + - if r.stop + %td= r.stop.strftime('%c') + - else + %td{:align=>'center'} - + - else + = role_name r.role + - if r.start + %td= r.start.strftime('%c') + - else + %td{:align=>'center'} - + - if r.stop + %td= r.stop.strftime('%c') + - else + %td{:align=>'center'} - +.label + = image_tag "cog.png" + Document +%table{:width=>"100%"} + %tr{:style=>"color:white; background-color:#6A6A6A;"} + %th Document + %th Name + %th User + %th Date + - @xmain.docs.each do |doc| + - next unless doc.display + %tr + %td + - if doc.content_type=='output' + = image_tag 'page_output.png' + - else + = image_tag 'page_attach.png' + = link_to align_text(doc.name), "/engine/document/#{doc.id}", :target=>'_blank' + %td= doc.filename + %td= doc.user.try(:full_name) + %td= doc.created_at.strftime('%c') diff --git a/test/dummy-2/app/views/jinda_mailer/gmail.html.erb b/test/dummy-2/app/views/jinda_mailer/gmail.html.erb new file mode 100644 index 0000000..116221f --- /dev/null +++ b/test/dummy-2/app/views/jinda_mailer/gmail.html.erb @@ -0,0 +1,9 @@ + + + + + + + <%= raw @ui %> + + diff --git a/test/dummy-2/app/views/layouts/_head.html.erb b/test/dummy-2/app/views/layouts/_head.html.erb new file mode 100644 index 0000000..512f14e --- /dev/null +++ b/test/dummy-2/app/views/layouts/_head.html.erb @@ -0,0 +1,10 @@ + + <%= favicon_link_tag %> + + <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track":"reload" %> + <%= javascript_include_tag "application", "data-turbolinks-track": "reload" %> + <%= stylesheet_link_tag "jinda", "sarabun" %> + + <%= csrf_meta_tags %> + <%= display_meta_tags %> + diff --git a/test/dummy-2/app/views/layouts/_meta_tag.html.erb b/test/dummy-2/app/views/layouts/_meta_tag.html.erb new file mode 100644 index 0000000..d9ae11c --- /dev/null +++ b/test/dummy-2/app/views/layouts/_meta_tag.html.erb @@ -0,0 +1,19 @@ + + + + + + <% if content_for?(:title) %> + <%= content_for(:title) %> + <% else %> + Jinda | Tools for | Ruby on Rails + <% end %> + + +<% if content_for :meta_description %> + +<% else %> + +<% end %> + + \ No newline at end of file diff --git a/test/dummy-2/app/views/layouts/application.haml b/test/dummy-2/app/views/layouts/application.haml new file mode 100644 index 0000000..6714385 --- /dev/null +++ b/test/dummy-2/app/views/layouts/application.haml @@ -0,0 +1,51 @@ +%html + %head + %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/ + = csrf_meta_tags + /%link{:href => "https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic", :rel => "stylesheet"}/ + %title Jinda AdminLTE 2 | Starter + = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' + = javascript_include_tag "application", 'data-turbolinks-track': 'reload' + / + BODY TAG OPTIONS: + \================= + Apply one or more of the following classes to get the + desired effect + |---------------------------------------------------------| + | SKINS | skin-blue | + | | skin-black | + | | skin-purple | + | | skin-yellow | + | | skin-red | + | | skin-green | + |---------------------------------------------------------| + |LAYOUT OPTIONS | fixed | + | | layout-boxed | + | | layout-top-nav | + | | sidebar-collapse | + | | sidebar-mini | + |---------------------------------------------------------| + + %body.hold-transition.skin-yellow.sidebar-mini + .wrapper + = render "layouts/lte/header" + = render "layouts/lte/sidebar" + .content-wrapper + %h3.box-title + = @page_title + = render 'layouts/lte/flash' + .label-warning + #flashes + - if flash[:notice] + %p#flash_notice.messages.notice= flash[:notice] + = javascript_tag "$('#flash_notice').effect('highlight',{},1000);" + - if flash[:error] || flash[:errors] + %p#flash_errors.messages.errors= flash[:error] || flash[:errors] + = javascript_tag "$('#flash_errors').effect('highlight',{},1000);" + - flash[:error] = flash[:errors] = flash[:notice] = nil + = yield + = render 'layouts/lte/footer' + .control-sidebar-bg + / REQUIRED JS SCRIPTS + / jQuery 3 + diff --git a/test/dummy/app/views/layouts/application.haml.bak b/test/dummy-2/app/views/layouts/application.haml.bak similarity index 100% rename from test/dummy/app/views/layouts/application.haml.bak rename to test/dummy-2/app/views/layouts/application.haml.bak diff --git a/test/dummy-2/app/views/layouts/application.html.erb.bak b/test/dummy-2/app/views/layouts/application.html.erb.bak new file mode 100644 index 0000000..f72b4ef --- /dev/null +++ b/test/dummy-2/app/views/layouts/application.html.erb.bak @@ -0,0 +1,15 @@ + + + + Dummy + + <%= csrf_meta_tags %> + <%= csp_meta_tag %> + + <%= stylesheet_link_tag "application" %> + + + + <%= yield %> + + diff --git a/test/dummy-2/app/views/layouts/bsb/_footer.haml b/test/dummy-2/app/views/layouts/bsb/_footer.haml new file mode 100644 index 0000000..8a8f922 --- /dev/null +++ b/test/dummy-2/app/views/layouts/bsb/_footer.haml @@ -0,0 +1,7 @@ +%footer.main-footer + .pull-right.hidden-xs + AdminBSB Themes + %strong + Copyright © 2017 + %a{:href => "#"} Company + All rights reserved. diff --git a/test/dummy-2/app/views/layouts/bsb/_header.haml b/test/dummy-2/app/views/layouts/bsb/_header.haml new file mode 100644 index 0000000..c490512 --- /dev/null +++ b/test/dummy-2/app/views/layouts/bsb/_header.haml @@ -0,0 +1,147 @@ +%nav.navbar + .container-fluid + .navbar-header + %a.navbar-toggle.collapsed{"aria-expanded" => "false", "data-target" => "#navbar-collapse", "data-toggle" => "collapse", :href => "javascript:void(0);"} + %a.bars{:href => "javascript:void(0);"} + %a.navbar-brand{:href => "index.html"} ADMINBSB - MATERIAL DESIGN + #navbar-collapse.collapse.navbar-collapse + %ul.nav.navbar-nav.navbar-right + / Call Search + %li + %a.js-search{"data-close" => "true", :href => "javascript:void(0);"} + %i.material-icons search + / #END# Call Search + / Notifications + %li.dropdown + %a.dropdown-toggle{"data-toggle" => "dropdown", :href => "javascript:void(0);", :role => "button"} + %i.material-icons notifications + %span.label-count 7 + %ul.dropdown-menu + %li.header NOTIFICATIONS + %li.body + %ul.menu + %li + %a{:href => "javascript:void(0);"} + .icon-circle.bg-light-green + %i.material-icons person_add + .menu-info + %h4 12 new members joined + %p + %i.material-icons access_time + 14 mins ago + %li + %a{:href => "javascript:void(0);"} + .icon-circle.bg-cyan + %i.material-icons add_shopping_cart + .menu-info + %h4 4 sales made + %p + %i.material-icons access_time + 22 mins ago + %li + %a{:href => "javascript:void(0);"} + .icon-circle.bg-red + %i.material-icons delete_forever + .menu-info + %h4 + %b Nancy Doe + deleted account + %p + %i.material-icons access_time + 3 hours ago + %li + %a{:href => "javascript:void(0);"} + .icon-circle.bg-orange + %i.material-icons mode_edit + .menu-info + %h4 + %b Nancy + changed name + %p + %i.material-icons access_time + 2 hours ago + %li + %a{:href => "javascript:void(0);"} + .icon-circle.bg-blue-grey + %i.material-icons comment + .menu-info + %h4 + %b John + commented your post + %p + %i.material-icons access_time + 4 hours ago + %li + %a{:href => "javascript:void(0);"} + .icon-circle.bg-light-green + %i.material-icons cached + .menu-info + %h4 + %b John + updated status + %p + %i.material-icons access_time + 3 hours ago + %li + %a{:href => "javascript:void(0);"} + .icon-circle.bg-purple + %i.material-icons settings + .menu-info + %h4 Settings updated + %p + %i.material-icons access_time + Yesterday + %li.footer + %a{:href => "javascript:void(0);"} View All Notifications + / #END# Notifications + / Tasks + %li.dropdown + %a.dropdown-toggle{"data-toggle" => "dropdown", :href => "javascript:void(0);", :role => "button"} + %i.material-icons flag + %span.label-count 9 + %ul.dropdown-menu + %li.header TASKS + %li.body + %ul.menu.tasks + %li + %a{:href => "javascript:void(0);"} + %h4 + Footer display issue + %small 32% + .progress + .progress-bar.bg-pink{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => "85", :role => "progressbar", :style => "width: 32%"} + %li + %a{:href => "javascript:void(0);"} + %h4 + Make new buttons + %small 45% + .progress + .progress-bar.bg-cyan{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => "85", :role => "progressbar", :style => "width: 45%"} + %li + %a{:href => "javascript:void(0);"} + %h4 + Create new dashboard + %small 54% + .progress + .progress-bar.bg-teal{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => "85", :role => "progressbar", :style => "width: 54%"} + %li + %a{:href => "javascript:void(0);"} + %h4 + Solve transition issue + %small 65% + .progress + .progress-bar.bg-orange{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => "85", :role => "progressbar", :style => "width: 65%"} + %li + %a{:href => "javascript:void(0);"} + %h4 + Answer GitHub questions + %small 92% + .progress + .progress-bar.bg-purple{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => "85", :role => "progressbar", :style => "width: 92%"} + %li.footer + %a{:href => "javascript:void(0);"} View All Tasks + / #END# Tasks + %li.pull-right + %a.js-right-sidebar{"data-close" => "true", :href => "javascript:void(0);"} + %i.material-icons more_vert +/ #Top Bar \ No newline at end of file diff --git a/test/dummy-2/app/views/layouts/bsb/_menu.haml b/test/dummy-2/app/views/layouts/bsb/_menu.haml new file mode 100644 index 0000000..9029560 --- /dev/null +++ b/test/dummy-2/app/views/layouts/bsb/_menu.haml @@ -0,0 +1,47 @@ +- head = login? ? current_ma_user.code : DEFAULT_HEADER + +.menu + %ul.list + %li.header MAIN NAVIGATION + %li.active + %a{:href =>"/jinda","data-panel" => "main"} + %i.material-icons home + %span Home + + = render 'layouts/jqm/menu_mm' + + - if login? + %li + %a{:href=>"/jinda/pending", "data-panel" => "main"} Pending Tasks + %li + %a{"data-panel" => "main", :href => logout_path, "data-ajax"=>"false"} + %i.material-icons layers + %span Sign Out + - else + %li + %a{:href =>new_session_path,"data-panel" => "main"} + %i.material-icons layers + %span Sign In + %li + %a{:href =>new_identity_path, "data-panel" => "main"} + %i.material-icons layers + %span Sign Up + %li + = link_to "Refresh", "#", :onclick=>"window.location.replace('/')" + - if !login? + %a.btn.btn-block.btn-social.btn-facebook{:href => "/auth/facebook", rel: "external"} + %i.material-icons facebook + %span Sign in with Facebook + +.legal + .copyright + © 2016 - 2017 + = succeed "." do + %a{:href => "javascript:void(0);"} AdminBSB - Material Design + .version + %b Version: + 1.0.5 + + + + \ No newline at end of file diff --git a/test/dummy-2/app/views/layouts/bsb/_menu_mm.haml b/test/dummy-2/app/views/layouts/bsb/_menu_mm.haml new file mode 100644 index 0000000..78f1943 --- /dev/null +++ b/test/dummy-2/app/views/layouts/bsb/_menu_mm.haml @@ -0,0 +1,34 @@ +%li.treeview + - process_services + - Jinda::Module.all.asc(:seq).each do |m| + - unless m.role.blank? + - next unless login? + - next unless current_ma_user.role + - next unless current_ma_user.role.upcase.split(',').include?(m.role.upcase) + %li + %a.menu-toggle{:href => "javascript:void(0);"} + %i.material-icons.col-light-blue donut_small + %span + = m.name + %ul.ml-menu + %li + - m.services.asc(:seq).each do |s| + - next unless s.list + - xml= REXML::Document.new(s.xml).root + - unless s.rule.blank? + - next if (!eval(s.rule)) + - unless s.role.blank? + - next unless login? + - next unless current_ma_user.role + - next unless current_ma_user.role.upcase.split(',').include?(s.role.upcase) + - if s.code.downcase=="link" + - name, url = s.name.split(":", 2) + - url.strip! + - else + - name= s.name; url= "/jinda/init?s=#{s.module_code}:#{s.code}" + - if s.confirm + %li + %a{"data-panel"=>"main", :onclick=>"if (confirm('Please Confirm')) {location.hash='#{url}'};"}= name + - else + %li + %a{"data-panel"=>"main", :href=> url}= name diff --git a/test/dummy/app/views/layouts/lte/_rightbar.haml b/test/dummy-2/app/views/layouts/bsb/_rightbar.haml similarity index 100% rename from test/dummy/app/views/layouts/lte/_rightbar.haml rename to test/dummy-2/app/views/layouts/bsb/_rightbar.haml diff --git a/test/dummy-2/app/views/layouts/bsb/_sidebar.haml b/test/dummy-2/app/views/layouts/bsb/_sidebar.haml new file mode 100644 index 0000000..7e1d762 --- /dev/null +++ b/test/dummy-2/app/views/layouts/bsb/_sidebar.haml @@ -0,0 +1,155 @@ +%section + / Left Sidebar + %aside#leftsidebar.sidebar + / User Info + .user-info + .image + %img{:alt => "User", :height => "48", :src => asset_url("user.png", :width => "48")}/ + .info-container + .name{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown"} John Doe + .email john.doe@example.com + .btn-group.user-helper-dropdown + %i.material-icons{"aria-expanded" => "true", "aria-haspopup" => "true", "data-toggle" => "dropdown"} keyboard_arrow_down + %ul.dropdown-menu.pull-right + %li + %a{:href => "javascript:void(0);"} + %i.material-icons> person + Profile + %li.divider{:role => "seperator"} + %li + %a{:href => "javascript:void(0);"} + %i.material-icons> group + Followers + %li + %a{:href => "javascript:void(0);"} + %i.material-icons> shopping_cart + Sales + %li + %a{:href => "javascript:void(0);"} + %i.material-icons> favorite + Likes + %li.divider{:role => "seperator"} + %li + %a{:href => "javascript:void(0);"} + %i.material-icons> input + Sign Out + / #User Info + / Menu + = render "layouts/jqm/menu" + + / #Footer + / #END# Left Sidebar + / Right Sidebar + %aside#rightsidebar.right-sidebar + %ul.nav.nav-tabs.tab-nav-right{:role => "tablist"} + %li.active{:role => "presentation"} + %a{"data-toggle" => "tab", :href => "#skins"} SKINS + %li{:role => "presentation"} + %a{"data-toggle" => "tab", :href => "#settings"} SETTINGS + .tab-content + #skins.tab-pane.fade.in.active.in.active{:role => "tabpanel"} + %ul.demo-choose-skin + %li.active{"data-theme" => "red"} + .red + %span Red + %li{"data-theme" => "pink"} + .pink + %span Pink + %li{"data-theme" => "purple"} + .purple + %span Purple + %li{"data-theme" => "deep-purple"} + .deep-purple + %span Deep Purple + %li{"data-theme" => "indigo"} + .indigo + %span Indigo + %li{"data-theme" => "blue"} + .blue + %span Blue + %li{"data-theme" => "light-blue"} + .light-blue + %span Light Blue + %li{"data-theme" => "cyan"} + .cyan + %span Cyan + %li{"data-theme" => "teal"} + .teal + %span Teal + %li{"data-theme" => "green"} + .green + %span Green + %li{"data-theme" => "light-green"} + .light-green + %span Light Green + %li{"data-theme" => "lime"} + .lime + %span Lime + %li{"data-theme" => "yellow"} + .yellow + %span Yellow + %li{"data-theme" => "amber"} + .amber + %span Amber + %li{"data-theme" => "orange"} + .orange + %span Orange + %li{"data-theme" => "deep-orange"} + .deep-orange + %span Deep Orange + %li{"data-theme" => "brown"} + .brown + %span Brown + %li{"data-theme" => "grey"} + .grey + %span Grey + %li{"data-theme" => "blue-grey"} + .blue-grey + %span Blue Grey + %li{"data-theme" => "black"} + .black + %span Black + #settings.tab-pane.fade{:role => "tabpanel"} + .demo-settings + %p GENERAL SETTINGS + %ul.setting-list + %li + %span Report Panel Usage + .switch + %label + %input{:checked => "checked", :type => "checkbox"}/ + %span.lever + %li + %span Email Redirect + .switch + %label + %input{:type => "checkbox"}/ + %span.lever + %p SYSTEM SETTINGS + %ul.setting-list + %li + %span Notifications + .switch + %label + %input{:checked => "checked", :type => "checkbox"}/ + %span.lever + %li + %span Auto Updates + .switch + %label + %input{:checked => "checked", :type => "checkbox"}/ + %span.lever + %p ACCOUNT SETTINGS + %ul.setting-list + %li + %span Offline + .switch + %label + %input{:type => "checkbox"}/ + %span.lever + %li + %span Location Permission + .switch + %label + %input{:checked => "checked", :type => "checkbox"}/ + %span.lever \ No newline at end of file diff --git a/test/dummy-2/app/views/layouts/bsb/application.haml-bsb b/test/dummy-2/app/views/layouts/bsb/application.haml-bsb new file mode 100644 index 0000000..cab149f --- /dev/null +++ b/test/dummy-2/app/views/layouts/bsb/application.haml-bsb @@ -0,0 +1,47 @@ +!!! +%html + %head + %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/ + %meta{:charset => "UTF-8"}/ + %meta{:content => "IE=Edge", "http-equiv" => "X-UA-Compatible"}/ + %meta{:content => "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no", :name => "viewport"}/ + %title Standup App2 + / Favicon + %link{:href => "favicon.ico", :rel => "icon", :type => "image/x-icon"}/ + = csrf_meta_tags + + %title Jinda Title | AdminLTE + + %link{:href => "https://fonts.googleapis.com/css?family=Roboto:400,700&subset=latin,cyrillic-ext", :rel => "stylesheet", :type => "text/css"}/ + %link{:href => "https://fonts.googleapis.com/icon?family=Material+Icons", :rel => "stylesheet", :type => "text/css"}/ + + = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' + = javascript_include_tag "application", 'data-turbolinks-track': 'reload' + + + %body.theme-red + .page-loader-wrapper + .loader + .preloader + .spinner-layer.pl-red + .circle-clipper.left + .circle + .circle-clipper.right + .circle + %p Please wait... + / Overlay For Sidebars + .overlay + .search-bar + .search-icon + %i.material-icons search + %input{:placeholder => "START TYPING...", :type => "text"}/ + .close-search + %i.material-icons close + = render "layouts/jqm/header" + = render "layouts/jqm/sidebar" + .content-header + %h1= @title || DEFAULT_TITLE + = yield + + + diff --git a/test/dummy-2/app/views/layouts/gmail.html.erb b/test/dummy-2/app/views/layouts/gmail.html.erb new file mode 100644 index 0000000..184aa26 --- /dev/null +++ b/test/dummy-2/app/views/layouts/gmail.html.erb @@ -0,0 +1,9 @@ + + + + + + + <%= yield %> + + \ No newline at end of file diff --git a/test/dummy-2/app/views/layouts/jqm/_full.haml b/test/dummy-2/app/views/layouts/jqm/_full.haml new file mode 100644 index 0000000..a423451 --- /dev/null +++ b/test/dummy-2/app/views/layouts/jqm/_full.haml @@ -0,0 +1,33 @@ +!!! 5 +%html + %head + = render :partial => "layouts/head" + %body + = render :partial => "jinda/menu" + %div{"data-id" => "main", "data-role" => "panel", "data-backbtn"=>"false"} + - if @cache + - cache = {} + - else + - cache = {"data-cache"=>"never"} + - if @backbtn + - backbtn= {"data-backbtn"=>"true"} + - else + - backbtn= {"data-backbtn"=>"false"} + %div{{"data-role" => "page"}.merge(cache) } + %div{{"data-role" => "header"}.merge(backbtn)} + %h1= @title || DEFAULT_TITLE + %div{"data-role" => "content"} + = yield + = render :partial => "jinda/static" +/ :javascript +/ $(document).on("pagehide", 'div', function(e,ui) { +/ var page = $(e.target); +/ if(page.attr('data-cache') == 'never') { +/ page.remove(); +/ } +/ }); +/ $( document ).on( "pagechange", function(){ +/ $.get("/jinda/ajax_notice", function(r) {$(r).appendTo('head').remove()}); +/ }); + +/= raw handle_ma_notice diff --git a/test/dummy-2/app/views/layouts/jqm/_page.haml b/test/dummy-2/app/views/layouts/jqm/_page.haml new file mode 100644 index 0000000..9d60429 --- /dev/null +++ b/test/dummy-2/app/views/layouts/jqm/_page.haml @@ -0,0 +1,16 @@ +- if @cache + - cache = {} +- else + - cache = {"data-cache"=>"never"} +- if @backbtn + - backbtn= {"data-backbtn"=>"true"} +- else + - backbtn= {"data-backbtn"=>"false"} +%div{{"data-role" => "page"}.merge(cache) } + %div{{"data-role" => "header"}.merge(backbtn)} + %h1= @title || DEFAULT_TITLE + %div{"data-role" => "content"} + = yield + +:javascript + document.title= "#{@title}"; diff --git a/test/dummy-2/app/views/layouts/jqm/application.haml-jqm b/test/dummy-2/app/views/layouts/jqm/application.haml-jqm new file mode 100644 index 0000000..33082de --- /dev/null +++ b/test/dummy-2/app/views/layouts/jqm/application.haml-jqm @@ -0,0 +1,4 @@ +- if request.accept=="text/html, */*; q=0.01" + = render "layouts/page" +- else + = render "layouts/full" diff --git a/test/dummy/app/views/layouts/lte/_flash.haml b/test/dummy-2/app/views/layouts/lte/_flash.haml similarity index 100% rename from test/dummy/app/views/layouts/lte/_flash.haml rename to test/dummy-2/app/views/layouts/lte/_flash.haml diff --git a/test/dummy/app/views/layouts/lte/_footer.haml b/test/dummy-2/app/views/layouts/lte/_footer.haml similarity index 100% rename from test/dummy/app/views/layouts/lte/_footer.haml rename to test/dummy-2/app/views/layouts/lte/_footer.haml diff --git a/test/dummy/app/views/layouts/lte/_header.haml b/test/dummy-2/app/views/layouts/lte/_header.haml similarity index 100% rename from test/dummy/app/views/layouts/lte/_header.haml rename to test/dummy-2/app/views/layouts/lte/_header.haml diff --git a/test/dummy/app/views/layouts/lte/_menu.haml b/test/dummy-2/app/views/layouts/lte/_menu.haml similarity index 100% rename from test/dummy/app/views/layouts/lte/_menu.haml rename to test/dummy-2/app/views/layouts/lte/_menu.haml diff --git a/test/dummy/app/views/layouts/lte/_menu_mm.haml b/test/dummy-2/app/views/layouts/lte/_menu_mm.haml similarity index 100% rename from test/dummy/app/views/layouts/lte/_menu_mm.haml rename to test/dummy-2/app/views/layouts/lte/_menu_mm.haml diff --git a/test/dummy-2/app/views/layouts/lte/_rightbar.haml b/test/dummy-2/app/views/layouts/lte/_rightbar.haml new file mode 100644 index 0000000..ef9513a --- /dev/null +++ b/test/dummy-2/app/views/layouts/lte/_rightbar.haml @@ -0,0 +1,123 @@ + %aside.control-sidebar.control-sidebar-dark + / Create the tabs + %ul.nav.nav-tabs.nav-justified.control-sidebar-tabs + %li + %a{"data-toggle" => "tab", :href => "#control-sidebar-home-tab"} + %i.fa.fa-home + %li + %a{"data-toggle" => "tab", :href => "#control-sidebar-settings-tab"} + %i.fa.fa-gears + / Tab panes + .tab-content + / Home tab content + #control-sidebar-home-tab.tab-pane + %h3.control-sidebar-heading Recent Activity + %ul.control-sidebar-menu + %li + %a{:href => "javascript:void(0)"} + %i.menu-icon.fa.fa-birthday-cake.bg-red + .menu-info + %h4.control-sidebar-subheading Langdon's Birthday + %p Will be 23 on April 24th + %li + %a{:href => "javascript:void(0)"} + %i.menu-icon.fa.fa-user.bg-yellow + .menu-info + %h4.control-sidebar-subheading Frodo Updated His Profile + %p New phone +1(800)555-1234 + %li + %a{:href => "javascript:void(0)"} + %i.menu-icon.fa.fa-envelope-o.bg-light-blue + .menu-info + %h4.control-sidebar-subheading Nora Joined Mailing List + %p nora@example.com + %li + %a{:href => "javascript:void(0)"} + %i.menu-icon.fa.fa-file-code-o.bg-green + .menu-info + %h4.control-sidebar-subheading Cron Job 254 Executed + %p Execution time 5 seconds + / /.control-sidebar-menu + %h3.control-sidebar-heading Tasks Progress + %ul.control-sidebar-menu + %li + %a{:href => "javascript:void(0)"} + %h4.control-sidebar-subheading + Custom Template Design + %span.label.label-danger.pull-right 70% + .progress.progress-xxs + .progress-bar.progress-bar-danger{:style => "width: 70%"} + %li + %a{:href => "javascript:void(0)"} + %h4.control-sidebar-subheading + Update Resume + %span.label.label-success.pull-right 95% + .progress.progress-xxs + .progress-bar.progress-bar-success{:style => "width: 95%"} + %li + %a{:href => "javascript:void(0)"} + %h4.control-sidebar-subheading + Laravel Integration + %span.label.label-warning.pull-right 50% + .progress.progress-xxs + .progress-bar.progress-bar-warning{:style => "width: 50%"} + %li + %a{:href => "javascript:void(0)"} + %h4.control-sidebar-subheading + Back End Framework + %span.label.label-primary.pull-right 68% + .progress.progress-xxs + .progress-bar.progress-bar-primary{:style => "width: 68%"} + / /.control-sidebar-menu + / /.tab-pane + / Stats tab content + #control-sidebar-stats-tab.tab-pane Stats Tab Content + / /.tab-pane + / Settings tab content + #control-sidebar-settings-tab.tab-pane + %form{:method => "post"} + %h3.control-sidebar-heading General Settings + .form-group + %label.control-sidebar-subheading + Report panel usage + %input.pull-right{:checked => "checked", :type => "checkbox"}/ + %p + Some information about this general settings option + / /.form-group + .form-group + %label.control-sidebar-subheading + Allow mail redirect + %input.pull-right{:checked => "checked", :type => "checkbox"}/ + %p + Other sets of options are available + / /.form-group + .form-group + %label.control-sidebar-subheading + Expose author name in posts + %input.pull-right{:checked => "checked", :type => "checkbox"}/ + %p + Allow the user to show his name in blog posts + / /.form-group + %h3.control-sidebar-heading Chat Settings + .form-group + %label.control-sidebar-subheading + Show me as online + %input.pull-right{:checked => "checked", :type => "checkbox"}/ + / /.form-group + .form-group + %label.control-sidebar-subheading + Turn off notifications + %input.pull-right{:type => "checkbox"}/ + / /.form-group + .form-group + %label.control-sidebar-subheading + Delete chat history + %a.text-red.pull-right{:href => "javascript:void(0)"} + %i.fa.fa-trash-o + / /.form-group + / /.tab-pane + / /.control-sidebar + / + Add the sidebar's background. This div must be placed + immediately after the control sidebar + .control-sidebar-bg \ No newline at end of file diff --git a/test/dummy/app/views/layouts/lte/_sidebar.haml b/test/dummy-2/app/views/layouts/lte/_sidebar.haml similarity index 100% rename from test/dummy/app/views/layouts/lte/_sidebar.haml rename to test/dummy-2/app/views/layouts/lte/_sidebar.haml diff --git a/test/dummy-2/app/views/layouts/mailer.html.erb b/test/dummy-2/app/views/layouts/mailer.html.erb new file mode 100644 index 0000000..cbd34d2 --- /dev/null +++ b/test/dummy-2/app/views/layouts/mailer.html.erb @@ -0,0 +1,13 @@ + + + + + + + + + <%= yield %> + + diff --git a/test/dummy-2/app/views/layouts/mailer.html.haml b/test/dummy-2/app/views/layouts/mailer.html.haml new file mode 100644 index 0000000..5ef091a --- /dev/null +++ b/test/dummy-2/app/views/layouts/mailer.html.haml @@ -0,0 +1,3 @@ +%html + %body + = yield diff --git a/test/dummy-2/app/views/layouts/mailer.text.erb b/test/dummy-2/app/views/layouts/mailer.text.erb new file mode 100644 index 0000000..37f0bdd --- /dev/null +++ b/test/dummy-2/app/views/layouts/mailer.text.erb @@ -0,0 +1 @@ +<%= yield %> diff --git a/test/dummy-2/app/views/layouts/mailer.text.haml b/test/dummy-2/app/views/layouts/mailer.text.haml new file mode 100644 index 0000000..0a90f09 --- /dev/null +++ b/test/dummy-2/app/views/layouts/mailer.text.haml @@ -0,0 +1 @@ += yield diff --git a/test/dummy-2/app/views/layouts/mobile.html.erb b/test/dummy-2/app/views/layouts/mobile.html.erb new file mode 100644 index 0000000..da8f229 --- /dev/null +++ b/test/dummy-2/app/views/layouts/mobile.html.erb @@ -0,0 +1,13 @@ + + + + + + + Worldwaypoint + <%= stylesheet_link_tag 'mobile', 'molengo' %> + + + <%= yield %> + + \ No newline at end of file diff --git a/test/dummy-2/app/views/layouts/mobilejq.html.erb b/test/dummy-2/app/views/layouts/mobilejq.html.erb new file mode 100644 index 0000000..aaeaa72 --- /dev/null +++ b/test/dummy-2/app/views/layouts/mobilejq.html.erb @@ -0,0 +1,31 @@ + + + + + ระบบรายงานสถานการณ์ β + <%= stylesheet_link_tag '/jqtouch/jqtouch.min.css' %> + <%= stylesheet_link_tag '/jqtouch/themes/apple/theme.min.css' %> + <%= javascript_include_tag '/jqtouch/jquery.1.3.2.min.js' %> + <%= javascript_include_tag '/jqtouch/jqtouch.min.js' %> + + + + <%= yield %> +
+
+

ข้อมูล

+ Cancel +
+
+ ระบบรายงานสถานการณ์ เป็นระบบที่รวบรวมข้อมูลยุทธศาสตร์เชิงรุก + ที่เกี่ยวข้องกับสถานการณ์ในปัจจุบัน โดยมีขั้นตอนคือ +

1. ทีมงานรวบรวมข่าวประจำวัน +
2. เตรียมข้อมูลเชิงลึกสำหรับผู้บริหารสืบค้น +
3. นำข้อมูลเข้าสู่ระบบที่สามารถเรียกใช้งานได้สะดวก +

+
+ + + \ No newline at end of file diff --git a/test/dummy-2/app/views/layouts/print.html.erb b/test/dummy-2/app/views/layouts/print.html.erb new file mode 100644 index 0000000..31df348 --- /dev/null +++ b/test/dummy-2/app/views/layouts/print.html.erb @@ -0,0 +1,22 @@ + + + + + + + eLocal + + <%= stylesheet_link_tag "sarabun", :media=>"all" %> + + + + <%= yield %> + + + diff --git a/test/dummy-2/app/views/layouts/utf8.html.erb b/test/dummy-2/app/views/layouts/utf8.html.erb new file mode 100644 index 0000000..06e2f89 --- /dev/null +++ b/test/dummy-2/app/views/layouts/utf8.html.erb @@ -0,0 +1,22 @@ + + + + eLocal Output + + + <%= stylesheet_link_tag "sarabun", :media=>"all" %> + + + + <%= yield %> + + diff --git a/test/dummy-2/app/views/note_mailer/gmail.html.haml b/test/dummy-2/app/views/note_mailer/gmail.html.haml new file mode 100644 index 0000000..769bcef --- /dev/null +++ b/test/dummy-2/app/views/note_mailer/gmail.html.haml @@ -0,0 +1,7 @@ +%h1= @title + +%p + =@body + +%p + =@from diff --git a/test/dummy-2/app/views/note_mailer/gmail.text.haml b/test/dummy-2/app/views/note_mailer/gmail.text.haml new file mode 100644 index 0000000..8cbc203 --- /dev/null +++ b/test/dummy-2/app/views/note_mailer/gmail.text.haml @@ -0,0 +1,8 @@ +%h1= @title + +%p + = @body +%p + = @from + + diff --git a/test/dummy-2/app/views/notes/delete/select_note.html.erb b/test/dummy-2/app/views/notes/delete/select_note.html.erb new file mode 100644 index 0000000..e3b9a49 --- /dev/null +++ b/test/dummy-2/app/views/notes/delete/select_note.html.erb @@ -0,0 +1,14 @@ + +<% + if current_ma_user.role.upcase.split(',').include?("A") + note= Note.all.desc(:created_at) + else + note= Note.where(user: current_ma_user).desc(:created_at) + end +%> +
+ <%= label_tag :title, 'Select Note' %> +
+
+ <%= select_tag :id, options_from_collection_for_select(note, :id, :title), "notee-menu"=>"false" %> +
diff --git a/test/dummy-2/app/views/notes/edit/edit_note.html.erb b/test/dummy-2/app/views/notes/edit/edit_note.html.erb new file mode 100644 index 0000000..5df0477 --- /dev/null +++ b/test/dummy-2/app/views/notes/edit/edit_note.html.erb @@ -0,0 +1,10 @@ +<%- @title= 'Edit Note' %> +<% + doc = Note.find_by :id => $xvars["select_note"]["id"] +%> +<%= fields_for doc do |f| %> + <%= f.label :title, "Title" %> + <%= f.text_field :title, required: true %>
+ <%= f.label :body, "Body Content" %> + <%= f.text_area :body, :cols=>50, :rows=>6 ,required: true %> +<% end %> diff --git a/test/dummy-2/app/views/notes/edit/select_note.html.erb b/test/dummy-2/app/views/notes/edit/select_note.html.erb new file mode 100644 index 0000000..e3b9a49 --- /dev/null +++ b/test/dummy-2/app/views/notes/edit/select_note.html.erb @@ -0,0 +1,14 @@ + +<% + if current_ma_user.role.upcase.split(',').include?("A") + note= Note.all.desc(:created_at) + else + note= Note.where(user: current_ma_user).desc(:created_at) + end +%> +
+ <%= label_tag :title, 'Select Note' %> +
+
+ <%= select_tag :id, options_from_collection_for_select(note, :id, :title), "notee-menu"=>"false" %> +
diff --git a/test/dummy-2/app/views/notes/index.haml b/test/dummy-2/app/views/notes/index.haml new file mode 100644 index 0000000..dee4743 --- /dev/null +++ b/test/dummy-2/app/views/notes/index.haml @@ -0,0 +1,71 @@ +.container + %div(style="text-align:center") + %h1 Notes + + %h2 Notes Overview + %div(style="text-align:center") + %h3 Notes is a personel message system or platform that design in rails which can be modified to use all rails features such as files attachment, reminder, mail, social network sharing. This version support key features below. + + %h2 Key features + %ul + %li Support multi-user + %li Title input maximum 30 characters + %li Body input maximum 1000 characters + %li Blank Title will use body content when save + %li Able to mail each Note + %li Support dynamic user roles for each view/controller such as admin, member, developer (A,M,D) or any assign in role table/collection + %li Full test in Key features with rspec + %li Support MVC work flow like normal rails, however this program use controller/helper feature call all controller in order to easy generate using my gem Jinda + + %h2 Current gems version found: + %ul + %li Ruby Version #{RUBY_VERSION } + %li Rails Version #{Rails.version } + %li gem jinda #{Gem.loaded_specs['jinda'].version} + + + + %h2 Recently tested with: + %ul + %li rspec + %li in localhost please run $rspec + + %h2 Requirement + %ul + %li Mongodb as database + + %h2 Installation + %ul + %li in localhost $git clone https://github.com/kul1/notes.git + %li install mongodb from https://docs.mongodb.com/manual/installation/ + %li bundle install + %li rake jinda:seed # to add user: "admin" password: "secret" + + %h2 Modification in app/jinda/index.mm (Using Freemind) + %ul + %li All models, views and controllers can be changed and result in Main menu + %li (Rails MVC still running in parallel) + %div(style="text-align:center") + = image_tag "app_schema.png" + %li Note model change as in image: + %div(style="text-align:center") + = image_tag "note_model.png" + %li then update app design in app/jinda/index.mm, by run + %li $rake jinda:update + + %h2 Usage + %ul + %li Sign in: your user name with email # default role as "" + %li (can set default to "" or m (member) or any group role in index.mm using freemind) + %li Sign in as user admin password "secret" to menu Admin and change user role to any like "m" or "m,a,d" for (member, admin, group) + %li + %div(style="text-align:center") + = image_tag "edit_role.png" + %h2 What missing (in limited time) + %ul + %li css on each Note pages which required work on platform themes + %li Better features eg: able to selecte several notes for action + %li Live email in Heroku (avoid security in noth github, heroku and Gmail blocked by serveral tested) + + + diff --git a/test/dummy-2/app/views/notes/mail/display_mail.html.erb b/test/dummy-2/app/views/notes/mail/display_mail.html.erb new file mode 100644 index 0000000..7eb880f --- /dev/null +++ b/test/dummy-2/app/views/notes/mail/display_mail.html.erb @@ -0,0 +1,20 @@ +<% + doc = Note.find_by :id => $xvars["select_note"]["id"] + %> + +<% email = $xvars["select_note"]["email"] %> +
+ + + <%= email %> + + +
+
+ <%= fields_for doc do |f| %> + <%= f.label :title, "Subject" %> + <%= f.text_field :title %> + <%= f.label :body, "Content" %> + <%= f.text_area :body, :cols=>50, :rows=>6 %> + <% end %> +
diff --git a/test/dummy-2/app/views/notes/mail/select_note.html.erb b/test/dummy-2/app/views/notes/mail/select_note.html.erb new file mode 100644 index 0000000..b0589e2 --- /dev/null +++ b/test/dummy-2/app/views/notes/mail/select_note.html.erb @@ -0,0 +1,19 @@ + +<% + if current_ma_user.role.upcase.split(',').include?("A") + note= Note.all.desc(:created_at) +else + note= Note.where(user: current_ma_user).desc(:created_at) +end +%> +
+ <%= label_tag :email %> +
+
+ <%= text_field_tag :email, @identity.try(:email) %> +
+
+ <%= label_tag :title, 'Select Note' , :class => "ui_input_text" %> +
+
+ <%= select_tag :id, options_from_collection_for_select(note, :id, :title), "notee-menu"=>"false" %> diff --git a/test/dummy-2/app/views/notes/mail/show.html.haml b/test/dummy-2/app/views/notes/mail/show.html.haml new file mode 100644 index 0000000..c14d640 --- /dev/null +++ b/test/dummy-2/app/views/notes/mail/show.html.haml @@ -0,0 +1,13 @@ +- title @note.title +- description @note.body + +- @title= 'Show Note' +- doc = Note.find_by :id => $xvars["select_note"]["id"] += fields_for doc do |f| + = f.label :title, "Title" + = f.text_field :title + %br/ + = f.label :body, "Body Content" + = f.cktext_area :body, :cols=>50, :rows=>6 + += 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" } diff --git a/test/dummy-2/app/views/notes/my.haml b/test/dummy-2/app/views/notes/my.haml new file mode 100644 index 0000000..90317d5 --- /dev/null +++ b/test/dummy-2/app/views/notes/my.haml @@ -0,0 +1,21 @@ +- @title= "My Notes" +%P +- @page_title = 'My Notes' += paginate @notes +%table{:class=>"module-table", :data-mode => "reflow", :data-role => "table"} + %tr + %th Title + %th Body + %th Created + %th Updated + %th Delete + %th Edit + - @notes.each do |note| + %tr + %td= link_to note.title, :controller=>"notes", :action=>"show", :id=>note.id + %td= note.body + %td= note.created_at.strftime('%m/%d/%Y') + %td= note.updated_at.strftime('%m/%d/%Y') + %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}';}" + %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" } + diff --git a/test/dummy-2/app/views/notes/new/new_note.html.erb b/test/dummy-2/app/views/notes/new/new_note.html.erb new file mode 100644 index 0000000..98ee11a --- /dev/null +++ b/test/dummy-2/app/views/notes/new/new_note.html.erb @@ -0,0 +1,13 @@ +<%- @title= 'New Note' %> +<% + doc = Note.new :issue_on=> Date.today, :process_at => Time.now +%> +
+ + <%= fields_for doc, validate: true do |f| %> + <%= f.label :title, "Title" %> + <%= f.text_field :title, :required => true %>
+ <%= f.label :body, "Body Content" %> + <%= f.text_area :body, :cols=>50, :rows=>6, required: true %> +<% end %> +
diff --git a/test/dummy-2/app/views/notes/show.haml b/test/dummy-2/app/views/notes/show.haml new file mode 100644 index 0000000..bc49be0 --- /dev/null +++ b/test/dummy-2/app/views/notes/show.haml @@ -0,0 +1,10 @@ +- @title= 'Show Note' +- doc = Note.find_by :id => @note.id + +%h3.ui-bar.ui-bar-a.ui-corner-all Title: #{@note.title} +       +.ui-body.ui-body-a.ui-corner-all +            + %p #{@note.body} + + = 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" } diff --git a/test/dummy-2/app/views/notes/xedit/edit_note.html.erb b/test/dummy-2/app/views/notes/xedit/edit_note.html.erb new file mode 100644 index 0000000..7a3bf36 --- /dev/null +++ b/test/dummy-2/app/views/notes/xedit/edit_note.html.erb @@ -0,0 +1,10 @@ +<%- @title= 'Edit Note' %> +<% + doc = Note.find_by :id=> $xvars["p"]["note_id"] +%> +<%= fields_for doc do |f| %> + <%= f.label :title, "Title" %> + <%= f.text_field :title %>
+ <%= f.label :body, "Body Content" %> + <%= f.text_area :body, :cols=>50, :rows=>6 %> +<% end %> diff --git a/test/dummy-2/app/views/password_resets/edit.html.erb b/test/dummy-2/app/views/password_resets/edit.html.erb new file mode 100644 index 0000000..ea5e439 --- /dev/null +++ b/test/dummy-2/app/views/password_resets/edit.html.erb @@ -0,0 +1,21 @@ +<%= form_for @user, :url => password_reset_path(params[:id]) do |f| %> + <% if @user.errors.any? %> +
+

Form is invalid

+ +
+ <% end %> +
+ <%= f.label :password %> + <%= f.password_field :password %> +
+
+ <%= f.label :password_confirmation %> + <%= f.password_field :password_confirmation %> +
+
<%= f.submit "Update Password" %>
+<% end %> \ No newline at end of file diff --git a/test/dummy-2/app/views/password_resets/new.html.haml b/test/dummy-2/app/views/password_resets/new.html.haml new file mode 100644 index 0000000..e0c5c35 --- /dev/null +++ b/test/dummy-2/app/views/password_resets/new.html.haml @@ -0,0 +1,11 @@ +.container + .signup-form + .sign_in + = form_tag password_resets_path, :method => :post do + .form-group.form-control + = label_tag :email + = text_field_tag :email, params[:email] + %button.btn.btn-success.btn-block.actions{:type => "submit"} + %i.fas.fa-sign-in-alt + Reset Password + diff --git a/test/dummy/app/views/sessions/new-bak.html.haml b/test/dummy-2/app/views/sessions/new-bak.html.haml similarity index 100% rename from test/dummy/app/views/sessions/new-bak.html.haml rename to test/dummy-2/app/views/sessions/new-bak.html.haml diff --git a/test/dummy-2/app/views/sessions/new.html.haml b/test/dummy-2/app/views/sessions/new.html.haml new file mode 100644 index 0000000..34bf93b --- /dev/null +++ b/test/dummy-2/app/views/sessions/new.html.haml @@ -0,0 +1,35 @@ +.container + .signup-form + = form_tag "/auth/identity/callback", {'data-ajax'=>'false'} do + %h1.h3.mb-3.font-weight-normal{:style => "text-align: center"} Sign in + %p.hint-text Sign in with your social media account or Username + .social-btn.text-center + %a.btn.btn-primary.btn-lg{:href => "/auth/facebook"} + %i.fa.fa-facebook + Facebook + %a.btn.btn-info.btn-lg{:href => "#"} + %i.fa.fa-twitter + Twitter + %a.btn.btn-danger.btn-lg{:href => "/auth/google_oauth2"} + %i.fa.fa-google + Google + .or-seperator + %b or + .sign_in + .label-warning + = flash[:alert] + .form-group.form-control + = label_tag :auth_key, "User name" + = text_field_tag :auth_key + .form-group.form-control + = label_tag :password, "Password" + = password_field_tag :password + .form-group + = label_tag :remember_me + = check_box_tag :remember_me, 1, params.permit[:remember_me] + %button.btn.btn-success.btn-block.actions{:type => "submit"} + %i.fas.fa-sign-in-alt + Sign in + = link_to 'Forgotten password?', new_password_reset_path, data: {icon: 'info', mini: 'true', role: 'button'} + %hr/ + diff --git a/test/dummy-2/app/views/sitemap/index.xml.haml b/test/dummy-2/app/views/sitemap/index.xml.haml new file mode 100644 index 0000000..7ebe707 --- /dev/null +++ b/test/dummy-2/app/views/sitemap/index.xml.haml @@ -0,0 +1,10 @@ +/= From https://makandracards.com/makandra/689-know-your-haml-comments + +!!! XML +%urlset{:xmlns => "http://www.sitemaps.org/schemas/sitemap/0.9"} + - for article in @articles + %url + %loc #{article_url(article)} + %lastmod=article.updated_at.strftime('%Y-%m-%d') + %changefreq monthly + %priority 0.5 \ No newline at end of file diff --git a/test/dummy-2/app/views/user_mailer/password_reset.html.haml b/test/dummy-2/app/views/user_mailer/password_reset.html.haml new file mode 100644 index 0000000..52001fe --- /dev/null +++ b/test/dummy-2/app/views/user_mailer/password_reset.html.haml @@ -0,0 +1,3 @@ +To reset your password, click the URL below. += edit_password_reset_url(@user.password_reset_token) +If you did not request your password to be reset, just ignore this email and your password will continue to stay the same. diff --git a/test/dummy-2/app/views/user_mailer/password_reset.text.erb b/test/dummy-2/app/views/user_mailer/password_reset.text.erb new file mode 100644 index 0000000..52001fe --- /dev/null +++ b/test/dummy-2/app/views/user_mailer/password_reset.text.erb @@ -0,0 +1,3 @@ +To reset your password, click the URL below. += edit_password_reset_url(@user.password_reset_token) +If you did not request your password to be reset, just ignore this email and your password will continue to stay the same. diff --git a/test/dummy-2/app/views/user_mailer/password_reset.text.haml b/test/dummy-2/app/views/user_mailer/password_reset.text.haml new file mode 100644 index 0000000..b9f400b --- /dev/null +++ b/test/dummy-2/app/views/user_mailer/password_reset.text.haml @@ -0,0 +1,3 @@ +UserMailer#password_reset + += @greeting + ", find me in app/views/user_mailer/password_reset.text.haml" diff --git a/test/dummy-2/app/views/users/index.haml b/test/dummy-2/app/views/users/index.haml new file mode 100644 index 0000000..95c7aeb --- /dev/null +++ b/test/dummy-2/app/views/users/index.haml @@ -0,0 +1,13 @@ +.field(data-role="fieldcontain") + %label.ui-input-text Name + = b current_ma_user.code +.field(data-role="fieldcontain") + %label.ui-input-text Email + = b current_ma_user.email +.field(data-role="fieldcontain") + %label.ui-input-text Role + = b current_ma_user.role + +- if @xmains + %h2 Pending Tasks + = render :partial=>"jinda/pending_page", :locals=>{:xmains=>@xmains} diff --git a/test/dummy-2/app/views/users/pwd/enter.html.erb b/test/dummy-2/app/views/users/pwd/enter.html.erb new file mode 100644 index 0000000..664808e --- /dev/null +++ b/test/dummy-2/app/views/users/pwd/enter.html.erb @@ -0,0 +1,6 @@ +<%= label_tag :epass, "Existing password" %> +<%= password_field_tag :epass %> +<%= label_tag :npass, "New password" %> +<%= password_field_tag :npass %> +<%= label_tag :npass_confirm, "New password confirmation" %> +<%= password_field_tag :npass_confirm %> diff --git a/test/dummy-2/app/views/users/user/enter_user.html.erb b/test/dummy-2/app/views/users/user/enter_user.html.erb new file mode 100644 index 0000000..8ae8bfe --- /dev/null +++ b/test/dummy-2/app/views/users/user/enter_user.html.erb @@ -0,0 +1,10 @@ +<% + user = current_ma_user +%> +

<%= user.code %>

+<%= fields_for user do |f| %> + <%= f.label :email, "Email" %> + <%= f.text_field :email %> + <%= f.label :image, "image link" %> + <%= f.text_field :image%> +<% end %> diff --git a/test/dummy-2/bin/rails b/test/dummy-2/bin/rails new file mode 100755 index 0000000..efc0377 --- /dev/null +++ b/test/dummy-2/bin/rails @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby +APP_PATH = File.expand_path("../config/application", __dir__) +require_relative "../config/boot" +require "rails/commands" diff --git a/test/dummy-2/bin/rake b/test/dummy-2/bin/rake new file mode 100755 index 0000000..4fbf10b --- /dev/null +++ b/test/dummy-2/bin/rake @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby +require_relative "../config/boot" +require "rake" +Rake.application.run diff --git a/test/dummy-2/bin/setup b/test/dummy-2/bin/setup new file mode 100755 index 0000000..57b65c8 --- /dev/null +++ b/test/dummy-2/bin/setup @@ -0,0 +1,25 @@ +#!/usr/bin/env ruby +require "fileutils" + +# path to your application root. +APP_ROOT = File.expand_path("..", __dir__) + +def system!(*args) + system(*args) || abort("\n== Command #{args} failed ==") +end + +FileUtils.chdir APP_ROOT do + # This script is a way to set up or update your development environment automatically. + # This script is idempotent, so that you can run it at any time and get an expectable outcome. + # Add necessary setup steps to this file. + + puts "== Installing dependencies ==" + system! "gem install bundler --conservative" + system("bundle check") || system!("bundle install") + + puts "\n== Removing old logs and tempfiles ==" + system! "bin/rails log:clear tmp:clear" + + puts "\n== Restarting application server ==" + system! "bin/rails restart" +end diff --git a/test/dummy-2/config.ru b/test/dummy-2/config.ru new file mode 100644 index 0000000..4a3c09a --- /dev/null +++ b/test/dummy-2/config.ru @@ -0,0 +1,6 @@ +# This file is used by Rack-based servers to start the application. + +require_relative "config/environment" + +run Rails.application +Rails.application.load_server diff --git a/test/dummy-2/config/application.rb b/test/dummy-2/config/application.rb new file mode 100644 index 0000000..3c74f92 --- /dev/null +++ b/test/dummy-2/config/application.rb @@ -0,0 +1,61 @@ +require_relative "boot" + +require "rails" +# Pick the frameworks you want: +require "active_model/railtie" +require "active_job/railtie" +# require "active_record/railtie" +# require "active_storage/engine" +require "action_controller/railtie" +require "action_mailer/railtie" +# require "action_mailbox/engine" +# require "action_text/engine" +require "action_view/railtie" +require "action_cable/engine" +# require "rails/test_unit/railtie" + +# Require the gems listed in Gemfile, including any gems +# you've limited to :test, :development, or :production. +Bundler.require(*Rails.groups) + +module Dummy + class Application < Rails::Application + + # Jinda default + config.generators do |g| + g.orm :mongoid + g.template_engine :haml + g.test_framework :rspec + g.integration_tool :rspec + end + + # config time zone + config.time_zone = "Central Time (US & Canada)" + + # gmail config + # config.action_mailer.delivery_method = :smtp + # config.action_mailer.smtp_settings = { + # :address => "smtp.gmail.com", + # :port => 587, + # :user_name => 'user@gmail.com', + # :password => 'secret', + # :authentication => 'plain', + # :enable_starttls_auto => true } + # config.action_mailer.raise_delivery_errors = true + # config.action_mailer.perform_deliveries = true + + # Initialize configuration defaults for originally generated Rails version. + config.load_defaults 7.0 + + # Configuration for the application, engines, and railties goes here. + # + # These settings can be overridden in specific environments using the files + # in config/environments, which are processed later. + # + # config.time_zone = "Central Time (US & Canada)" + # config.eager_load_paths << Rails.root.join("extras") + + # Don't generate system test files. + config.generators.system_tests = nil + end +end diff --git a/test/dummy-2/config/boot.rb b/test/dummy-2/config/boot.rb new file mode 100644 index 0000000..988a5dd --- /dev/null +++ b/test/dummy-2/config/boot.rb @@ -0,0 +1,4 @@ +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +require "bundler/setup" # Set up gems listed in the Gemfile. +require "bootsnap/setup" # Speed up boot time by caching expensive operations. diff --git a/test/dummy-2/config/cable.yml b/test/dummy-2/config/cable.yml new file mode 100644 index 0000000..98367f8 --- /dev/null +++ b/test/dummy-2/config/cable.yml @@ -0,0 +1,10 @@ +development: + adapter: async + +test: + adapter: test + +production: + adapter: redis + url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> + channel_prefix: dummy_production diff --git a/test/dummy-2/config/cloudinary.yml b/test/dummy-2/config/cloudinary.yml new file mode 100644 index 0000000..a63dafc --- /dev/null +++ b/test/dummy-2/config/cloudinary.yml @@ -0,0 +1,9 @@ +development: + cloud_name: "sample" + api_key: "874837483274837" + api_secret: "a676b67565c6767a6767d6767f676fe1" + +production: + cloud_name: "sample" + api_key: "874837483274837" + api_secret: "a676b67565c6767a6767d6767f676fe1" diff --git a/test/dummy-2/config/credentials.yml.enc b/test/dummy-2/config/credentials.yml.enc new file mode 100644 index 0000000..29427e3 --- /dev/null +++ b/test/dummy-2/config/credentials.yml.enc @@ -0,0 +1 @@ +rKJOMS7I0Z2/6HTmUtZoHpiofv1hKjyG7PP/xif21dRzKKgCueZV6ImjpU0HdupQYnIheFTCoNdcQmzvzfl0oZaUr03Ox6pf/KGVkEUAwuBPAt76UzNrElzKR1LOctwpmQ6gqCT4AR26lGhpIQDC/XpzT6b4A05C19Xq6vwS4pYBPz119XcKB7dVVGfzhY79NndT1ifklAmWqw2qvoqDp9BdTPpI+HdtjZrbYV8KL0l34lqV/Cf8x2LkvNQjcnCQ8e8tCjNDBFbfQbNrAxQEC832RrQEZ4stK+miW3n+5tEMAwBg7lxyrI8OosHHn5GKnL5geG1NPIosSfgdiFnv0TGGRlaS2d8Is0c0LpWTAMoUN20xl6w6R2HMkumfXLmJLhZEfeZVsLwE11jjSxRLKd8hciqV+W9IqNqV--4BEM1/9dfS1odAZT--IrPmtHRIpZytag1DsyZDSg== \ No newline at end of file diff --git a/test/dummy-2/config/environment.rb b/test/dummy-2/config/environment.rb new file mode 100644 index 0000000..9397e5a --- /dev/null +++ b/test/dummy-2/config/environment.rb @@ -0,0 +1,11 @@ +# Load the Rails application. +require_relative "application" + +# Initialize the Rails application. +Rails.application.initialize! + +# hack to fix cloudinary error https://github.com/archiloque/rest-client/issues/141 +class Hash + remove_method :read +rescue +end diff --git a/test/dummy-2/config/environments/development.rb b/test/dummy-2/config/environments/development.rb new file mode 100644 index 0000000..7feeea1 --- /dev/null +++ b/test/dummy-2/config/environments/development.rb @@ -0,0 +1,62 @@ +require "active_support/core_ext/integer/time" + +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # In the development environment your application's code is reloaded any time + # it changes. This slows down response time but is perfect for development + # since you don't have to restart the web server when you make code changes. + config.cache_classes = false + + # Do not eager load code on boot. + config.eager_load = false + + # Show full error reports. + config.consider_all_requests_local = true + + # Enable server timing + config.server_timing = true + + # Enable/disable caching. By default caching is disabled. + # Run rails dev:cache to toggle caching. + if Rails.root.join("tmp/caching-dev.txt").exist? + config.action_controller.perform_caching = true + config.action_controller.enable_fragment_cache_logging = true + + config.cache_store = :memory_store + config.public_file_server.headers = { + "Cache-Control" => "public, max-age=#{2.days.to_i}" + } + else + config.action_controller.perform_caching = false + + config.cache_store = :null_store + end + + # Don't care if the mailer can't send. + config.action_mailer.raise_delivery_errors = false + config.assets.check_precompiled_asset = false + + config.action_mailer.perform_caching = false + + # Print deprecation notices to the Rails logger. + config.active_support.deprecation = :log + + # Raise exceptions for disallowed deprecations. + config.active_support.disallowed_deprecation = :raise + + # Tell Active Support which deprecation messages to disallow. + config.active_support.disallowed_deprecation_warnings = [] + + # Suppress logger output for asset requests. + config.assets.quiet = true + + # Raises error for missing translations. + # config.i18n.raise_on_missing_translations = true + + # Annotate rendered view with file names. + # config.action_view.annotate_rendered_view_with_filenames = true + + # Uncomment if you wish to allow Action Cable access from any origin. + # config.action_cable.disable_request_forgery_protection = true +end diff --git a/test/dummy-2/config/environments/production.rb b/test/dummy-2/config/environments/production.rb new file mode 100644 index 0000000..806b190 --- /dev/null +++ b/test/dummy-2/config/environments/production.rb @@ -0,0 +1,88 @@ +require "active_support/core_ext/integer/time" + +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # Code is not reloaded between requests. + config.cache_classes = true + + # Eager load code on boot. This eager loads most of Rails and + # your application in memory, allowing both threaded web servers + # and those relying on copy on write to perform better. + # Rake tasks automatically ignore this option for performance. + config.eager_load = true + + # Full error reports are disabled and caching is turned on. + config.consider_all_requests_local = false + config.action_controller.perform_caching = true + + # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"] + # or in config/master.key. This key is used to decrypt credentials (and other encrypted files). + # config.require_master_key = true + + # Disable serving static files from the `/public` folder by default since + # Apache or NGINX already handles this. + config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? + + # Compress CSS using a preprocessor. + # config.assets.css_compressor = :sass + + # Do not fallback to assets pipeline if a precompiled asset is missed. + config.assets.compile = false + config.assets.compile = true + + # Enable serving of images, stylesheets, and JavaScripts from an asset server. + # config.asset_host = "http://assets.example.com" + + # Specifies the header that your server uses for sending files. + # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache + # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX + + # Mount Action Cable outside main process or domain. + # config.action_cable.mount_path = nil + # config.action_cable.url = "wss://example.com/cable" + # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ] + + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. + # config.force_ssl = true + + # Include generic and useful information about system operation, but avoid logging too much + # information to avoid inadvertent exposure of personally identifiable information (PII). + config.log_level = :info + + # Prepend all log lines with the following tags. + config.log_tags = [ :request_id ] + + # Use a different cache store in production. + # config.cache_store = :mem_cache_store + + # Use a real queuing backend for Active Job (and separate queues per environment). + # config.active_job.queue_adapter = :resque + # config.active_job.queue_name_prefix = "dummy_production" + + config.action_mailer.perform_caching = false + + # Ignore bad email addresses and do not raise email delivery errors. + # Set this to true and configure the email server for immediate delivery to raise delivery errors. + # config.action_mailer.raise_delivery_errors = false + + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to + # the I18n.default_locale when a translation cannot be found). + config.i18n.fallbacks = true + + # Don't log any deprecations. + config.active_support.report_deprecations = false + + # Use default logging formatter so that PID and timestamp are not suppressed. + config.log_formatter = ::Logger::Formatter.new + + # Use a different logger for distributed setups. + # require "syslog/logger" + # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name") + + if ENV["RAILS_LOG_TO_STDOUT"].present? + logger = ActiveSupport::Logger.new(STDOUT) + logger.formatter = config.log_formatter + config.logger = ActiveSupport::TaggedLogging.new(logger) + end +end diff --git a/test/dummy-2/config/environments/test.rb b/test/dummy-2/config/environments/test.rb new file mode 100644 index 0000000..e57c036 --- /dev/null +++ b/test/dummy-2/config/environments/test.rb @@ -0,0 +1,57 @@ +require "active_support/core_ext/integer/time" + +# The test environment is used exclusively to run your application's +# test suite. You never need to work with it otherwise. Remember that +# your test database is "scratch space" for the test suite and is wiped +# and recreated between test runs. Don't rely on the data there! + +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # Turn false under Spring and add config.action_view.cache_template_loading = true. + config.cache_classes = true + + # Eager loading loads your whole application. When running a single test locally, + # this probably isn't necessary. It's a good idea to do in a continuous integration + # system, or in some way before deploying your code. + config.eager_load = ENV["CI"].present? + + # Configure public file server for tests with Cache-Control for performance. + config.public_file_server.enabled = true + config.public_file_server.headers = { + "Cache-Control" => "public, max-age=#{1.hour.to_i}" + } + + # Show full error reports and disable caching. + config.consider_all_requests_local = true + config.action_controller.perform_caching = false + config.cache_store = :null_store + + # Raise exceptions instead of rendering exception templates. + config.action_dispatch.show_exceptions = false + + # Disable request forgery protection in test environment. + config.action_controller.allow_forgery_protection = false + + config.action_mailer.perform_caching = false + + # Tell Action Mailer not to deliver emails to the real world. + # The :test delivery method accumulates sent emails in the + # ActionMailer::Base.deliveries array. + config.action_mailer.delivery_method = :test + + # Print deprecation notices to the stderr. + config.active_support.deprecation = :stderr + + # Raise exceptions for disallowed deprecations. + config.active_support.disallowed_deprecation = :raise + + # Tell Active Support which deprecation messages to disallow. + config.active_support.disallowed_deprecation_warnings = [] + + # Raises error for missing translations. + # config.i18n.raise_on_missing_translations = true + + # Annotate rendered view with file names. + # config.action_view.annotate_rendered_view_with_filenames = true +end diff --git a/test/dummy-2/config/initializers/assets.rb b/test/dummy-2/config/initializers/assets.rb new file mode 100644 index 0000000..2eeef96 --- /dev/null +++ b/test/dummy-2/config/initializers/assets.rb @@ -0,0 +1,12 @@ +# Be sure to restart your server when you modify this file. + +# Version of your assets, change this if you want to expire all your assets. +Rails.application.config.assets.version = "1.0" + +# Add additional assets to the asset load path. +# Rails.application.config.assets.paths << Emoji.images_path + +# Precompile additional assets. +# application.js, application.css, and all non-JS/CSS in the app/assets +# folder are already added. +# Rails.application.config.assets.precompile += %w( admin.js admin.css ) diff --git a/test/dummy-2/config/initializers/content_security_policy.rb b/test/dummy-2/config/initializers/content_security_policy.rb new file mode 100644 index 0000000..54f47cf --- /dev/null +++ b/test/dummy-2/config/initializers/content_security_policy.rb @@ -0,0 +1,25 @@ +# Be sure to restart your server when you modify this file. + +# Define an application-wide content security policy. +# See the Securing Rails Applications Guide for more information: +# https://guides.rubyonrails.org/security.html#content-security-policy-header + +# Rails.application.configure do +# config.content_security_policy do |policy| +# policy.default_src :self, :https +# policy.font_src :self, :https, :data +# policy.img_src :self, :https, :data +# policy.object_src :none +# policy.script_src :self, :https +# policy.style_src :self, :https +# # Specify URI for violation reports +# # policy.report_uri "/csp-violation-report-endpoint" +# end +# +# # Generate session nonces for permitted importmap and inline scripts +# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s } +# config.content_security_policy_nonce_directives = %w(script-src) +# +# # Report violations without enforcing the policy. +# # config.content_security_policy_report_only = true +# end diff --git a/test/dummy-2/config/initializers/filter_parameter_logging.rb b/test/dummy-2/config/initializers/filter_parameter_logging.rb new file mode 100644 index 0000000..adc6568 --- /dev/null +++ b/test/dummy-2/config/initializers/filter_parameter_logging.rb @@ -0,0 +1,8 @@ +# Be sure to restart your server when you modify this file. + +# Configure parameters to be filtered from the log file. Use this to limit dissemination of +# sensitive information. See the ActiveSupport::ParameterFilter documentation for supported +# notations and behaviors. +Rails.application.config.filter_parameters += [ + :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn +] diff --git a/test/dummy-2/config/initializers/fix_mongoid_generator.rb-org b/test/dummy-2/config/initializers/fix_mongoid_generator.rb-org new file mode 100644 index 0000000..2800014 --- /dev/null +++ b/test/dummy-2/config/initializers/fix_mongoid_generator.rb-org @@ -0,0 +1,14 @@ +require 'rails/generators' +require 'rails/generators/mongoid/config/config_generator' + +if Gem::Version.new(Mongoid::VERSION) >= Gem::Version.new('7.3.0') + warn("You may need not this file: #{__FILE__}\nAfter https://github.com/mongodb/mongoid/pull/4953 is released.") +end +Mongoid::Generators::ConfigGenerator.class_eval do + def app_name + # Rails::Application.subclasses.first.parent.to_s.underscore + # No more Module#parent + # See https://github.com/rails/rails/commit/167b4153cac0069a21e0bb9689cb16f34f6abbaa + Rails::Application.subclasses.first.module_parent_name.underscore + end +end diff --git a/test/dummy-2/config/initializers/inflections.rb b/test/dummy-2/config/initializers/inflections.rb new file mode 100644 index 0000000..3860f65 --- /dev/null +++ b/test/dummy-2/config/initializers/inflections.rb @@ -0,0 +1,16 @@ +# Be sure to restart your server when you modify this file. + +# Add new inflection rules using the following format. Inflections +# are locale specific, and you may define rules for as many different +# locales as you wish. All of these examples are active by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.plural /^(ox)$/i, "\\1en" +# inflect.singular /^(ox)en/i, "\\1" +# inflect.irregular "person", "people" +# inflect.uncountable %w( fish sheep ) +# end + +# These inflection rules are supported but not enabled by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.acronym "RESTful" +# end diff --git a/test/dummy-2/config/initializers/jinda.rb b/test/dummy-2/config/initializers/jinda.rb new file mode 100644 index 0000000..727f133 --- /dev/null +++ b/test/dummy-2/config/initializers/jinda.rb @@ -0,0 +1,14 @@ +# encoding: utf-8 +MM = "#{Rails.root}/app/jinda/index.mm" +DEFAULT_TITLE = 'Jinda' +DEFAULT_HEADER = 'Jinda' +DEFAULT_DESCRIPTION = 'Rails Application Generator' +DEFAULT_KEYWORDS = %w[Jinda Rails ruby Generator, Prateep Kul] +GMAP = false +# ADSENSE = true +NEXT = "Next >" +# comment IMAGE_LOCATION to use cloudinary (specify params in config/cloudinary.yml) +IMAGE_LOCATION = "upload" +# for debugging +# DONT_SEND_MAIL = true + diff --git a/test/dummy-2/config/initializers/mongoid.rb b/test/dummy-2/config/initializers/mongoid.rb new file mode 100644 index 0000000..1680d93 --- /dev/null +++ b/test/dummy-2/config/initializers/mongoid.rb @@ -0,0 +1,10 @@ +# encoding: utf-8 + # + # Mongoid 6 follows the new pattern of AR5 requiring a belongs_to relation to always require its parent + # belongs_to` will now trigger a validation error by default if the association is not present. + # You can turn this off on a per-association basis with `optional: true`. + # (Note this new default only applies to new Rails apps that will be generated with + # `config.active_record.belongs_to_required_by_default = true` in initializer.) + # + Mongoid::Config.belongs_to_required_by_default = false + diff --git a/test/dummy/config/initializers/omniauth.rb b/test/dummy-2/config/initializers/omniauth.rb similarity index 100% rename from test/dummy/config/initializers/omniauth.rb rename to test/dummy-2/config/initializers/omniauth.rb diff --git a/test/dummy-2/config/initializers/permissions_policy.rb b/test/dummy-2/config/initializers/permissions_policy.rb new file mode 100644 index 0000000..00f64d7 --- /dev/null +++ b/test/dummy-2/config/initializers/permissions_policy.rb @@ -0,0 +1,11 @@ +# Define an application-wide HTTP permissions policy. For further +# information see https://developers.google.com/web/updates/2018/06/feature-policy +# +# Rails.application.config.permissions_policy do |f| +# f.camera :none +# f.gyroscope :none +# f.microphone :none +# f.usb :none +# f.fullscreen :self +# f.payment :self, "https://secure.example.com" +# end diff --git a/test/dummy-2/config/locales/en.yml b/test/dummy-2/config/locales/en.yml new file mode 100644 index 0000000..8ca56fc --- /dev/null +++ b/test/dummy-2/config/locales/en.yml @@ -0,0 +1,33 @@ +# Files in the config/locales directory are used for internationalization +# and are automatically loaded by Rails. If you want to use locales other +# than English, add the necessary files in this directory. +# +# To use the locales, use `I18n.t`: +# +# I18n.t "hello" +# +# In views, this is aliased to just `t`: +# +# <%= t("hello") %> +# +# To use a different locale, set it with `I18n.locale`: +# +# I18n.locale = :es +# +# This would use the information in config/locales/es.yml. +# +# The following keys must be escaped otherwise they will not be retrieved by +# the default I18n backend: +# +# true, false, on, off, yes, no +# +# Instead, surround them with single quotes. +# +# en: +# "true": "foo" +# +# To learn more, please read the Rails Internationalization guide +# available at https://guides.rubyonrails.org/i18n.html. + +en: + hello: "Hello world" diff --git a/test/dummy-2/config/mongoid.yml b/test/dummy-2/config/mongoid.yml new file mode 100644 index 0000000..f37ff3d --- /dev/null +++ b/test/dummy-2/config/mongoid.yml @@ -0,0 +1,196 @@ +development: + # Configure available database clients. (required) + clients: + # Defines the default client. (required) + default: + # Mongoid can connect to a URI accepted by the driver: + # uri: mongodb://user:password@mongodb.domain.com:27017/dummy_development + + # Otherwise define the parameters separately. + # This defines the name of the default database that Mongoid can connect to. + # (required). + database: dummy_development + # Provides the hosts the default client can connect to. Must be an array + # of host:port pairs. (required) + hosts: + - localhost:27017 + options: + # Note that all options listed below are Ruby driver client options (the mongo gem). + # Please refer to the driver documentation of the version of the mongo gem you are using + # for the most up-to-date list of options. + # + # Change the default write concern. (default = { w: 1 }) + # write: + # w: 1 + + # Change the default read preference. Valid options for mode are: :secondary, + # :secondary_preferred, :primary, :primary_preferred, :nearest + # (default: primary) + # read: + # mode: :secondary_preferred + # tag_sets: + # - use: web + + # The name of the user for authentication. + # user: 'user' + + # The password of the user for authentication. + # password: 'password' + + # The user's database roles. + # roles: + # - 'dbOwner' + + # Change the default authentication mechanism. Valid options are: :scram, + # :mongodb_cr, :mongodb_x509, and :plain. Note that all authentication + # mechanisms require username and password, with the exception of :mongodb_x509. + # Default on mongoDB 3.0 is :scram, default on 2.4 and 2.6 is :plain. + # auth_mech: :scram + + # The database or source to authenticate the user against. + # (default: the database specified above or admin) + # auth_source: admin + + # Force a the driver cluster to behave in a certain manner instead of auto- + # discovering. Can be one of: :direct, :replica_set, :sharded. Set to :direct + # when connecting to hidden members of a replica set. + # connect: :direct + + # Changes the default time in seconds the server monitors refresh their status + # via hello commands. (default: 10) + # heartbeat_frequency: 10 + + # The time in seconds for selecting servers for a near read preference. (default: 0.015) + # local_threshold: 0.015 + + # The timeout in seconds for selecting a server for an operation. (default: 30) + # server_selection_timeout: 30 + + # The maximum number of connections in the connection pool. (default: 5) + # max_pool_size: 5 + + # The minimum number of connections in the connection pool. (default: 1) + # min_pool_size: 1 + + # The time to wait, in seconds, in the connection pool for a connection + # to be checked in before timing out. (default: 5) + # wait_queue_timeout: 5 + + # The time to wait to establish a connection before timing out, in seconds. + # (default: 10) + # connect_timeout: 10 + + # How long to wait for a response for each operation sent to the + # server. This timeout should be set to a value larger than the + # processing time for the longest operation that will be executed + # by the application. Note that this is a client-side timeout; + # the server may continue executing an operation after the client + # aborts it with the SocketTimeout exception. + # (default: nil, meaning no timeout) + # socket_timeout: 5 + + # The name of the replica set to connect to. Servers provided as seeds that do + # not belong to this replica set will be ignored. + # replica_set: name + + # Whether to connect to the servers via ssl. (default: false) + # ssl: true + + # The certificate file used to identify the connection against MongoDB. + # ssl_cert: /path/to/my.cert + + # The private keyfile used to identify the connection against MongoDB. + # Note that even if the key is stored in the same file as the certificate, + # both need to be explicitly specified. + # ssl_key: /path/to/my.key + + # A passphrase for the private key. + # ssl_key_pass_phrase: password + + # Whether to do peer certification validation. (default: true) + # ssl_verify: true + + # The file containing concatenated certificate authority certificates + # used to validate certs passed from the other end of the connection. + # ssl_ca_cert: /path/to/ca.cert + + # Whether to truncate long log lines. (default: true) + # truncate_logs: true + + # Configure Mongoid specific options. (optional) + options: + # Application name that is printed to the mongodb logs upon establishing + # a connection in server versions >= 3.4. Note that the name cannot + # exceed 128 bytes. It is also used as the database name if the + # database name is not explicitly defined. (default: nil) + # app_name: MyApplicationName + +production: + clients: + default: + uri: <%= ENV['MONGODB_URI'] %> + options: + raise_not_found_error: false + belongs_to_required_by_default: false + + + # Mark belongs_to associations as required by default, so that saving a + # model with a missing belongs_to association will trigger a validation + # error. (default: true) + # belongs_to_required_by_default: true + belongs_to_required_by_default: false + + # Raise an exception when a field is redefined. (default: false) + # duplicate_fields_exception: false + + # Include the root model name in json serialization. (default: false) + # include_root_in_json: false + + # Include the _type field in serialization. (default: false) + # include_type_for_serialization: false + + # Whether to join nested persistence contexts for atomic operations + # to parent contexts by default. (default: false) + # join_contexts: false + + # Set the Mongoid and Ruby driver log levels when Mongoid is not using + # Ruby on Rails logger instance. (default: :info) + # log_level: :info + + # Preload all models in development, needed when models use + # inheritance. (default: false) + # preload_models: false + + # Raise an error when performing a #find and the document is not found. + # (default: true) + # raise_not_found_error: true + raise_not_found_error: false + + # Raise an error when defining a scope with the same name as an + # existing method. (default: false) + # scope_overwrite_exception: false + + # Use ActiveSupport's time zone in time operations instead of + # the Ruby default time zone. See the time zone section below for + # further information. (default: true) + # use_activesupport_time_zone: true + + # Return stored times as UTC. See the time zone section below for + # further information. Most applications should not use this option. + # (default: false) + # use_utc: false + + # (Deprecated) In MongoDB 4.0 and earlier, set whether to create + # indexes in the background by default. (default: false) + # background_indexing: false + +test: + clients: + default: + database: dummy_test + hosts: + - localhost:27017 + options: + read: + mode: :primary + max_pool_size: 1 diff --git a/test/dummy-2/config/mongoid.yml-docker b/test/dummy-2/config/mongoid.yml-docker new file mode 100644 index 0000000..9be8e88 --- /dev/null +++ b/test/dummy-2/config/mongoid.yml-docker @@ -0,0 +1,182 @@ +development: + # Configure available database clients. (required) + clients: + # Defines the default client. (required) + default: + # Mongoid can connect to a URI accepted by the driver: + # uri: mongodb://user:password@mongodb.domain.com:27017/shop263603_development + + # Otherwise define the parameters separately. + # This defines the name of the default database that Mongoid can connect to. + # (required). + database: shop263603_development + # Provides the hosts the default client can connect to. Must be an array + # of host:port pairs. (required) + hosts: + # - localhost:27017 + - mongodb + options: + # Note that all options listed below are Ruby driver client options (the mongo gem). + # Please refer to the driver documentation of the version of the mongo gem you are using + # for the most up-to-date list of options. + # + # Change the default write concern. (default = { w: 1 }) + # write: + # w: 1 + + # Change the default read preference. Valid options for mode are: :secondary, + # :secondary_preferred, :primary, :primary_preferred, :nearest + # (default: primary) + # read: + # mode: :secondary_preferred + # tag_sets: + # - use: web + + # The name of the user for authentication. + # user: 'user' + + # The password of the user for authentication. + # password: 'password' + + # The user's database roles. + # roles: + # - 'dbOwner' + + # Change the default authentication mechanism. Valid options are: :scram, + # :mongodb_cr, :mongodb_x509, and :plain. Note that all authentication + # mechanisms require username and password, with the exception of :mongodb_x509. + # Default on mongoDB 3.0 is :scram, default on 2.4 and 2.6 is :plain. + # auth_mech: :scram + + # The database or source to authenticate the user against. + # (default: the database specified above or admin) + # auth_source: admin + + # Force a the driver cluster to behave in a certain manner instead of auto- + # discovering. Can be one of: :direct, :replica_set, :sharded. Set to :direct + # when connecting to hidden members of a replica set. + # connect: :direct + + # Changes the default time in seconds the server monitors refresh their status + # via ismaster commands. (default: 10) + # heartbeat_frequency: 10 + + # The time in seconds for selecting servers for a near read preference. (default: 0.015) + # local_threshold: 0.015 + + # The timeout in seconds for selecting a server for an operation. (default: 30) + # server_selection_timeout: 30 + + # The maximum number of connections in the connection pool. (default: 5) + # max_pool_size: 5 + + # The minimum number of connections in the connection pool. (default: 1) + # min_pool_size: 1 + + # The time to wait, in seconds, in the connection pool for a connection + # to be checked in before timing out. (default: 5) + # wait_queue_timeout: 5 + + # The time to wait to establish a connection before timing out, in seconds. + # (default: 10) + # connect_timeout: 10 + + # The timeout to wait to execute operations on a socket before raising an error. + # (default: 5) + # socket_timeout: 5 + + # The name of the replica set to connect to. Servers provided as seeds that do + # not belong to this replica set will be ignored. + # replica_set: name + + # Whether to connect to the servers via ssl. (default: false) + # ssl: true + + # The certificate file used to identify the connection against MongoDB. + # ssl_cert: /path/to/my.cert + + # The private keyfile used to identify the connection against MongoDB. + # Note that even if the key is stored in the same file as the certificate, + # both need to be explicitly specified. + # ssl_key: /path/to/my.key + + # A passphrase for the private key. + # ssl_key_pass_phrase: password + + # Whether to do peer certification validation. (default: true) + # ssl_verify: true + + # The file containing concatenated certificate authority certificates + # used to validate certs passed from the other end of the connection. + # ssl_ca_cert: /path/to/ca.cert + + # Whether to truncate long log lines. (default: true) + # truncate_logs: true + + # Configure Mongoid specific options. (optional) + options: + # Includes the root model name in json serialization. (default: false) + # include_root_in_json: false + + # Include the _type field in serialization. (default: false) + # include_type_for_serialization: false + + # Preload all models in development, needed when models use + # inheritance. (default: false) + # preload_models: false + + # Raise an error when performing a #find and the document is not found. + # (default: true) + # raise_not_found_error: true + raise_not_found_error: false + + # Raise an error when defining a scope with the same name as an + # existing method. (default: false) + # scope_overwrite_exception: false + + # Raise an error when defining a field with the same name as an + # existing method. (default: false) + # duplicate_fields_exception: false + + # Use Active Support's time zone in conversions. (default: true) + # use_activesupport_time_zone: true + + # Ensure all times are UTC in the app side. (default: false) + # use_utc: false + + # Set the Mongoid and Ruby driver log levels when not in a Rails + # environment. The Mongoid logger will be set to the Rails logger + # otherwise.(default: :info) + # log_level: :info + + # Control whether `belongs_to` association is required. By default + # `belongs_to` will trigger a validation error if the association + # is not present. (default: true) + # belongs_to_required_by_default: true + belongs_to_required_by_default: false + + # Application name that is printed to the mongodb logs upon establishing a + # connection in server versions >= 3.4. Note that the name cannot exceed 128 bytes. + # app_name: MyApplicationName + +production: + clients: + default: + uri: <%= ENV['MONGODB_URI'] %> + options: + raise_not_found_error: false + belongs_to_required_by_default: false + + + # Use background indexes by default if `background` option not specified. (default: false) + # background_indexing: false +test: + clients: + default: + database: shop263603_test + hosts: + - localhost:27017 + options: + read: + mode: :primary + max_pool_size: 1 diff --git a/test/dummy-2/config/mongoid.yml-localhost b/test/dummy-2/config/mongoid.yml-localhost new file mode 100644 index 0000000..6c0c902 --- /dev/null +++ b/test/dummy-2/config/mongoid.yml-localhost @@ -0,0 +1,182 @@ +development: + # Configure available database clients. (required) + clients: + # Defines the default client. (required) + default: + # Mongoid can connect to a URI accepted by the driver: + # uri: mongodb://user:password@mongodb.domain.com:27017/shop263603_development + + # Otherwise define the parameters separately. + # This defines the name of the default database that Mongoid can connect to. + # (required). + database: shop263603_development + # Provides the hosts the default client can connect to. Must be an array + # of host:port pairs. (required) + hosts: + - localhost:27017 + # - mongodb + options: + # Note that all options listed below are Ruby driver client options (the mongo gem). + # Please refer to the driver documentation of the version of the mongo gem you are using + # for the most up-to-date list of options. + # + # Change the default write concern. (default = { w: 1 }) + # write: + # w: 1 + + # Change the default read preference. Valid options for mode are: :secondary, + # :secondary_preferred, :primary, :primary_preferred, :nearest + # (default: primary) + # read: + # mode: :secondary_preferred + # tag_sets: + # - use: web + + # The name of the user for authentication. + # user: 'user' + + # The password of the user for authentication. + # password: 'password' + + # The user's database roles. + # roles: + # - 'dbOwner' + + # Change the default authentication mechanism. Valid options are: :scram, + # :mongodb_cr, :mongodb_x509, and :plain. Note that all authentication + # mechanisms require username and password, with the exception of :mongodb_x509. + # Default on mongoDB 3.0 is :scram, default on 2.4 and 2.6 is :plain. + # auth_mech: :scram + + # The database or source to authenticate the user against. + # (default: the database specified above or admin) + # auth_source: admin + + # Force a the driver cluster to behave in a certain manner instead of auto- + # discovering. Can be one of: :direct, :replica_set, :sharded. Set to :direct + # when connecting to hidden members of a replica set. + # connect: :direct + + # Changes the default time in seconds the server monitors refresh their status + # via ismaster commands. (default: 10) + # heartbeat_frequency: 10 + + # The time in seconds for selecting servers for a near read preference. (default: 0.015) + # local_threshold: 0.015 + + # The timeout in seconds for selecting a server for an operation. (default: 30) + # server_selection_timeout: 30 + + # The maximum number of connections in the connection pool. (default: 5) + # max_pool_size: 5 + + # The minimum number of connections in the connection pool. (default: 1) + # min_pool_size: 1 + + # The time to wait, in seconds, in the connection pool for a connection + # to be checked in before timing out. (default: 5) + # wait_queue_timeout: 5 + + # The time to wait to establish a connection before timing out, in seconds. + # (default: 10) + # connect_timeout: 10 + + # The timeout to wait to execute operations on a socket before raising an error. + # (default: 5) + # socket_timeout: 5 + + # The name of the replica set to connect to. Servers provided as seeds that do + # not belong to this replica set will be ignored. + # replica_set: name + + # Whether to connect to the servers via ssl. (default: false) + # ssl: true + + # The certificate file used to identify the connection against MongoDB. + # ssl_cert: /path/to/my.cert + + # The private keyfile used to identify the connection against MongoDB. + # Note that even if the key is stored in the same file as the certificate, + # both need to be explicitly specified. + # ssl_key: /path/to/my.key + + # A passphrase for the private key. + # ssl_key_pass_phrase: password + + # Whether to do peer certification validation. (default: true) + # ssl_verify: true + + # The file containing concatenated certificate authority certificates + # used to validate certs passed from the other end of the connection. + # ssl_ca_cert: /path/to/ca.cert + + # Whether to truncate long log lines. (default: true) + # truncate_logs: true + + # Configure Mongoid specific options. (optional) + options: + # Includes the root model name in json serialization. (default: false) + # include_root_in_json: false + + # Include the _type field in serialization. (default: false) + # include_type_for_serialization: false + + # Preload all models in development, needed when models use + # inheritance. (default: false) + # preload_models: false + + # Raise an error when performing a #find and the document is not found. + # (default: true) + # raise_not_found_error: true + raise_not_found_error: false + + # Raise an error when defining a scope with the same name as an + # existing method. (default: false) + # scope_overwrite_exception: false + + # Raise an error when defining a field with the same name as an + # existing method. (default: false) + # duplicate_fields_exception: false + + # Use Active Support's time zone in conversions. (default: true) + # use_activesupport_time_zone: true + + # Ensure all times are UTC in the app side. (default: false) + # use_utc: false + + # Set the Mongoid and Ruby driver log levels when not in a Rails + # environment. The Mongoid logger will be set to the Rails logger + # otherwise.(default: :info) + # log_level: :info + + # Control whether `belongs_to` association is required. By default + # `belongs_to` will trigger a validation error if the association + # is not present. (default: true) + # belongs_to_required_by_default: true + belongs_to_required_by_default: false + + # Application name that is printed to the mongodb logs upon establishing a + # connection in server versions >= 3.4. Note that the name cannot exceed 128 bytes. + # app_name: MyApplicationName + +production: + clients: + default: + uri: <%= ENV['MONGODB_URI'] %> + options: + raise_not_found_error: false + belongs_to_required_by_default: false + + + # Use background indexes by default if `background` option not specified. (default: false) + # background_indexing: false +test: + clients: + default: + database: shop263603_test + hosts: + - localhost:27017 + options: + read: + mode: :primary + max_pool_size: 1 diff --git a/test/dummy-2/config/puma.rb b/test/dummy-2/config/puma.rb new file mode 100644 index 0000000..daaf036 --- /dev/null +++ b/test/dummy-2/config/puma.rb @@ -0,0 +1,43 @@ +# Puma can serve each request in a thread from an internal thread pool. +# The `threads` method setting takes two numbers: a minimum and maximum. +# Any libraries that use thread pools should be configured to match +# the maximum value specified for Puma. Default is set to 5 threads for minimum +# and maximum; this matches the default thread size of Active Record. +# +max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } +min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count } +threads min_threads_count, max_threads_count + +# Specifies the `worker_timeout` threshold that Puma will use to wait before +# terminating a worker in development environments. +# +worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development" + +# Specifies the `port` that Puma will listen on to receive requests; default is 3000. +# +port ENV.fetch("PORT") { 3000 } + +# Specifies the `environment` that Puma will run in. +# +environment ENV.fetch("RAILS_ENV") { "development" } + +# Specifies the `pidfile` that Puma will use. +pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" } + +# Specifies the number of `workers` to boot in clustered mode. +# Workers are forked web server processes. If using threads and workers together +# the concurrency of the application would be max `threads` * `workers`. +# Workers do not work on JRuby or Windows (both of which do not support +# processes). +# +# workers ENV.fetch("WEB_CONCURRENCY") { 2 } + +# Use the `preload_app!` method when specifying a `workers` number. +# This directive tells Puma to first boot the application and load code +# before forking the application. This takes advantage of Copy On Write +# process behavior so workers use less memory. +# +# preload_app! + +# Allow puma to be restarted by `bin/rails restart` command. +plugin :tmp_restart diff --git a/test/dummy-2/config/routes.rb b/test/dummy-2/config/routes.rb new file mode 100644 index 0000000..06b4a51 --- /dev/null +++ b/test/dummy-2/config/routes.rb @@ -0,0 +1,7 @@ +Rails.application.routes.draw do + root :to => 'jinda#index' + # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html + + # Defines the root path route ("/") + # root "articles#index" +end diff --git a/test/dummy-2/db/seeds.rb b/test/dummy-2/db/seeds.rb new file mode 100644 index 0000000..e13ea94 --- /dev/null +++ b/test/dummy-2/db/seeds.rb @@ -0,0 +1,6 @@ +unless Identity.where(code:"admin").exists? + identity= Identity.create :code => "admin", :email => "admin@test.com", :password => "secret", + :password_confirmation => "secret" + User.create :provider => "identity", :uid => identity.id.to_s, :code => identity.code, + :email => identity.email, :role => "M,A,D" +end diff --git a/test/dummy/docker-compose.yml b/test/dummy-2/docker-compose.yml similarity index 100% rename from test/dummy/docker-compose.yml rename to test/dummy-2/docker-compose.yml diff --git a/test/dummy-2/dot/.rspec b/test/dummy-2/dot/.rspec new file mode 100644 index 0000000..89aa361 --- /dev/null +++ b/test/dummy-2/dot/.rspec @@ -0,0 +1,4 @@ +--color +--format documentation +--require spec_helper +--require rails_helper diff --git a/test/dummy-2/dot/dot.env b/test/dummy-2/dot/dot.env new file mode 100644 index 0000000..b338aa1 --- /dev/null +++ b/test/dummy-2/dot/dot.env @@ -0,0 +1,2 @@ +FACEBOOK_API="16x" +FACEBOOK_KEY="32x" diff --git a/test/dummy/entrypoint.sh b/test/dummy-2/entrypoint.sh similarity index 100% rename from test/dummy/entrypoint.sh rename to test/dummy-2/entrypoint.sh diff --git a/test/dummy-2/lib/assets/.keep b/test/dummy-2/lib/assets/.keep new file mode 100644 index 0000000..e69de29 diff --git a/test/dummy-2/lib/tasks/.keep b/test/dummy-2/lib/tasks/.keep new file mode 100644 index 0000000..e69de29 diff --git a/test/dummy-2/log/.keep b/test/dummy-2/log/.keep new file mode 100644 index 0000000..e69de29 diff --git a/test/dummy-2/public/404.html b/test/dummy-2/public/404.html new file mode 100644 index 0000000..2be3af2 --- /dev/null +++ b/test/dummy-2/public/404.html @@ -0,0 +1,67 @@ + + + + The page you were looking for doesn't exist (404) + + + + + + +
+
+

The page you were looking for doesn't exist.

+

You may have mistyped the address or the page may have moved.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/test/dummy-2/public/422.html b/test/dummy-2/public/422.html new file mode 100644 index 0000000..c08eac0 --- /dev/null +++ b/test/dummy-2/public/422.html @@ -0,0 +1,67 @@ + + + + The change you wanted was rejected (422) + + + + + + +
+
+

The change you wanted was rejected.

+

Maybe you tried to change something you didn't have access to.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/test/dummy-2/public/500.html b/test/dummy-2/public/500.html new file mode 100644 index 0000000..78a030a --- /dev/null +++ b/test/dummy-2/public/500.html @@ -0,0 +1,66 @@ + + + + We're sorry, but something went wrong (500) + + + + + + +
+
+

We're sorry, but something went wrong.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/test/dummy-2/public/apple-touch-icon-precomposed.png b/test/dummy-2/public/apple-touch-icon-precomposed.png new file mode 100644 index 0000000..e69de29 diff --git a/test/dummy-2/public/apple-touch-icon.png b/test/dummy-2/public/apple-touch-icon.png new file mode 100644 index 0000000..e69de29 diff --git a/test/dummy-2/public/favicon.ico b/test/dummy-2/public/favicon.ico new file mode 100644 index 0000000..e69de29 diff --git a/test/dummy-2/public/robots.txt b/test/dummy-2/public/robots.txt new file mode 100644 index 0000000..c19f78a --- /dev/null +++ b/test/dummy-2/public/robots.txt @@ -0,0 +1 @@ +# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file diff --git a/test/dummy-2/spec/controllers/api/v1_get_index_spec.rb b/test/dummy-2/spec/controllers/api/v1_get_index_spec.rb new file mode 100644 index 0000000..d5cc346 --- /dev/null +++ b/test/dummy-2/spec/controllers/api/v1_get_index_spec.rb @@ -0,0 +1,23 @@ +require 'rails_helper' +# describe Api::V1::NotesController, '#index', type: :request do +RSpec.describe 'Notes API', type: :request do + # let(:notes) { create_list(:note,1)} + # let!(:notes) {Note.create(title: "dddd", body: "body")} + let!(:note) {FactoryBot.create_list(:note, 9)} + let(:note_id) { notes.first.id } + + describe 'GET /api/v1/notes' do + before { get api_v1_notes_path } + + it 'returns notes size as expected' do + expect(json).not_to be_empty + expect(json.size).to eq(9) + end + + it 'returns status code 200' do + expect(response).to have_http_status(:success) + end + + end +end + diff --git a/test/dummy-2/spec/controllers/api/v1_get_my_spec.rb b/test/dummy-2/spec/controllers/api/v1_get_my_spec.rb new file mode 100644 index 0000000..311c965 --- /dev/null +++ b/test/dummy-2/spec/controllers/api/v1_get_my_spec.rb @@ -0,0 +1,14 @@ +require 'rails_helper' + +RSpec.describe 'Notes API', type: :request do + let!(:note) {FactoryBot.create_list(:note, 9)} + before {get api_v1_notes_my_path} + + it 'returns all notes' do + expect(json.size).to eq(9) + end + it 'returns status code 200' do + expect(response).to have_http_status(:success) + end +end + diff --git a/test/dummy-2/spec/controllers/api/v1_post_spec.rb b/test/dummy-2/spec/controllers/api/v1_post_spec.rb new file mode 100644 index 0000000..6c33d30 --- /dev/null +++ b/test/dummy-2/spec/controllers/api/v1_post_spec.rb @@ -0,0 +1,19 @@ +require 'rails_helper' +describe Api::V1::NotesController , type: :controller do + + before do + create_and_sign_in_user + post :create , params: { :body => 'test_body', :title => 'test_title', :user => User.first} + end + + it 'returns the title' do + expect(JSON.parse(@response.body)['title']).to eq('test_title') + end + it 'returns the body' do + expect(JSON.parse(@response.body)['body']).to eq('test_body') + end + + it 'returns a created status' do + expect(response).to have_http_status(:created) + end +end diff --git a/test/dummy-2/spec/controllers/sessions_controller_spec.rb b/test/dummy-2/spec/controllers/sessions_controller_spec.rb new file mode 100644 index 0000000..042e22b --- /dev/null +++ b/test/dummy-2/spec/controllers/sessions_controller_spec.rb @@ -0,0 +1,98 @@ +# sessions_controller_spec.rb +# 1. Set up the mock +# 2. Make the request +# 3. Test whatever code is attached to the callback +# require 'spec_helper' +require 'rails_helper' +describe SessionsController, type: :controller do + + describe "Google" do + + before do + + @request.env['omniauth.auth'] = OmniAuth.config.mock_auth[:google_oauth2] + visit '/auth/google_oauth2' + end + + describe "#create" do + + it "should successfully create a session" do + session[:user_id].should be_nil + post :create, params: {provider: :google_oauth2} + session[:user_id].should_not be_nil + end + + it "should redirect the user to root_path " do + post :create, params: {provider: :google_oauth2} + response.should redirect_to root_path + end + + end + + #describe "#destroy", js: true do + describe "#destroy" do + before do + post :create, params: {provider: :google_oauth2} + end + + it "should clear the session" do + session[:user_id].should_not be_nil + delete :destroy + session[:user_id].should be_nil + end + + it "should redirect to the home page" do + delete :destroy + # response.should redirect_to root_url + # https://stackoverflow.com/questions/5144758/how-to-test-a-javascript-redirect-with-rspec + response.body.should include("window.location") + end + end + end + + skip describe "Facebook" do + # skip or finish at config facebook + + before do + @request.env['omniauth.auth'] = OmniAuth.config.mock_auth[:facebook] + visit '/auth/facebook' + end + + describe "#create" do + + it "should successfully create a session" do + session[:user_id].should be_nil + post :create, params: {provider: :facebook} + session[:user_id].should_not be_nil + end + + it "should redirect the user to the articles/my url" do + post :create, params: {provider: :facebook} + response.should redirect_to articles_my_path + end + + end + + describe "#destroy" do + before do + post :create, params: {provider: :facebook} + end + + it "should clear the session" do + session[:user_id].should_not be_nil + delete :destroy + session[:user_id].should be_nil + end + + it "should redirect to the home page" do + delete :destroy + # response.should redirect_to root_url + # https://stackoverflow.com/questions/5144758/how-to-test-a-javascript-redirect-with-rspec + response.body.should include("window.location") + end + end + end + +end + + diff --git a/test/dummy-2/spec/features/userlogins_spec.rb b/test/dummy-2/spec/features/userlogins_spec.rb new file mode 100644 index 0000000..0fbc6c0 --- /dev/null +++ b/test/dummy-2/spec/features/userlogins_spec.rb @@ -0,0 +1,23 @@ +require 'rails_helper' + +RSpec.feature "Userlogins", type: :feature do + scenario "Admin User Sign In" do + skip visit "/sessions/new" + + fill_in "User name", :with => "admin" + fill_in "Password", :with => "secret1" + click_button "Sign In" + + xexpect(page).to have_text("My Articles") + end + + scenario "Google User Sign In" do + visit "/auth/google_oauth2" + expect(page).to have_text("My Articles") + end + + + + + +end diff --git a/test/dummy-2/spec/mailers/note_spec.rb b/test/dummy-2/spec/mailers/note_spec.rb new file mode 100644 index 0000000..ebc7900 --- /dev/null +++ b/test/dummy-2/spec/mailers/note_spec.rb @@ -0,0 +1,24 @@ +require 'rails_helper' + +RSpec.describe NoteMailer do + + + describe 'gmail' do + + let(:mail) {NoteMailer.gmail("Test Body", "receiver@email.com", "Test title", "from@example.com")} + + + it 'renders the subject' do + expect(mail.subject).to eql('Test title') + end + + it 'renders the receiver email' do + expect(mail.to).to eql(['receiver@email.com']) + end + + it 'renders the sender email' do + expect(mail.from).to eql(['from@example.com']) + end + end + +end diff --git a/test/dummy-2/spec/mailers/previews/note_preview.rb b/test/dummy-2/spec/mailers/previews/note_preview.rb new file mode 100644 index 0000000..4a59518 --- /dev/null +++ b/test/dummy-2/spec/mailers/previews/note_preview.rb @@ -0,0 +1,9 @@ +# Preview all emails at http://localhost:3000/rails/mailers/note +class NotePreview < ActionMailer::Preview + + # Preview this email at http://localhost:3000/rails/mailers/note/gmail + def gmail + NoteMailer.gmail + end + +end diff --git a/test/dummy-2/spec/models/note_spec.rb b/test/dummy-2/spec/models/note_spec.rb new file mode 100644 index 0000000..b6402d5 --- /dev/null +++ b/test/dummy-2/spec/models/note_spec.rb @@ -0,0 +1,41 @@ +require 'rails_helper' + +RSpec.describe Note, type: :model do + describe "Required only title (Maximum 30)" do + + it "valid with both title and body" do + before_count = Note.count + Note.create(title: "dddd", body: "body") + expect(Note.count).not_to eq(before_count) + end + + it "valid with only title" do + before_count = Note.count + Note.create(title: "Title") + expect(Note.count).not_to eq(before_count) + end + + it "invalid with only body" do + before_count = Note.count + Note.new(body: "body") + expect(Note.count).to eq(before_count) + end + + it "invalid body length more than 1000" do + before_count = Note.count + title_max = "x"*30 + body_max = "y"*1001 + Note.create(title: title_max, body: body_max) + expect(Note.count).to eq(before_count) + end + end + + describe "title data blank" do + it "auto fill from body" do + note = Note.create(:title => "", :body => "Body content") + note.title.should == "Body content" + end + end + +end + diff --git a/test/dummy-2/spec/models/user_spec.rb b/test/dummy-2/spec/models/user_spec.rb new file mode 100644 index 0000000..f340199 --- /dev/null +++ b/test/dummy-2/spec/models/user_spec.rb @@ -0,0 +1,12 @@ +require 'rails_helper' + +RSpec.describe "User", :type => :model do + it "prevents duplicates " do + user1 = create(:user, code: 'abc', email: 'test@email.com') + user2 = build(:user, code: 'abc', email: 'test@email.com') + + user1.should be_valid + #user2.should be_valid + user2.should_not have_valid(:code) + end +end diff --git a/test/dummy-2/spec/rails_helper.rb b/test/dummy-2/spec/rails_helper.rb new file mode 100644 index 0000000..e8bfb91 --- /dev/null +++ b/test/dummy-2/spec/rails_helper.rb @@ -0,0 +1,42 @@ +# This file is copied to spec/ when you run 'rails generate rspec:install' +ENV['RAILS_ENV'] ||= 'test' +require File.expand_path('../../config/environment', __FILE__) +Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f } # Add this at top of file +# Prevent database truncation if the environment is production +abort("The Rails environment is running in production mode!") if Rails.env.production? +require 'rspec/rails' +require 'spec_helper' + +RSpec.configure do |config| + + # Add create_and_sign_in_user + config.include AuthenticationHelper, type: :controller + + # To include RequestSpecHelper + config.include RequestSpecHelper, type: :request + + # config.infer_spec_type_from_file_location! + + # Filter lines from Rails gems in backtraces. + config.filter_rails_from_backtrace! + # arbitrary gems may also be filtered via: + # config.filter_gems_from_backtrace("gem name") + + + + # Added to make factorybot work + # FactoryBot.allow_class_lookup = false + config.use_transactional_fixtures = false + config.include FactoryBot::Syntax::Methods + config.before do + FactoryBot.find_definitions + end + # configure shoulda matchers to use rspec as the test framework and full matcher libraries for rails + Shoulda::Matchers.configure do |config| + config.integrate do |with| + with.test_framework :rspec + with.library :rails + end + end + +end diff --git a/test/dummy-2/spec/spec_helper.rb b/test/dummy-2/spec/spec_helper.rb new file mode 100644 index 0000000..e3accd6 --- /dev/null +++ b/test/dummy-2/spec/spec_helper.rb @@ -0,0 +1,80 @@ +# https://www.natashatherobot.com/rails-test-omniauth-sessions-controller/ +# spec_helper.rb +require 'rubygems' +require 'capybara/rspec' +# Set up the mock +require 'support/omniauth_macros' +require 'valid_attribute' + +# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration +RSpec.configure do |config| + config.filter_run focus: true + config.run_all_when_everything_filtered = true + + # config.include SpecTestHelper, :type => :controller + config.expect_with :rspec do |expectations| + expectations.include_chain_clauses_in_custom_matcher_descriptions = true + expectations.syntax = [:expect, :should] + end + config.mock_with :rspec do |mocks| + mocks.verify_partial_doubles = true + end + config.shared_context_metadata_behavior = :apply_to_host_groups + +# https://github.com/DatabaseCleaner/database_cleaner # +# config.use_transactional_fixtures = false + # https://stackoverflow.com/questions/15148585/undefined-method-visit-when-using-rspec-and-capybara-in-rails + config.include Capybara::DSL + + # https://stackoverflow.com/questions/21445164/set-chrome-as-default-browser-for-rspec-capybara/30551595 + Capybara.register_driver :chrome do |app| + Capybara::Selenium::Driver.new(app, :browser => :chrome) + end + Capybara.javascript_driver = :chrome + + config.before(:suite) do + if config.use_transactional_fixtures? + raise(<<-MSG) + Delete line `config.use_transactional_fixtures = true` from rails_helper.rb + (or set it to false) to prevent uncommitted transactions being used in + JavaScript-dependent specs. + + During testing, the app-under-test that the browser driver connects to + uses a different database connection to the database connection used by + the spec. The app's database connection would not be able to access + uncommitted transaction data setup over the spec's database connection. + MSG + end + DatabaseCleaner.clean_with(:deletion) + end + + config.before(:each, :js => true) do + #DatabaseCleaner.strategy = :transaction + DatabaseCleaner.strategy = :deletion + end + + config.before(:each, type: :feature) do + # :rack_test driver's Rack app under test shares database connection + # with the specs, so continue to use transaction strategy for speed. + driver_shares_db_connection_with_specs = Capybara.current_driver == :rack_test + + unless driver_shares_db_connection_with_specs + # Driver is probably for an external browser with an app + # under test that does *not* share a database connection with the + # specs, so use truncation strategy. + # DatabaseCleaner.strategy = :truncation + DatabaseCleaner[:mongoid].strategy = :deletion + + end + end + + config.before(:each) do + DatabaseCleaner.start + end + + config.append_after(:each) do + DatabaseCleaner.clean + end +# https://github.com/DatabaseCleaner/database_cleaner # + +end diff --git a/test/dummy-2/spec/support/authentication_helper.rb b/test/dummy-2/spec/support/authentication_helper.rb new file mode 100644 index 0000000..724f3e6 --- /dev/null +++ b/test/dummy-2/spec/support/authentication_helper.rb @@ -0,0 +1,20 @@ +module AuthenticationHelper + # controller return 1. Session 2. Cookies ==> user.id + def sign_in(user) + @user = user + current_ma_user + end + + def create_and_sign_in_user + user = FactoryBot.create(:user) + sign_in(user) + return user + end + # from Jinda::Helpers + def current_ma_user + @user ||= User.where(:auth_token => user.auth_token) + return @user + end + +end + diff --git a/test/dummy-2/spec/support/databasecleaner.rb b/test/dummy-2/spec/support/databasecleaner.rb new file mode 100644 index 0000000..5a82539 --- /dev/null +++ b/test/dummy-2/spec/support/databasecleaner.rb @@ -0,0 +1,13 @@ +RSpec.configure do |config| + config.before(:suite) do + DatabaseCleaner[:mongoid].strategy = :deletion + end + + config.before(:each) do + DatabaseCleaner[:mongoid].start + end + + config.after(:each) do + DatabaseCleaner[:mongoid].clean + end +end diff --git a/test/dummy-2/spec/support/factory_bot.rb b/test/dummy-2/spec/support/factory_bot.rb new file mode 100644 index 0000000..06dbc6e --- /dev/null +++ b/test/dummy-2/spec/support/factory_bot.rb @@ -0,0 +1,12 @@ +FactoryBot.define do + factory :user, class: 'User' do + code {Faker::Name.unique.name} + email {Faker::Internet.email} + role {"Admin"} + end + factory :note, class: 'Note' do + title { Faker::Lorem.sentence[0..29] } + body { Faker::Lorem.sentence[0..999] } + user { User.first } + end +end diff --git a/test/dummy-2/spec/support/omniauth_macros.rb b/test/dummy-2/spec/support/omniauth_macros.rb new file mode 100644 index 0000000..ab7cdd7 --- /dev/null +++ b/test/dummy-2/spec/support/omniauth_macros.rb @@ -0,0 +1,38 @@ +# in spec/support/omniauth_macro.rb +module OmniauthMacros +require 'omniauth' + #To enable all request to OmniAuth short circuited to use below mock authentication hash the /auth/provider will redirect immediately to /auth/provider/call back + # https://github.com/omniauth/omniauth/wiki/Integration-Testing + OmniAuth.config.test_mode = true + + omniauth_hash = { 'provider' => 'google_oauth2', + 'uid' => '105362273761620533373', + 'info' => { + 'name' => 'Kulsoft', + 'email' => 'kulsoft.net@gmail.com', + 'nickname' => 'kulsoft' + }, + 'extra' => {'raw_info' => + { 'location' => 'San Francisco', + 'gravatar_id' => '123456789' + } + } + } + OmniAuth.config.add_mock(:google_oauth2, omniauth_hash) + + omniauth_hash = { 'provider' => 'facebook', + 'uid' => '105362273761620533373', + 'info' => { + 'name' => 'Peter Colling', + 'email' => '1.0@kul.asia', + 'nickname' => 'Peter C' + }, + 'extra' => {'raw_info' => + {'location' => 'LA', + 'gravatar_id' => '13' + } + } + } + OmniAuth.config.add_mock(:facebook, omniauth_hash) +end + diff --git a/test/dummy-2/spec/support/request_spec_helper.rb b/test/dummy-2/spec/support/request_spec_helper.rb new file mode 100644 index 0000000..a986145 --- /dev/null +++ b/test/dummy-2/spec/support/request_spec_helper.rb @@ -0,0 +1,8 @@ +#request_spec_helper.rb + +module RequestSpecHelper + # Parse JSON response to ruby hash + def json + JSON.parse(response.body) + end +end diff --git a/test/dummy-2/spec/views/articles/_article.html.erb_spec.rbx b/test/dummy-2/spec/views/articles/_article.html.erb_spec.rbx new file mode 100644 index 0000000..17482ea --- /dev/null +++ b/test/dummy-2/spec/views/articles/_article.html.erb_spec.rbx @@ -0,0 +1,14 @@ +let login_as_admin + +describe 'articles/_article.html.erb' do + context 'when the article has a url' do + it 'display the url' do + assign(:article, Article.build(:article, url: 'http://localhost:3000/jinda/init?s=articles:new_article')) + + render + + expect(rendered).to have_link 'Article', href: 'http://localhost:3000/jinda/init?s=articles:new_article' + end + end +end + diff --git a/test/dummy-2/tmp/.keep b/test/dummy-2/tmp/.keep new file mode 100644 index 0000000..e69de29 diff --git a/test/dummy-2/tmp/pids/.keep b/test/dummy-2/tmp/pids/.keep new file mode 100644 index 0000000..e69de29 diff --git a/test/dummy-2/vendor/.keep b/test/dummy-2/vendor/.keep new file mode 100644 index 0000000..e69de29 diff --git a/test/dummy/Gemfile b/test/dummy/Gemfile index 504edd9..13b27ce 100644 --- a/test/dummy/Gemfile +++ b/test/dummy/Gemfile @@ -97,4 +97,3 @@ group :development, :test do end gem "mongoid-paperclip", require: "mongoid_paperclip" gem "kaminari-mongoid", "1.0.1" -gem 'rspec_junit_formatter' diff --git a/test/dummy/Gemfile.lock b/test/dummy/Gemfile.lock index 9d57dfd..22ce3a1 100644 --- a/test/dummy/Gemfile.lock +++ b/test/dummy/Gemfile.lock @@ -389,8 +389,6 @@ GEM rspec-mocks (~> 3.11) rspec-support (~> 3.11) rspec-support (3.12.0) - rspec_junit_formatter (0.6.0) - rspec-core (>= 2, < 4, != 2.12.0) ruby2_keywords (0.0.5) ruby_parser (3.19.1) sexp_processor (~> 4.16) @@ -502,7 +500,6 @@ DEPENDENCIES rouge rspec rspec-rails - rspec_junit_formatter selenium-webdriver shoulda sprockets-rails diff --git a/test/dummy/app/assets/javascripts/application.js b/test/dummy/app/assets/javascripts/application.js index 87a9a81..37c2fd0 100644 --- a/test/dummy/app/assets/javascripts/application.js +++ b/test/dummy/app/assets/javascripts/application.js @@ -1,15 +1,15 @@ // This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // -// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's -// vendor/assets/javascripts directory can be referenced here using a relative path. +// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, +// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. // // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -// compiled file. JavaScript code in this file should be added after the last require_* statement. +// the compiled file. // -// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details -// about supported directives. +// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD +// GO AFTER THE REQUIRES BELOW. // -//= require rails-ujs -// require turbolinks -//= require jindalte.js +//= require jinda_jqm + + diff --git a/test/dummy/app/assets/stylesheets/application.css.bak b/test/dummy/app/assets/stylesheets/application.css.bak new file mode 100644 index 0000000..288b9ab --- /dev/null +++ b/test/dummy/app/assets/stylesheets/application.css.bak @@ -0,0 +1,15 @@ +/* + * This is a manifest file that'll be compiled into application.css, which will include all the files + * listed below. + * + * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's + * vendor/assets/stylesheets directory can be referenced here using a relative path. + * + * You're free to add application-wide styles to this file and they'll appear at the bottom of the + * compiled file so the styles you add here take precedence over styles defined in any other CSS + * files in this directory. Styles in this file should be added after the last require_* statement. + * It is generally better to create a new file per style scope. + * + *= require_tree . + *= require_self + */ diff --git a/test/dummy/app/assets/stylesheets/application.css.scss b/test/dummy/app/assets/stylesheets/application.css.scss new file mode 100644 index 0000000..5932cb8 --- /dev/null +++ b/test/dummy/app/assets/stylesheets/application.css.scss @@ -0,0 +1,15 @@ +/* + * This is a manif.est file that'll be compiled into application.css, which will include all the files + * listed below. + * + * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, + * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. + * + * You're free to add application-wide styles to this file and they'll appear at the top of the + * compiled file, but it's generally better to create a new file per style scope. + * + *= require_tree . + *= require_self + *= require normalize-rails + */ +@import "jinda_jqm.css.scss" diff --git a/test/dummy/app/assets/stylesheets/jinda_jqm.css.scss b/test/dummy/app/assets/stylesheets/jinda_jqm.css.scss new file mode 100644 index 0000000..58d4118 --- /dev/null +++ b/test/dummy/app/assets/stylesheets/jinda_jqm.css.scss @@ -0,0 +1,32 @@ +/* + * This is a manifest file that'll be compiled into application.css, which will include all the files + * listed below. + * + * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, + * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. + * + * You're free to add application-wide styles to this file and they'll appear at the top of the + * compiled file, but it's generally better to create a new file per style scope. + * + *= require normalize-rails + */ + +@import "jquery.mobile-1.2.1"; +@import "jquery.mobile.splitview"; +@import "jquery.mobile.grids.collapsible"; +@import "jquery.mobile.datebox.css"; +@import "sarabun"; +@import "jinda"; +@import "kul-4.2"; +@import "articles"; +@import "app.scss"; +@import "font-awesome-sprockets"; +@import "font-awesome"; +@import "social"; + + + + + + + diff --git a/test/dummy/app/views/identities/new.html.haml b/test/dummy/app/views/identities/new.html.haml index d0cb298..56d6623 100644 --- a/test/dummy/app/views/identities/new.html.haml +++ b/test/dummy/app/views/identities/new.html.haml @@ -3,19 +3,6 @@ - @title= 'Sign Up' = form_tag "/auth/identity/register", {'data-ajax'=>'false'} do %h1.h3.mb-3.font-weight-normal{:style => "text-align: center"} Sign Up - %p.hint-text Sign Up with your social media account or Username - .social-btn.text-center - %a.btn.btn-primary.btn-lg{:href => "/auth/facebook"} - %i.fa.fa-facebook - Facebook - %a.btn.btn-info.btn-lg{:href => "#"} - %i.fa.fa-twitter - Twitter - %a.btn.btn-danger.btn-lg{:href => "/auth/google_oauth2"} - %i.fa.fa-google - Google - .or-seperator - %b or .sign_in .label-warning = flash[:alert] diff --git a/test/dummy/app/views/layouts/application.haml b/test/dummy/app/views/layouts/application.haml index 6714385..0894f04 100644 --- a/test/dummy/app/views/layouts/application.haml +++ b/test/dummy/app/views/layouts/application.haml @@ -1,51 +1,4 @@ -%html - %head - %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/ - = csrf_meta_tags - /%link{:href => "https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic", :rel => "stylesheet"}/ - %title Jinda AdminLTE 2 | Starter - = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' - = javascript_include_tag "application", 'data-turbolinks-track': 'reload' - / - BODY TAG OPTIONS: - \================= - Apply one or more of the following classes to get the - desired effect - |---------------------------------------------------------| - | SKINS | skin-blue | - | | skin-black | - | | skin-purple | - | | skin-yellow | - | | skin-red | - | | skin-green | - |---------------------------------------------------------| - |LAYOUT OPTIONS | fixed | - | | layout-boxed | - | | layout-top-nav | - | | sidebar-collapse | - | | sidebar-mini | - |---------------------------------------------------------| - - %body.hold-transition.skin-yellow.sidebar-mini - .wrapper - = render "layouts/lte/header" - = render "layouts/lte/sidebar" - .content-wrapper - %h3.box-title - = @page_title - = render 'layouts/lte/flash' - .label-warning - #flashes - - if flash[:notice] - %p#flash_notice.messages.notice= flash[:notice] - = javascript_tag "$('#flash_notice').effect('highlight',{},1000);" - - if flash[:error] || flash[:errors] - %p#flash_errors.messages.errors= flash[:error] || flash[:errors] - = javascript_tag "$('#flash_errors').effect('highlight',{},1000);" - - flash[:error] = flash[:errors] = flash[:notice] = nil - = yield - = render 'layouts/lte/footer' - .control-sidebar-bg - / REQUIRED JS SCRIPTS - / jQuery 3 - +- if request.accept=="text/html, */*; q=0.01" + = render "layouts/jqm/page" +- else + = render "layouts/jqm/full" diff --git a/test/dummy/app/views/sessions/new.html.haml b/test/dummy/app/views/sessions/new.html.haml index 34bf93b..e19bb2e 100644 --- a/test/dummy/app/views/sessions/new.html.haml +++ b/test/dummy/app/views/sessions/new.html.haml @@ -2,19 +2,6 @@ .signup-form = form_tag "/auth/identity/callback", {'data-ajax'=>'false'} do %h1.h3.mb-3.font-weight-normal{:style => "text-align: center"} Sign in - %p.hint-text Sign in with your social media account or Username - .social-btn.text-center - %a.btn.btn-primary.btn-lg{:href => "/auth/facebook"} - %i.fa.fa-facebook - Facebook - %a.btn.btn-info.btn-lg{:href => "#"} - %i.fa.fa-twitter - Twitter - %a.btn.btn-danger.btn-lg{:href => "/auth/google_oauth2"} - %i.fa.fa-google - Google - .or-seperator - %b or .sign_in .label-warning = flash[:alert] diff --git a/test/dummy/config/credentials.yml.enc b/test/dummy/config/credentials.yml.enc index 29427e3..86685fd 100644 --- a/test/dummy/config/credentials.yml.enc +++ b/test/dummy/config/credentials.yml.enc @@ -1 +1 @@ -rKJOMS7I0Z2/6HTmUtZoHpiofv1hKjyG7PP/xif21dRzKKgCueZV6ImjpU0HdupQYnIheFTCoNdcQmzvzfl0oZaUr03Ox6pf/KGVkEUAwuBPAt76UzNrElzKR1LOctwpmQ6gqCT4AR26lGhpIQDC/XpzT6b4A05C19Xq6vwS4pYBPz119XcKB7dVVGfzhY79NndT1ifklAmWqw2qvoqDp9BdTPpI+HdtjZrbYV8KL0l34lqV/Cf8x2LkvNQjcnCQ8e8tCjNDBFbfQbNrAxQEC832RrQEZ4stK+miW3n+5tEMAwBg7lxyrI8OosHHn5GKnL5geG1NPIosSfgdiFnv0TGGRlaS2d8Is0c0LpWTAMoUN20xl6w6R2HMkumfXLmJLhZEfeZVsLwE11jjSxRLKd8hciqV+W9IqNqV--4BEM1/9dfS1odAZT--IrPmtHRIpZytag1DsyZDSg== \ No newline at end of file +Tc7HI8GJT1XlYyLCg2NoTW4hquKJYDBjxbOnCYTPNkeHjMuXFg38IYU+FpxvuFu/58PPztO/GSc4AKX5vgA1gDiZmjQ0PLuMAxwR4a44C6DI+hkOt399N7Mc3Fh/4Rp8zbntYG8g7E7Sbn+3ilvapRk0IET+CSdJuFip4eaZ9LYhVK1/EPQWbynvfMKwkfQj9NcS6P3LpUHX87uH7OwHdYyj/8pFfDLU4KVRATLuiDVGi43IpxoLdhTtp8m603Fkx6/Nuxp0r4miPV8AoNudNlzkuaYEJeygEPA9NVVEcRN/5lFGvfUrK46/vzGAVOIrv3lninf3Y7hgMXM81Z8UScSqJhIJx0j9Uc16/oSKJhm7si6J5iP4cq0nz3DLkHoudTxO0CUft1xO7Isesg8zlzuC7Bxu7IHIpNcQ--8cIwmfEJiX4SlV85--HcCKJOKgSp8mz55wFTFtOw== \ No newline at end of file diff --git a/test/dummy/config/mongoid.yml b/test/dummy/config/mongoid.yml index f37ff3d..6c0c902 100644 --- a/test/dummy/config/mongoid.yml +++ b/test/dummy/config/mongoid.yml @@ -4,16 +4,17 @@ development: # Defines the default client. (required) default: # Mongoid can connect to a URI accepted by the driver: - # uri: mongodb://user:password@mongodb.domain.com:27017/dummy_development + # uri: mongodb://user:password@mongodb.domain.com:27017/shop263603_development # Otherwise define the parameters separately. # This defines the name of the default database that Mongoid can connect to. # (required). - database: dummy_development + database: shop263603_development # Provides the hosts the default client can connect to. Must be an array # of host:port pairs. (required) hosts: - localhost:27017 + # - mongodb options: # Note that all options listed below are Ruby driver client options (the mongo gem). # Please refer to the driver documentation of the version of the mongo gem you are using @@ -57,7 +58,7 @@ development: # connect: :direct # Changes the default time in seconds the server monitors refresh their status - # via hello commands. (default: 10) + # via ismaster commands. (default: 10) # heartbeat_frequency: 10 # The time in seconds for selecting servers for a near read preference. (default: 0.015) @@ -80,13 +81,8 @@ development: # (default: 10) # connect_timeout: 10 - # How long to wait for a response for each operation sent to the - # server. This timeout should be set to a value larger than the - # processing time for the longest operation that will be executed - # by the application. Note that this is a client-side timeout; - # the server may continue executing an operation after the client - # aborts it with the SocketTimeout exception. - # (default: nil, meaning no timeout) + # The timeout to wait to execute operations on a socket before raising an error. + # (default: 5) # socket_timeout: 5 # The name of the replica set to connect to. Servers provided as seeds that do @@ -119,44 +115,12 @@ development: # Configure Mongoid specific options. (optional) options: - # Application name that is printed to the mongodb logs upon establishing - # a connection in server versions >= 3.4. Note that the name cannot - # exceed 128 bytes. It is also used as the database name if the - # database name is not explicitly defined. (default: nil) - # app_name: MyApplicationName - -production: - clients: - default: - uri: <%= ENV['MONGODB_URI'] %> - options: - raise_not_found_error: false - belongs_to_required_by_default: false - - - # Mark belongs_to associations as required by default, so that saving a - # model with a missing belongs_to association will trigger a validation - # error. (default: true) - # belongs_to_required_by_default: true - belongs_to_required_by_default: false - - # Raise an exception when a field is redefined. (default: false) - # duplicate_fields_exception: false - - # Include the root model name in json serialization. (default: false) + # Includes the root model name in json serialization. (default: false) # include_root_in_json: false # Include the _type field in serialization. (default: false) # include_type_for_serialization: false - # Whether to join nested persistence contexts for atomic operations - # to parent contexts by default. (default: false) - # join_contexts: false - - # Set the Mongoid and Ruby driver log levels when Mongoid is not using - # Ruby on Rails logger instance. (default: :info) - # log_level: :info - # Preload all models in development, needed when models use # inheritance. (default: false) # preload_models: false @@ -170,24 +134,46 @@ production: # existing method. (default: false) # scope_overwrite_exception: false - # Use ActiveSupport's time zone in time operations instead of - # the Ruby default time zone. See the time zone section below for - # further information. (default: true) + # Raise an error when defining a field with the same name as an + # existing method. (default: false) + # duplicate_fields_exception: false + + # Use Active Support's time zone in conversions. (default: true) # use_activesupport_time_zone: true - # Return stored times as UTC. See the time zone section below for - # further information. Most applications should not use this option. - # (default: false) + # Ensure all times are UTC in the app side. (default: false) # use_utc: false - # (Deprecated) In MongoDB 4.0 and earlier, set whether to create - # indexes in the background by default. (default: false) - # background_indexing: false + # Set the Mongoid and Ruby driver log levels when not in a Rails + # environment. The Mongoid logger will be set to the Rails logger + # otherwise.(default: :info) + # log_level: :info + + # Control whether `belongs_to` association is required. By default + # `belongs_to` will trigger a validation error if the association + # is not present. (default: true) + # belongs_to_required_by_default: true + belongs_to_required_by_default: false + # Application name that is printed to the mongodb logs upon establishing a + # connection in server versions >= 3.4. Note that the name cannot exceed 128 bytes. + # app_name: MyApplicationName + +production: + clients: + default: + uri: <%= ENV['MONGODB_URI'] %> + options: + raise_not_found_error: false + belongs_to_required_by_default: false + + + # Use background indexes by default if `background` option not specified. (default: false) + # background_indexing: false test: clients: default: - database: dummy_test + database: shop263603_test hosts: - localhost:27017 options: diff --git a/test/dummy/config/routes.rb b/test/dummy/config/routes.rb index 06b4a51..54a9428 100644 --- a/test/dummy/config/routes.rb +++ b/test/dummy/config/routes.rb @@ -1,5 +1,6 @@ Rails.application.routes.draw do - root :to => 'jinda#index' + mount Jinda::Engine => "/jinda" + # root :to => 'jinda#index' # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html # Defines the root path route ("/") diff --git a/test/dummy/log/development.log b/test/dummy/log/development.log index db10794..e69de29 100644 --- a/test/dummy/log/development.log +++ b/test/dummy/log/development.log @@ -1,585 +0,0 @@ -Started GET "/" for ::1 at 2022-11-19 15:39:06 -0600 -Processing by JindaController#index as HTML - Rendering layout layouts/application.haml - Rendering jinda/index.html.haml within layouts/application - Rendered jinda/index.html.haml within layouts/application (Duration: 7.4ms | Allocations: 15133) - Rendered layouts/_head.html.erb (Duration: 1209.3ms | Allocations: 364979) -MONGODB | EVENT: # -MONGODB | Topology type 'unknown' initializing. -MONGODB | EVENT: # -MONGODB | Topology type 'Unknown' changed to type 'Unknown'. -MONGODB | EVENT: # -MONGODB | Server localhost:27017 initializing. -MONGODB | Waiting for up to 30.00 seconds for servers to be scanned: #]> -MONGODB | EVENT: # new=#true, "topologyVersion"=>{"processId"=>BSON::ObjectId('6367ec5a76a448c37db6eee4'), "counter"=>0}, "maxBsonObjectSize"=>16777216, "maxMessageSizeBytes"=>48000000, "maxWriteBatchSize"=>100000, "localTime"=>2022-11-19 21:39:07.622 UTC, "logicalSessionTimeoutMinutes"=>30, "connectionId"=>92, "minWireVersion"=>0, "maxWireVersion"=>17, "readOnly"=>false, "ok"=>1.0} average_round_trip_time=0.004262>> -MONGODB | Server description for localhost:27017 changed from 'unknown' to 'standalone'. -MONGODB | EVENT: # -MONGODB | Topology type 'Unknown' changed to type 'Single'. -The criteria cache has been deprecated and will be removed in Mongoid 8. Please enable the Mongoid QueryCache to have caching functionality. -MONGODB | EVENT: #true, "topologyVersion"=>{"processId"=>BSON::ObjectId('6367ec5a76a448c37db6eee4'), "counter"=>0}, "maxBsonObjectSize"=>16777216, "maxMessageSizeBytes"=>48000000, "maxWriteBatchSize"=>100000, "localTime"=>2022-11-19 21:39:07.622 UTC, "logicalSessionTimeoutMinutes"=>30, "connectionId"=>92, "minWireVersion"=>0, "maxWireVersion"=>17, "readOnly"=>false, "ok"=>1.0} average_round_trip_time=0.004262> new=#true, "topologyVersion"=>{"processId"=>BSON::ObjectId('6367ec5a76a448c37db6eee4'), "counter"=>0}, "maxBsonObjectSize"=>16777216, "maxMessageSizeBytes"=>48000000, "maxWriteBatchSize"=>100000, "localTime"=>2022-11-19 21:39:07.626 UTC, "logicalSessionTimeoutMinutes"=>30, "connectionId"=>94, "minWireVersion"=>0, "maxWireVersion"=>17, "readOnly"=>false, "ok"=>1.0} average_round_trip_time=0.0038656000000000003>> -MONGODB | Server description for localhost:27017 changed from 'standalone' to 'standalone'. -MONGODB | EVENT: # -MONGODB | Topology type 'Single' changed to type 'Single'. -MONGODB | [7] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [7] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [8] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_modules", "filter"=>{"code"=>"jobs"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [8] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [9] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_modules", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86a7'), "code"=>"jobs"}], "lsid"=>{"id"=>}} -MONGODB | [9] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.007s -MONGODB | [10] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86a7')}, "u"=>{"$set"=>{"uid"=>"63794cfbbee042dbe60c86a7", "icon"=>"edit"}}}], "lsid"=>{"id"=>"jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86a7')}, "u"=>{"$set"=>{"name"=>"Job", "seq"=>0}}}], "lsid"=>{"id"=>}} -MONGODB | [11] localhost:27017 | dummy_development.update | SUCCEEDED | 0.001s -MONGODB | [12] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_services", "filter"=>{"module_code"=>"jobs", "code"=>"link", "name"=>"All Jobs: /jobs"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [12] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [13] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86a8'), "module_code"=>"jobs", "code"=>"link", "name"=>"All Jobs: /jobs"}], "lsid"=>{"id"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86a8')}, "u"=>{"$set"=>{"xml"=>"", "lis... -MONGODB | [14] localhost:27017 | dummy_development.update | SUCCEEDED | 0.001s -MONGODB | [15] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_services", "filter"=>{"module_code"=>"jobs", "code"=>"link", "name"=>"My jobs: /jobs/my"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [15] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [16] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86a9'), "module_code"=>"jobs", "code"=>"link", "name"=>"My jobs: /jobs/my"}], "lsid"=>{"id"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86a9')}, "u"=>{"$set"=>{"xml"=>"", "li... -MONGODB | [17] localhost:27017 | dummy_development.update | SUCCEEDED | 0.001s -MONGODB | [18] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_services", "filter"=>{"module_code"=>"jobs", "code"=>"link", "name"=>"My forms: /jobs/forms"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [18] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [19] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86aa'), "module_code"=>"jobs", "code"=>"link", "name"=>"My forms: /jobs/forms"}], "lsid"=>{"id"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86aa')}, "u"=>{"$set"=>{"xml"=>"",... -MONGODB | [20] localhost:27017 | dummy_development.update | SUCCEEDED | 0.001s -MONGODB | [21] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_services", "filter"=>{"module_code"=>"jobs", "code"=>"new_job"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [21] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [22] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86ab'), "module_code"=>"jobs", "code"=>"new_job"}], "lsid"=>{"id"=>}} -MONGODB | [22] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [23] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86ab')}, "u"=>{"$set"=>{"xml"=>""jinda_services", "filter"=>{"module_code"=>"jobs", "code"=>"edit_job"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [24] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [25] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86ac'), "module_code"=>"jobs", "code"=>"edit_job"}], "lsid"=>{"id"=>}} -MONGODB | [25] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [26] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86ac')}, "u"=>{"$set"=>{"xml"=>""jinda_services", "filter"=>{"module_code"=>"jobs", "code"=>"create_form"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [27] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [28] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86ad'), "module_code"=>"jobs", "code"=>"create_form"}], "lsid"=>{"id"=>}} -MONGODB | [28] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [29] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86ad')}, "u"=>{"$set"=>{"xml"=>""jinda_services", "filter"=>{"module_code"=>"jobs", "code"=>"import_job"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [30] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [31] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86ae'), "module_code"=>"jobs", "code"=>"import_job"}], "lsid"=>{"id"=>}} -MONGODB | [31] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [32] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86ae')}, "u"=>{"$set"=>{"xml"=>""jinda_services", "filter"=>{"module_code"=>"jobs", "code"=>"xedit_job"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [33] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [34] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86af'), "module_code"=>"jobs", "code"=>"xedit_job"}], "lsid"=>{"id"=>}} -MONGODB | [34] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [35] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86af')}, "u"=>{"$set"=>{"xml"=>""jinda_modules", "filter"=>{"code"=>"users"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [36] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [37] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_modules", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86b0'), "code"=>"users"}], "lsid"=>{"id"=>}} -MONGODB | [37] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [38] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86b0')}, "u"=>{"$set"=>{"uid"=>"63794cfbbee042dbe60c86b0", "icon"=>""}}}], "lsid"=>{"id"=>"jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86b0')}, "u"=>{"$set"=>{"name"=>"User", "seq"=>1}}}], "lsid"=>{"id"=>}} -MONGODB | [39] localhost:27017 | dummy_development.update | SUCCEEDED | 0.001s -MONGODB | [40] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86b0')}, "u"=>{"$set"=>{"role"=>"m"}}}], "lsid"=>{"id"=>}} -MONGODB | [40] localhost:27017 | dummy_development.update | SUCCEEDED | 0.001s -MONGODB | [41] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_services", "filter"=>{"module_code"=>"users", "code"=>"link", "name"=>"info: /users"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [41] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [42] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86b1'), "module_code"=>"users", "code"=>"link", "name"=>"info: /users"}], "lsid"=>{"id"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86b1')}, "u"=>{"$set"=>{"xml"=>"", "list"=>... -MONGODB | [43] localhost:27017 | dummy_development.update | SUCCEEDED | 0.001s -MONGODB | [44] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_services", "filter"=>{"module_code"=>"users", "code"=>"link", "name"=>"pending tasks: /jinda/pending"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [44] localhost:27017 | dummy_development.find | SUCCEEDED | 0.003s -MONGODB | [45] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86b2'), "module_code"=>"users", "code"=>"link", "name"=>"pending tasks: /jinda/pending"}], "lsid"=>{"id"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86b2')}, "u"=>{"$set"=>{"xml"=>""users", "code"=>"user"}], "lsid"=>{"id"=>}} -MONGODB | [48] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.002s -MONGODB | [49] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86b3')}, "u"=>{"$set"=>{"xml"=>""users", "code"=>"pwd"}], "lsid"=>{"id"=>}} -MONGODB | [51] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.019s -MONGODB | [52] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86b4')}, "u"=>{"$set"=>{"xml"=>""jinda_modules", "filter"=>{"code"=>"admins"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [53] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [54] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_modules", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86b5'), "code"=>"admins"}], "lsid"=>{"id"=>}} -MONGODB | [54] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [55] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86b5')}, "u"=>{"$set"=>{"uid"=>"63794cfbbee042dbe60c86b5", "icon"=>""}}}], "lsid"=>{"id"=>"jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86b5')}, "u"=>{"$set"=>{"name"=>"Admin", "seq"=>2}}}], "lsid"=>{"id"=>}} -MONGODB | [56] localhost:27017 | dummy_development.update | SUCCEEDED | 0.001s -MONGODB | [57] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86b5')}, "u"=>{"$set"=>{"role"=>"a"}}}], "lsid"=>{"id"=>}} -MONGODB | [57] localhost:27017 | dummy_development.update | SUCCEEDED | 0.001s -MONGODB | [58] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_services", "filter"=>{"module_code"=>"admins", "code"=>"edit_role"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [58] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [59] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86b6'), "module_code"=>"admins", "code"=>"edit_role"}], "lsid"=>{"id"=>}} -MONGODB | [59] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [60] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86b6')}, "u"=>{"$set"=>{"xml"=>""jinda_services", "filter"=>{"module_code"=>"admins", "code"=>"link", "name"=>"pending tasks: /jinda/pending"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [61] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [62] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86b7'), "module_code"=>"admins", "code"=>"link", "name"=>"pending tasks: /jinda/pending"}], "lsid"=>{"id"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86b7')}, "u"=>{"$set"=>{"xml"=>""admins", "code"=>"link", "name"=>"logs: /jinda/logs"}], "lsid"=>{"id"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86b8')}, "u"=>{"$set"=>{"xml"=>"", "li... -MONGODB | [66] localhost:27017 | dummy_development.update | SUCCEEDED | 0.001s -MONGODB | [67] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_services", "filter"=>{"module_code"=>"admins", "code"=>"link", "name"=>"docs: /jinda/doc"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [67] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [68] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86b9'), "module_code"=>"admins", "code"=>"link", "name"=>"docs: /jinda/doc"}], "lsid"=>{"id"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86b9')}, "u"=>{"$set"=>{"xml"=>"", "lis... -MONGODB | [69] localhost:27017 | dummy_development.update | SUCCEEDED | 0.001s -MONGODB | [70] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_modules", "filter"=>{"code"=>"devs"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [70] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [71] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_modules", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86ba'), "code"=>"devs"}], "lsid"=>{"id"=>}} -MONGODB | [71] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [72] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86ba')}, "u"=>{"$set"=>{"uid"=>"63794cfbbee042dbe60c86ba", "icon"=>""}}}], "lsid"=>{"id"=>"jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86ba')}, "u"=>{"$set"=>{"name"=>"Developer", "seq"=>3}}}], "lsid"=>{"id"=>}} -MONGODB | [73] localhost:27017 | dummy_development.update | SUCCEEDED | 0.001s -MONGODB | [74] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86ba')}, "u"=>{"$set"=>{"role"=>"d"}}}], "lsid"=>{"id"=>}} -MONGODB | [74] localhost:27017 | dummy_development.update | SUCCEEDED | 0.001s -MONGODB | [75] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_services", "filter"=>{"module_code"=>"devs", "code"=>"link", "name"=>"error_logs: /jinda/error_logs"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [75] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [76] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86bb'), "module_code"=>"devs", "code"=>"link", "name"=>"error_logs: /jinda/error_logs"}], "lsid"=>{"id"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86bb')}, "u"=>{"$set"=>{"xml"=>""devs", "code"=>"link", "name"=>"notice_logs: /jinda/notice_logs"}], "lsid"=>{"id"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86bc')}, "u"=>{"$set"=>{"xml"=>""docs"}], "lsid"=>{"id"=>}} -MONGODB | [82] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [83] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86bd')}, "u"=>{"$set"=>{"uid"=>"63794cfbbee042dbe60c86bd", "icon"=>""}}}], "lsid"=>{"id"=>"jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86bd')}, "u"=>{"$set"=>{"name"=>"Document", "seq"=>4}}}], "lsid"=>{"id"=>}} -MONGODB | [84] localhost:27017 | dummy_development.update | SUCCEEDED | 0.001s -MONGODB | [85] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_services", "filter"=>{"module_code"=>"docs", "code"=>"link", "name"=>"My Document: /docs/my"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [85] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [86] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86be'), "module_code"=>"docs", "code"=>"link", "name"=>"My Document: /docs/my"}], "lsid"=>{"id"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86be')}, "u"=>{"$set"=>{"xml"=>""jinda_services", "filter"=>{"module_code"=>"docs", "code"=>"doc_new"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [88] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [89] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86bf'), "module_code"=>"docs", "code"=>"doc_new"}], "lsid"=>{"id"=>}} -MONGODB | [89] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [90] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86bf')}, "u"=>{"$set"=>{"xml"=>""jinda_services", "filter"=>{"module_code"=>"docs", "code"=>"doc_edit"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [91] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [92] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86c0'), "module_code"=>"docs", "code"=>"doc_edit"}], "lsid"=>{"id"=>}} -MONGODB | [92] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [93] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86c0')}, "u"=>{"$set"=>{"xml"=>""jinda_services", "filter"=>{"module_code"=>"docs", "code"=>"doc_xedit"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [94] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [95] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86c1'), "module_code"=>"docs", "code"=>"doc_xedit"}], "lsid"=>{"id"=>}} -MONGODB | [95] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [96] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86c1')}, "u"=>{"$set"=>{"xml"=>""jinda_modules", "filter"=>{"code"=>"notes"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [97] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [98] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_modules", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86c2'), "code"=>"notes"}], "lsid"=>{"id"=>}} -MONGODB | [98] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [99] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86c2')}, "u"=>{"$set"=>{"uid"=>"63794cfbbee042dbe60c86c2", "icon"=>""}}}], "lsid"=>{"id"=>"jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86c2')}, "u"=>{"$set"=>{"name"=>"Notes", "seq"=>5}}}], "lsid"=>{"id"=>}} -MONGODB | [100] localhost:27017 | dummy_development.update | SUCCEEDED | 0.001s -MONGODB | [101] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_services", "filter"=>{"module_code"=>"notes", "code"=>"link", "name"=>"My Notes: /notes/my"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [101] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [102] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86c3'), "module_code"=>"notes", "code"=>"link", "name"=>"My Notes: /notes/my"}], "lsid"=>{"id"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86c3')}, "u"=>{"$set"=>{"xml"=>""jinda_services", "filter"=>{"module_code"=>"notes", "code"=>"new"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [104] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [105] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86c4'), "module_code"=>"notes", "code"=>"new"}], "lsid"=>{"id"=>}} -MONGODB | [105] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [106] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86c4')}, "u"=>{"$set"=>{"xml"=>""notes", "code"=>"edit"}], "lsid"=>{"id"=>}} -MONGODB | [108] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [109] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86c5')}, "u"=>{"$set"=>{"xml"=>""jinda_services", "filter"=>{"module_code"=>"notes", "code"=>"delete"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [110] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [111] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86c6'), "module_code"=>"notes", "code"=>"delete"}], "lsid"=>{"id"=>}} -MONGODB | [111] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [112] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86c6')}, "u"=>{"$set"=>{"xml"=>""notes", "code"=>"mail"}], "lsid"=>{"id"=>}} -MONGODB | [114] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [115] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86c7')}, "u"=>{"$set"=>{"xml"=>""jinda_services", "filter"=>{"module_code"=>"notes", "code"=>"xedit"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [116] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [117] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86c8'), "module_code"=>"notes", "code"=>"xedit"}], "lsid"=>{"id"=>}} -MONGODB | [117] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [118] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86c8')}, "u"=>{"$set"=>{"xml"=>""jinda_modules", "filter"=>{"code"=>"articles"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [119] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [120] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_modules", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86c9'), "code"=>"articles"}], "lsid"=>{"id"=>}} -MONGODB | [120] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [121] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86c9')}, "u"=>{"$set"=>{"uid"=>"63794cfbbee042dbe60c86c9", "icon"=>""}}}], "lsid"=>{"id"=>"jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86c9')}, "u"=>{"$set"=>{"name"=>"Article", "seq"=>6}}}], "lsid"=>{"id"=>}} -MONGODB | [122] localhost:27017 | dummy_development.update | SUCCEEDED | 0.001s -MONGODB | [123] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_services", "filter"=>{"module_code"=>"articles", "code"=>"link", "name"=>"All Articles: /articles"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [123] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [124] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86ca'), "module_code"=>"articles", "code"=>"link", "name"=>"All Articles: /articles"}], "lsid"=>{"id"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86ca')}, "u"=>{"$set"=>{"xml"=>""jinda_services", "filter"=>{"module_code"=>"articles", "code"=>"link", "name"=>"My article: /articles/my"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [126] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [127] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86cb'), "module_code"=>"articles", "code"=>"link", "name"=>"My article: /articles/my"}], "lsid"=>{"id"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86cb')}, "u"=>{"$set"=>{"xml"=>""articles", "code"=>"new_article"}], "lsid"=>{"id"=>}} -MONGODB | [130] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [131] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86cc')}, "u"=>{"$set"=>{"xml"=>""jinda_services", "filter"=>{"module_code"=>"articles", "code"=>"edit_article"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [132] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [133] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86cd'), "module_code"=>"articles", "code"=>"edit_article"}], "lsid"=>{"id"=>}} -MONGODB | [133] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [134] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86cd')}, "u"=>{"$set"=>{"xml"=>""jinda_services", "filter"=>{"module_code"=>"articles", "code"=>"xedit_article"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [135] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [136] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86ce'), "module_code"=>"articles", "code"=>"xedit_article"}], "lsid"=>{"id"=>}} -MONGODB | [136] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [137] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86ce')}, "u"=>{"$set"=>{"xml"=>"<... -MONGODB | [137] localhost:27017 | dummy_development.update | SUCCEEDED | 0.001s -MONGODB | [138] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_modules", "filter"=>{"code"=>"comments"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [138] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [139] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_modules", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86cf'), "code"=>"comments"}], "lsid"=>{"id"=>}} -MONGODB | [139] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [140] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86cf')}, "u"=>{"$set"=>{"uid"=>"63794cfbbee042dbe60c86cf", "icon"=>"button_cancel"}}}], "lsid"=>{"id"=>"jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86cf')}, "u"=>{"$set"=>{"name"=>"Comment", "seq"=>7}}}], "lsid"=>{"id"=>}} -MONGODB | [141] localhost:27017 | dummy_development.update | SUCCEEDED | 0.001s -MONGODB | [142] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_services", "filter"=>{"module_code"=>"comments", "code"=>"new_comment"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [142] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [143] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86d0'), "module_code"=>"comments", "code"=>"new_comment"}], "lsid"=>{"id"=>}} -MONGODB | [143] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [144] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86d0')}, "u"=>{"$set"=>{"xml"=>""jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86cf')}, "u"=>{"$set"=>{"role"=>"m"}}}], "lsid"=>{"id"=>}} -MONGODB | [145] localhost:27017 | dummy_development.update | SUCCEEDED | 0.001s -MONGODB | [146] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_services", "filter"=>{"module_code"=>"comments", "code"=>"comments"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [146] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [147] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86d1'), "module_code"=>"comments", "code"=>"comments"}], "lsid"=>{"id"=>}} -MONGODB | [147] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [148] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86d1')}, "u"=>{"$set"=>{"xml"=>""jinda_modules", "filter"=>{"code"=>"ctrs"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [149] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [150] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_modules", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86d2'), "code"=>"ctrs"}], "lsid"=>{"id"=>}} -MONGODB | [150] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [151] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86d2')}, "u"=>{"$set"=>{"uid"=>"63794cfbbee042dbe60c86d2", "icon"=>""}}}], "lsid"=>{"id"=>"jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86d2')}, "u"=>{"$set"=>{"name"=>"ctrs& Menu", "seq"=>8}}}], "lsid"=>{"id"=>}} -MONGODB | [152] localhost:27017 | dummy_development.update | SUCCEEDED | 0.001s -MONGODB | [153] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86d2')}, "u"=>{"$set"=>{"role"=>"a"}}}], "lsid"=>{"id"=>}} -MONGODB | [153] localhost:27017 | dummy_development.update | SUCCEEDED | 0.001s -MONGODB | [154] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_services", "filter"=>{"module_code"=>"ctrs", "code"=>"vfolder1"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [154] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [155] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86d3'), "module_code"=>"ctrs", "code"=>"vfolder1"}], "lsid"=>{"id"=>}} -MONGODB | [155] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [156] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86d3')}, "u"=>{"$set"=>{"xml"=>""jinda_services", "filter"=>{"module_code"=>"ctrs", "code"=>"vfolder2"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [157] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [158] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86d4'), "module_code"=>"ctrs", "code"=>"vfolder2"}], "lsid"=>{"id"=>}} -MONGODB | [158] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [159] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86d4')}, "u"=>{"$set"=>{"xml"=>""jinda_modules", "filter"=>{"code"=>"sitemap"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [160] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [161] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_modules", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86d5'), "code"=>"sitemap"}], "lsid"=>{"id"=>}} -MONGODB | [161] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [162] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86d5')}, "u"=>{"$set"=>{"uid"=>"63794cfbbee042dbe60c86d5", "icon"=>""}}}], "lsid"=>{"id"=>"jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86d5')}, "u"=>{"$set"=>{"name"=>"Sitemap", "seq"=>9}}}], "lsid"=>{"id"=>}} -MONGODB | [163] localhost:27017 | dummy_development.update | SUCCEEDED | 0.001s -MONGODB | [164] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_services", "filter"=>{"module_code"=>"sitemap", "code"=>"sitemap"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [164] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [165] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86d6'), "module_code"=>"sitemap", "code"=>"sitemap"}], "lsid"=>{"id"=>}} -MONGODB | [165] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [166] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86d6')}, "u"=>{"$set"=>{"xml"=>"", "name"=>"S... -MONGODB | [166] localhost:27017 | dummy_development.update | SUCCEEDED | 0.001s -MONGODB | [167] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86d5')}, "u"=>{"$set"=>{"role"=>"a"}}}], "lsid"=>{"id"=>}} -MONGODB | [167] localhost:27017 | dummy_development.update | SUCCEEDED | 0.001s -MONGODB | [168] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_modules", "filter"=>{"code"=>"api/v1/notes"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [168] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [169] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_modules", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86d7'), "code"=>"api/v1/notes"}], "lsid"=>{"id"=>}} -MONGODB | [169] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [170] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86d7')}, "u"=>{"$set"=>{"uid"=>"63794cfbbee042dbe60c86d7", "icon"=>""}}}], "lsid"=>{"id"=>"jinda_modules", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86d7')}, "u"=>{"$set"=>{"name"=>"Notes API", "seq"=>10}}}], "lsid"=>{"id"=>}} -MONGODB | [171] localhost:27017 | dummy_development.update | SUCCEEDED | 0.001s -MONGODB | [172] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_services", "filter"=>{"module_code"=>"api/v1/notes", "code"=>"link", "name"=>"My Notes: /api/v1/notes/my"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [172] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [173] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"jinda_services", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86d8'), "module_code"=>"api/v1/notes", "code"=>"link", "name"=>"My Notes: /api/v1/notes/my"}], "lsid"=>{"id"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86d8')}, "u"=>{"$set"=>{"xml"=>""api/v1/notes", "code"=>"new"}], "lsid"=>{"id"=>}} -MONGODB | [176] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [177] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86d9')}, "u"=>{"$set"=>{"xml"=>""api/v1/notes", "code"=>"edit"}], "lsid"=>{"id"=>}} -MONGODB | [179] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [180] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86da')}, "u"=>{"$set"=>{"xml"=>""api/v1/notes", "code"=>"delete"}], "lsid"=>{"id"=>}} -MONGODB | [182] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [183] localhost:27017 #1 | dummy_development.update | STARTED | {"update"=>"jinda_services", "ordered"=>true, "updates"=>[{"q"=>{"_id"=>BSON::ObjectId('63794cfbbee042dbe60c86db')}, "u"=>{"$set"=>{"xml"=>""jinda_modules", "ordered"=>true, "deletes"=>[{"q"=>{"uid"=>{"$nin"=>["63794cfbbee042dbe60c86a7", "63794cfbbee042dbe60c86b0", "63794cfbbee042dbe60c86b5", "63794cfbbee042dbe60c86ba", "63794cfbbee042dbe60c86bd", "63794cfbbee042dbe60c86c2", "6... -MONGODB | [184] localhost:27017 | dummy_development.delete | SUCCEEDED | 0.001s -MONGODB | [185] localhost:27017 #1 | dummy_development.delete | STARTED | {"delete"=>"jinda_services", "ordered"=>true, "deletes"=>[{"q"=>{"uid"=>{"$nin"=>["63794cfbbee042dbe60c86a8", "63794cfbbee042dbe60c86a9", "63794cfbbee042dbe60c86aa", "63794cfbbee042dbe60c86ab", "63794cfbbee042dbe60c86ac", "63794cfbbee042dbe60c86ad", "... -MONGODB | [185] localhost:27017 | dummy_development.delete | SUCCEEDED | 0.001s -MONGODB | [186] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_modules", "filter"=>{}, "sort"=>{"seq"=>1}, "lsid"=>{"id"=>}} -MONGODB | [186] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [187] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_services", "filter"=>{"module_id"=>BSON::ObjectId('63794cfbbee042dbe60c86a7')}, "sort"=>{"seq"=>1}, "lsid"=>{"id"=>}} -MONGODB | [187] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [188] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [188] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [189] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [189] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [190] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [190] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [191] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [191] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [192] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [192] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [193] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [193] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [194] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [194] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [195] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_services", "filter"=>{"module_id"=>BSON::ObjectId('63794cfbbee042dbe60c86bd')}, "sort"=>{"seq"=>1}, "lsid"=>{"id"=>}} -MONGODB | [195] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [196] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [196] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [197] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [197] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [198] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_services", "filter"=>{"module_id"=>BSON::ObjectId('63794cfbbee042dbe60c86c2')}, "sort"=>{"seq"=>1}, "lsid"=>{"id"=>}} -MONGODB | [198] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [199] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [199] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [200] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [200] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [201] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [201] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [202] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [202] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [203] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [203] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [204] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_services", "filter"=>{"module_id"=>BSON::ObjectId('63794cfbbee042dbe60c86c9')}, "sort"=>{"seq"=>1}, "lsid"=>{"id"=>}} -MONGODB | [204] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [205] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [205] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [206] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [206] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [207] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [207] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [208] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [208] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [209] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [209] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [210] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [210] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [211] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_services", "filter"=>{"module_id"=>BSON::ObjectId('63794cfbbee042dbe60c86d7')}, "sort"=>{"seq"=>1}, "lsid"=>{"id"=>}} -MONGODB | [211] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [212] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [212] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [213] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [213] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [214] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [214] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s - Rendered jinda/_menu_mm.haml (Duration: 407.5ms | Allocations: 1045192) -MONGODB | [215] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [215] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [216] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [216] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s - Rendered jinda/_menu.haml (Duration: 434.5ms | Allocations: 1089778) - Rendered jinda/_static.haml (Duration: 2.7ms | Allocations: 6777) - Rendered layouts/jqm/_full.haml (Duration: 1649.7ms | Allocations: 1471099) - Rendered layout layouts/application.haml (Duration: 1658.2ms | Allocations: 1488766) -Completed 200 OK in 1665ms (Views: 1661.0ms | MongoDB: 0.2ms | Allocations: 1491883) - - -MONGODB | EVENT: #true, "topologyVersion"=>{"processId"=>BSON::ObjectId('6367ec5a76a448c37db6eee4'), "counter"=>0}, "maxBsonObjectSize"=>16777216, "maxMessageSizeBytes"=>48000000, "maxWriteBatchSize"=>100000, "localTime"=>2022-11-19 21:39:07.626 UTC, "logicalSessionTimeoutMinutes"=>30, "connectionId"=>94, "minWireVersion"=>0, "maxWireVersion"=>17, "readOnly"=>false, "ok"=>1.0} average_round_trip_time=0.0038656000000000003> new=#true, "topologyVersion"=>{"processId"=>BSON::ObjectId('6367ec5a76a448c37db6eee4'), "counter"=>0}, "maxBsonObjectSize"=>16777216, "maxMessageSizeBytes"=>48000000, "maxWriteBatchSize"=>100000, "localTime"=>2022-11-19 21:39:17.626 UTC, "logicalSessionTimeoutMinutes"=>30, "connectionId"=>92, "minWireVersion"=>0, "maxWireVersion"=>17, "readOnly"=>false, "ok"=>1.0} average_round_trip_time=0.00334028>> -MONGODB | Server description for localhost:27017 changed from 'standalone' to 'standalone'. -MONGODB | EVENT: # -MONGODB | Topology type 'Single' changed to type 'Single'. -MONGODB | EVENT: # -MONGODB | Topology type 'unknown' initializing. -MONGODB | EVENT: # -MONGODB | Topology type 'Unknown' changed to type 'Unknown'. -MONGODB | EVENT: # -MONGODB | Server localhost:27017 initializing. -MONGODB | Waiting for up to 30.00 seconds for servers to be scanned: #]> -MONGODB | EVENT: # new=#true, "topologyVersion"=>{"processId"=>BSON::ObjectId('6367ec5a76a448c37db6eee4'), "counter"=>0}, "maxBsonObjectSize"=>16777216, "maxMessageSizeBytes"=>48000000, "maxWriteBatchSize"=>100000, "localTime"=>2022-11-19 21:40:36.489 UTC, "logicalSessionTimeoutMinutes"=>30, "connectionId"=>96, "minWireVersion"=>0, "maxWireVersion"=>17, "readOnly"=>false, "ok"=>1.0} average_round_trip_time=0.004445>> -MONGODB | Server description for localhost:27017 changed from 'unknown' to 'standalone'. -MONGODB | EVENT: # -MONGODB | Topology type 'Unknown' changed to type 'Single'. -The criteria cache has been deprecated and will be removed in Mongoid 8. Please enable the Mongoid QueryCache to have caching functionality. -MONGODB | EVENT: #true, "topologyVersion"=>{"processId"=>BSON::ObjectId('6367ec5a76a448c37db6eee4'), "counter"=>0}, "maxBsonObjectSize"=>16777216, "maxMessageSizeBytes"=>48000000, "maxWriteBatchSize"=>100000, "localTime"=>2022-11-19 21:40:36.489 UTC, "logicalSessionTimeoutMinutes"=>30, "connectionId"=>96, "minWireVersion"=>0, "maxWireVersion"=>17, "readOnly"=>false, "ok"=>1.0} average_round_trip_time=0.004445> new=#true, "topologyVersion"=>{"processId"=>BSON::ObjectId('6367ec5a76a448c37db6eee4'), "counter"=>0}, "maxBsonObjectSize"=>16777216, "maxMessageSizeBytes"=>48000000, "maxWriteBatchSize"=>100000, "localTime"=>2022-11-19 21:40:36.493 UTC, "logicalSessionTimeoutMinutes"=>30, "connectionId"=>97, "minWireVersion"=>0, "maxWireVersion"=>17, "readOnly"=>false, "ok"=>1.0} average_round_trip_time=0.0041722>> -MONGODB | Server description for localhost:27017 changed from 'standalone' to 'standalone'. -MONGODB | EVENT: # -MONGODB | Topology type 'Single' changed to type 'Single'. -MONGODB | [7] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"identities", "filter"=>{"code"=>"admin"}, "projection"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [7] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [8] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"identities", "filter"=>{"code"=>"admin"}, "projection"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [8] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [9] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"identities", "filter"=>{"email"=>"admin@test.com"}, "projection"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [9] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [10] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"identities", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794d54bee042de69125a42'), "code"=>"admin", "email"=>"admin@test.com", "password_digest"=>"$2a$12$RYJjfj152r5lVdJrnmNqDOsY9cjpviw5IekAIcE3qZ7.i0LIM/0VO"}], "lsid"=>{"id"=... -MONGODB | [10] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.008s -MONGODB | [11] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"code"=>"admin"}, "projection"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [11] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [12] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"users", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794d54bee042de69125a43'), "provider"=>"identity", "uid"=>"63794d54bee042de69125a42", "code"=>"admin", "email"=>"admin@test.com", "role"=>"M,A,D", "image"=>"https://user-image... -MONGODB | [12] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.006s -MONGODB | [13] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"identities", "filter"=>{"code"=>"tester"}, "projection"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [13] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [14] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"identities", "filter"=>{"code"=>"tester"}, "projection"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [14] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [15] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"identities", "filter"=>{"email"=>"tester@test.com"}, "projection"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [15] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [16] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"identities", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794d55bee042de69125a44'), "code"=>"tester", "email"=>"tester@test.com", "password_digest"=>"$2a$12$tEGVBz6Rg8MJzIawYNnIzOQ/t0LzritrfhvpWHlCv.pU20LzmSQ9C"}], "lsid"=>{"id... -MONGODB | [16] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [17] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"code"=>"tester"}, "projection"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [17] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [18] localhost:27017 #1 | dummy_development.insert | STARTED | {"insert"=>"users", "ordered"=>true, "documents"=>[{"_id"=>BSON::ObjectId('63794d55bee042de69125a45'), "provider"=>"identity", "uid"=>"63794d55bee042de69125a44", "code"=>"tester", "email"=>"tester@test.com", "role"=>"M", "image"=>"https://www.manatees... -MONGODB | [18] localhost:27017 | dummy_development.insert | SUCCEEDED | 0.001s -MONGODB | [19] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"identities", "filter"=>{"code"=>"admin"}, "projection"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [19] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [20] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"identities", "filter"=>{"code"=>"tester"}, "projection"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [20] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -Started GET "/" for ::1 at 2022-11-19 15:40:55 -0600 -Processing by JindaController#index as HTML - Rendering layout layouts/application.haml - Rendering jinda/index.html.haml within layouts/application - Rendered jinda/index.html.haml within layouts/application (Duration: 4.7ms | Allocations: 11958) -MONGODB | [217] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [217] localhost:27017 | dummy_development.find | SUCCEEDED | 0.004s -MONGODB | [218] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [218] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [219] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [219] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [220] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [220] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s - Rendered layouts/lte/_header.haml (Duration: 27.4ms | Allocations: 57948) -MONGODB | [221] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [221] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [222] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [222] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [223] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_modules", "filter"=>{}, "sort"=>{"seq"=>1}, "lsid"=>{"id"=>}} -MONGODB | [223] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [224] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_services", "filter"=>{"module_id"=>BSON::ObjectId('63794cfbbee042dbe60c86a7')}, "sort"=>{"seq"=>1}, "lsid"=>{"id"=>}} -MONGODB | [224] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [225] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [225] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [226] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [226] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [227] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [227] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [228] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [228] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [229] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [229] localhost:27017 | dummy_development.find | SUCCEEDED | 0.003s -MONGODB | [230] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [230] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [231] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [231] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [232] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_services", "filter"=>{"module_id"=>BSON::ObjectId('63794cfbbee042dbe60c86bd')}, "sort"=>{"seq"=>1}, "lsid"=>{"id"=>}} -MONGODB | [232] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [233] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [233] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [234] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [234] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [235] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_services", "filter"=>{"module_id"=>BSON::ObjectId('63794cfbbee042dbe60c86c2')}, "sort"=>{"seq"=>1}, "lsid"=>{"id"=>}} -MONGODB | [235] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [236] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [236] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [237] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [237] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [238] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [238] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [239] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [239] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [240] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [240] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [241] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_services", "filter"=>{"module_id"=>BSON::ObjectId('63794cfbbee042dbe60c86c9')}, "sort"=>{"seq"=>1}, "lsid"=>{"id"=>}} -MONGODB | [241] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [242] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [242] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [243] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [243] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [244] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [244] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [245] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [245] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [246] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [246] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [247] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [247] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [248] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"jinda_services", "filter"=>{"module_id"=>BSON::ObjectId('63794cfbbee042dbe60c86d7')}, "sort"=>{"seq"=>1}, "lsid"=>{"id"=>}} -MONGODB | [248] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [249] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [249] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [250] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [250] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s -MONGODB | [251] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [251] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s - Rendered layouts/lte/_menu_mm.haml (Duration: 85.1ms | Allocations: 278524) -MONGODB | [252] localhost:27017 #1 | dummy_development.find | STARTED | {"find"=>"users", "filter"=>{"auth_token"=>"YaZkE74V0-vhg08-tQEMzg"}, "sort"=>{"_id"=>1}, "limit"=>1, "lsid"=>{"id"=>}} -MONGODB | [252] localhost:27017 | dummy_development.find | SUCCEEDED | 0.001s - Rendered layouts/lte/_menu.haml (Duration: 92.0ms | Allocations: 297721) - Rendered layouts/lte/_sidebar.haml (Duration: 106.4ms | Allocations: 340141) - Rendered layouts/lte/_flash.haml (Duration: 1.6ms | Allocations: 3956) - Rendered layouts/lte/_footer.haml (Duration: 1.0ms | Allocations: 3225) - Rendered layout layouts/application.haml (Duration: 326.9ms | Allocations: 559196) -Completed 200 OK in 328ms (Views: 327.5ms | MongoDB: 0.0ms | Allocations: 560249) - - diff --git a/test/dummy/tmp/development_secret.txt b/test/dummy/tmp/development_secret.txt index 995fd16..1869206 100644 --- a/test/dummy/tmp/development_secret.txt +++ b/test/dummy/tmp/development_secret.txt @@ -1 +1 @@ -4c3fe5941e16cfbd3d524bf40427b40556764fb06d021eb9617e4386452377ee62ccb30bdc54af63bf6725a1b25953f6d888f52718c802050481310313575594 \ No newline at end of file +05732a677c708d3c62b8595dfd5ebf6a4c6bdd6c4daf5fa0e0a3f7c56f778ee5e2108a485f98694af8b37c6d150c953e05ab6c0f58e67bc2f970668d79785f70 \ No newline at end of file