notee 0.4.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/notee/application.js +19539 -17294
- data/app/controllers/notee/application_controller.rb +5 -0
- data/app/controllers/notee/categories_controller.rb +7 -3
- data/app/controllers/notee/comments_controller.rb +9 -4
- data/app/controllers/notee/images_controller.rb +2 -2
- data/app/controllers/notee/posts_controller.rb +11 -4
- data/app/controllers/notee/roles_controller.rb +1 -1
- data/app/controllers/notee/tokens_controller.rb +9 -15
- data/app/controllers/notee/trashes_controller.rb +60 -0
- data/app/controllers/notee/users_controller.rb +26 -6
- data/app/models/notee/application_record.rb +27 -0
- data/app/models/notee/authority.rb +377 -0
- data/app/models/notee/category.rb +15 -2
- data/app/models/notee/comment.rb +6 -0
- data/app/models/notee/image.rb +2 -2
- data/app/models/notee/post.rb +7 -5
- data/app/models/notee/user.rb +97 -41
- data/app/views/layouts/notee/application.html.erb +3 -1
- data/config/routes.rb +19 -9
- data/db/migrate/20160605141437_create_notee_posts.rb +1 -0
- data/db/migrate/20160605141510_create_notee_categories.rb +4 -1
- data/db/migrate/20160605141547_create_notee_images.rb +4 -2
- data/db/migrate/20160803154954_create_notee_comments.rb +2 -1
- data/db/migrate/20160809145754_create_notee_users.rb +1 -0
- data/lib/notee/helpers/notee_helper.rb +65 -46
- data/lib/notee/helpers/view_helper.rb +10 -2
- data/lib/notee/status.rb +1 -2
- data/lib/notee/version.rb +1 -1
- data/lib/tasks/config/notee.rb +26 -0
- data/lib/tasks/config/schedule.rb +7 -0
- data/lib/tasks/controllers/notee_controller.rb +65 -0
- data/lib/tasks/javascripts/notee/highlight.pack.js +2 -0
- data/lib/tasks/notee_tasks.rake +105 -51
- data/lib/tasks/stylesheets/notee/highlight/agate.css +108 -0
- data/lib/tasks/stylesheets/notee/highlight/androidstudio.css +66 -0
- data/lib/tasks/stylesheets/notee/highlight/arduino-light.css +88 -0
- data/lib/tasks/stylesheets/notee/highlight/arta.css +73 -0
- data/lib/tasks/stylesheets/notee/highlight/ascetic.css +45 -0
- data/lib/tasks/stylesheets/notee/highlight/atelier-cave-dark.css +83 -0
- data/lib/tasks/stylesheets/notee/highlight/atelier-cave-light.css +85 -0
- data/lib/tasks/stylesheets/notee/highlight/atelier-dune-dark.css +69 -0
- data/lib/tasks/stylesheets/notee/highlight/atelier-dune-light.css +69 -0
- data/lib/tasks/stylesheets/notee/highlight/atelier-estuary-dark.css +84 -0
- data/lib/tasks/stylesheets/notee/highlight/atelier-estuary-light.css +84 -0
- data/lib/tasks/stylesheets/notee/highlight/atelier-forest-dark.css +69 -0
- data/lib/tasks/stylesheets/notee/highlight/atelier-forest-light.css +69 -0
- data/lib/tasks/stylesheets/notee/highlight/atelier-heath-dark.css +69 -0
- data/lib/tasks/stylesheets/notee/highlight/atelier-heath-light.css +69 -0
- data/lib/tasks/stylesheets/notee/highlight/atelier-lakeside-dark.css +69 -0
- data/lib/tasks/stylesheets/notee/highlight/atelier-lakeside-light.css +69 -0
- data/lib/tasks/stylesheets/notee/highlight/atelier-plateau-dark.css +84 -0
- data/lib/tasks/stylesheets/notee/highlight/atelier-plateau-light.css +84 -0
- data/lib/tasks/stylesheets/notee/highlight/atelier-savanna-dark.css +84 -0
- data/lib/tasks/stylesheets/notee/highlight/atelier-savanna-light.css +84 -0
- data/lib/tasks/stylesheets/notee/highlight/atelier-seaside-dark.css +69 -0
- data/lib/tasks/stylesheets/notee/highlight/atelier-seaside-light.css +69 -0
- data/lib/tasks/stylesheets/notee/highlight/atelier-sulphurpool-dark.css +69 -0
- data/lib/tasks/stylesheets/notee/highlight/atelier-sulphurpool-light.css +69 -0
- data/lib/tasks/stylesheets/notee/highlight/atom-one-dark.css +96 -0
- data/lib/tasks/stylesheets/notee/highlight/atom-one-light.css +96 -0
- data/lib/tasks/stylesheets/notee/highlight/brown-paper.css +64 -0
- data/lib/tasks/stylesheets/notee/highlight/brown-papersq.png +0 -0
- data/lib/tasks/stylesheets/notee/highlight/codepen-embed.css +60 -0
- data/lib/tasks/stylesheets/notee/highlight/color-brewer.css +71 -0
- data/lib/tasks/stylesheets/notee/highlight/darcula.css +77 -0
- data/lib/tasks/stylesheets/notee/highlight/dark.css +63 -0
- data/lib/tasks/stylesheets/notee/highlight/darkula.css +6 -0
- data/lib/tasks/stylesheets/notee/highlight/default.css +99 -0
- data/lib/tasks/stylesheets/notee/highlight/docco.css +97 -0
- data/lib/tasks/stylesheets/notee/highlight/dracula.css +76 -0
- data/lib/tasks/stylesheets/notee/highlight/far.css +71 -0
- data/lib/tasks/stylesheets/notee/highlight/foundation.css +88 -0
- data/lib/tasks/stylesheets/notee/highlight/github-gist.css +71 -0
- data/lib/tasks/stylesheets/notee/highlight/github.css +99 -0
- data/lib/tasks/stylesheets/notee/highlight/googlecode.css +89 -0
- data/lib/tasks/stylesheets/notee/highlight/grayscale.css +101 -0
- data/lib/tasks/stylesheets/notee/highlight/gruvbox-dark.css +108 -0
- data/lib/tasks/stylesheets/notee/highlight/gruvbox-light.css +108 -0
- data/lib/tasks/stylesheets/notee/highlight/hopscotch.css +83 -0
- data/lib/tasks/stylesheets/notee/highlight/hybrid.css +102 -0
- data/lib/tasks/stylesheets/notee/highlight/idea.css +97 -0
- data/lib/tasks/stylesheets/notee/highlight/ir-black.css +73 -0
- data/lib/tasks/stylesheets/notee/highlight/kimbie.dark.css +74 -0
- data/lib/tasks/stylesheets/notee/highlight/kimbie.light.css +74 -0
- data/lib/tasks/stylesheets/notee/highlight/magula.css +70 -0
- data/lib/tasks/stylesheets/notee/highlight/mono-blue.css +59 -0
- data/lib/tasks/stylesheets/notee/highlight/monokai-sublime.css +83 -0
- data/lib/tasks/stylesheets/notee/highlight/monokai.css +70 -0
- data/lib/tasks/stylesheets/notee/highlight/obsidian.css +88 -0
- data/lib/tasks/stylesheets/notee/highlight/ocean.css +74 -0
- data/lib/tasks/stylesheets/notee/highlight/paraiso-dark.css +72 -0
- data/lib/tasks/stylesheets/notee/highlight/paraiso-light.css +72 -0
- data/lib/tasks/stylesheets/notee/highlight/pojoaque.css +83 -0
- data/lib/tasks/stylesheets/notee/highlight/pojoaque.jpg +0 -0
- data/lib/tasks/stylesheets/notee/highlight/purebasic.css +96 -0
- data/lib/tasks/stylesheets/notee/highlight/qtcreator_dark.css +83 -0
- data/lib/tasks/stylesheets/notee/highlight/qtcreator_light.css +83 -0
- data/lib/tasks/stylesheets/notee/highlight/railscasts.css +106 -0
- data/lib/tasks/stylesheets/notee/highlight/rainbow.css +85 -0
- data/lib/tasks/stylesheets/notee/highlight/school-book.css +72 -0
- data/lib/tasks/stylesheets/notee/highlight/school-book.png +0 -0
- data/lib/tasks/stylesheets/notee/highlight/solarized-dark.css +84 -0
- data/lib/tasks/stylesheets/notee/highlight/solarized-light.css +84 -0
- data/lib/tasks/stylesheets/notee/highlight/sunburst.css +102 -0
- data/lib/tasks/stylesheets/notee/highlight/tomorrow-night-blue.css +75 -0
- data/lib/tasks/stylesheets/notee/highlight/tomorrow-night-bright.css +74 -0
- data/lib/tasks/stylesheets/notee/highlight/tomorrow-night-eighties.css +74 -0
- data/lib/tasks/stylesheets/notee/highlight/tomorrow-night.css +75 -0
- data/lib/tasks/stylesheets/notee/highlight/tomorrow.css +72 -0
- data/lib/tasks/stylesheets/notee/highlight/vs.css +68 -0
- data/lib/tasks/stylesheets/notee/highlight/xcode.css +93 -0
- data/lib/tasks/stylesheets/notee/highlight/xt256.css +92 -0
- data/lib/tasks/stylesheets/notee/highlight/zenburn.css +80 -0
- data/lib/tasks/stylesheets/notee/normalize.css +427 -0
- data/lib/tasks/stylesheets/notee/notee_default.css +386 -0
- data/lib/tasks/views/notee/about.html.erb +43 -0
- data/lib/tasks/views/notee/archives.html.erb +16 -0
- data/lib/tasks/views/notee/categories.html.erb +15 -0
- data/lib/tasks/views/notee/partials/_foote.html.erb +3 -0
- data/lib/tasks/views/notee/partials/_header.html.erb +17 -0
- data/lib/tasks/views/notee/partials/_profile.html.erb +9 -0
- data/lib/tasks/views/notee/partials/_sidebar.html.erb +23 -0
- data/lib/tasks/views/notee/posts.html.erb +53 -0
- data/lib/tasks/views/notee/show.html.erb +42 -0
- data/lib/tasks/views/notee/writers.html.erb +11 -0
- metadata +115 -240
- data/lib/tasks/css/notee_default.css +0 -59
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +0 -3087
- data/test/dummy/log/test.log +0 -872
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/-t/-tdJTrCcY92VpiO_z6SIt_iHkHDtn1-8Vf__p-Ve9lU.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/0K/0KQJQyRy3gQkymW0xnPhM4_OpLtoTcw9Rutx4F4IajE.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/1B/1Bb2_fhXoTmM27WcuQJ2sr0UCMHh6TjrBIwd6Ks8qJ0.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/1N/1NYje2ld9grEMpvxBFjocEWWMPi4jNPuPLdlkV1Wq5A.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/1s/1sPuKGE0jImBtnCnczIk6NpOn9cYeyBZsXHvpXJ1tGA.cache +0 -2
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/1s/1sRxHck-81_JSGvEidXPx2S86Cbe0UjizohTg5lkd-U.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/3d/3dw9fS6dak9HSgJqviXZ6CCibFx8--QDKyWjrqKqraI.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/4S/4SCYKO2aAiXfZPZF1vTYeIQegrrqvH-2jlfGl1I6juQ.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/4z/4zE2reLAwChLIBivfo5JfQjRwOM2sBvlDLXftsA772o.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/5L/5Lly_CA8DZvPhQV2jDQx-Y6P_y3Ygra9t5jfSlGhHDA.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/5p/5pDjSjY69Pd-A64UKCqQ_yxQouHkmBElVBKf1IZT2HM.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/5p/5pnvfhvSgahCnLPLbhB7dM8lSEhk2w39UTDXe83gYng.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/5r/5r2K8e-LRVnmo3VUaNdNx3K1b_BgFMOboxlnTQC_Ckk.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/5u/5ue4ZdF425UevYa9Danha84KDME2s4InW-zR-y-Y0SM.cache +0 -2
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/6Q/6Qq8Rnvquz8oH8ojJlj79pSAhSHH_VoWRS0Cn-d-yLQ.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/6Y/6Y--Gdy-iDkVFcgE3j660zOA3sf_osOedfJpeV_Kxh4.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/7G/7GrmDrSvjAFvLUcaRN95cQLmvkzf8D_cvGlhRyL01HA.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/83/83mXRYYdvGZS4tNS_IFZLa5P6e-fg9MSMqWG4MJ-Jks.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/8H/8HKewCH2XL9errlVDVPK8QZg0LoH-_Q3zqQ1pjCYBEU.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/8v/8vJIODLLCFZwV8yIF98dlb5_CQZlgBdCLiM8UA6WiSA.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/9W/9WtQTxW8TE4CQvkem1QkHVjZFB93XAJo3ioPSt6U5wM.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/AH/AHLaBPz-xNABgeh1V66iU7wJ6FCxvFIie5V05wRvI84.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/C1/C1S3q8MtvUImrUe70fZPf9wxMfxdcWPSRXRrv4H6_lo.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/D4/D4ftsVSRtZadejqqBmur8bfiHLhZFCaIjpsAdJT28Iw.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/DS/DSOLSc6A5RVSmvM415eEWAWG_AgOvZcLZOXQjsXyWQA.cache +0 -2
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Fr/FrWiXIfDo2-fsKFSgef9Bs-0HjC7dOgBY8IVBLCq9ag.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Fz/FzjTR8U_FOgMIbfYBgJfzujyNBozRZd-3YYTkiAQTOg.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/G6/G6nKI6E9cfkIZqH5EnbMJtS4DKHApFlNTKh__ZuK774.cache +0 -2
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/HH/HHQp4rqJ3kx9sfFo3AAW2DS6zHl28lCqALB5YnKXeG8.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/IN/INpQmG9J4AOUCg2YWypvnwq9ce01SFPnDGidI2qcU_8.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/J0/J038M_TjhJBb-678LCin4jaJSkSaaXy7XHJbEp1Bo5I.cache +0 -2
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/JI/JIHr2A9bWoln5XahhS15lRxvHSXdQZ7OrlbAW1IzayM.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/JI/JId5JhtAhhN90V7z1OSItT9m4n4H_Nfk3IGtOW0mA_s.cache +0 -3
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/JP/JPylOhsUjr9NtL1AViDe-Sz0-iLPZGPww463ChRqhEw.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/JU/JUdbchVNMjz67zIvPztSzFfpU_VO4Rl9V86GzJH28_A.cache +0 -2
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/K0/K0Ou5PNqxeODBFSEnIeg7EaidQVBRvPH-SPrTF1tRVA.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/KS/KSTuVqjLw0xUGYH5WcnAloHDphCDQr4cFjXKKl5vW7M.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/L-/L--JLWiCS6RZ0l_EciZOoY0eTEs6BGBED1YZ7hj13vQ.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/ME/META30ksADpNoAnM_vlhKhlLOfxBlo5uJjJKSJa264o.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/MH/MHQULHaqwmMfm67LLiF_ZDlM6Zix3aPput7pxTViWQ0.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/NK/NKXg7894FsAVQJxXzYkUOgd131zYAeWOIxmegdT-LFk.cache +0 -2
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/NW/NWx4g28WkpCPeRLdgMDaUuLO2e4UIw2bs-HKy-ixIlU.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Nj/NjPNj--fkweGPvPTHkDlefKtB5bpFaGG9X60M_goNUo.cache +0 -2
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/OI/OI6uxGcnsKavdWTtwDAasU3wPx8QXhzBgV0X2n1KjMQ.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Oh/Ohok7uysixzjxK1FE7m-KJv6gqYQH4svN8nZyRBOgwA.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Ot/Ot7COhZjTueyAONhzjXiOOwv0uTS9EtXGgxYznVMIvs.cache +0 -3
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/P4/P4KZGx6J2yGIq1PMq13fnsaXrS47R-S_sYrQrcUL59I.cache +0 -3
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Pn/Pn9eXmle4fRjakm_xgwyXs5YzlWELSuhbi3nnV2-Ink.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/QY/QYNLSW9XctrfttzhOfkik5INswRo-qBjjwQvA7S_lyc.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Qb/Qbb4ATlvuCS0fudaTweqJoma2S99Mr2Q6ISbIpDoMso.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/R6/R6E4Q8O1upT5p_U-ySDbO3dFY6SMeSwmubqJUfSJedo.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Rv/RvcRQ_I7meCLqBRooErlcPwcbH0tdDuvO5SQ_Xy45Qk.cache +0 -2
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Sz/SzRmx7uSmniNAGO1zMPd4qzEgM8eAaWBqaxestc32Jg.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Tk/TkRyIpbn-1DcVexPTWUljWQOek0D_q6yO_jYNGwKM_o.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/U1/U1E_3Z4bItTBl9s8aX6O2rceqAD5GfoNzF8AqYs9Hig.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/UC/UCe1qLwGTD6W2etoFOMln6E2DgTq8Xnm7eGvCs6YGEE.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/UZ/UZhrzLOgNG132Xf1yJ7H7lSq4S3TyDoPphdzwKU8fqQ.cache +0 -3
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Ud/UdBXq-s3u32R-gjMCYZv9RJH4n1xSt8PnBpWxg-JzGE.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/VD/VDaYJQJdErZ0zVg9KgvidORf7a13jqM72Uk97zzuUZU.cache +0 -2
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/WT/WTExV_4iBOBS-SWMh6jqm61uSp83ezH5DPIkjfktls4.cache +0 -3
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Wi/Wia5tzg4hJNhNhKWgY7pkrxWbvr6n0YaKXl80wh6qPg.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Wl/WldqQqssrkJedTdiFt86Y6FDn5ww1MirVAAnOpRqeCE.cache +0 -3
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Wv/WvAZ72pGsB5VpmTmGBucm1eztH129yQ1YmrRMy-yS4g.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Wz/WzSkff9VUQsb0DJ5RB3m3SfxRTMU97qhyNCqiIHlJPw.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Yx/Yx6fZ9ju2qCb4Ps_0iEzNR7KgDNTE2gIRjcdOMFXNlo.cache +0 -2
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/ZO/ZOUPFk5_ZB8Wtn42g9PiY6Qu7KSbipNG04Qa5YSP6sw.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/ZT/ZT-4a7lIKMm0Swxyt7MdXMz5v6r5MaVvtHvqAT6T8Ts.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Zb/ZbvOW6HdEiql0zdGkCPG-EK8beJAmp1ovBR1Oy1V6Fw.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Zu/ZuAoFB2A_kFOIb19dNUzEU5jP-SzQLmauPCURINz2Fo.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/_r/_rmEe1ir-igQN0twVhxrxngbLIFJkINITWVGNye4-MM.cache +0 -2
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/aE/aEQNT9eY4cAc2ACQnD35BkLV5dEezB-drcCoF1SzjAc.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/bK/bKPdLlYXb5ZZU8vrzCdKqLgCXyeiXHExSl9lwGIofU0.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/br/brGLDCuoxhnIrvwsuWmzjnwDV7Bn_nezqOrXiI0oco0.cache +0 -3
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/c3/c3Jo7UkNggNJH21U9HD-Y5Lipd68yZXcl6FGMbzFEeM.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/c4/c4YjuvK4zQOjr5Q6N7A_-NHM59NF0kGApLBxSZ5JgqA.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/c9/c9B4H9i5OvdAnZpel-KocssCcsd3TS2Gqe4uKAFjiKQ.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/dM/dMJ_N4wD6R1wforGNMdyz6wec-5a7_H03vxu0pgPhLc.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/dr/drYndmRIbBKroImntO4XhUYV5kqxE2q2qE_aYRwYj4Q.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/du/dumQ6K8NP4rz74ofF4DxxFRetR-K07c75MhZrUQDbqY.cache +0 -3
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/fn/fns6a_EwXvrlRyeQjB9lcYXHfIZi0guP75oUWPuz4Z0.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/g3/g3NfArxOfOGHlWIGK-Znm2-gh1Oyud_f5ZEFuGrOv2g.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/gF/gFErWaVWbjefUiSe3yI-bWCrUD3SsMHomSjTacMlSDM.cache +0 -2
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/gG/gGCsoohK0vflREMUeOrfW4KZeI73jU9ld5t0pzfjh4U.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/gZ/gZp3uXMHuYQC4hzCr7bQfetKNdJAtbQmg3so2KpW1Dw.cache +0 -2
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/hZ/Hz6pNt28QsuyrFcIx0afHONIVEGdLBEC64cV2zh2xAM.cache +0 -2
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/hZ/hZi1k6tpxxCGYxRe7zY74ItcOI8gZrREOpGuA8JSpGg.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/hv/hvw4qAvufcLTOeT9ie13DTIDt3SOLih2iH9P603ZOFQ.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/iZ/iZGxFM6U5PSEZmHGlksi8vAVBMlMiyjOBaL8HIGcOPE.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/ig/iguUMDAVIm9pfM52njpM4hqpnNYkwKTWvNXQyolgR74.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/jJ/jJTo0slnuZqKDbuFGjyBEkenWViH1MiTvb7gNjc4SL4.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/jN/jNM9mSzc6sg9yU7srXH0l2_bPIXbqLtJVBML2umXb9w.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/jh/jhx8TAOiUaenqesmOiahNzaVcnpiciOE8VKZdrxGerc.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/kT/kTif4yPNd0vB6fWie0kxsN5Gwubl8sqAOyydwpiyHzo.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/m3/m3lSeIbfcyVVkENoCOiz_6LvNubosVesCJBkdI88aNk.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/m6/m6kJHQNOyyMHxod8TObJKAp8iV_noMwYPWsBh-CCG0k.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/mX/mXJ655Gxgvg2C08jNcMFB9OQ2G6HrtGc_MfVIpYycsg.cache +0 -3
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/mr/MrG8zKUbpqoyxO2GdEOuWmFBUIpOKL3upEtfOWsYluQ.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/mr/mr-hjupF6Lf8wABiaoi8L9823j20yjhhTnrn4FNsEZI.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/n2/n2T4JbhKpnbSE5uhnXyPzu4WnDOkMu78BrJ-Huhn7YU.cache +0 -2
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/nC/nCuKY2iJdzgSyWS09dThZ5T57F8vGBo0w-ycyuEidUk.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/og/ogVEMp7SPQ-wAJz4mNXdRrx52GXFvHKpSx3bS7dr_t8.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/pE/pEhaat2KBd5SrT7szC_8R1_6hK17FTpvoRFkmCRSD3M.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/pO/pOOGu7nAdun08PmdiHZas85h5Kqbgs6_M5vHQQKJgW8.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/pX/pXIDW5zCrR8MxxTON9elPRDkMBEefpa-fWViSmyJGns.cache +0 -2
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/qF/qFG1ZnUOHTHsxMxvN1iTKNCA05nrecKPlygtJzvMdSs.cache +0 -2
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/sS/sS00IDFTJ19zoTjrB2-Sypybo0I1qXoTtW8JabBMoAo.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/sb/sbB7Wbcww5hxA8e-5K0oBKQDnlNNnY90t0YUIdYE138.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/xX/xXo4fouecqy2oZpxsgtkqL6uyIDuKLwBUwmzddno9hw.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/x_/x_WcnsWyMV1QzLUnFW5J4gZHs0gACREYGaSom7xcaBQ.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/yC/yCp-2wuXWORHGqxfwG37-mb00X8GpHiRjrlo2QQX3lU.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/yW/yWtPpcB-kB8_hw5k0prtaOvTW5A5PaCT0ZaJSdh8Zkw.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/ys/ysFM6FIJniGme1T62LOmRFt3h7g0scd6o6BFIjS5Ppg.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/z4/z4i9WzpZRzFXynWsqewNMikNdcZ9f9mGFdlrIP5N6Gs.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/zN/zNfQXfFXMTyOoz3HbVM-_4m-46rWO7XrZPvGs4aJCQc.cache +0 -2
@@ -24,10 +24,18 @@ module Notee
|
|
24
24
|
return render :partial => "notee/partials/comment_box.html.erb", :locals => { :post_id => id, :recaptcha => Notee.recaptcha_key }
|
25
25
|
end
|
26
26
|
|
27
|
-
def notee_meta(meta)
|
28
|
-
meta ||= Notee.blog_meta
|
27
|
+
def notee_meta(meta = Notee.blog_meta)
|
29
28
|
return render :partial => "notee/partials/meta.html.erb", :locals => { :meta => meta, :ga => Notee.google_analytics }
|
30
29
|
end
|
30
|
+
|
31
|
+
def notee_title
|
32
|
+
return Notee.blog_meta[:title]
|
33
|
+
end
|
34
|
+
|
35
|
+
def notee_description
|
36
|
+
return Notee.blog_meta[:description]
|
37
|
+
end
|
38
|
+
|
31
39
|
end
|
32
40
|
end
|
33
41
|
end
|
data/lib/notee/status.rb
CHANGED
data/lib/notee/version.rb
CHANGED
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'notee'
|
2
|
+
|
3
|
+
# Recommendation using .env for manage id & password
|
4
|
+
|
5
|
+
Notee.configure do |config|
|
6
|
+
|
7
|
+
# root-user
|
8
|
+
config.notee_id = "hogehoge"
|
9
|
+
config.notee_password = "hogehoge"
|
10
|
+
|
11
|
+
# recaptcha
|
12
|
+
config.recaptcha_key = "hogehoge"
|
13
|
+
config.recaptcha_secret_key = "hogehoge"
|
14
|
+
|
15
|
+
# blog
|
16
|
+
config.blog_meta = {
|
17
|
+
title: "Notee",
|
18
|
+
url: "http://hogehoge.com",
|
19
|
+
keyword: "hoge, hoge, hoge",
|
20
|
+
description: "hogehoge",
|
21
|
+
og_image: "http://hogehoge.com/hoge.png"
|
22
|
+
}
|
23
|
+
|
24
|
+
# google-analytics
|
25
|
+
config.google_analytics = "hogehogehogehoge"
|
26
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
class NoteeController < ApplicationController
|
2
|
+
|
3
|
+
before_action :set_meta_info, except: [:show]
|
4
|
+
|
5
|
+
# GET "/"
|
6
|
+
def index
|
7
|
+
@posts = notees
|
8
|
+
@notee_title = 'Post Lists'
|
9
|
+
render :action => 'posts'
|
10
|
+
end
|
11
|
+
|
12
|
+
# GET "/:id_or_slug"
|
13
|
+
def show
|
14
|
+
redirect_to root_path if params[:id_or_slug].nil?
|
15
|
+
@post = notee(params[:id_or_slug])
|
16
|
+
@notee_meta = notee_set_meta_by_post(@post)
|
17
|
+
end
|
18
|
+
|
19
|
+
# GET "/categories"
|
20
|
+
def categories
|
21
|
+
@categories = notee_categories
|
22
|
+
end
|
23
|
+
|
24
|
+
# GET "/categories/:name_or_slug"
|
25
|
+
def category_posts
|
26
|
+
@posts = category_notees(params[:name_or_slug])
|
27
|
+
@notee_title = 'Category: ' + params[:name_or_slug]
|
28
|
+
render :action => 'posts'
|
29
|
+
end
|
30
|
+
|
31
|
+
# GET "/archives"
|
32
|
+
def archives
|
33
|
+
@archives = notee_archives
|
34
|
+
end
|
35
|
+
|
36
|
+
# GET "/archives/:year"
|
37
|
+
# GET "/archives/:year/:month"
|
38
|
+
def archive_posts
|
39
|
+
@posts = archive_notees(params[:year], params[:month].present? ? params[:month] : nil)
|
40
|
+
@notee_title = 'Archive: ' + params[:year] + (params[:month].present? ? "/" + params[:month].to_s : "")
|
41
|
+
render :action => 'posts'
|
42
|
+
end
|
43
|
+
|
44
|
+
# GET "/writers"
|
45
|
+
def writers
|
46
|
+
@writers = notee_writers
|
47
|
+
end
|
48
|
+
|
49
|
+
# GET "/writers/:name_or_id"
|
50
|
+
def writer_posts
|
51
|
+
@posts = writer_notees(params[:name_or_id])
|
52
|
+
@notee_title = 'Writer: ' + params[:name_or_id]
|
53
|
+
render :action => 'posts'
|
54
|
+
end
|
55
|
+
|
56
|
+
# GET "/about"
|
57
|
+
def about
|
58
|
+
end
|
59
|
+
|
60
|
+
private
|
61
|
+
def set_meta_info
|
62
|
+
@notee_meta = Notee.blog_meta
|
63
|
+
end
|
64
|
+
|
65
|
+
end
|
@@ -0,0 +1,2 @@
|
|
1
|
+
/*! highlight.js v9.8.0 | BSD3 License | git.io/hljslicense */
|
2
|
+
!function(e){var n="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):n&&(n.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return n.hljs}))}(function(e){function n(e){return e.replace(/[&<>]/gm,function(e){return I[e]})}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0===t.index}function a(e){return k.test(e)}function i(e){var n,t,r,i,o=e.className+" ";if(o+=e.parentNode?e.parentNode.className:"",t=B.exec(o))return R(t[1])?t[1]:"no-highlight";for(o=o.split(/\s+/),n=0,r=o.length;r>n;n++)if(i=o[n],a(i)||R(i))return i}function o(e,n){var t,r={};for(t in e)r[t]=e[t];if(n)for(t in n)r[t]=n[t];return r}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3===i.nodeType?a+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!==r[0].offset?e[0].offset<r[0].offset?e:r:"start"===r[0].event?e:r:e.length?e:r}function o(e){function r(e){return" "+e.nodeName+'="'+n(e.value)+'"'}l+="<"+t(e)+w.map.call(e.attributes,r).join("")+">"}function u(e){l+="</"+t(e)+">"}function c(e){("start"===e.event?o:u)(e.node)}for(var s=0,l="",f=[];e.length||r.length;){var g=i();if(l+=n(a.substr(s,g[0].offset-s)),s=g[0].offset,g===e){f.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g===e&&g.length&&g[0].offset===s);f.reverse().forEach(o)}else"start"===g[0].event?f.push(g[0].node):f.pop(),c(g.splice(0,1)[0])}return l+n(a.substr(s))}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var u={},c=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");u[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?c("keyword",a.k):E(a.k).forEach(function(e){c(e,a.k[e])}),a.k=u}a.lR=t(a.l||/\w+/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),null==a.r&&(a.r=1),a.c||(a.c=[]);var s=[];a.c.forEach(function(e){e.v?e.v.forEach(function(n){s.push(o(e,n))}):s.push("self"===e?a:e)}),a.c=s,a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var l=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=l.length?t(l.join("|"),!0):{exec:function(){return null}}}}r(e)}function l(e,t,a,i){function o(e,n){var t,a;for(t=0,a=n.c.length;a>t;t++)if(r(n.c[t].bR,e))return n.c[t]}function u(e,n){if(r(e.eR,n)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?u(e.parent,n):void 0}function c(e,n){return!a&&r(n.iR,e)}function g(e,n){var t=N.cI?n[0].toLowerCase():n[0];return e.k.hasOwnProperty(t)&&e.k[t]}function h(e,n,t,r){var a=r?"":y.classPrefix,i='<span class="'+a,o=t?"":C;return i+=e+'">',i+n+o}function p(){var e,t,r,a;if(!E.k)return n(B);for(a="",t=0,E.lR.lastIndex=0,r=E.lR.exec(B);r;)a+=n(B.substr(t,r.index-t)),e=g(E,r),e?(M+=e[1],a+=h(e[0],n(r[0]))):a+=n(r[0]),t=E.lR.lastIndex,r=E.lR.exec(B);return a+n(B.substr(t))}function d(){var e="string"==typeof E.sL;if(e&&!x[E.sL])return n(B);var t=e?l(E.sL,B,!0,L[E.sL]):f(B,E.sL.length?E.sL:void 0);return E.r>0&&(M+=t.r),e&&(L[E.sL]=t.top),h(t.language,t.value,!1,!0)}function b(){k+=null!=E.sL?d():p(),B=""}function v(e){k+=e.cN?h(e.cN,"",!0):"",E=Object.create(e,{parent:{value:E}})}function m(e,n){if(B+=e,null==n)return b(),0;var t=o(n,E);if(t)return t.skip?B+=n:(t.eB&&(B+=n),b(),t.rB||t.eB||(B=n)),v(t,n),t.rB?0:n.length;var r=u(E,n);if(r){var a=E;a.skip?B+=n:(a.rE||a.eE||(B+=n),b(),a.eE&&(B=n));do E.cN&&(k+=C),E.skip||(M+=E.r),E=E.parent;while(E!==r.parent);return r.starts&&v(r.starts,""),a.rE?0:n.length}if(c(n,E))throw new Error('Illegal lexeme "'+n+'" for mode "'+(E.cN||"<unnamed>")+'"');return B+=n,n.length||1}var N=R(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var w,E=i||N,L={},k="";for(w=E;w!==N;w=w.parent)w.cN&&(k=h(w.cN,"",!0)+k);var B="",M=0;try{for(var I,j,O=0;;){if(E.t.lastIndex=O,I=E.t.exec(t),!I)break;j=m(t.substr(O,I.index-O),I[0]),O=I.index+j}for(m(t.substr(O)),w=E;w.parent;w=w.parent)w.cN&&(k+=C);return{r:M,value:k,language:e,top:E}}catch(T){if(T.message&&-1!==T.message.indexOf("Illegal"))return{r:0,value:n(t)};throw T}}function f(e,t){t=t||y.languages||E(x);var r={r:0,value:n(e)},a=r;return t.filter(R).forEach(function(n){var t=l(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}),a.language&&(r.second_best=a),r}function g(e){return y.tabReplace||y.useBR?e.replace(M,function(e,n){return y.useBR&&"\n"===e?"<br>":y.tabReplace?n.replace(/\t/g,y.tabReplace):void 0}):e}function h(e,n,t){var r=n?L[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function p(e){var n,t,r,o,s,p=i(e);a(p)||(y.useBR?(n=document.createElementNS("http://www.w3.org/1999/xhtml","div"),n.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,"\n")):n=e,s=n.textContent,r=p?l(p,s,!0):f(s),t=u(n),t.length&&(o=document.createElementNS("http://www.w3.org/1999/xhtml","div"),o.innerHTML=r.value,r.value=c(t,u(o),s)),r.value=g(r.value),e.innerHTML=r.value,e.className=h(e.className,p,r.language),e.result={language:r.language,re:r.r},r.second_best&&(e.second_best={language:r.second_best.language,re:r.second_best.r}))}function d(e){y=o(y,e)}function b(){if(!b.called){b.called=!0;var e=document.querySelectorAll("pre code");w.forEach.call(e,p)}}function v(){addEventListener("DOMContentLoaded",b,!1),addEventListener("load",b,!1)}function m(n,t){var r=x[n]=t(e);r.aliases&&r.aliases.forEach(function(e){L[e]=n})}function N(){return E(x)}function R(e){return e=(e||"").toLowerCase(),x[e]||x[L[e]]}var w=[],E=Object.keys,x={},L={},k=/^(no-?highlight|plain|text)$/i,B=/\blang(?:uage)?-([\w-]+)\b/i,M=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,C="</span>",y={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},I={"&":"&","<":"<",">":">"};return e.highlight=l,e.highlightAuto=f,e.fixMarkup=g,e.highlightBlock=p,e.configure=d,e.initHighlighting=b,e.initHighlightingOnLoad=v,e.registerLanguage=m,e.listLanguages=N,e.getLanguage=R,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},e.C=function(n,t,r){var a=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e});hljs.registerLanguage("sql",function(e){var t=e.C("--","$");return{cI:!0,i:/[<>{}*#]/,c:[{bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment",e:/;/,eW:!0,l:/[\w\.]+/,k:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM,e.CBCM,t]},e.CBCM,t]}});hljs.registerLanguage("coffeescript",function(e){var c={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",built_in:"npm require console print module global window document"},n="[A-Za-z$_][0-9A-Za-z$_]*",r={cN:"subst",b:/#\{/,e:/}/,k:c},s=[e.BNM,e.inherit(e.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'''/,e:/'''/,c:[e.BE]},{b:/'/,e:/'/,c:[e.BE]},{b:/"""/,e:/"""/,c:[e.BE,r]},{b:/"/,e:/"/,c:[e.BE,r]}]},{cN:"regexp",v:[{b:"///",e:"///",c:[r,e.HCM]},{b:"//[gim]*",r:0},{b:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{b:"@"+n},{b:"`",e:"`",eB:!0,eE:!0,sL:"javascript"}];r.c=s;var i=e.inherit(e.TM,{b:n}),t="(\\(.*\\))?\\s*\\B[-=]>",o={cN:"params",b:"\\([^\\(]",rB:!0,c:[{b:/\(/,e:/\)/,k:c,c:["self"].concat(s)}]};return{aliases:["coffee","cson","iced"],k:c,i:/\/\*/,c:s.concat([e.C("###","###"),e.HCM,{cN:"function",b:"^\\s*"+n+"\\s*=\\s*"+t,e:"[-=]>",rB:!0,c:[i,o]},{b:/[:\(,=]\s*/,r:0,c:[{cN:"function",b:t,e:"[-=]>",rB:!0,c:[o]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:!0,i:/[:="\[\]]/,c:[i]},i]},{b:n+":",e:":",rB:!0,rE:!0,r:0}])}});hljs.registerLanguage("python",function(e){var r={cN:"meta",b:/^(>>>|\.\.\.) /},b={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[r],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[r],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},e.ASM,e.QSM]},a={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},l={cN:"params",b:/\(/,e:/\)/,c:["self",r,a,b]};return{aliases:["py","gyp"],k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},i:/(<\/|->|\?)|=>/,c:[r,a,b,e.HCM,{v:[{cN:"function",bK:"def"},{cN:"class",bK:"class"}],e:/:/,i:/[${=;\n,]/,c:[e.UTM,l,{b:/->/,eW:!0,k:"None"}]},{cN:"meta",b:/^[\t ]*@/,e:/$/},{b:/\b(print|exec)\(/}]}});hljs.registerLanguage("diff",function(e){return{aliases:["patch"],c:[{cN:"meta",r:10,v:[{b:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"comment",v:[{b:/Index: /,e:/$/},{b:/={3,}/,e:/$/},{b:/^\-{3}/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+{3}/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"addition",b:"^\\!",e:"$"}]}});hljs.registerLanguage("nginx",function(e){var r={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+e.UIR}]},b={eW:!0,l:"[a-z/_]+",k:{literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[e.HCM,{cN:"string",c:[e.BE,r],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{b:"([a-z]+):/",e:"\\s",eW:!0,eE:!0,c:[r]},{cN:"regexp",c:[e.BE,r],v:[{b:"\\s\\^",e:"\\s|{|;",rE:!0},{b:"~\\*?\\s+",e:"\\s|{|;",rE:!0},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},r]};return{aliases:["nginxconf"],c:[e.HCM,{b:e.UIR+"\\s+{",rB:!0,e:"{",c:[{cN:"section",b:e.UIR}],r:0},{b:e.UIR+"\\s",e:";|{",rB:!0,c:[{cN:"attribute",b:e.UIR,starts:b}],r:0}],i:"[^\\s\\}]"}});hljs.registerLanguage("json",function(e){var i={literal:"true false null"},n=[e.QSM,e.CNM],r={e:",",eW:!0,eE:!0,c:n,k:i},t={b:"{",e:"}",c:[{cN:"attr",b:/"/,e:/"/,c:[e.BE],i:"\\n"},e.inherit(r,{b:/:/})],i:"\\S"},c={b:"\\[",e:"\\]",c:[e.inherit(r)],i:"\\S"};return n.splice(n.length,0,t,c),{c:n,k:i,i:"\\S"}});hljs.registerLanguage("http",function(e){var t="HTTP/[0-9\\.]+";return{aliases:["https"],i:"\\S",c:[{b:"^"+t,e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{b:"^[A-Z]+ (.*?) "+t+"$",rB:!0,e:"$",c:[{cN:"string",b:" ",e:" ",eB:!0,eE:!0},{b:t},{cN:"keyword",b:"[A-Z]+"}]},{cN:"attribute",b:"^\\w",e:": ",eE:!0,i:"\\n|\\s|=",starts:{e:"$",r:0}},{b:"\\n\\n",starts:{sL:[],eW:!0}}]}});hljs.registerLanguage("javascript",function(e){var r="[A-Za-z$_][0-9A-Za-z$_]*",t={keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},a={cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},n={cN:"subst",b:"\\$\\{",e:"\\}",k:t,c:[]},c={cN:"string",b:"`",e:"`",c:[e.BE,n]};n.c=[e.ASM,e.QSM,c,a,e.RM];var s=n.c.concat([e.CBCM,e.CLCM]);return{aliases:["js","jsx"],k:t,c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,c,e.CLCM,e.CBCM,a,{b:/[{,]\s*/,r:0,c:[{b:r+"\\s*:",rB:!0,r:0,c:[{cN:"attr",b:r,r:0}]}]},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{cN:"function",b:"(\\(.*?\\)|"+r+")\\s*=>",rB:!0,e:"\\s*=>",c:[{cN:"params",v:[{b:r},{b:/\(\s*\)/},{b:/\(/,e:/\)/,eB:!0,eE:!0,k:t,c:s}]}]},{b:/</,e:/(\/\w+|\w+\/)>/,sL:"xml",c:[{b:/<\w+\s*\/>/,skip:!0},{b:/<\w+/,e:/(\/\w+|\w+\/)>/,skip:!0,c:[{b:/<\w+\s*\/>/,skip:!0},"self"]}]}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:r}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:s}],i:/\[|%/},{b:/\$[(.]/},e.METHOD_GUARD,{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor",e:/\{/,eE:!0}],i:/#(?!!)/}});hljs.registerLanguage("ini",function(e){var b={cN:"string",c:[e.BE],v:[{b:"'''",e:"'''",r:10},{b:'"""',e:'"""',r:10},{b:'"',e:'"'},{b:"'",e:"'"}]};return{aliases:["toml"],cI:!0,i:/\S/,c:[e.C(";","$"),e.HCM,{cN:"section",b:/^\s*\[+/,e:/\]+/},{b:/^[a-z0-9\[\]_-]+\s*=\s*/,e:"$",rB:!0,c:[{cN:"attr",b:/[a-z0-9\[\]_-]+/},{b:/=/,eW:!0,r:0,c:[{cN:"literal",b:/\bon|off|true|false|yes|no\b/},{cN:"variable",v:[{b:/\$[\w\d"][\w\d_]*/},{b:/\$\{(.*?)}/}]},b,{cN:"number",b:/([\+\-]+)?[\d]+_[\d_]+/},e.NM]}]}]}});hljs.registerLanguage("cpp",function(t){var e={cN:"keyword",b:"\\b[a-z\\d_]*_t\\b"},r={cN:"string",v:[{b:'(u8?|U)?L?"',e:'"',i:"\\n",c:[t.BE]},{b:'(u8?|U)?R"',e:'"',c:[t.BE]},{b:"'\\\\?.",e:"'",i:"."}]},s={cN:"number",v:[{b:"\\b(0b[01']+)"},{b:"\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{b:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],r:0},i={cN:"meta",b:/#\s*[a-z]+\b/,e:/$/,k:{"meta-keyword":"if else elif endif define undef warning error line pragma ifdef ifndef include"},c:[{b:/\\\n/,r:0},t.inherit(r,{cN:"meta-string"}),{cN:"meta-string",b:"<",e:">",i:"\\n"},t.CLCM,t.CBCM]},a=t.IR+"\\s*\\(",c={keyword:"int float while private char catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return",built_in:"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr",literal:"true false nullptr NULL"},n=[e,t.CLCM,t.CBCM,s,r];return{aliases:["c","cc","h","c++","h++","hpp"],k:c,i:"</",c:n.concat([i,{b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:c,c:["self",e]},{b:t.IR+"::",k:c},{v:[{b:/=/,e:/;/},{b:/\(/,e:/\)/},{bK:"new throw return else",e:/;/}],k:c,c:n.concat([{b:/\(/,e:/\)/,k:c,c:n.concat(["self"]),r:0}]),r:0},{cN:"function",b:"("+t.IR+"[\\*&\\s]+)+"+a,rB:!0,e:/[{;=]/,eE:!0,k:c,i:/[^\w\s\*&]/,c:[{b:a,rB:!0,c:[t.TM],r:0},{cN:"params",b:/\(/,e:/\)/,k:c,r:0,c:[t.CLCM,t.CBCM,r,s,e]},t.CLCM,t.CBCM,i]}]),exports:{preprocessor:i,strings:r,k:c}}});hljs.registerLanguage("xml",function(s){var e="[A-Za-z0-9\\._:-]+",t={eW:!0,i:/</,r:0,c:[{cN:"attr",b:e,r:0},{b:/=\s*/,r:0,c:[{cN:"string",endsParent:!0,v:[{b:/"/,e:/"/},{b:/'/,e:/'/},{b:/[^\s"'=<>`]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist"],cI:!0,c:[{cN:"meta",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},s.C("<!--","-->",{r:10}),{b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{b:/<\?(php)?/,e:/\?>/,sL:"php",c:[{b:"/\\*",e:"\\*/",skip:!0}]},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{name:"style"},c:[t],starts:{e:"</style>",rE:!0,sL:["css","xml"]}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{name:"script"},c:[t],starts:{e:"</script>",rE:!0,sL:["actionscript","javascript","handlebars","xml"]}},{cN:"meta",v:[{b:/<\?xml/,e:/\?>/,r:10},{b:/<\?\w+/,e:/\?>/}]},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"name",b:/[^\/><\s]+/,r:0},t]}]}});hljs.registerLanguage("php",function(e){var c={b:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},i={cN:"meta",b:/<\?(php)?|\?>/},t={cN:"string",c:[e.BE,i],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},a={v:[e.BNM,e.CNM]};return{aliases:["php3","php4","php5","php6"],cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[e.HCM,e.C("//","$",{c:[i]}),e.C("/\\*","\\*/",{c:[{cN:"doctag",b:"@[A-Za-z]+"}]}),e.C("__halt_compiler.+?;",!1,{eW:!0,k:"__halt_compiler",l:e.UIR}),{cN:"string",b:/<<<['"]?\w+['"]?$/,e:/^\w+;?$/,c:[e.BE,{cN:"subst",v:[{b:/\$\w+/},{b:/\{\$/,e:/\}/}]}]},i,{cN:"keyword",b:/\$this\b/},c,{b:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{cN:"function",bK:"function",e:/[;{]/,eE:!0,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",c,e.CBCM,t,a]}]},{cN:"class",bK:"class interface",e:"{",eE:!0,i:/[:\(\$"]/,c:[{bK:"extends implements"},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},t,a]}});hljs.registerLanguage("objectivec",function(e){var t={cN:"built_in",b:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},_={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},i=/[a-zA-Z@][a-zA-Z0-9_]*/,n="@interface @class @protocol @implementation";return{aliases:["mm","objc","obj-c"],k:_,l:i,i:"</",c:[t,e.CLCM,e.CBCM,e.CNM,e.QSM,{cN:"string",v:[{b:'@"',e:'"',i:"\\n",c:[e.BE]},{b:"'",e:"[^\\\\]'",i:"[^\\\\][^']"}]},{cN:"meta",b:"#",e:"$",c:[{cN:"meta-string",v:[{b:'"',e:'"'},{b:"<",e:">"}]}]},{cN:"class",b:"("+n.split(" ").join("|")+")\\b",e:"({|$)",eE:!0,k:n,l:i,c:[e.UTM]},{b:"\\."+e.UIR,r:0}]}});hljs.registerLanguage("makefile",function(e){var a={cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]};return{aliases:["mk","mak"],c:[e.HCM,{b:/^\w+\s*\W*=/,rB:!0,r:0,starts:{e:/\s*\W*=/,eE:!0,starts:{e:/$/,r:0,c:[a]}}},{cN:"section",b:/^[\w]+:\s*$/},{cN:"meta",b:/^\.PHONY:/,e:/$/,k:{"meta-keyword":".PHONY"},l:/[\.\w]+/},{b:/^\t+/,e:/$/,r:0,c:[e.QSM,a]}]}});hljs.registerLanguage("css",function(e){var c="[a-zA-Z-][a-zA-Z0-9_-]*",t={b:/[A-Z\_\.\-]+\s*:/,rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:/\S/,e:":",eE:!0,starts:{eW:!0,eE:!0,c:[{b:/[\w-]+\(/,rB:!0,c:[{cN:"built_in",b:/[\w-]+/},{b:/\(/,e:/\)/,c:[e.ASM,e.QSM]}]},e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"number",b:"#[0-9A-Fa-f]+"},{cN:"meta",b:"!important"}]}}]};return{cI:!0,i:/[=\/|'\$]/,c:[e.CBCM,{cN:"selector-id",b:/#[A-Za-z0-9_-]+/},{cN:"selector-class",b:/\.[A-Za-z0-9_-]+/},{cN:"selector-attr",b:/\[/,e:/\]/,i:"$"},{cN:"selector-pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{b:"@",e:"[{;]",i:/:/,c:[{cN:"keyword",b:/\w+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[e.ASM,e.QSM,e.CSSNM]}]},{cN:"selector-tag",b:c,r:0},{b:"{",e:"}",i:/\S/,c:[e.CBCM,t]}]}});hljs.registerLanguage("perl",function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",r={cN:"subst",b:"[$@]\\{",e:"\\}",k:t},s={b:"->{",e:"}"},n={v:[{b:/\$\d/},{b:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{b:/[\$%@][^\s\w{]/,r:0}]},i=[e.BE,r,n],o=[n,e.HCM,e.C("^\\=\\w","\\=cut",{eW:!0}),s,{cN:"string",c:i,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[e.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[e.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+e.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[e.HCM,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[e.BE],r:0}]},{cN:"function",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",eE:!0,r:5,c:[e.TM]},{b:"-\\w\\b",r:0},{b:"^__DATA__$",e:"^__END__$",sL:"mojolicious",c:[{b:"^@@.*",e:"$",cN:"comment"}]}];return r.c=o,s.c=o,{aliases:["pl","pm"],l:/[\w\.]+/,k:t,c:o}});hljs.registerLanguage("bash",function(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)}/}]},s={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},a={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/-?[a-z\._]+/,k:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"meta",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,s,a,t]}});hljs.registerLanguage("cs",function(e){var i={keyword:"abstract as base bool break byte case catch char checked const continue decimal default delegate do double else enum event explicit extern finally fixed float for foreach goto if implicit in int interface internal is lock long object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this try typeof uint ulong unchecked unsafe ushort using virtual void volatile while nameof add alias ascending async await by descending dynamic equals from get global group into join let on orderby partial remove select set value var where yield",literal:"null false true"},r={cN:"string",b:'@"',e:'"',c:[{b:'""'}]},t=e.inherit(r,{i:/\n/}),a={cN:"subst",b:"{",e:"}",k:i},n=e.inherit(a,{i:/\n/}),c={cN:"string",b:/\$"/,e:'"',i:/\n/,c:[{b:"{{"},{b:"}}"},e.BE,n]},s={cN:"string",b:/\$@"/,e:'"',c:[{b:"{{"},{b:"}}"},{b:'""'},a]},o=e.inherit(s,{i:/\n/,c:[{b:"{{"},{b:"}}"},{b:'""'},n]});a.c=[s,c,r,e.ASM,e.QSM,e.CNM,e.CBCM],n.c=[o,c,t,e.ASM,e.QSM,e.CNM,e.inherit(e.CBCM,{i:/\n/})];var l={v:[s,c,r,e.ASM,e.QSM]},b=e.IR+"(<"+e.IR+"(\\s*,\\s*"+e.IR+")*>)?(\\[\\])?";return{aliases:["csharp"],k:i,i:/::/,c:[e.C("///","$",{rB:!0,c:[{cN:"doctag",v:[{b:"///",r:0},{b:"<!--|-->"},{b:"</?",e:">"}]}]}),e.CLCM,e.CBCM,{cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},l,e.CNM,{bK:"class interface",e:/[{;=]/,i:/[^\s:]/,c:[e.TM,e.CLCM,e.CBCM]},{bK:"namespace",e:/[{;=]/,i:/[^\s:]/,c:[e.inherit(e.TM,{b:"[a-zA-Z](\\.?\\w)*"}),e.CLCM,e.CBCM]},{bK:"new return throw await",r:0},{cN:"function",b:"("+b+"\\s+)+"+e.IR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:i,c:[{b:e.IR+"\\s*\\(",rB:!0,c:[e.TM],r:0},{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:i,r:0,c:[l,e.CNM,e.CBCM]},e.CLCM,e.CBCM]}]}});hljs.registerLanguage("markdown",function(e){return{aliases:["md","mkdown","mkd"],c:[{cN:"section",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"quote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"^```w*s*$",e:"^```s*$"},{b:"`.+?`"},{b:"^( {4}| )",e:"$",r:0}]},{b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].*?[\\)\\]]",rB:!0,c:[{cN:"string",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"symbol",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:/^\[[^\n]+\]:/,rB:!0,c:[{cN:"symbol",b:/\[/,e:/\]/,eB:!0,eE:!0},{cN:"link",b:/:\s*/,e:/$/,eB:!0}]}]}});hljs.registerLanguage("java",function(e){var a="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",t=a+"(<"+a+"(\\s*,\\s*"+a+")*>)?",r="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",s="\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",c={cN:"number",b:s,r:0};return{aliases:["jsp"],k:r,i:/<\/|#/,c:[e.C("/\\*\\*","\\*/",{r:0,c:[{b:/\w+@/,r:0},{cN:"doctag",b:"@[A-Za-z]+"}]}),e.CLCM,e.CBCM,e.ASM,e.QSM,{cN:"class",bK:"class interface",e:/[{;=]/,eE:!0,k:"class interface",i:/[:"\[\]]/,c:[{bK:"extends implements"},e.UTM]},{bK:"new throw return else",r:0},{cN:"function",b:"("+t+"\\s+)+"+e.UIR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:r,c:[{b:e.UIR+"\\s*\\(",rB:!0,r:0,c:[e.UTM]},{cN:"params",b:/\(/,e:/\)/,k:r,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},c,{cN:"meta",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("ruby",function(e){var b="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",r={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},c={cN:"doctag",b:"@[A-Za-z]+"},a={b:"#<",e:">"},s=[e.C("#","$",{c:[c]}),e.C("^\\=begin","^\\=end",{c:[c],r:10}),e.C("^__END__","\\n$")],n={cN:"subst",b:"#\\{",e:"}",k:r},t={cN:"string",c:[e.BE,n],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/`/,e:/`/},{b:"%[qQwWx]?\\(",e:"\\)"},{b:"%[qQwWx]?\\[",e:"\\]"},{b:"%[qQwWx]?{",e:"}"},{b:"%[qQwWx]?<",e:">"},{b:"%[qQwWx]?/",e:"/"},{b:"%[qQwWx]?%",e:"%"},{b:"%[qQwWx]?-",e:"-"},{b:"%[qQwWx]?\\|",e:"\\|"},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{b:/<<(-?)\w+$/,e:/^\s*\w+$/}]},i={cN:"params",b:"\\(",e:"\\)",endsParent:!0,k:r},d=[t,a,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{b:"<\\s*",c:[{b:"("+e.IR+"::)?"+e.IR}]}].concat(s)},{cN:"function",bK:"def",e:"$|;",c:[e.inherit(e.TM,{b:b}),i].concat(s)},{b:e.IR+"::"},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"symbol",b:":(?!\\s)",c:[t,{b:b}],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{cN:"params",b:/\|/,e:/\|/,k:r},{b:"("+e.RSR+")\\s*",c:[a,{cN:"regexp",c:[e.BE,n],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}].concat(s),r:0}].concat(s);n.c=d,i.c=d;var l="[>?]>",o="[\\w#]+\\(\\w+\\):\\d+:\\d+>",w="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",u=[{b:/^\s*=>/,starts:{e:"$",c:d}},{cN:"meta",b:"^("+l+"|"+o+"|"+w+")",starts:{e:"$",c:d}}];return{aliases:["rb","gemspec","podspec","thor","irb"],k:r,i:/\/\*/,c:s.concat(u).concat(d)}});hljs.registerLanguage("apache",function(e){var r={cN:"number",b:"[\\$%]\\d+"};return{aliases:["apacheconf"],cI:!0,c:[e.HCM,{cN:"section",b:"</?",e:">"},{cN:"attribute",b:/\w+/,r:0,k:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"meta",b:"\\s\\[",e:"\\]$"},{cN:"variable",b:"[\\$%]\\{",e:"\\}",c:["self",r]},r,e.QSM]}}],i:/\S/}});
|
data/lib/tasks/notee_tasks.rake
CHANGED
@@ -1,13 +1,23 @@
|
|
1
1
|
desc 'setup notee'
|
2
2
|
namespace :notee do
|
3
3
|
|
4
|
+
require 'fileutils'
|
5
|
+
|
4
6
|
task :start do
|
5
7
|
notee_mark
|
6
8
|
sh 'bundle exec rake notee:install:migrations'
|
7
9
|
add_engine_to_route
|
8
|
-
|
9
|
-
|
10
|
-
|
10
|
+
add_highlight_setting_to_js
|
11
|
+
add_notee_css_path
|
12
|
+
copy_directory("/app/views/", "../views/notee")
|
13
|
+
copy_directory("/app/assets/stylesheets/notee/", "../stylesheets/notee")
|
14
|
+
copy_directory("/app/assets/javascripts/notee/", "../javascripts/notee")
|
15
|
+
create_file("/config/schedule.rb", "../config/schedule.rb", nil)
|
16
|
+
create_file("/app/controllers/notee_controller.rb", "../controllers/notee_controller.rb", nil)
|
17
|
+
create_file("/config/initializers/notee.rb", "../config/notee.rb", nil)
|
18
|
+
copy_default_image("/public/notee")
|
19
|
+
copy_default_image("/public/notee/profile")
|
20
|
+
sh 'bundle exec whenever --update-crontab RAILS_ENV=production'
|
11
21
|
end
|
12
22
|
|
13
23
|
def notee_mark
|
@@ -26,6 +36,7 @@ ________________________________
|
|
26
36
|
"
|
27
37
|
end
|
28
38
|
|
39
|
+
|
29
40
|
def add_engine_to_route
|
30
41
|
puts ""
|
31
42
|
return puts 'setup Notee Engine in config/route.rb\n' unless route = File.open("#{Rails.root}/config/routes.rb","r")
|
@@ -33,7 +44,24 @@ ________________________________
|
|
33
44
|
|
34
45
|
text = <<-EOC
|
35
46
|
|
36
|
-
|
47
|
+
# ################## #
|
48
|
+
# default notee path #
|
49
|
+
# ################## #
|
50
|
+
|
51
|
+
get '/about' => 'notee#about'
|
52
|
+
|
53
|
+
mount Notee::Engine => '/notee'
|
54
|
+
|
55
|
+
get '/' => 'notee#index', as: 'notee_public_index'
|
56
|
+
get '/categories' => 'notee#categories', as: 'notee_public_categories'
|
57
|
+
get '/categories/:name_or_slug' => 'notee#category_posts', as: 'notee_public_category_posts'
|
58
|
+
get '/archives' => 'notee#archives', as: 'notee_public_archives'
|
59
|
+
get '/archives/:year' => 'notee#archive_posts', as: 'notee_public_archive_posts'
|
60
|
+
get '/archives/:year/:month' => 'notee#archive_posts'
|
61
|
+
get '/writers' => 'notee#writers', as: 'notee_public_writers'
|
62
|
+
get '/writers/:name_or_id' => 'notee#writer_posts', as: 'notee_public_writer_posts'
|
63
|
+
get '/:id_or_slug' => 'notee#show', as: 'notee_public_show'
|
64
|
+
|
37
65
|
EOC
|
38
66
|
|
39
67
|
new_route = String.new
|
@@ -50,74 +78,73 @@ EOC
|
|
50
78
|
puts ""
|
51
79
|
end
|
52
80
|
|
53
|
-
def
|
54
|
-
|
55
|
-
return
|
56
|
-
|
57
|
-
str = <<EOC
|
58
|
-
require 'notee'
|
81
|
+
def add_highlight_setting_to_js
|
82
|
+
puts ""
|
83
|
+
return puts 'setup for highlight.pack.js in /app/assets/javascripts/application.js\n' unless route = File.open("#{Rails.root}/app/assets/javascripts/application.js","r")
|
84
|
+
return if File.open("#{Rails.root}/app/assets/javascripts/application.js","r").read.include?("hljs.initHighlightingOnLoad()")
|
59
85
|
|
60
|
-
|
86
|
+
text = <<-EOC
|
61
87
|
|
62
|
-
|
88
|
+
// ///////////////////////////
|
89
|
+
// default notee setting
|
90
|
+
// ///////////////////////////
|
63
91
|
|
64
|
-
|
65
|
-
|
66
|
-
|
92
|
+
$(document).on('ready', function() {
|
93
|
+
hljs.initHighlightingOnLoad();
|
94
|
+
});
|
67
95
|
|
68
|
-
|
69
|
-
config.recaptcha_key = "hogehoge"
|
70
|
-
config.recaptcha_secret_key = "hogehoge"
|
96
|
+
EOC
|
71
97
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
description: "hogehoge",
|
78
|
-
og_image: "http://hogehoge.com/hoge.png"
|
79
|
-
}
|
98
|
+
new_js = String.new
|
99
|
+
route.each_line do |line|
|
100
|
+
line += text if line.include?("//= require_tree .")
|
101
|
+
new_js += line
|
102
|
+
end
|
80
103
|
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
EOC
|
104
|
+
f = File.open("#{Rails.root}/app/assets/javascripts/application.js","w")
|
105
|
+
f.write(new_js)
|
106
|
+
f.close()
|
85
107
|
|
86
|
-
|
87
|
-
|
88
|
-
end
|
89
|
-
puts 'create file in "config/initializers/notee.rb"'
|
90
|
-
puts 'you should change notee_id & notee_password'
|
108
|
+
puts 'Notee added "hljs.initHighlightingOnLoad();" to /app/assets/javascripts/application.js'
|
109
|
+
puts ""
|
91
110
|
end
|
92
111
|
|
93
|
-
def create_css_file
|
94
|
-
image_dir = Rails.root.to_s + '/app/assets/stylesheets/notee/'
|
95
|
-
FileUtils.mkdir_p(image_dir) unless FileTest.exist?(image_dir)
|
96
112
|
|
97
|
-
|
98
|
-
|
113
|
+
def add_notee_css_path
|
114
|
+
puts ""
|
115
|
+
return puts 'setup for application.css in /app/assets/stylesheets/application.css\n' unless route = File.open("#{Rails.root}/app/assets/stylesheets/application.css","r")
|
116
|
+
return if File.open("#{Rails.root}/app/assets/stylesheets/application.css","r").read.include?("*= require_directory ./notee")
|
117
|
+
|
118
|
+
text = <<-EOC
|
119
|
+
|
120
|
+
// ///////////////////////////
|
121
|
+
// default notee setting
|
122
|
+
// ///////////////////////////
|
123
|
+
|
124
|
+
*= require_directory .
|
125
|
+
*= require_directory ./notee
|
126
|
+
|
127
|
+
EOC
|
99
128
|
|
100
|
-
css = File.open(File.expand_path('../css/notee_default.css', __FILE__))
|
101
129
|
new_css = String.new
|
102
|
-
|
130
|
+
route.each_line do |line|
|
131
|
+
line = text if line.include?("*= require_tree .")
|
103
132
|
new_css += line
|
104
133
|
end
|
105
134
|
|
135
|
+
f = File.open("#{Rails.root}/app/assets/stylesheets/application.css","w")
|
136
|
+
f.write(new_css)
|
137
|
+
f.close()
|
106
138
|
|
107
|
-
|
108
|
-
|
109
|
-
end
|
110
|
-
puts 'create file in "/app/assets/stylesheets/notee/notee_default.css"'
|
139
|
+
puts 'Notee added "*= require_directory ./notee" to /app/assets/stylesheets/application.css'
|
140
|
+
puts ""
|
111
141
|
end
|
112
142
|
|
113
|
-
def setup_default
|
114
|
-
copy_default_image
|
115
|
-
end
|
116
143
|
|
117
144
|
private
|
118
145
|
|
119
|
-
def copy_default_image
|
120
|
-
image_dir = Rails.root.to_s +
|
146
|
+
def copy_default_image(image_path)
|
147
|
+
image_dir = Rails.root.to_s + image_path
|
121
148
|
FileUtils.mkdir_p(image_dir) unless FileTest.exist?(image_dir)
|
122
149
|
|
123
150
|
image_url = image_dir + '/default.png'
|
@@ -128,4 +155,31 @@ EOC
|
|
128
155
|
end
|
129
156
|
end
|
130
157
|
|
158
|
+
def create_file(create_path, origin_path, dir)
|
159
|
+
if dir.present?
|
160
|
+
new_dir = Rails.root.to_s + dir.to_s
|
161
|
+
FileUtils.mkdir_p(new_dir) unless FileTest.exist?(new_dir)
|
162
|
+
end
|
163
|
+
|
164
|
+
create_file_path = Rails.root.to_s + create_path.to_s
|
165
|
+
return if File.exist?(create_file_path)
|
166
|
+
|
167
|
+
origin_file = File.open(File.expand_path(origin_path.to_s, __FILE__))
|
168
|
+
new_file = String.new
|
169
|
+
origin_file.each_line do |line|
|
170
|
+
new_file += line
|
171
|
+
end
|
172
|
+
|
173
|
+
File.open(create_file_path,"w") do |file|
|
174
|
+
file.puts new_file
|
175
|
+
end
|
176
|
+
puts 'create file in ' + create_file_path.to_s
|
177
|
+
end
|
178
|
+
|
179
|
+
def copy_directory(create_dir, origin_dir)
|
180
|
+
new_dir = Rails.root.to_s + create_dir.to_s
|
181
|
+
return if FileTest.exist?(new_dir)
|
182
|
+
FileUtils.cp_r(File.expand_path(origin_dir.to_s, __FILE__), new_dir)
|
183
|
+
end
|
184
|
+
|
131
185
|
end
|
@@ -0,0 +1,108 @@
|
|
1
|
+
/*!
|
2
|
+
* Agate by Taufik Nurrohman <https://github.com/tovic>
|
3
|
+
* ----------------------------------------------------
|
4
|
+
*
|
5
|
+
* #ade5fc
|
6
|
+
* #a2fca2
|
7
|
+
* #c6b4f0
|
8
|
+
* #d36363
|
9
|
+
* #fcc28c
|
10
|
+
* #fc9b9b
|
11
|
+
* #ffa
|
12
|
+
* #fff
|
13
|
+
* #333
|
14
|
+
* #62c8f3
|
15
|
+
* #888
|
16
|
+
*
|
17
|
+
*/
|
18
|
+
|
19
|
+
.hljs {
|
20
|
+
display: block;
|
21
|
+
overflow-x: auto;
|
22
|
+
padding: 0.5em;
|
23
|
+
background: #333;
|
24
|
+
color: white;
|
25
|
+
}
|
26
|
+
|
27
|
+
.hljs-name,
|
28
|
+
.hljs-strong {
|
29
|
+
font-weight: bold;
|
30
|
+
}
|
31
|
+
|
32
|
+
.hljs-code,
|
33
|
+
.hljs-emphasis {
|
34
|
+
font-style: italic;
|
35
|
+
}
|
36
|
+
|
37
|
+
.hljs-tag {
|
38
|
+
color: #62c8f3;
|
39
|
+
}
|
40
|
+
|
41
|
+
.hljs-variable,
|
42
|
+
.hljs-template-variable,
|
43
|
+
.hljs-selector-id,
|
44
|
+
.hljs-selector-class {
|
45
|
+
color: #ade5fc;
|
46
|
+
}
|
47
|
+
|
48
|
+
.hljs-string,
|
49
|
+
.hljs-bullet {
|
50
|
+
color: #a2fca2;
|
51
|
+
}
|
52
|
+
|
53
|
+
.hljs-type,
|
54
|
+
.hljs-title,
|
55
|
+
.hljs-section,
|
56
|
+
.hljs-attribute,
|
57
|
+
.hljs-quote,
|
58
|
+
.hljs-built_in,
|
59
|
+
.hljs-builtin-name {
|
60
|
+
color: #ffa;
|
61
|
+
}
|
62
|
+
|
63
|
+
.hljs-number,
|
64
|
+
.hljs-symbol,
|
65
|
+
.hljs-bullet {
|
66
|
+
color: #d36363;
|
67
|
+
}
|
68
|
+
|
69
|
+
.hljs-keyword,
|
70
|
+
.hljs-selector-tag,
|
71
|
+
.hljs-literal {
|
72
|
+
color: #fcc28c;
|
73
|
+
}
|
74
|
+
|
75
|
+
.hljs-comment,
|
76
|
+
.hljs-deletion,
|
77
|
+
.hljs-code {
|
78
|
+
color: #888;
|
79
|
+
}
|
80
|
+
|
81
|
+
.hljs-regexp,
|
82
|
+
.hljs-link {
|
83
|
+
color: #c6b4f0;
|
84
|
+
}
|
85
|
+
|
86
|
+
.hljs-meta {
|
87
|
+
color: #fc9b9b;
|
88
|
+
}
|
89
|
+
|
90
|
+
.hljs-deletion {
|
91
|
+
background-color: #fc9b9b;
|
92
|
+
color: #333;
|
93
|
+
}
|
94
|
+
|
95
|
+
.hljs-addition {
|
96
|
+
background-color: #a2fca2;
|
97
|
+
color: #333;
|
98
|
+
}
|
99
|
+
|
100
|
+
.hljs a {
|
101
|
+
color: inherit;
|
102
|
+
}
|
103
|
+
|
104
|
+
.hljs a:focus,
|
105
|
+
.hljs a:hover {
|
106
|
+
color: inherit;
|
107
|
+
text-decoration: underline;
|
108
|
+
}
|