j1-template 2021.0.16 → 2021.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/themes/j1/blocks/footer/boxes/legal_statements.proc +4 -0
- data/_includes/themes/j1/modules/connectors/ad/google-adsense.html +1 -1
- data/_includes/themes/j1/modules/connectors/ads +1 -1
- data/_includes/themes/j1/modules/connectors/analytic/google-analytics-legacy.html +36 -0
- data/_includes/themes/j1/modules/connectors/analytic/google-analytics.html +1 -1
- data/_includes/themes/j1/modules/connectors/analytics +2 -3
- data/_includes/themes/j1/modules/connectors/comment/disqus.html +1 -1
- data/_layouts/default.html +11 -1
- data/assets/data/galleries.json +2 -2
- data/assets/data/gallery_customizer.html +2 -2
- data/assets/themes/j1/adapter/js/asciidoctor.js +166 -0
- data/assets/themes/j1/adapter/js/carousel.js +24 -0
- data/assets/themes/j1/adapter/js/fam.js +0 -12
- data/assets/themes/j1/adapter/js/j1.js +36 -21
- data/assets/themes/j1/adapter/js/{jf_gallery.js → justifiedGallery.js} +9 -9
- data/assets/themes/j1/adapter/js/{gallery_customizer.js → justifiedGalleryCustomizer.js} +11 -11
- data/assets/themes/j1/adapter/js/logger.js +35 -23
- data/assets/themes/j1/adapter/js/navigator.js +0 -12
- data/assets/themes/j1/core/css/vendor.css +14 -2
- data/assets/themes/j1/core/css/vendor.min.css +1 -1
- data/assets/themes/j1/core/js/template.js +8 -2
- data/assets/themes/j1/core/js/template.js.map +1 -1
- data/assets/themes/j1/core/js/template.min.js +8 -2
- data/assets/themes/j1/core/js/template.min.js.map +1 -1
- data/assets/themes/j1/modules/log4javascript/docs/backwardsincompatibilities.html +90 -0
- data/assets/themes/j1/modules/log4javascript/docs/distribution.html +87 -0
- data/assets/themes/j1/modules/log4javascript/docs/index.html +190 -0
- data/assets/themes/j1/modules/log4javascript/docs/lite.html +182 -0
- data/assets/themes/j1/modules/log4javascript/docs/manual.html +3217 -0
- data/assets/themes/j1/modules/log4javascript/docs/manual_lite.html +383 -0
- data/assets/themes/j1/modules/log4javascript/docs/quickstart.html +230 -0
- data/assets/themes/j1/modules/log4javascript/docs/whatsnew.html +86 -0
- data/assets/themes/j1/modules/log4javascript/js/log4javascript.js +5826 -0
- data/assets/themes/j1/modules/{util/js/log4javascript.js → log4javascript/js/log4javascript.min.js} +17 -0
- data/exe/j1 +1 -1
- data/lib/j1/commands/generate.rb +32 -9
- data/lib/{patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/2.6 → j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/2.7}/fastfilereaderext.so +0 -0
- data/lib/{patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/2.6 → j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/2.7}/rubyeventmachine.so +0 -0
- data/lib/j1/patches/rubygems/execjs-2.7.0/lib/execjs/external_runtime.rb +246 -0
- data/lib/j1/version.rb +1 -1
- data/lib/j1_app.rb +1 -1
- data/lib/j1_app/j1_auth_manager/auth_manager.rb +8 -2
- data/lib/j1_app/j1_site_manager/static_site.no-cross-origin.rb +94 -0
- data/lib/j1_app/j1_site_manager/static_site.rb +13 -11
- data/lib/starter_web/Gemfile +20 -14
- data/lib/starter_web/_config.yml +6 -47
- data/lib/starter_web/_data/_defaults/j1_config.yml +460 -0
- data/lib/starter_web/_data/{private.yml@localhost → _defaults/private.yml} +8 -51
- data/lib/starter_web/_data/_defaults/resources.yml +626 -325
- data/lib/starter_web/_data/apps/defaults/{justified_gallery.yml → justifiedGallery.yml} +2 -2
- data/lib/starter_web/_data/apps/defaults/{gallery_customizer.yml → justifiedGalleryCustomizer.yml} +0 -0
- data/lib/starter_web/_data/apps/defaults/{light_gallery.yml → lightGallery.yml} +0 -0
- data/lib/starter_web/_data/apps/{justified_gallery.yml → justifiedGallery.yml} +7 -7
- data/lib/starter_web/_data/apps/{gallery_customizer.yml → justifiedGalleryCustomizer.yml} +0 -0
- data/lib/starter_web/_data/apps/{light_gallery.yml → lightGallery.yml} +0 -0
- data/lib/starter_web/_data/blocks/banner.yml +18 -30
- data/lib/starter_web/_data/blocks/footer.yml +15 -3
- data/lib/starter_web/_data/blocks/panel.yml +4 -6
- data/lib/starter_web/_data/j1_config.yml +8 -7
- data/lib/starter_web/_data/modules/authentication.yml +11 -100
- data/lib/starter_web/_data/modules/defaults/log4javascript.yml +37 -40
- data/lib/starter_web/_data/modules/defaults/quicksearch.yml +2 -0
- data/lib/starter_web/_data/modules/log4javascript.yml +11 -83
- data/lib/starter_web/_data/modules/navigator_menu.yml +25 -6
- data/lib/starter_web/_data/modules/quicksearch.yml +2 -0
- data/lib/starter_web/_data/plugins/defaults/paginator.yml +15 -12
- data/lib/starter_web/_data/plugins/paginator.yml +5 -3
- data/lib/starter_web/_data/private.yml +29 -57
- data/lib/starter_web/_data/private@default.yml +119 -0
- data/lib/starter_web/_data/private@localhost.yml +156 -0
- data/lib/starter_web/_data/resources.yml +33 -16
- data/lib/starter_web/_data/utilities/defaults/util_srv.yml +49 -3
- data/lib/starter_web/_data/utilities/util_srv.yml +8 -65
- data/lib/starter_web/_includes/attributes.asciidoc +9 -6
- data/lib/starter_web/_plugins/asciidoctor-extensions/callout.rb +47 -5
- data/lib/starter_web/_plugins/asciidoctor-extensions/conum.rb +28 -1
- data/lib/starter_web/_plugins/lunr_index.rb +17 -2
- data/lib/starter_web/assets/images/collections/blog/featured/dynamic-web-access.png +0 -0
- data/lib/starter_web/assets/images/collections/blog/featured/jamstack-generators.gif +0 -0
- data/lib/starter_web/assets/images/collections/blog/featured/jamstack-generators.jpg +0 -0
- data/lib/starter_web/assets/images/collections/blog/featured/static-web-access.png +0 -0
- data/lib/starter_web/assets/images/modules/attics/leon-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/machine-generator-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/icons/j1/j1-256x256.gif +0 -0
- data/lib/starter_web/collections/posts/public/featured/_posts/0000-00-00-welcome-to-j1.adoc.erb +44 -45
- data/lib/starter_web/collections/posts/public/featured/_posts/{2020-06-01-about-cookies.adoc → 2020-01-01-about-cookies.adoc} +43 -41
- data/lib/starter_web/collections/posts/public/featured/_posts/{2020-05-01-top-site-generators.adoc → 2021-03-01-site-generators.adoc} +57 -30
- data/lib/starter_web/collections/posts/public/featured/_posts/2021-03-03-about-j1.adoc +125 -0
- data/lib/starter_web/collections/posts/public/featured/_posts/_includes/attributes.asciidoc +4 -0
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-02-post-test-series.adoc +1 -1
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-03-post-test-series.adoc +1 -1
- data/lib/starter_web/collections/posts/public/series/_posts/2020-01-04-post-test-series.adoc +1 -1
- data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-20-minneapolis.adoc +1 -1
- data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-24-narcisse-snake-dens.adoc +1 -1
- data/lib/starter_web/collections/posts/public/wikipedia/_posts/2016-11-26-columbia-river.adoc +1 -1
- data/lib/starter_web/dot.gitattributes +1 -1
- data/lib/starter_web/dot.gitignore +5 -1
- data/lib/starter_web/package.json +3 -2
- data/lib/starter_web/pages/public/asciidoc_skeletons/_templates/asciidoc-extensions/gallery.asciidoc +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/200_chapter.adoc +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/book.adoc +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/200_chapter.asciidoc +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/multi.adoc +1 -1
- data/lib/starter_web/pages/public/blog/navigator/archive.html +1 -1
- data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +1 -1
- data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +2 -2
- data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +1 -1
- data/lib/starter_web/pages/public/blog/navigator/index.html +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +44 -47
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_videos.adoc +20 -19
- data/lib/starter_web/pages/public/learn/roundtrip/200_typography.adoc +5 -1
- data/lib/starter_web/pages/public/learn/roundtrip/300_icon_fonts.adoc +38 -34
- data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +37 -35
- data/lib/starter_web/pages/public/learn/roundtrip/410_bs_modals_extentions.adoc +15 -13
- data/lib/starter_web/pages/public/learn/roundtrip/420_responsive_tables_extensions.adoc +10 -8
- data/lib/starter_web/pages/public/learn/roundtrip/500_themes.adoc +29 -26
- data/lib/starter_web/pages/public/learn/roundtrip/600_quicksearch.adoc +49 -48
- data/lib/starter_web/pages/public/learn/roundtrip/_includes/documents/100_gistblock.asciidoc +1 -1
- data/lib/starter_web/pages/public/learn/where_to_go.adoc +43 -16
- data/lib/starter_web/pages/public/legal/en/100_copyright.adoc +114 -0
- data/lib/starter_web/pages/public/legal/en/200_impress.adoc +81 -0
- data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +70 -48
- data/lib/starter_web/pages/public/legal/en/400_comment_policy.adoc +121 -0
- data/lib/starter_web/pages/public/panels/intro_panel/panel.adoc +78 -70
- data/lib/starter_web/pages/public/previewer/justified_gallery.html +2 -2
- data/lib/starter_web/pages/public/previewer/md_color_palette.adoc +0 -1939
- data/lib/starter_web/pages/public/previewer/mdi_icons_preview.adoc +6 -8
- data/lib/starter_web/utilsrv/_defaults/package.json +13 -9
- data/lib/starter_web/utilsrv/package.json +6 -2
- data/lib/starter_web/utilsrv/server.js +228 -55
- metadata +45 -214
- data/assets/data/menu.1.html +0 -505
- data/lib/starter_web/_data/_defaults/j1_light_gallery.yml +0 -110
- data/lib/starter_web/_data/_defaults/template_settings.yml +0 -258
- data/lib/starter_web/_data/plugins/defaults/notebooks.yml +0 -61
- data/lib/starter_web/_data/plugins/notebooks.yml +0 -70
- data/lib/starter_web/assets/images/collections/blog/featured/staticgen.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/aditya-joshi-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/alex-holyoake-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/anaya-katlego-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/antonella-lombardi-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/antonino-visalli-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/docker-1280x600-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/jekyll.1200x600-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/signpost-1920x800-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/water-journal-1280x600.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/banner/write-1280x600-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/brandon-mowinkel-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/daniel-jensen-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/florian-olivo-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/giammarco-boscaro-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/go-up-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/ian-schneider-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/jason-rosewell-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/joel-filipe-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/lianhao-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/library-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/mae-mue-1920x1280-v.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/mae-mue-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/markus-spiske-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/markus-spiske.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/markus-spiske3-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/modules-apps-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/nicola-styles-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/no-time-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/nousnou-iwasaki-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/premium-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/responsive-text-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/robert-v-ruggiero-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/romain-vignes-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/spider-web-1920x1200-bw.jpg +0 -0
- data/lib/starter_web/assets/images/modules/attics/the-place-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/modules/icons/algolia/search-by-algolia.png +0 -0
- data/lib/starter_web/assets/images/modules/icons/d1/d1-256x256.png +0 -0
- data/lib/starter_web/assets/images/modules/icons/d1/d1-32x32.ico +0 -0
- data/lib/starter_web/assets/images/modules/icons/d1/d1-512x512.png +0 -0
- data/lib/starter_web/assets/images/modules/icons/d1/d1-64x64.png +0 -0
- data/lib/starter_web/assets/images/modules/icons/d1/d1.ico +0 -0
- data/lib/starter_web/assets/images/modules/icons/d1/favicon.ico +0 -0
- data/lib/starter_web/assets/images/modules/icons/d1/scalable/d1.svg +0 -2025
- data/lib/starter_web/assets/images/modules/icons/netlify/nf-logo.png +0 -0
- data/lib/starter_web/assets/images/modules/icons/p1/favicon.ico +0 -0
- data/lib/starter_web/assets/images/modules/icons/p1/p1-256x256.png +0 -0
- data/lib/starter_web/assets/images/modules/icons/p1/p1-32x32.ico +0 -0
- data/lib/starter_web/assets/images/modules/icons/p1/p1-512x512.png +0 -0
- data/lib/starter_web/assets/images/modules/icons/p1/p1-64x64.png +0 -0
- data/lib/starter_web/assets/images/modules/icons/p1/p1.ico +0 -0
- data/lib/starter_web/assets/images/modules/icons/p1/scalable/p1.svg +0 -2020
- data/lib/starter_web/assets/images/modules/icons/patreon/favicon-16x16.png +0 -0
- data/lib/starter_web/assets/images/modules/icons/patreon/favicon-32x32.png +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/000_browser_console-1280x600.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/001_smee_channel-1280x400.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/002_gh_repo_settings-1280x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/003_gh_webhook_settings-1280x1000.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/004_gh_webhook_settings-post-1280x600.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/005_smee_channel_ping_receive-1280x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/006_gh_redeliver_payload-1280x900.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/007_receive_redelivered_payload-1280x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/base/000_browser_console.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/base/000_smee_channel.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/base/002_gh_repo-settings.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/base/003_gh_webhook_settings.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/base/004_gh_webhook_settings-post.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/base/005_smee_channel_ping_received.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/base/006_gh_redeliver_payload.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/base/007_receive_redelivered_payload.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/base/webhook_flow.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/flows/webhook_flow-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/j1_webhooks/scaleable/webhook_flow.svg +0 -432
- data/lib/starter_web/assets/images/pages/j1_webhooks/uml/auth_mgmr_signin_request_flow.uxf +0 -632
- data/lib/starter_web/assets/images/pages/j1_webhooks/uml/webhook_flow.uxf +0 -648
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/get-started-1920x1280-bw.jpg +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/130_layout_inheritance.png +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/content_inheritance.png +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/content_inheritance_thumb.png +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/html_layout.png +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/j1-quickstart-windows.png +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/j1-template-theme.jpg +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/j1_layout.png +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/jekyll-minima-theme.png +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/lane_inheritance.png +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/intro/layout_inheritance.png +0 -0
- data/lib/starter_web/assets/images/pages/kickstarter/web_in_a_day/preparations/msys_installation.jpg +0 -0
- data/lib/starter_web/assets/images/pages/log4j/apache-log4j-logo.png +0 -0
- data/lib/starter_web/assets/images/pages/log4r/code-1920x600.jpg +0 -0
- data/lib/starter_web/assets/images/pages/log4r/log4r-logo.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_000.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_001.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_002.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_003.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_004.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_005.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_006.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_007.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_008.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_009.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_010.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_011.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_012.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_013.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_014.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_015.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_016.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_017.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_018.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_019.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_020.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_021.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_022.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_023.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_024.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_025.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_026.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_027.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_028.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_029.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_030.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_031.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_032.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_033.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_034.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_035.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_036.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_037.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_038.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_039.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_040.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_041.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_042.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_043.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_044.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_045.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_046.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_047.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_048.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_049.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_050.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_051.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_052.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_053.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_054.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_055.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_056.png +0 -0
- data/lib/starter_web/assets/images/pages/log_expert/image_057.png +0 -0
- data/lib/starter_web/assets/images/pages/material/apple-touch-icon.png +0 -0
- data/lib/starter_web/assets/images/pages/pen/jquery/jQuery-logo.png +0 -0
- data/lib/starter_web/assets/images/pages/pen/jquery/jquery-banner-1280x600.jpg +0 -0
- data/lib/starter_web/assets/images/pages/pen/jquery/jquery-banner-1920x800.jpg +0 -0
- data/lib/starter_web/assets/images/pages/pen/jquery/src/JQuery-Logo.svg +0 -122
- data/lib/starter_web/assets/images/pages/pen/jquery/src/banner.psd +0 -0
- data/lib/starter_web/assets/images/pages/winlogbeat/coordinate-map.png +0 -0
- data/lib/starter_web/assets/images/pages/winlogbeat/kibana-powershell.jpg +0 -0
- data/lib/starter_web/assets/images/pages/winlogbeat/option_ignore_outgoing.png +0 -0
- data/lib/starter_web/assets/images/pages/winlogbeat/winlogbeat-dashboard.png +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/1280px-PDCA_Process.png +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/annie-spratt-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/deming-cycle.png +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/humble-lamb-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/john-schnobrich-1920x1280.jpg +0 -0
- data/lib/starter_web/assets/images/pages/writers_guide/sigmund-1920x1280.jpg +0 -0
- data/lib/starter_web/pages/protected/site_search.adoc +0 -180
- data/lib/starter_web/pages/public/asciidoc_skeletons/book/book.pdf +1 -5439
- data/lib/starter_web/pages/public/legal/en/000_copyright.adoc +0 -93
- data/lib/starter_web/pages/public/legal/en/100_impress.adoc +0 -55
- data/lib/starter_web/pages/public/legal/en/200_terms_of_use.adoc +0 -53
- data/lib/starter_web/pages/public/legal/en/eu/cookie.policy.asciidoc +0 -50
data/assets/themes/j1/modules/{util/js/log4javascript.js → log4javascript/js/log4javascript.min.js}
RENAMED
@@ -13,6 +13,23 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
+
|
17
|
+
/**
|
18
|
+
* log4javascript
|
19
|
+
*
|
20
|
+
* log4javascript is a logging framework for JavaScript based on log4j
|
21
|
+
* for Java. This file contains all core log4javascript code and is the only
|
22
|
+
* file required to use log4javascript, unless you require support for
|
23
|
+
* document.domain, in which case you will also need console.html, which must be
|
24
|
+
* stored in the same directory as the main log4javascript.js file.
|
25
|
+
*
|
26
|
+
* Author: Tim Down <tim@log4javascript.org>
|
27
|
+
* Version: 1.4.13
|
28
|
+
* Edition: log4javascript
|
29
|
+
* Build date: 23 May 2015
|
30
|
+
* Website: http://log4javascript.org
|
31
|
+
*/
|
32
|
+
|
16
33
|
(function(factory,root){if(typeof define=="function"&&define.amd){define(factory);}else if(typeof module!="undefined"&&typeof exports=="object"){module.exports=factory();}else{root.log4javascript=factory();}})(function(){if(!Array.prototype.push){Array.prototype.push=function(){for(var i=0,len=arguments.length;i<len;i++){this[this.length]=arguments[i];}
|
17
34
|
return this.length;};}
|
18
35
|
if(!Array.prototype.shift){Array.prototype.shift=function(){if(this.length>0){var firstItem=this[0];for(var i=0,len=this.length-1;i<len;i++){this[i]=this[i+1];}
|
data/exe/j1
CHANGED
@@ -17,7 +17,7 @@ Mercenary.program(:j1) do |p|
|
|
17
17
|
c.description 'Generates a starter site scaffold in PATH'
|
18
18
|
c.option 'force', '--force', 'Force a site to be created even the PATH already exists'
|
19
19
|
c.option "skip-bundle", "--skip-bundle", "Skip 'bundle install'"
|
20
|
-
c.option "skip-
|
20
|
+
c.option "skip-_patches", "--skip-_patches", "Skip to install any PATCHES buildin with J1"
|
21
21
|
c.option "system", "--system", "Run 'bundle install' for the Ruby SYSTEM gem folder"
|
22
22
|
c.action do |args, options|
|
23
23
|
J1::Commands::Generate.process(args, options)
|
data/lib/j1/commands/generate.rb
CHANGED
@@ -13,7 +13,7 @@ module J1
|
|
13
13
|
c.description 'Generates a starter site scaffold in PATH'
|
14
14
|
c.option 'force', '--force', 'Force a site to be created even the PATH already exists'
|
15
15
|
c.option 'skip-bundle', '--skip-bundle', "Skip 'bundle install'"
|
16
|
-
c.option "skip-
|
16
|
+
c.option "skip-_patches", "--skip-_patches", "Skip to install any PATCHES buildin with J1"
|
17
17
|
c.option "system", "--system", "Run 'bundle install' for the Ruby SYSTEM gem folder"
|
18
18
|
c.action do |args, options|
|
19
19
|
J1::Commands::Generate.process(args, options)
|
@@ -93,10 +93,10 @@ module J1
|
|
93
93
|
def after_install(path, options = {})
|
94
94
|
unless options['skip-bundle']
|
95
95
|
bundle_install(path, options)
|
96
|
-
unless options['skip-
|
96
|
+
unless options['skip-_patches']
|
97
97
|
patch_install(options)
|
98
98
|
else
|
99
|
-
J1.logger.info "Install
|
99
|
+
J1.logger.info "Install _patches skipped ..."
|
100
100
|
end
|
101
101
|
end
|
102
102
|
unless options['force']
|
@@ -127,29 +127,52 @@ module J1
|
|
127
127
|
|
128
128
|
def patch_install(options)
|
129
129
|
if is_windows?
|
130
|
+
major, minor = RUBY_VERSION.split('.')
|
131
|
+
lib_version = major + '.' + minor
|
130
132
|
curr_path = File.expand_path(File.dirname(File.dirname(__FILE__)))
|
131
|
-
|
132
|
-
|
133
|
+
patch_gem_eventmachine = 'eventmachine-1.2.7-x64-mingw32'
|
134
|
+
patch_gem_execjs = 'execjs-2.7.0'
|
135
|
+
patch_eventmachine_source_path = curr_path + '/patches/rubygems' + '/' + patch_gem_eventmachine + '/lib/' + lib_version
|
136
|
+
patch_execjs_source_path = curr_path + '/patches/rubygems' + '/' + patch_gem_execjs + '/lib/execjs/external_runtime.rb'
|
133
137
|
|
134
|
-
J1.logger.info "Install patches in USER gem folder ~/.gem ..."
|
135
138
|
process, output = J1::Utils::Exec.run('gem', 'env', 'gempath')
|
136
139
|
raise SystemExit unless process.success?
|
137
140
|
|
138
141
|
result = output.split(';')
|
139
142
|
user_path = result[0]
|
140
143
|
system_path = result[1]
|
144
|
+
|
141
145
|
if options['system']
|
146
|
+
J1.logger.info "Install patches in SYSTEM folder ..."
|
142
147
|
J1.logger.info "Install patches on path #{system_path} ..."
|
143
|
-
dest = system_path + '/gems/' +
|
148
|
+
dest = system_path + '/gems/' + patch_gem_eventmachine + '/lib'
|
144
149
|
else
|
150
|
+
J1.logger.info "Install patches in USER gem folder ~/.gem ..."
|
145
151
|
J1.logger.info "Install patches on path #{user_path} ..."
|
146
|
-
dest = user_path + '/gems/' +
|
152
|
+
dest = user_path + '/gems/' + patch_gem_eventmachine + '/lib'
|
147
153
|
end
|
148
|
-
src =
|
154
|
+
src = patch_eventmachine_source_path
|
149
155
|
FileUtils.cp_r(src, dest)
|
156
|
+
|
157
|
+
if lib_version === '2.7'
|
158
|
+
if options['system']
|
159
|
+
# J1.logger.info "Install patches on path #{system_path} ..."
|
160
|
+
dest = system_path + '/gems/' + patch_gem_execjs + '/lib/execjs'
|
161
|
+
else
|
162
|
+
# J1.logger.info "Install patches on path #{user_path} ..."
|
163
|
+
dest = user_path + '/gems/' + patch_gem_execjs + '/lib/execjs'
|
164
|
+
end
|
165
|
+
src = patch_execjs_source_path
|
166
|
+
FileUtils.cp(src, dest)
|
167
|
+
end
|
168
|
+
|
150
169
|
end
|
151
170
|
end
|
152
171
|
|
172
|
+
def install_patch(options)
|
173
|
+
end
|
174
|
+
|
175
|
+
|
153
176
|
end
|
154
177
|
end
|
155
178
|
end
|
Binary file
|
Binary file
|
@@ -0,0 +1,246 @@
|
|
1
|
+
require "tmpdir"
|
2
|
+
require "execjs/runtime"
|
3
|
+
|
4
|
+
module ExecJS
|
5
|
+
class ExternalRuntime < Runtime
|
6
|
+
class Context < Runtime::Context
|
7
|
+
def initialize(runtime, source = "", options = {})
|
8
|
+
source = encode(source)
|
9
|
+
|
10
|
+
@runtime = runtime
|
11
|
+
@source = source
|
12
|
+
|
13
|
+
# Test compile context source
|
14
|
+
exec("")
|
15
|
+
end
|
16
|
+
|
17
|
+
def eval(source, options = {})
|
18
|
+
source = encode(source)
|
19
|
+
|
20
|
+
if /\S/ =~ source
|
21
|
+
exec("return eval(#{::JSON.generate("(#{source})", quirks_mode: true)})")
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def exec(source, options = {})
|
26
|
+
source = encode(source)
|
27
|
+
source = "#{@source}\n#{source}" if @source != ""
|
28
|
+
source = @runtime.compile_source(source)
|
29
|
+
|
30
|
+
tmpfile = write_to_tempfile(source)
|
31
|
+
|
32
|
+
if ExecJS.cygwin?
|
33
|
+
filepath = `cygpath -m #{tmpfile.path}`.rstrip
|
34
|
+
else
|
35
|
+
filepath = tmpfile.path
|
36
|
+
end
|
37
|
+
|
38
|
+
begin
|
39
|
+
extract_result(@runtime.exec_runtime(filepath), filepath)
|
40
|
+
ensure
|
41
|
+
File.unlink(tmpfile)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def call(identifier, *args)
|
46
|
+
eval "#{identifier}.apply(this, #{::JSON.generate(args)})"
|
47
|
+
end
|
48
|
+
|
49
|
+
protected
|
50
|
+
# See Tempfile.create on Ruby 2.1
|
51
|
+
def create_tempfile(basename)
|
52
|
+
tmpfile = nil
|
53
|
+
Dir::Tmpname.create(basename) do |tmpname|
|
54
|
+
mode = File::WRONLY | File::CREAT | File::EXCL
|
55
|
+
tmpfile = File.open(tmpname, mode, 0600)
|
56
|
+
end
|
57
|
+
tmpfile
|
58
|
+
end
|
59
|
+
|
60
|
+
def write_to_tempfile(contents)
|
61
|
+
tmpfile = create_tempfile(['execjs', 'js'])
|
62
|
+
tmpfile.write(contents)
|
63
|
+
tmpfile.close
|
64
|
+
tmpfile
|
65
|
+
end
|
66
|
+
|
67
|
+
def extract_result(output, filename)
|
68
|
+
status, value, stack = output.empty? ? [] : ::JSON.parse(output, create_additions: false)
|
69
|
+
if status == "ok"
|
70
|
+
value
|
71
|
+
else
|
72
|
+
stack ||= ""
|
73
|
+
real_filename = File.realpath(filename)
|
74
|
+
stack = stack.split("\n").map do |line|
|
75
|
+
line.sub(" at ", "")
|
76
|
+
.sub(real_filename, "(execjs)")
|
77
|
+
.sub(filename, "(execjs)")
|
78
|
+
.strip
|
79
|
+
end
|
80
|
+
stack.reject! { |line| ["eval code", "eval@[native code]"].include?(line) }
|
81
|
+
stack.shift unless stack[0].to_s.include?("(execjs)")
|
82
|
+
error_class = value =~ /SyntaxError:/ ? RuntimeError : ProgramError
|
83
|
+
error = error_class.new(value)
|
84
|
+
error.set_backtrace(stack + caller)
|
85
|
+
raise error
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
attr_reader :name
|
91
|
+
|
92
|
+
def initialize(options)
|
93
|
+
@name = options[:name]
|
94
|
+
@command = options[:command]
|
95
|
+
@runner_path = options[:runner_path]
|
96
|
+
@encoding = options[:encoding]
|
97
|
+
@deprecated = !!options[:deprecated]
|
98
|
+
@binary = nil
|
99
|
+
|
100
|
+
@popen_options = {}
|
101
|
+
@popen_options[:external_encoding] = @encoding if @encoding
|
102
|
+
@popen_options[:internal_encoding] = ::Encoding.default_internal || 'UTF-8'
|
103
|
+
|
104
|
+
if @runner_path
|
105
|
+
instance_eval generate_compile_method(@runner_path)
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
def available?
|
110
|
+
require 'json'
|
111
|
+
binary ? true : false
|
112
|
+
end
|
113
|
+
|
114
|
+
def deprecated?
|
115
|
+
@deprecated
|
116
|
+
end
|
117
|
+
|
118
|
+
private
|
119
|
+
def binary
|
120
|
+
@binary ||= which(@command)
|
121
|
+
end
|
122
|
+
|
123
|
+
def locate_executable(command)
|
124
|
+
commands = Array(command)
|
125
|
+
if ExecJS.windows? && File.extname(command) == ""
|
126
|
+
ENV['PATHEXT'].split(File::PATH_SEPARATOR).each { |p|
|
127
|
+
commands << (command + p)
|
128
|
+
}
|
129
|
+
end
|
130
|
+
|
131
|
+
commands.find { |cmd|
|
132
|
+
if File.executable? cmd
|
133
|
+
cmd
|
134
|
+
else
|
135
|
+
path = ENV['PATH'].split(File::PATH_SEPARATOR).find { |p|
|
136
|
+
full_path = File.join(p, cmd)
|
137
|
+
File.executable?(full_path) && File.file?(full_path)
|
138
|
+
}
|
139
|
+
path && File.expand_path(cmd, path)
|
140
|
+
end
|
141
|
+
}
|
142
|
+
end
|
143
|
+
|
144
|
+
protected
|
145
|
+
def generate_compile_method(path)
|
146
|
+
<<-RUBY
|
147
|
+
def compile_source(source)
|
148
|
+
<<-RUNNER
|
149
|
+
#{IO.read(path)}
|
150
|
+
RUNNER
|
151
|
+
end
|
152
|
+
RUBY
|
153
|
+
end
|
154
|
+
|
155
|
+
def json2_source
|
156
|
+
@json2_source ||= IO.read(ExecJS.root + "/support/json2.js")
|
157
|
+
end
|
158
|
+
|
159
|
+
def encode_source(source)
|
160
|
+
encoded_source = encode_unicode_codepoints(source)
|
161
|
+
::JSON.generate("(function(){ #{encoded_source} })()", quirks_mode: true)
|
162
|
+
end
|
163
|
+
|
164
|
+
def encode_unicode_codepoints(str)
|
165
|
+
str.gsub(/[\u0080-\uffff]/) do |ch|
|
166
|
+
"\\u%04x" % ch.codepoints.to_a
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
if ExecJS.windows?
|
171
|
+
def exec_runtime(filename)
|
172
|
+
path = Dir::Tmpname.create(['execjs', 'json']) {}
|
173
|
+
begin
|
174
|
+
command = binary.split(" ") << filename
|
175
|
+
`#{shell_escape(*command)} 2>&1 > #{path}`
|
176
|
+
output = File.open(path, 'rb', **@popen_options) { |f| f.read }
|
177
|
+
ensure
|
178
|
+
File.unlink(path) if path
|
179
|
+
end
|
180
|
+
|
181
|
+
if $?.success?
|
182
|
+
output
|
183
|
+
else
|
184
|
+
raise exec_runtime_error(output)
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
188
|
+
def shell_escape(*args)
|
189
|
+
# see http://technet.microsoft.com/en-us/library/cc723564.aspx#XSLTsection123121120120
|
190
|
+
args.map { |arg|
|
191
|
+
arg = %Q("#{arg.gsub('"','""')}") if arg.match(/[&|()<>^ "]/)
|
192
|
+
arg
|
193
|
+
}.join(" ")
|
194
|
+
end
|
195
|
+
elsif RUBY_ENGINE == 'jruby'
|
196
|
+
require 'shellwords'
|
197
|
+
|
198
|
+
def exec_runtime(filename)
|
199
|
+
command = "#{Shellwords.join(binary.split(' ') << filename)} 2>&1"
|
200
|
+
io = IO.popen(command, **@popen_options)
|
201
|
+
output = io.read
|
202
|
+
io.close
|
203
|
+
|
204
|
+
if $?.success?
|
205
|
+
output
|
206
|
+
else
|
207
|
+
raise exec_runtime_error(output)
|
208
|
+
end
|
209
|
+
end
|
210
|
+
else
|
211
|
+
def exec_runtime(filename)
|
212
|
+
io = IO.popen(binary.split(' ') << filename, **(@popen_options.merge({err: [:child, :out]})))
|
213
|
+
output = io.read
|
214
|
+
io.close
|
215
|
+
|
216
|
+
if $?.success?
|
217
|
+
output
|
218
|
+
else
|
219
|
+
raise exec_runtime_error(output)
|
220
|
+
end
|
221
|
+
end
|
222
|
+
end
|
223
|
+
# Internally exposed for Context.
|
224
|
+
public :exec_runtime
|
225
|
+
|
226
|
+
def exec_runtime_error(output)
|
227
|
+
error = RuntimeError.new(output)
|
228
|
+
lines = output.split("\n")
|
229
|
+
lineno = lines[0][/:(\d+)$/, 1] if lines[0]
|
230
|
+
lineno ||= 1
|
231
|
+
error.set_backtrace(["(execjs):#{lineno}"] + caller)
|
232
|
+
error
|
233
|
+
end
|
234
|
+
|
235
|
+
def which(command)
|
236
|
+
Array(command).find do |name|
|
237
|
+
name, args = name.split(/\s+/, 2)
|
238
|
+
path = locate_executable(name)
|
239
|
+
|
240
|
+
next unless path
|
241
|
+
|
242
|
+
args ? "#{path} #{args}" : path
|
243
|
+
end
|
244
|
+
end
|
245
|
+
end
|
246
|
+
end
|
data/lib/j1/version.rb
CHANGED
data/lib/j1_app.rb
CHANGED
@@ -88,8 +88,12 @@ module J1App
|
|
88
88
|
# ==========================================================================
|
89
89
|
# Initialize J1 logger settings
|
90
90
|
# ==========================================================================
|
91
|
-
|
92
|
-
|
91
|
+
# uuid = UUID.new.generate
|
92
|
+
# page_id = uuid[25, 37]
|
93
|
+
|
94
|
+
chars = [('a'..'z'), ('A'..'Z'), ('0'..'9')].map(&:to_a).flatten
|
95
|
+
page_id = (0...11).map { chars[rand(chars.length)] }.join
|
96
|
+
|
93
97
|
MDC.put('pageID', page_id)
|
94
98
|
MDC.put('path', '/')
|
95
99
|
|
@@ -152,6 +156,8 @@ module J1App
|
|
152
156
|
use Rack::Session::Cookie,
|
153
157
|
http_only: true, # if set to 'true', make session cookie visible to the browser (document) for HTTP
|
154
158
|
key: 'j1.app.session',
|
159
|
+
# same_site: 'None',
|
160
|
+
same_site: 'Lax',
|
155
161
|
secret: ENV['J1_SESSION_SECRET'] || SecureRandom.hex
|
156
162
|
|
157
163
|
# use Rack::Cache do |config|
|
@@ -0,0 +1,94 @@
|
|
1
|
+
module J1App
|
2
|
+
class SiteManager < Sinatra::Base
|
3
|
+
|
4
|
+
# ==========================================================================
|
5
|
+
# Sinatra Framework settings
|
6
|
+
# ==========================================================================
|
7
|
+
|
8
|
+
# NOTE: https://stackoverflow.com/questions/7847536/sinatra-in-facebook-iframe
|
9
|
+
#
|
10
|
+
#set :protection, :except => :frame_options
|
11
|
+
|
12
|
+
# Check: http://sinatrarb.com/intro.html
|
13
|
+
#
|
14
|
+
#set :static_cache_control, [:public, :max_age => 10]
|
15
|
+
|
16
|
+
# Sinatra extension 'sinatra-cross_origin' to enable CORS
|
17
|
+
# See: https://github.com/britg/sinatra-cross_origin
|
18
|
+
# Resource Sharing (CORS).
|
19
|
+
# See more on cross domain resource sharing with:
|
20
|
+
# https://developer.mozilla.org/En/HTTP_access_control
|
21
|
+
# --------------------------------------------------------------------------
|
22
|
+
# register Sinatra::CrossOrigin
|
23
|
+
# configure do
|
24
|
+
# enable :cross_origin
|
25
|
+
# end
|
26
|
+
|
27
|
+
# Additional (response) headers managed by Sinatra extension
|
28
|
+
# 'sinatra-cross_origin'
|
29
|
+
# NOTE: for the static content 'Access-Control-Allow-Origin'
|
30
|
+
# is NOT needed
|
31
|
+
# --------------------------------------------------------------------------
|
32
|
+
# before do
|
33
|
+
# response.headers['Access-Control-Allow-Origin'] = '*'
|
34
|
+
# response.headers['X-Powered-By'] = 'J1 Template'
|
35
|
+
# end
|
36
|
+
|
37
|
+
# OPTION BLOCK for Sinatra extension 'sinatra-cross_origin'
|
38
|
+
# Send a HTTP 200 response on the CORS preflight request (browser)
|
39
|
+
# --------------------------------------------------------------------------
|
40
|
+
# options "*" do
|
41
|
+
# response.headers["Allow"] = "GET, POST, OPTIONS"
|
42
|
+
# response.headers["Access-Control-Allow-Headers"] = "Authorization, Content-Type, Accept, X-User-Email, X-Auth-Token, X-Page-ID, X-Powered-By"
|
43
|
+
# 200
|
44
|
+
# end
|
45
|
+
|
46
|
+
# Register static content
|
47
|
+
# --------------------------------------------------------------------------
|
48
|
+
register Sinatra::Index
|
49
|
+
root = File.expand_path(J1App.destination, J1App.project_path)
|
50
|
+
set :public_folder, root
|
51
|
+
use_static_index "index.html"
|
52
|
+
|
53
|
+
error 400 do
|
54
|
+
four_oh_oh = File.expand_path(settings.public_folder + "/400.html", Dir.pwd)
|
55
|
+
File.read(four_oh_oh) if File.exist?(four_oh_oh)
|
56
|
+
end
|
57
|
+
|
58
|
+
error 401 do
|
59
|
+
four_oh_one = File.expand_path(settings.public_folder + "/401.html", Dir.pwd)
|
60
|
+
File.read(four_oh_one) if File.exist?(four_oh_one)
|
61
|
+
end
|
62
|
+
|
63
|
+
error 403 do
|
64
|
+
four_oh_three = File.expand_path(settings.public_folder + "/403.html", Dir.pwd)
|
65
|
+
File.read(four_oh_three) if File.exist?(four_oh_three)
|
66
|
+
end
|
67
|
+
|
68
|
+
error 404 do
|
69
|
+
four_oh_four = File.expand_path(settings.public_folder + "/404.html", Dir.pwd)
|
70
|
+
File.read(four_oh_four) if File.exist?(four_oh_four)
|
71
|
+
end
|
72
|
+
|
73
|
+
error 500 do
|
74
|
+
five_oh_oh = File.expand_path(settings.public_folder + "/500.html", Dir.pwd)
|
75
|
+
File.read(five_oh_oh) if File.exist?(five_oh_oh)
|
76
|
+
end
|
77
|
+
|
78
|
+
error 501 do
|
79
|
+
five_oh_one = File.expand_path(settings.public_folder + "/501.html", Dir.pwd)
|
80
|
+
File.read(five_oh_one) if File.exist?(five_oh_one)
|
81
|
+
end
|
82
|
+
|
83
|
+
error 502 do
|
84
|
+
five_oh_two = File.expand_path(settings.public_folder + "/502.html", Dir.pwd)
|
85
|
+
File.read(five_oh_two) if File.exist?(five_oh_two)
|
86
|
+
end
|
87
|
+
|
88
|
+
error 533 do
|
89
|
+
five_three_three = File.expand_path(settings.public_folder + "/533.html", Dir.pwd)
|
90
|
+
File.read(five_three_three) if File.exist?(five_three_three)
|
91
|
+
end
|
92
|
+
|
93
|
+
end
|
94
|
+
end
|