station 0.0.0 → 0.0.100
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.buildpacks +1 -0
- data/.editorconfig +23 -0
- data/.env.example +33 -0
- data/.gitignore +37 -22
- data/CODE_OF_CONDUCT.md +46 -0
- data/CONTRIBUTING.md +46 -0
- data/Dockerfile +69 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +14 -0
- data/LICENSE.md +400 -20
- data/LICENSE.txt +9 -0
- data/Procfile +1 -0
- data/README.md +54 -20
- data/app.json +24 -0
- data/babel.config.js +74 -0
- data/bin/nexmo-developer +120 -0
- data/docs/Getting-Started.md +39 -0
- data/docs/How-To-Use.md +272 -0
- data/docs/_config.yml +5 -0
- data/docs/index.md +46 -0
- data/lib/nexmo_developer/.disallowed_words +2 -0
- data/lib/nexmo_developer/.dockerignore +1 -0
- data/lib/nexmo_developer/.eslintrc.js +6 -0
- data/lib/nexmo_developer/.nvmrc +1 -0
- data/lib/nexmo_developer/.postcssrc.yml +4 -0
- data/lib/nexmo_developer/.pre-commit-config.yaml +8 -0
- data/lib/nexmo_developer/.rspec +3 -0
- data/lib/nexmo_developer/.rubocop.yml +276 -0
- data/lib/nexmo_developer/.ruby-version +1 -0
- data/lib/nexmo_developer/Dockerfile +28 -0
- data/lib/nexmo_developer/Gemfile +192 -0
- data/lib/nexmo_developer/Gemfile.lock +630 -0
- data/lib/nexmo_developer/Guardfile +109 -0
- data/lib/nexmo_developer/Procfile +2 -0
- data/lib/nexmo_developer/Rakefile +6 -0
- data/lib/nexmo_developer/Runbook.md +69 -0
- data/lib/nexmo_developer/app/admin/active_admin_feedback_author.rb +23 -0
- data/lib/nexmo_developer/app/admin/active_admin_redirect.rb +22 -0
- data/lib/nexmo_developer/app/admin/active_admin_session.rb +34 -0
- data/lib/nexmo_developer/app/admin/admin_building_block_event.rb +31 -0
- data/lib/nexmo_developer/app/admin/admin_event.rb +40 -0
- data/lib/nexmo_developer/app/admin/admin_feedback_feedback.rb +54 -0
- data/lib/nexmo_developer/app/admin/admin_feedback_resource.rb +42 -0
- data/lib/nexmo_developer/app/admin/admin_user.rb +37 -0
- data/lib/nexmo_developer/app/assets/config/manifest.js +5 -0
- data/lib/nexmo_developer/app/assets/fonts/Lato-Black.woff +0 -0
- data/lib/nexmo_developer/app/assets/fonts/Lato-Black.woff2 +0 -0
- data/lib/nexmo_developer/app/assets/fonts/Lato-Regular.woff +0 -0
- data/lib/nexmo_developer/app/assets/fonts/Lato-Regular.woff2 +0 -0
- data/lib/nexmo_developer/app/assets/fonts/Lato-Semibold.woff +0 -0
- data/lib/nexmo_developer/app/assets/fonts/Lato-Semibold.woff2 +0 -0
- data/lib/nexmo_developer/app/assets/fonts/icomoon.eot +0 -0
- data/lib/nexmo_developer/app/assets/fonts/icomoon.json +1257 -0
- data/lib/nexmo_developer/app/assets/fonts/icomoon.svg +55 -0
- data/lib/nexmo_developer/app/assets/fonts/icomoon.ttf +0 -0
- data/lib/nexmo_developer/app/assets/fonts/icomoon.woff +0 -0
- data/lib/nexmo_developer/app/assets/fonts/nexmo-developer.json +36483 -0
- data/lib/nexmo_developer/app/assets/images/.keep +0 -0
- data/lib/nexmo_developer/app/assets/images/logo@3x.png +0 -0
- data/lib/nexmo_developer/app/assets/images/logo_vonage.png +0 -0
- data/lib/nexmo_developer/app/assets/images/nexmo-developer-logo.svg +25 -0
- data/lib/nexmo_developer/app/assets/images/nexmo-logo-collapsed.svg +10 -0
- data/lib/nexmo_developer/app/assets/images/nexmo-vonage-white.svg +79 -0
- data/lib/nexmo_developer/app/assets/images/posters/chatapp.jpg +0 -0
- data/lib/nexmo_developer/app/assets/images/posters/chatapp_small.png +0 -0
- data/lib/nexmo_developer/app/assets/images/posters/nexmo.jpg +0 -0
- data/lib/nexmo_developer/app/assets/images/posters/numberinsight.jpg +0 -0
- data/lib/nexmo_developer/app/assets/images/posters/numberinsight_small.png +0 -0
- data/lib/nexmo_developer/app/assets/images/posters/sms.jpg +0 -0
- data/lib/nexmo_developer/app/assets/images/posters/sms_small.png +0 -0
- data/lib/nexmo_developer/app/assets/images/posters/verify.jpg +0 -0
- data/lib/nexmo_developer/app/assets/images/posters/verify_small.png +0 -0
- data/lib/nexmo_developer/app/assets/images/posters/voice.jpg +0 -0
- data/lib/nexmo_developer/app/assets/images/posters/voice_small.png +0 -0
- data/lib/nexmo_developer/app/assets/images/select-dropdown.png +0 -0
- data/lib/nexmo_developer/app/assets/images/slack.svg +33 -0
- data/lib/nexmo_developer/app/assets/images/themes/ea/topography.png +0 -0
- data/lib/nexmo_developer/app/assets/javascripts/active_admin.js.coffee +1 -0
- data/lib/nexmo_developer/app/assets/javascripts/application.js +19 -0
- data/lib/nexmo_developer/app/assets/javascripts/stats.js +14 -0
- data/lib/nexmo_developer/app/assets/regex/matching_chars.rb +1 -0
- data/lib/nexmo_developer/app/assets/regex/sequence_diagram_regex.rb +1 -0
- data/lib/nexmo_developer/app/assets/regex/stats_regex.rb +1 -0
- data/lib/nexmo_developer/app/assets/regex/webfont_regex.rb +1 -0
- data/lib/nexmo_developer/app/assets/stylesheets/active_admin.scss +17 -0
- data/lib/nexmo_developer/app/assets/stylesheets/application.css +1 -0
- data/lib/nexmo_developer/app/channels/application_cable/channel.rb +4 -0
- data/lib/nexmo_developer/app/channels/application_cable/connection.rb +4 -0
- data/lib/nexmo_developer/app/constraints/documentation_constraint.rb +25 -0
- data/lib/nexmo_developer/app/constraints/landing_page_constraint.rb +18 -0
- data/lib/nexmo_developer/app/constraints/locale_constraint.rb +17 -0
- data/lib/nexmo_developer/app/constraints/open_api_constraint.rb +49 -0
- data/lib/nexmo_developer/app/controllers/admin_api/code_snippets_controller.rb +45 -0
- data/lib/nexmo_developer/app/controllers/admin_api/feedback_controller.rb +11 -0
- data/lib/nexmo_developer/app/controllers/admin_api_controller.rb +17 -0
- data/lib/nexmo_developer/app/controllers/api_controller.rb +33 -0
- data/lib/nexmo_developer/app/controllers/api_errors_controller.rb +82 -0
- data/lib/nexmo_developer/app/controllers/application_controller.rb +93 -0
- data/lib/nexmo_developer/app/controllers/careers_controller.rb +9 -0
- data/lib/nexmo_developer/app/controllers/concerns/.keep +0 -0
- data/lib/nexmo_developer/app/controllers/dashboard_controller.rb +216 -0
- data/lib/nexmo_developer/app/controllers/extend_controller.rb +45 -0
- data/lib/nexmo_developer/app/controllers/feedback/feedbacks_controller.rb +85 -0
- data/lib/nexmo_developer/app/controllers/feeds_controller.rb +20 -0
- data/lib/nexmo_developer/app/controllers/jobs_controller.rb +64 -0
- data/lib/nexmo_developer/app/controllers/markdown_controller.rb +160 -0
- data/lib/nexmo_developer/app/controllers/search_controller.rb +35 -0
- data/lib/nexmo_developer/app/controllers/sessions_controller.rb +12 -0
- data/lib/nexmo_developer/app/controllers/slack_controller.rb +61 -0
- data/lib/nexmo_developer/app/controllers/static_controller.rb +195 -0
- data/lib/nexmo_developer/app/controllers/tutorial_controller.rb +113 -0
- data/lib/nexmo_developer/app/controllers/usage/ab_result_controller.rb +10 -0
- data/lib/nexmo_developer/app/controllers/usage/code_snippet_controller.rb +19 -0
- data/lib/nexmo_developer/app/controllers/use_case_controller.rb +65 -0
- data/lib/nexmo_developer/app/extensions/nokogiri/html/document.rb +23 -0
- data/lib/nexmo_developer/app/helpers/application_helper.rb +66 -0
- data/lib/nexmo_developer/app/helpers/date_range_helper.rb +9 -0
- data/lib/nexmo_developer/app/helpers/navigation_helper.rb +56 -0
- data/lib/nexmo_developer/app/helpers/parameter_values_helper.rb +5 -0
- data/lib/nexmo_developer/app/helpers/video_helper.rb +20 -0
- data/lib/nexmo_developer/app/jobs/application_job.rb +2 -0
- data/lib/nexmo_developer/app/mailers/application_mailer.rb +4 -0
- data/lib/nexmo_developer/app/middleware/nexmo_developer/building_block_redirect.rb +18 -0
- data/lib/nexmo_developer/app/middleware/nexmo_developer/visitor_id.rb +13 -0
- data/lib/nexmo_developer/app/models/api_error.rb +31 -0
- data/lib/nexmo_developer/app/models/application_record.rb +3 -0
- data/lib/nexmo_developer/app/models/concerns/.keep +0 -0
- data/lib/nexmo_developer/app/models/concerns/publishable.rb +13 -0
- data/lib/nexmo_developer/app/models/event.rb +38 -0
- data/lib/nexmo_developer/app/models/feedback.rb +5 -0
- data/lib/nexmo_developer/app/models/feedback/author.rb +5 -0
- data/lib/nexmo_developer/app/models/feedback/config.rb +16 -0
- data/lib/nexmo_developer/app/models/feedback/feedback.rb +34 -0
- data/lib/nexmo_developer/app/models/feedback/resource.rb +45 -0
- data/lib/nexmo_developer/app/models/product.rb +22 -0
- data/lib/nexmo_developer/app/models/redirect.rb +2 -0
- data/lib/nexmo_developer/app/models/session.rb +9 -0
- data/lib/nexmo_developer/app/models/tutorial.rb +189 -0
- data/lib/nexmo_developer/app/models/tutorial/file_loader.rb +28 -0
- data/lib/nexmo_developer/app/models/tutorial/metadata.rb +54 -0
- data/lib/nexmo_developer/app/models/tutorial/prerequisite.rb +31 -0
- data/lib/nexmo_developer/app/models/tutorial/task.rb +45 -0
- data/lib/nexmo_developer/app/models/usage.rb +5 -0
- data/lib/nexmo_developer/app/models/usage/code_snippet_event.rb +7 -0
- data/lib/nexmo_developer/app/models/user.rb +14 -0
- data/lib/nexmo_developer/app/presenters/card.rb +20 -0
- data/lib/nexmo_developer/app/presenters/career.rb +40 -0
- data/lib/nexmo_developer/app/presenters/feedback_presenter.rb +31 -0
- data/lib/nexmo_developer/app/presenters/footer.rb +88 -0
- data/lib/nexmo_developer/app/presenters/head.rb +96 -0
- data/lib/nexmo_developer/app/presenters/header.rb +56 -0
- data/lib/nexmo_developer/app/presenters/improve_page_presenter.rb +19 -0
- data/lib/nexmo_developer/app/presenters/languages_dropdown_presenter.rb +19 -0
- data/lib/nexmo_developer/app/presenters/locale_switcher_presenter.rb +36 -0
- data/lib/nexmo_developer/app/presenters/navigation.rb +44 -0
- data/lib/nexmo_developer/app/presenters/page_title.rb +38 -0
- data/lib/nexmo_developer/app/presenters/product_dropdown_presenter.rb +39 -0
- data/lib/nexmo_developer/app/presenters/sidenav.rb +64 -0
- data/lib/nexmo_developer/app/presenters/sidenav_item.rb +58 -0
- data/lib/nexmo_developer/app/presenters/sidenav_resolver.rb +136 -0
- data/lib/nexmo_developer/app/presenters/sidenav_subitem.rb +71 -0
- data/lib/nexmo_developer/app/presenters/title_normalizer.rb +25 -0
- data/lib/nexmo_developer/app/presenters/topnav.rb +23 -0
- data/lib/nexmo_developer/app/presenters/topnav_item.rb +19 -0
- data/lib/nexmo_developer/app/presenters/tutorial_list_item.rb +99 -0
- data/lib/nexmo_developer/app/screenshots/webhook-url-for-delivery-receipt.js +44 -0
- data/lib/nexmo_developer/app/screenshots/webhook-url-for-inbound-message.js +44 -0
- data/lib/nexmo_developer/app/services/diff.rb +146 -0
- data/lib/nexmo_developer/app/services/email_validator.rb +6 -0
- data/lib/nexmo_developer/app/services/feedback_slack_notifier.rb +141 -0
- data/lib/nexmo_developer/app/services/greenhouse.rb +45 -0
- data/lib/nexmo_developer/app/services/load_config.rb +14 -0
- data/lib/nexmo_developer/app/services/locale_redirector.rb +29 -0
- data/lib/nexmo_developer/app/services/not_found_notifier.rb +34 -0
- data/lib/nexmo_developer/app/services/open_api_definition_resolver.rb +25 -0
- data/lib/nexmo_developer/app/services/redirector.rb +33 -0
- data/lib/nexmo_developer/app/services/search/article.rb +39 -0
- data/lib/nexmo_developer/app/services/search/document.rb +37 -0
- data/lib/nexmo_developer/app/services/search_terms.rb +27 -0
- data/lib/nexmo_developer/app/services/smartling_api.rb +72 -0
- data/lib/nexmo_developer/app/services/translator/file_translator.rb +61 -0
- data/lib/nexmo_developer/app/services/translator/smartling/api/base.rb +54 -0
- data/lib/nexmo_developer/app/services/translator/smartling/api/create_batch.rb +48 -0
- data/lib/nexmo_developer/app/services/translator/smartling/api/create_job.rb +44 -0
- data/lib/nexmo_developer/app/services/translator/smartling/api/download_file.rb +44 -0
- data/lib/nexmo_developer/app/services/translator/smartling/api/file_status.rb +43 -0
- data/lib/nexmo_developer/app/services/translator/smartling/api/file_uris.rb +46 -0
- data/lib/nexmo_developer/app/services/translator/smartling/api/upload_file.rb +67 -0
- data/lib/nexmo_developer/app/services/translator/smartling/api_requests_generator.rb +64 -0
- data/lib/nexmo_developer/app/services/translator/smartling/token_generator.rb +16 -0
- data/lib/nexmo_developer/app/services/translator/smartling_coordinator.rb +56 -0
- data/lib/nexmo_developer/app/services/translator/smartling_downloader.rb +57 -0
- data/lib/nexmo_developer/app/services/translator/translation_request.rb +11 -0
- data/lib/nexmo_developer/app/services/translator/translator_coordinator.rb +33 -0
- data/lib/nexmo_developer/app/services/translator/utils.rb +42 -0
- data/lib/nexmo_developer/app/services/tutorial_list.rb +39 -0
- data/lib/nexmo_developer/app/views/admin/feedbacks/_steps.html.erb +44 -0
- data/lib/nexmo_developer/app/views/admin_api/code_snippets/index.json.erb +1 -0
- data/lib/nexmo_developer/app/views/admin_api/feedback/index.json.jbuilder +3 -0
- data/lib/nexmo_developer/app/views/api/show.html.erb +1 -0
- data/lib/nexmo_developer/app/views/api_errors/_error_example.html.erb +9 -0
- data/lib/nexmo_developer/app/views/api_errors/_error_table.html.erb +30 -0
- data/lib/nexmo_developer/app/views/api_errors/index.html.erb +45 -0
- data/lib/nexmo_developer/app/views/api_errors/show.html.erb +27 -0
- data/lib/nexmo_developer/app/views/careers/index.html.erb +76 -0
- data/lib/nexmo_developer/app/views/code_languages/_icon.html.erb +11 -0
- data/lib/nexmo_developer/app/views/contribute/administration/page-links.md +179 -0
- data/lib/nexmo_developer/app/views/contribute/code-snippets/how-to-update-code-snippets.md +89 -0
- data/lib/nexmo_developer/app/views/contribute/code-snippets/sample-code-snippet.md +42 -0
- data/lib/nexmo_developer/app/views/contribute/guides/code-examples.md +190 -0
- data/lib/nexmo_developer/app/views/contribute/guides/introduction.md +32 -0
- data/lib/nexmo_developer/app/views/contribute/guides/landing-pages.md +556 -0
- data/lib/nexmo_developer/app/views/contribute/guides/markdown-guide.md +420 -0
- data/lib/nexmo_developer/app/views/contribute/guides/platform.md +220 -0
- data/lib/nexmo_developer/app/views/contribute/guides/tutorials-and-use-cases.md +64 -0
- data/lib/nexmo_developer/app/views/contribute/guides/writing-style-guide.md +278 -0
- data/lib/nexmo_developer/app/views/contribute/overview.md +39 -0
- data/lib/nexmo_developer/app/views/contribute/structure/content-types/code-snippets.md +140 -0
- data/lib/nexmo_developer/app/views/contribute/structure/content-types/guides.md +14 -0
- data/lib/nexmo_developer/app/views/contribute/structure/content-types/overviews.md +34 -0
- data/lib/nexmo_developer/app/views/contribute/structure/content-types/tutorials.md +59 -0
- data/lib/nexmo_developer/app/views/contribute/structure/content-types/use-cases.md +18 -0
- data/lib/nexmo_developer/app/views/contribute/structure/overview.md +55 -0
- data/lib/nexmo_developer/app/views/contribute/tutorials-and-use-cases/tutorials.md +197 -0
- data/lib/nexmo_developer/app/views/contribute/tutorials-and-use-cases/use-cases.md +22 -0
- data/lib/nexmo_developer/app/views/dashboard/_performance_table.html.erb +18 -0
- data/lib/nexmo_developer/app/views/dashboard/coverage.html.erb +169 -0
- data/lib/nexmo_developer/app/views/dashboard/stats.html.erb +134 -0
- data/lib/nexmo_developer/app/views/dashboard/stats_summary.html.erb +62 -0
- data/lib/nexmo_developer/app/views/extend/index.html.erb +33 -0
- data/lib/nexmo_developer/app/views/extend/show.html.erb +31 -0
- data/lib/nexmo_developer/app/views/layouts/api.html.erb +24 -0
- data/lib/nexmo_developer/app/views/layouts/application.html.erb +15 -0
- data/lib/nexmo_developer/app/views/layouts/documentation-index.html.erb +16 -0
- data/lib/nexmo_developer/app/views/layouts/documentation.html.erb +26 -0
- data/lib/nexmo_developer/app/views/layouts/landing.html.erb +17 -0
- data/lib/nexmo_developer/app/views/layouts/mailer.html.erb +13 -0
- data/lib/nexmo_developer/app/views/layouts/mailer.text.erb +1 -0
- data/lib/nexmo_developer/app/views/layouts/open-api.html.erb +10 -0
- data/lib/nexmo_developer/app/views/layouts/page-full.html.erb +9 -0
- data/lib/nexmo_developer/app/views/layouts/page.html.erb +15 -0
- data/lib/nexmo_developer/app/views/layouts/partials/_feedback.html.erb +14 -0
- data/lib/nexmo_developer/app/views/layouts/partials/_footer.html.erb +50 -0
- data/lib/nexmo_developer/app/views/layouts/partials/_head.html.erb +139 -0
- data/lib/nexmo_developer/app/views/layouts/partials/_header.html.erb +57 -0
- data/lib/nexmo_developer/app/views/layouts/partials/_improve_this_page.html.erb +16 -0
- data/lib/nexmo_developer/app/views/layouts/partials/_locale_switcher.html.erb +28 -0
- data/lib/nexmo_developer/app/views/layouts/partials/_notices.html.erb +29 -0
- data/lib/nexmo_developer/app/views/layouts/partials/_post-body-tags.html.erb +4 -0
- data/lib/nexmo_developer/app/views/layouts/partials/_product_dropdown.html.erb +30 -0
- data/lib/nexmo_developer/app/views/layouts/partials/_programming_languages_dropdown.html.erb +29 -0
- data/lib/nexmo_developer/app/views/layouts/partials/_sidenav.html.erb +3 -0
- data/lib/nexmo_developer/app/views/layouts/partials/_sidenav_item.html.erb +18 -0
- data/lib/nexmo_developer/app/views/layouts/partials/_sidenav_subitem.html.erb +34 -0
- data/lib/nexmo_developer/app/views/layouts/partials/api/_voice.html.erb +84 -0
- data/lib/nexmo_developer/app/views/layouts/static.html.erb +33 -0
- data/lib/nexmo_developer/app/views/markdown/show.html.erb +1 -0
- data/lib/nexmo_developer/app/views/markdown/wip.html.erb +5 -0
- data/lib/nexmo_developer/app/views/product-lifecycle/beta.md +28 -0
- data/lib/nexmo_developer/app/views/product-lifecycle/dev-preview.md +22 -0
- data/lib/nexmo_developer/app/views/search/_result.html.erb +31 -0
- data/lib/nexmo_developer/app/views/search/results.html.erb +26 -0
- data/lib/nexmo_developer/app/views/sessions/set_user_locale.js.erb +1 -0
- data/lib/nexmo_developer/app/views/slack/join.html.erb +25 -0
- data/lib/nexmo_developer/app/views/static/404.html.erb +26 -0
- data/lib/nexmo_developer/app/views/static/_career.html.erb +15 -0
- data/lib/nexmo_developer/app/views/static/_community.html.erb +24 -0
- data/lib/nexmo_developer/app/views/static/_dotnet.html.erb +26 -0
- data/lib/nexmo_developer/app/views/static/_event.html.erb +7 -0
- data/lib/nexmo_developer/app/views/static/_products.html.erb +450 -0
- data/lib/nexmo_developer/app/views/static/_profile.html.erb +9 -0
- data/lib/nexmo_developer/app/views/static/_slack.html.erb +2 -0
- data/lib/nexmo_developer/app/views/static/_xwithy.html.erb +33 -0
- data/lib/nexmo_developer/app/views/static/default_landing.html.erb +22 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_action_button.html.erb +13 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_api_list.html.erb +30 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_call_to_action.html.erb +35 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_career.html.erb +3 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_client_sdk_card.html.erb +17 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_contact_community.html.erb +15 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_contact_support.html.erb +14 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_event_search_results.js.erb +2 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_event_search_results_content.html.erb +9 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_event_search_results_map_content.html.erb +10 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_events.html.erb +80 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_featured_session.html.erb +18 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_github_repo.html.erb +31 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_header.html.erb +24 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_headshot.html.erb +43 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_html.html.erb +3 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_join_slack.html.erb +3 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_line_divider.html.erb +5 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_linked_image.html.erb +10 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_migrate_details.html.erb +57 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_products.html.erb +1 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_section_header.html.erb +10 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_sessions.html.erb +30 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_structured_text.html.erb +24 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_submit_your_idea_form.html.erb +58 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_table.html.erb +25 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_team_members.html.erb +5 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_text.html.erb +5 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_tutorial.html.erb +30 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_unordered_list.html.erb +11 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_warning_callout.html.erb +8 -0
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_write_for_nexmo.html.erb +12 -0
- data/lib/nexmo_developer/app/views/static/documentation.html.erb +1 -0
- data/lib/nexmo_developer/app/views/static/landing.html.erb +47 -0
- data/lib/nexmo_developer/app/views/static/past_events.html.erb +19 -0
- data/lib/nexmo_developer/app/views/static/podcast.html.erb +40 -0
- data/lib/nexmo_developer/app/views/static/robots.txt.erb +4 -0
- data/lib/nexmo_developer/app/views/tools/concatenation.html +1 -0
- data/lib/nexmo_developer/app/views/tutorial/_prerequisites.html.erb +23 -0
- data/lib/nexmo_developer/app/views/tutorial/index.html.erb +81 -0
- data/lib/nexmo_developer/app/views/tutorial/list.html.erb +63 -0
- data/lib/nexmo_developer/app/views/tutorial/single.html.erb +1 -0
- data/lib/nexmo_developer/app/views/use_case/_index.html.erb +53 -0
- data/lib/nexmo_developer/app/views/use_case/index.html.erb +12 -0
- data/lib/nexmo_developer/app/views/use_case/list/plain.html.erb +5 -0
- data/lib/nexmo_developer/app/views/use_case/show.html.erb +8 -0
- data/lib/nexmo_developer/app/webpacker/javascript/api_status/index.js +20 -0
- data/lib/nexmo_developer/app/webpacker/javascript/careers/index.js +134 -0
- data/lib/nexmo_developer/app/webpacker/javascript/code_snippet_events/index.js +89 -0
- data/lib/nexmo_developer/app/webpacker/javascript/components/concatenation/Concatenation.vue +96 -0
- data/lib/nexmo_developer/app/webpacker/javascript/components/concatenation/character_counter.js +112 -0
- data/lib/nexmo_developer/app/webpacker/javascript/components/feedback/Feedback.vue +156 -0
- data/lib/nexmo_developer/app/webpacker/javascript/components/feedback/FeedbackPath.vue +56 -0
- data/lib/nexmo_developer/app/webpacker/javascript/components/feedback/eventHub.js +3 -0
- data/lib/nexmo_developer/app/webpacker/javascript/components/feedback/step/FieldSet.vue +78 -0
- data/lib/nexmo_developer/app/webpacker/javascript/components/feedback/step/Plain.vue +26 -0
- data/lib/nexmo_developer/app/webpacker/javascript/components/feedback/step/RadioGroup.vue +65 -0
- data/lib/nexmo_developer/app/webpacker/javascript/components/feedback/step/TextArea.vue +86 -0
- data/lib/nexmo_developer/app/webpacker/javascript/components/feedback/step/base.vue +53 -0
- data/lib/nexmo_developer/app/webpacker/javascript/components/feedback/store.js +50 -0
- data/lib/nexmo_developer/app/webpacker/javascript/components/jwt_generator/JwtGenerator.vue +220 -0
- data/lib/nexmo_developer/app/webpacker/javascript/components/search/NDPArticle.vue +38 -0
- data/lib/nexmo_developer/app/webpacker/javascript/components/search/Search.vue +182 -0
- data/lib/nexmo_developer/app/webpacker/javascript/components/search/ZendeskArticle.vue +30 -0
- data/lib/nexmo_developer/app/webpacker/javascript/format/index.js +36 -0
- data/lib/nexmo_developer/app/webpacker/javascript/github_cards/index.js +16 -0
- data/lib/nexmo_developer/app/webpacker/javascript/locale_switcher/index.js +40 -0
- data/lib/nexmo_developer/app/webpacker/javascript/notices/index.js +52 -0
- data/lib/nexmo_developer/app/webpacker/javascript/scroll/index.js +25 -0
- data/lib/nexmo_developer/app/webpacker/javascript/sidenav/index.js +251 -0
- data/lib/nexmo_developer/app/webpacker/javascript/spotlight/index.js +12 -0
- data/lib/nexmo_developer/app/webpacker/javascript/volta/tooltip.min.js +5 -0
- data/lib/nexmo_developer/app/webpacker/javascript/volta/volta.js +2145 -0
- data/lib/nexmo_developer/app/webpacker/javascript/volta_tabbed_examples/index.js +106 -0
- data/lib/nexmo_developer/app/webpacker/javascript/volta_tabbed_examples/user_preference.js +78 -0
- data/lib/nexmo_developer/app/webpacker/packs/application.js +136 -0
- data/lib/nexmo_developer/app/webpacker/src/application.css +0 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/application.scss +62 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/custom/_core.scss +196 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/custom/_mixins.scss +51 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/custom/_syntax.scss +63 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/custom/_typography.scss +248 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/custom/_variables.scss +23 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/layout/_api.scss +167 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/layout/_careers.scss +29 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/layout/_community.scss +70 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/layout/_feedback.scss +16 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/layout/_footer.scss +113 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/layout/_header.scss +207 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/layout/_hero.scss +16 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/layout/_print.scss +14 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/layout/_search.scss +115 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/layout/_team.scss +36 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/objects/_building-block.scss +32 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/objects/_card.scss +150 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/objects/_collapsible.scss +18 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/objects/_content-block.scss +24 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/objects/_extend.scss +49 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/objects/_focus.scss +5 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/objects/_icons.scss +334 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/objects/_js-sequence-diagram.scss +9 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/objects/_navigation.scss +113 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/objects/_notices.scss +49 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/objects/_tabs.scss +35 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/objects/_use_cases.scss +29 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/objects/_video.scss +14 -0
- data/lib/nexmo_developer/app/webpacker/stylesheets/themes/_ea.scss +32 -0
- data/lib/nexmo_developer/bin/initiate +23 -0
- data/lib/nexmo_developer/bin/rails +4 -0
- data/lib/nexmo_developer/bin/setup +36 -0
- data/lib/nexmo_developer/bin/update +31 -0
- data/lib/nexmo_developer/bin/webpack +19 -0
- data/lib/nexmo_developer/bin/webpack-dev-server +19 -0
- data/lib/nexmo_developer/bin/yarn +11 -0
- data/lib/nexmo_developer/config.ru +5 -0
- data/lib/nexmo_developer/config/application.rb +44 -0
- data/lib/nexmo_developer/config/boot.rb +4 -0
- data/lib/nexmo_developer/config/cable.yml +10 -0
- data/lib/nexmo_developer/config/credentials.yml.enc +1 -0
- data/lib/nexmo_developer/config/database.yml +91 -0
- data/lib/nexmo_developer/config/dynamic_content.yml +1 -0
- data/lib/nexmo_developer/config/environment.rb +7 -0
- data/lib/nexmo_developer/config/environments/development.rb +63 -0
- data/lib/nexmo_developer/config/environments/production.rb +102 -0
- data/lib/nexmo_developer/config/environments/staging.rb +86 -0
- data/lib/nexmo_developer/config/environments/test.rb +48 -0
- data/lib/nexmo_developer/config/feedback.yml +104 -0
- data/lib/nexmo_developer/config/initializers/active_admin.rb +295 -0
- data/lib/nexmo_developer/config/initializers/algolia.rb +30 -0
- data/lib/nexmo_developer/config/initializers/application_controller_renderer.rb +8 -0
- data/lib/nexmo_developer/config/initializers/assets.rb +16 -0
- data/lib/nexmo_developer/config/initializers/backtrace_silencers.rb +7 -0
- data/lib/nexmo_developer/config/initializers/bugsnag.rb +8 -0
- data/lib/nexmo_developer/config/initializers/content_security_policy.rb +25 -0
- data/lib/nexmo_developer/config/initializers/cookies_serializer.rb +5 -0
- data/lib/nexmo_developer/config/initializers/devise.rb +279 -0
- data/lib/nexmo_developer/config/initializers/doc_finder.rb +10 -0
- data/lib/nexmo_developer/config/initializers/filter_parameter_logging.rb +4 -0
- data/lib/nexmo_developer/config/initializers/geocoder.rb +24 -0
- data/lib/nexmo_developer/config/initializers/gravatar_image_tag.rb +5 -0
- data/lib/nexmo_developer/config/initializers/greenhouse_io.rb +7 -0
- data/lib/nexmo_developer/config/initializers/inflections.rb +16 -0
- data/lib/nexmo_developer/config/initializers/locale.rb +6 -0
- data/lib/nexmo_developer/config/initializers/mime_types.rb +4 -0
- data/lib/nexmo_developer/config/initializers/recaptcha.rb +6 -0
- data/lib/nexmo_developer/config/initializers/session_store.rb +3 -0
- data/lib/nexmo_developer/config/initializers/slack_safety_check.rb +29 -0
- data/lib/nexmo_developer/config/initializers/split.rb +5 -0
- data/lib/nexmo_developer/config/initializers/wrap_parameters.rb +14 -0
- data/lib/nexmo_developer/config/initializers/zeitwerk.rb +7 -0
- data/lib/nexmo_developer/config/master.key +1 -0
- data/lib/nexmo_developer/config/newrelic.yml +35 -0
- data/lib/nexmo_developer/config/puma.rb +41 -0
- data/lib/nexmo_developer/config/redirects.yml +280 -0
- data/lib/nexmo_developer/config/repos.yml +27 -0
- data/lib/nexmo_developer/config/routes.rb +108 -0
- data/lib/nexmo_developer/config/secrets.yml +25 -0
- data/lib/nexmo_developer/config/spring.rb +6 -0
- data/lib/nexmo_developer/config/stitch-redirects.yml +145 -0
- data/lib/nexmo_developer/config/storage.yml +34 -0
- data/lib/nexmo_developer/config/tutorials/.gitkeep +0 -0
- data/lib/nexmo_developer/config/tutorials/en/app-to-app.yml +49 -0
- data/lib/nexmo_developer/config/tutorials/en/app-to-phone.yml +43 -0
- data/lib/nexmo_developer/config/tutorials/en/create-and-retrieve-a-report.yml +24 -0
- data/lib/nexmo_developer/config/tutorials/en/create-report-using-graphical-tools.yml +20 -0
- data/lib/nexmo_developer/config/tutorials/en/get-json-records-cli.yml +20 -0
- data/lib/nexmo_developer/config/tutorials/en/ifttt-to-sms.yml +10 -0
- data/lib/nexmo_developer/config/tutorials/en/in-app-messaging.yml +4 -0
- data/lib/nexmo_developer/config/tutorials/en/in-app-messaging/javascript.yml +50 -0
- data/lib/nexmo_developer/config/tutorials/en/in-app-messaging/kotlin.yml +52 -0
- data/lib/nexmo_developer/config/tutorials/en/in-app-messaging/objective_c.yml +50 -0
- data/lib/nexmo_developer/config/tutorials/en/in-app-messaging/swift.yml +50 -0
- data/lib/nexmo_developer/config/tutorials/en/number-insight-api-aspnet.yml +11 -0
- data/lib/nexmo_developer/config/tutorials/en/phone-to-app.yml +4 -0
- data/lib/nexmo_developer/config/tutorials/en/phone-to-app/javascript.yml +38 -0
- data/lib/nexmo_developer/config/tutorials/en/receive-sms-dotnet.yml +9 -0
- data/lib/nexmo_developer/config/tutorials/en/receive-sms-with-java.yml +9 -0
- data/lib/nexmo_developer/config/tutorials/en/receive-sms-with-php.yml +10 -0
- data/lib/nexmo_developer/config/tutorials/en/receive-sms-with-ruby.yml +9 -0
- data/lib/nexmo_developer/config/tutorials/en/send-facebook-message-with-failover.yml +41 -0
- data/lib/nexmo_developer/config/tutorials/en/send-fbm-message.yml +42 -0
- data/lib/nexmo_developer/config/tutorials/en/send-sms-with-dotnet.yml +9 -0
- data/lib/nexmo_developer/config/tutorials/en/send-sms-with-flask.yml +9 -0
- data/lib/nexmo_developer/config/tutorials/en/send-sms-with-java.yml +9 -0
- data/lib/nexmo_developer/config/tutorials/en/send-sms-with-messages.yml +38 -0
- data/lib/nexmo_developer/config/tutorials/en/send-sms-with-php.yml +9 -0
- data/lib/nexmo_developer/config/tutorials/en/send-sms-with-ruby.yml +9 -0
- data/lib/nexmo_developer/config/tutorials/en/send-viber-message.yml +40 -0
- data/lib/nexmo_developer/config/tutorials/en/send-whatsapp-message.yml +40 -0
- data/lib/nexmo_developer/config/tutorials/en/sms-browser-notifications.yml +10 -0
- data/lib/nexmo_developer/config/tutorials/en/sms-dlr-with-dotnet.yml +9 -0
- data/lib/nexmo_developer/config/tutorials/en/sms-dlr-with-php.yml +9 -0
- data/lib/nexmo_developer/config/tutorials/en/sms-dlr-with-ruby.yml +9 -0
- data/lib/nexmo_developer/config/tutorials/en/sms-fortune-cookies-with-ibm-cloud.yml +10 -0
- data/lib/nexmo_developer/config/tutorials/en/two-factor-authentication-dotnet-verify-api.yml +11 -0
- data/lib/nexmo_developer/config/webpack/custom.js +7 -0
- data/lib/nexmo_developer/config/webpack/development.js +3 -0
- data/lib/nexmo_developer/config/webpack/environment.js +22 -0
- data/lib/nexmo_developer/config/webpack/loaders/vue.js +6 -0
- data/lib/nexmo_developer/config/webpack/production.js +3 -0
- data/lib/nexmo_developer/config/webpack/staging.js +4 -0
- data/lib/nexmo_developer/config/webpack/test.js +3 -0
- data/lib/nexmo_developer/config/webpacker.yml +82 -0
- data/lib/nexmo_developer/db/migrate/20170215101603_create_events.rb +15 -0
- data/lib/nexmo_developer/db/migrate/20170413143802_enable_uuid_ossp_extension.rb +6 -0
- data/lib/nexmo_developer/db/migrate/20170413154102_change_event_id_to_uuid.rb +7 -0
- data/lib/nexmo_developer/db/migrate/20170413154510_create_sessions.rb +13 -0
- data/lib/nexmo_developer/db/migrate/20170831144035_create_feedback_feedbacks.rb +18 -0
- data/lib/nexmo_developer/db/migrate/20170831150024_create_feedback_resources.rb +10 -0
- data/lib/nexmo_developer/db/migrate/20170901093402_sorcery_core.rb +17 -0
- data/lib/nexmo_developer/db/migrate/20170907172926_create_feedback_authors.rb +10 -0
- data/lib/nexmo_developer/db/migrate/20170908112821_create_active_admin_comments.rb +19 -0
- data/lib/nexmo_developer/db/migrate/20170908153555_change_events_start_at_and_end_at_to_date_type.rb +6 -0
- data/lib/nexmo_developer/db/migrate/20170914145346_add_code_language_to_feedback.rb +6 -0
- data/lib/nexmo_developer/db/migrate/20170915081222_correct_uri_of_resources.rb +31 -0
- data/lib/nexmo_developer/db/migrate/20170919151243_add_langugage_set_filters_to_feedbacks.rb +9 -0
- data/lib/nexmo_developer/db/migrate/20170920153649_add_resolved_to_feedback_feedbacks.rb +6 -0
- data/lib/nexmo_developer/db/migrate/20170921120626_drop_users.rb +5 -0
- data/lib/nexmo_developer/db/migrate/20170921121218_devise_create_users.rb +44 -0
- data/lib/nexmo_developer/db/migrate/20171030115603_add_api_key_and_api_secret_to_users.rb +6 -0
- data/lib/nexmo_developer/db/migrate/20180125163023_add_api_secret_to_users.rb +18 -0
- data/lib/nexmo_developer/db/migrate/20180306142355_create_careers.rb +14 -0
- data/lib/nexmo_developer/db/migrate/20180306161650_add_summary_and_icon_to_careers.rb +6 -0
- data/lib/nexmo_developer/db/migrate/20180306184030_create_friendly_id_slugs.rb +15 -0
- data/lib/nexmo_developer/db/migrate/20180306184642_add_slug_to_career.rb +6 -0
- data/lib/nexmo_developer/db/migrate/20180306185340_add_description_short_to_careers.rb +5 -0
- data/lib/nexmo_developer/db/migrate/20180308101927_add_role_group_to_careers.rb +6 -0
- data/lib/nexmo_developer/db/migrate/20180403111850_add_product_to_feedback_resources.rb +41 -0
- data/lib/nexmo_developer/db/migrate/20180404124814_add_published_to_sessions.rb +6 -0
- data/lib/nexmo_developer/db/migrate/20180827133110_usage_building_block_events.rb +16 -0
- data/lib/nexmo_developer/db/migrate/20181006144242_create_redirects.rb +8 -0
- data/lib/nexmo_developer/db/migrate/20190220092207_add_city_country_to_events.rb +6 -0
- data/lib/nexmo_developer/db/migrate/20190306130440_add_latitude_longitude_to_events.rb +6 -0
- data/lib/nexmo_developer/db/migrate/20190415162421_rename_usage_building_block_events.rb +7 -0
- data/lib/nexmo_developer/db/migrate/20190711141227_drop_careers_table.rb +21 -0
- data/lib/nexmo_developer/db/migrate/20190711143408_drop_friendly_id_slugs_table.rb +16 -0
- data/lib/nexmo_developer/db/migrate/20191022100247_add_foreign_key_to_active_storage_for_blob_id.rb +10 -0
- data/lib/nexmo_developer/db/migrate/20200402092734_add_remote_to_events.rb +5 -0
- data/lib/nexmo_developer/db/migrate/20201016102902_create_feedback_config.rb +10 -0
- data/lib/nexmo_developer/db/migrate/20201016110604_add_details_to_feedback_feedback.rb +7 -0
- data/lib/nexmo_developer/db/schema.rb +152 -0
- data/lib/nexmo_developer/db/seeds.rb +70 -0
- data/lib/nexmo_developer/docker-compose.yml +43 -0
- data/lib/nexmo_developer/github_deploy_key.enc +0 -0
- data/lib/nexmo_developer/lib/common_errors.rb +5 -0
- data/lib/nexmo_developer/lib/tasks/.keep +0 -0
- data/lib/nexmo_developer/lib/tasks/cache.rake +6 -0
- data/lib/nexmo_developer/lib/tasks/careers.rake +8 -0
- data/lib/nexmo_developer/lib/tasks/ci.rake +171 -0
- data/lib/nexmo_developer/lib/tasks/diff.rake +40 -0
- data/lib/nexmo_developer/lib/tasks/documentation.rake +18 -0
- data/lib/nexmo_developer/lib/tasks/generate_search_terms.rake +39 -0
- data/lib/nexmo_developer/lib/tasks/links.rake +135 -0
- data/lib/nexmo_developer/lib/tasks/move.rake +58 -0
- data/lib/nexmo_developer/lib/tasks/repos.rake +57 -0
- data/lib/nexmo_developer/lib/tasks/screenshots.rake +11 -0
- data/lib/nexmo_developer/lib/tasks/section.rake +146 -0
- data/lib/nexmo_developer/lib/tasks/smartling.rake +65 -0
- data/lib/nexmo_developer/lib/tasks/test.rake +22 -0
- data/lib/nexmo_developer/nexmo_developer.rb +1 -0
- data/lib/nexmo_developer/public/404.html +67 -0
- data/lib/nexmo_developer/public/422.html +67 -0
- data/lib/nexmo_developer/public/500.html +66 -0
- data/lib/nexmo_developer/public/android-chrome-192x192.png +0 -0
- data/lib/nexmo_developer/public/android-chrome-512x512.png +0 -0
- data/lib/nexmo_developer/public/apple-touch-icon-precomposed.png +0 -0
- data/lib/nexmo_developer/public/apple-touch-icon.png +0 -0
- data/lib/nexmo_developer/public/browserconfig.xml +9 -0
- data/lib/nexmo_developer/public/favicon-16x16.png +0 -0
- data/lib/nexmo_developer/public/favicon-32x32.png +0 -0
- data/lib/nexmo_developer/public/favicon.ico +0 -0
- data/lib/nexmo_developer/public/fonts/Lato-Heavy.woff +0 -0
- data/lib/nexmo_developer/public/fonts/Lato-Heavy.woff2 +0 -0
- data/lib/nexmo_developer/public/fonts/Lato-Regular.woff +0 -0
- data/lib/nexmo_developer/public/fonts/Lato-Regular.woff2 +0 -0
- data/lib/nexmo_developer/public/fonts/Lato-Semibold.woff +0 -0
- data/lib/nexmo_developer/public/fonts/Lato-Semibold.woff2 +0 -0
- data/lib/nexmo_developer/public/manifest.json +17 -0
- data/lib/nexmo_developer/public/mstile-144x144.png +0 -0
- data/lib/nexmo_developer/public/mstile-150x150.png +0 -0
- data/lib/nexmo_developer/public/nexmo-developer-logo.svg +25 -0
- data/lib/nexmo_developer/public/nexmo-vonage-white.svg +79 -0
- data/lib/nexmo_developer/public/packs-test/css/application-5047da33.chunk.css +14950 -0
- data/lib/nexmo_developer/public/packs-test/css/application-5047da33.chunk.css.map +1 -0
- data/lib/nexmo_developer/public/packs-test/css/application-a5fa0fdb.chunk.css +15085 -0
- data/lib/nexmo_developer/public/packs-test/css/application-a5fa0fdb.chunk.css.map +1 -0
- data/lib/nexmo_developer/public/packs-test/css/application-f92656e6.chunk.css +13 -0
- data/lib/nexmo_developer/public/packs-test/css/application-f92656e6.chunk.css.map +1 -0
- data/lib/nexmo_developer/public/packs-test/css/application-f9d1bdbc.chunk.css +13 -0
- data/lib/nexmo_developer/public/packs-test/css/application-f9d1bdbc.chunk.css.map +1 -0
- data/lib/nexmo_developer/public/packs-test/js/0-e58f598fb97314a89835.chunk.js +59763 -0
- data/lib/nexmo_developer/public/packs-test/js/0-e58f598fb97314a89835.chunk.js.map +1 -0
- data/lib/nexmo_developer/public/packs-test/js/application-21483bf220c794127fa9.chunk.js +6405 -0
- data/lib/nexmo_developer/public/packs-test/js/application-21483bf220c794127fa9.chunk.js.map +1 -0
- data/lib/nexmo_developer/public/packs-test/js/application-6e53f67bc3230c42f9dd.chunk.js +7839 -0
- data/lib/nexmo_developer/public/packs-test/js/application-6e53f67bc3230c42f9dd.chunk.js.map +1 -0
- data/lib/nexmo_developer/public/packs-test/js/application-76d5a80c3775a7e2327a.chunk.js +6405 -0
- data/lib/nexmo_developer/public/packs-test/js/application-76d5a80c3775a7e2327a.chunk.js.map +1 -0
- data/lib/nexmo_developer/public/packs-test/js/application-c6f3e7a9d98562f76890.chunk.js +6619 -0
- data/lib/nexmo_developer/public/packs-test/js/application-c6f3e7a9d98562f76890.chunk.js.map +1 -0
- data/lib/nexmo_developer/public/packs-test/js/application-d280e78dd4f9d3d9b466.chunk.js +6405 -0
- data/lib/nexmo_developer/public/packs-test/js/application-d280e78dd4f9d3d9b466.chunk.js.map +1 -0
- data/lib/nexmo_developer/public/packs-test/js/runtime~application-1c11a8c601900ade80b6.js +155 -0
- data/lib/nexmo_developer/public/packs-test/js/runtime~application-1c11a8c601900ade80b6.js.map +1 -0
- data/lib/nexmo_developer/public/packs-test/js/vendors~application-6518249ed8d7aa985a8b.chunk.js +61849 -0
- data/lib/nexmo_developer/public/packs-test/js/vendors~application-6518249ed8d7aa985a8b.chunk.js.map +1 -0
- data/lib/nexmo_developer/public/packs-test/js/vendors~application-bc967911d70f3f4a5151.chunk.js +59077 -0
- data/lib/nexmo_developer/public/packs-test/js/vendors~application-bc967911d70f3f4a5151.chunk.js.map +1 -0
- data/lib/nexmo_developer/public/packs-test/js/vendors~application-d2bde7a8e622fafdeb1d.chunk.js +61843 -0
- data/lib/nexmo_developer/public/packs-test/js/vendors~application-d2bde7a8e622fafdeb1d.chunk.js.map +1 -0
- data/lib/nexmo_developer/public/packs-test/js/vendors~application-eb13e7814c54bf76b364.chunk.js +62431 -0
- data/lib/nexmo_developer/public/packs-test/js/vendors~application-eb13e7814c54bf76b364.chunk.js.map +1 -0
- data/lib/nexmo_developer/public/packs-test/manifest.json +85 -0
- data/lib/nexmo_developer/public/safari-pinned-tab.svg +1 -0
- data/lib/nexmo_developer/public/symbol/volta-brand-icons.svg +1 -0
- data/lib/nexmo_developer/public/symbol/volta-icons.svg +1 -0
- data/lib/nexmo_developer/vendor/assets/javascripts/.keep +0 -0
- data/lib/nexmo_developer/vendor/assets/javascripts/jquery-scrolltofixed.js +567 -0
- data/lib/nexmo_developer/vendor/assets/javascripts/mermaid.js +49 -0
- data/lib/nexmo_developer/vendor/assets/javascripts/underscore.js +5 -0
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/addons/jquery.tablesorter.js +1031 -0
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/addons/prism.js +22 -0
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/components/side-navigation/volta.menu.js +377 -0
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/components/volta.accordion.js +249 -0
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/components/volta.dropdown.js +145 -0
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/components/volta.flash.js +175 -0
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/components/volta.modal.js +312 -0
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/components/volta.tab.js +203 -0
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/components/volta.tooltip.js +71 -0
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/popper.min.js +5 -0
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/svgxuse.min.js +12 -0
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/tooltip.min.js +5 -0
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/volta.core.js +238 -0
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/volta.js +2141 -0
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/volta.min.js +1 -0
- data/lib/nexmo_developer/vendor/assets/stylesheets/.keep +0 -0
- data/lib/nexmo_developer/version.rb +3 -0
- data/package.json +124 -0
- data/station.gemspec +94 -42
- data/yarn.lock +13943 -0
- metadata +1888 -55
- data/.document +0 -5
- data/Rakefile +0 -61
- data/VERSION +0 -1
- data/lib/station.rb +0 -3
@@ -0,0 +1,85 @@
|
|
1
|
+
module Feedback
|
2
|
+
class FeedbacksController < ApplicationController
|
3
|
+
skip_before_action :verify_authenticity_token
|
4
|
+
|
5
|
+
def new; end
|
6
|
+
|
7
|
+
def create
|
8
|
+
@feedback = ::Feedback::Feedback.find_by(id: params['feedback_feedback']['id'])
|
9
|
+
@feedback ||= ::Feedback::Feedback.new
|
10
|
+
|
11
|
+
@feedback.assign_attributes(feedback_params)
|
12
|
+
@feedback.ip = request.remote_ip
|
13
|
+
|
14
|
+
@feedback.owner = owner
|
15
|
+
set_email
|
16
|
+
@feedback.owner.save!
|
17
|
+
set_cookies
|
18
|
+
|
19
|
+
return render json: @feedback if @feedback.save
|
20
|
+
|
21
|
+
head 422
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def set_cookies
|
27
|
+
return unless @feedback.owner.instance_of?(::Feedback::Author)
|
28
|
+
|
29
|
+
cookies[:feedback_author_id] = {
|
30
|
+
value: @feedback.owner.id,
|
31
|
+
expires: 20.years.from_now,
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
def feedback_params
|
36
|
+
params.require(:feedback_feedback).permit!.slice(
|
37
|
+
:sentiment,
|
38
|
+
:source,
|
39
|
+
:path,
|
40
|
+
:feedback_config_id,
|
41
|
+
:steps,
|
42
|
+
:code_language,
|
43
|
+
:code_language_set_by_url,
|
44
|
+
:code_language_selected_whilst_on_page
|
45
|
+
)
|
46
|
+
end
|
47
|
+
|
48
|
+
def should_use_cookied_author?(author)
|
49
|
+
# Always use the cookied author if cookies[:feedback_author_id] is present
|
50
|
+
# but the author is not known by email
|
51
|
+
return true if author.email.nil?
|
52
|
+
|
53
|
+
# Always used the cookied author if present but no email has been provided
|
54
|
+
# for this request
|
55
|
+
return true if params['feedback_feedback']['email'].nil?
|
56
|
+
|
57
|
+
# If the cookied author is known by email, only use it if it matches the
|
58
|
+
# email sent in the parameters
|
59
|
+
return true if author.email == params['feedback_feedback']['email']
|
60
|
+
|
61
|
+
# Otherwise let's continue to try and lookup the author by email or create
|
62
|
+
# a new author if one can not be foundd.
|
63
|
+
false
|
64
|
+
end
|
65
|
+
|
66
|
+
def owner
|
67
|
+
return current_user if current_user
|
68
|
+
|
69
|
+
if cookies[:feedback_author_id]
|
70
|
+
author = ::Feedback::Author.find_by(id: cookies[:feedback_author_id])
|
71
|
+
return author if author && should_use_cookied_author?(author)
|
72
|
+
end
|
73
|
+
|
74
|
+
::Feedback::Author.find_by(email: params['feedback_feedback']['email']) ||
|
75
|
+
::Feedback::Author.new
|
76
|
+
end
|
77
|
+
|
78
|
+
def set_email
|
79
|
+
return if @feedback.owner.instance_of?(User)
|
80
|
+
return if params['feedback_feedback']['email'].blank?
|
81
|
+
|
82
|
+
@feedback.owner.email = params['feedback_feedback']['email']
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'icalendar'
|
2
|
+
|
3
|
+
class FeedsController < ApplicationController
|
4
|
+
def events
|
5
|
+
calendar = Icalendar::Calendar.new
|
6
|
+
calendar.x_wr_calname = 'Nexmo Developer Events'
|
7
|
+
|
8
|
+
Event.all.each do |event|
|
9
|
+
calendar.event do |e|
|
10
|
+
e.dtstart = Icalendar::Values::Date.new(event.starts_at)
|
11
|
+
e.dtend = Icalendar::Values::Date.new(event.ends_at + 1.day)
|
12
|
+
e.summary = event.title
|
13
|
+
e.description = event.description
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
calendar.publish
|
18
|
+
render plain: calendar.to_ical
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'octokit'
|
2
|
+
|
3
|
+
class JobsController < ApplicationController
|
4
|
+
skip_before_action :verify_authenticity_token
|
5
|
+
|
6
|
+
def code_example_push
|
7
|
+
if validate_github_signature
|
8
|
+
if params['ref'] == 'refs/heads/master'
|
9
|
+
url = "https://api.travis-ci.org/repo/#{ENV['TRAVIS_REPO_ID']}/requests"
|
10
|
+
RestClient.post(url, {
|
11
|
+
"request": {
|
12
|
+
"branch": 'master',
|
13
|
+
"config": {
|
14
|
+
"script": 'bundle exec rake diff:execute',
|
15
|
+
"env": {
|
16
|
+
"SSH_KEY_REQUIRED": true,
|
17
|
+
},
|
18
|
+
},
|
19
|
+
},
|
20
|
+
}.to_json, {
|
21
|
+
content_type: :json,
|
22
|
+
accept: :json,
|
23
|
+
'Authorization': "token #{ENV['TRAVIS_TOKEN']}",
|
24
|
+
'Travis-API-Version': '3',
|
25
|
+
})
|
26
|
+
|
27
|
+
render plain: 'Request forwarded to CI', status: :accepted
|
28
|
+
else
|
29
|
+
render plain: 'Request understood. Not master, not continuing', status: :ok
|
30
|
+
end
|
31
|
+
else
|
32
|
+
head :unauthorized
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def open_pull_request
|
37
|
+
if validate_ci_secret
|
38
|
+
repo = ENV['GITHUB_REPO']
|
39
|
+
branch_base = 'master'
|
40
|
+
branch_head = params[:branch]
|
41
|
+
title = '[AUTOMATED] Updated code examples'
|
42
|
+
body = params[:body]
|
43
|
+
|
44
|
+
client = Octokit::Client.new(access_token: ENV['GITHUB_PERSONAL_ACCESS_TOKEN'])
|
45
|
+
client.login
|
46
|
+
client.create_pull_request(repo, branch_base, branch_head, title, body)
|
47
|
+
|
48
|
+
head :accepted
|
49
|
+
else
|
50
|
+
head :unauthorized
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
private
|
55
|
+
|
56
|
+
def validate_github_signature
|
57
|
+
signature = "sha1=#{OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha1'), ENV['CI_SECRET'], request.raw_post)}"
|
58
|
+
Rack::Utils.secure_compare(signature, request.headers['X-Hub-Signature'])
|
59
|
+
end
|
60
|
+
|
61
|
+
def validate_ci_secret
|
62
|
+
params['secret'] = ENV['CI_SECRET']
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,160 @@
|
|
1
|
+
class MarkdownController < ApplicationController
|
2
|
+
before_action :set_navigation
|
3
|
+
before_action :set_product
|
4
|
+
before_action :set_tracking_cookie
|
5
|
+
before_action :check_redirects, only: :show
|
6
|
+
before_action :canonical_redirect, only: :show
|
7
|
+
|
8
|
+
def show
|
9
|
+
if path_is_folder?
|
10
|
+
@frontmatter, @content = content_from_folder
|
11
|
+
else
|
12
|
+
@document_path = document.path
|
13
|
+
@frontmatter, @content = content_from_file
|
14
|
+
set_canonical_url
|
15
|
+
end
|
16
|
+
|
17
|
+
@document_title = @frontmatter['meta_title'] || @frontmatter['title']
|
18
|
+
|
19
|
+
@sidenav = Sidenav.new(
|
20
|
+
namespace: params[:namespace],
|
21
|
+
locale: params[:locale],
|
22
|
+
request_path: request.path,
|
23
|
+
navigation: @navigation,
|
24
|
+
code_language: params[:code_language],
|
25
|
+
product: @product
|
26
|
+
)
|
27
|
+
|
28
|
+
if !Rails.env.development? && @frontmatter['wip']
|
29
|
+
render 'wip', layout: 'documentation'
|
30
|
+
else
|
31
|
+
render layout: 'documentation'
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def api
|
36
|
+
redirect = Redirector.find(request)
|
37
|
+
if redirect
|
38
|
+
redirect_to redirect
|
39
|
+
else
|
40
|
+
render_not_found
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
def set_navigation
|
47
|
+
@navigation = :documentation
|
48
|
+
end
|
49
|
+
|
50
|
+
def set_product
|
51
|
+
@product = params[:product]
|
52
|
+
end
|
53
|
+
|
54
|
+
def set_tracking_cookie
|
55
|
+
helpers.dashboard_cookie(params[:product])
|
56
|
+
end
|
57
|
+
|
58
|
+
def document
|
59
|
+
@document ||= Nexmo::Markdown::DocFinder.find(
|
60
|
+
root: root_folder,
|
61
|
+
document: params[:document],
|
62
|
+
language: params[:locale],
|
63
|
+
product: params[:product],
|
64
|
+
code_language: params[:code_language]
|
65
|
+
)
|
66
|
+
end
|
67
|
+
|
68
|
+
def root_folder
|
69
|
+
if params[:namespace].present?
|
70
|
+
"app/views/#{params[:namespace]}"
|
71
|
+
else
|
72
|
+
"#{Rails.configuration.docs_base_path}/_documentation"
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
def path_is_folder?
|
77
|
+
folder_config_path
|
78
|
+
rescue Nexmo::Markdown::DocFinder::MissingDoc
|
79
|
+
false
|
80
|
+
end
|
81
|
+
|
82
|
+
def folder_config_path
|
83
|
+
@folder_config_path ||= Nexmo::Markdown::DocFinder.find(
|
84
|
+
root: root_folder,
|
85
|
+
document: "#{params[:document]}/.config.yml",
|
86
|
+
language: params[:locale],
|
87
|
+
product: params[:product],
|
88
|
+
code_language: params[:code_language]
|
89
|
+
).path
|
90
|
+
end
|
91
|
+
|
92
|
+
def content_from_folder
|
93
|
+
frontmatter = YAML.safe_load(File.read(folder_config_path))
|
94
|
+
path = folder_config_path.chomp('/.config.yml')
|
95
|
+
|
96
|
+
content = Nexmo::Markdown::Renderer.new({
|
97
|
+
code_language: @code_language,
|
98
|
+
current_user: current_user,
|
99
|
+
}).call(<<~HEREDOC
|
100
|
+
<h1>#{@document_title}</h1>
|
101
|
+
|
102
|
+
```tabbed_folder
|
103
|
+
source: #{path}
|
104
|
+
```
|
105
|
+
HEREDOC
|
106
|
+
)
|
107
|
+
|
108
|
+
[frontmatter, content]
|
109
|
+
end
|
110
|
+
|
111
|
+
def content_from_file
|
112
|
+
content = File.read(document.path)
|
113
|
+
frontmatter = YAML.safe_load(content)
|
114
|
+
|
115
|
+
raise Errno::ENOENT if frontmatter['redirect']
|
116
|
+
|
117
|
+
content = Nexmo::Markdown::Renderer.new({
|
118
|
+
code_language: @code_language,
|
119
|
+
current_user: current_user,
|
120
|
+
locale: params[:locale],
|
121
|
+
}).call(content)
|
122
|
+
|
123
|
+
[frontmatter, content]
|
124
|
+
end
|
125
|
+
|
126
|
+
def set_canonical_url
|
127
|
+
if params[:namespace] || !params[:locale] || document.available_languages.include?(params[:locale])
|
128
|
+
@canonical_url = canonical_url
|
129
|
+
else
|
130
|
+
@canonical_url = "#{canonical_base}#{canonical_path.sub("#{params[:locale]}/", '')}"
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
def check_redirects
|
135
|
+
redirect = Redirector.find(request)
|
136
|
+
return redirect_to redirect if redirect
|
137
|
+
end
|
138
|
+
|
139
|
+
def canonical_redirect
|
140
|
+
# TODO: change this to use the locale from the domain
|
141
|
+
# once we add support for that.
|
142
|
+
|
143
|
+
return if params[:namespace]
|
144
|
+
return if params[:locale].nil? && session[:locale].nil?
|
145
|
+
return if params[:locale] && params[:locale] != I18n.default_locale.to_s
|
146
|
+
|
147
|
+
if params[:locale]
|
148
|
+
redirect_to url_for(
|
149
|
+
controller: :markdown,
|
150
|
+
action: :show,
|
151
|
+
only_path: true,
|
152
|
+
locale: nil,
|
153
|
+
document: params[:document],
|
154
|
+
product: params[:product]
|
155
|
+
)
|
156
|
+
elsif session[:locale] && session[:locale] != I18n.default_locale.to_s
|
157
|
+
redirect_to "/#{session[:locale]}/#{params[:product]}/#{params[:document]}"
|
158
|
+
end
|
159
|
+
end
|
160
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
class SearchController < ApplicationController
|
2
|
+
include ApplicationHelper
|
3
|
+
|
4
|
+
before_action :validate_query_is_present
|
5
|
+
before_action :check_search_is_enabled
|
6
|
+
|
7
|
+
def results
|
8
|
+
@results = JSON.parse(get_results.to_json, object_class: OpenStruct).results
|
9
|
+
@results_total = @results.sum(&:nbHits)
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def validate_query_is_present
|
15
|
+
redirect_to root_path unless params['query']
|
16
|
+
end
|
17
|
+
|
18
|
+
def get_results # rubocop:disable Naming/AccessorMethodName
|
19
|
+
return unless params['query']
|
20
|
+
|
21
|
+
parameters = ALGOLIA_CONFIG.keys.map do |index|
|
22
|
+
{
|
23
|
+
index_name: index,
|
24
|
+
query: params['query'],
|
25
|
+
hitsPerPage: 20,
|
26
|
+
}
|
27
|
+
end
|
28
|
+
|
29
|
+
Algolia.multiple_queries(parameters)
|
30
|
+
end
|
31
|
+
|
32
|
+
def check_search_is_enabled
|
33
|
+
redirect_to root_path unless search_enabled?
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class SessionsController < ApplicationController
|
2
|
+
def destroy
|
3
|
+
sign_out
|
4
|
+
cookies.delete :feedback_author_id
|
5
|
+
redirect_back(fallback_location: root_path)
|
6
|
+
end
|
7
|
+
|
8
|
+
def set_user_locale
|
9
|
+
session[:locale] = params[:preferred_locale]
|
10
|
+
@path = LocaleRedirector.new(request, params).path
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
class SlackController < ApplicationController
|
2
|
+
before_action :set_navigation
|
3
|
+
before_action :set_email, only: [:invite]
|
4
|
+
before_action :validate_recapcha, only: [:invite]
|
5
|
+
before_action :validate_email, only: [:invite]
|
6
|
+
|
7
|
+
def join; end
|
8
|
+
|
9
|
+
def invite
|
10
|
+
response = RestClient.post "https://#{ENV['SLACK_SUBDOMAIN']}.slack.com/api/users.admin.invite", {
|
11
|
+
token: ENV['SLACK_TOKEN'],
|
12
|
+
email: @email,
|
13
|
+
}
|
14
|
+
|
15
|
+
response = JSON.parse(response)
|
16
|
+
|
17
|
+
if response['ok']
|
18
|
+
@invitation_sent_successfully = true
|
19
|
+
@notice = "An invitation has been sent to #{@email}"
|
20
|
+
else
|
21
|
+
case response['error']
|
22
|
+
when 'already_invited'
|
23
|
+
@notice = "It looks like you've already been sent an invitation."
|
24
|
+
when 'already_in_team'
|
25
|
+
@notice = 'You are already a member of this Slack'
|
26
|
+
else
|
27
|
+
Bugsnag.notify('Slack Error') do |notification|
|
28
|
+
notification.add_tab(:slack, { response: response })
|
29
|
+
end
|
30
|
+
@notice = 'Something went wrong. Please try again later.'
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
render 'join'
|
35
|
+
end
|
36
|
+
|
37
|
+
private
|
38
|
+
|
39
|
+
def set_navigation
|
40
|
+
@navigation = :community
|
41
|
+
end
|
42
|
+
|
43
|
+
def set_email
|
44
|
+
@email = params[:email]
|
45
|
+
end
|
46
|
+
|
47
|
+
def validate_recapcha
|
48
|
+
return unless ENV['RECAPTCHA_ENABLED']
|
49
|
+
return if verify_recaptcha
|
50
|
+
|
51
|
+
@notice = 'Are you a robot? It looks like you failed our reCAPTCHA. Try again.'
|
52
|
+
render 'join'
|
53
|
+
end
|
54
|
+
|
55
|
+
def validate_email
|
56
|
+
return if EmailValidator.valid?(@email)
|
57
|
+
|
58
|
+
@notice = 'Invalid email, try again.'
|
59
|
+
render 'join'
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,195 @@
|
|
1
|
+
class StaticController < ApplicationController
|
2
|
+
before_action :canonical_redirect, only: :documentation
|
3
|
+
|
4
|
+
def default_landing
|
5
|
+
yaml_name = request[:landing_page]
|
6
|
+
|
7
|
+
if File.exist?("#{Rails.configuration.docs_base_path}/custom/landing_pages/#{yaml_name}.yml")
|
8
|
+
@landing_config = YAML.load_file("#{Rails.configuration.docs_base_path}/custom/landing_pages/#{yaml_name}.yml")
|
9
|
+
else
|
10
|
+
@landing_config = YAML.load_file("#{Rails.root}/config/landing_pages/#{yaml_name}.yml")
|
11
|
+
end
|
12
|
+
|
13
|
+
@landing_config['page'].each do |row|
|
14
|
+
some_columns_have_widths = row['row'].select { |c| c['width'] }.count.positive?
|
15
|
+
if some_columns_have_widths
|
16
|
+
row['row'] = row['row'].map do |c|
|
17
|
+
c['width'] ||= 1
|
18
|
+
c
|
19
|
+
end
|
20
|
+
row['column_count'] = row['row'].map { |c| c['width'] }.sum
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
if request.path.delete('/') == 'community'
|
25
|
+
@upcoming_events = Event.upcoming
|
26
|
+
@past_events_count = Event.past.count
|
27
|
+
@navigation = :community
|
28
|
+
|
29
|
+
@hash = Gmaps4rails.build_markers(@upcoming_events.reject(&:remote?)) do |event, marker|
|
30
|
+
event.geocode
|
31
|
+
marker.lat event.latitude
|
32
|
+
marker.lng event.longitude
|
33
|
+
marker.infowindow event.title
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
if request.path.delete('/') == 'team'
|
38
|
+
@team ||= LoadConfig.load_file('config/team.yml')
|
39
|
+
@careers = Greenhouse.devrel_careers
|
40
|
+
end
|
41
|
+
|
42
|
+
if request.path.sub!('/', '') == 'migrate/tropo/sms'
|
43
|
+
migrate_tropo
|
44
|
+
elsif request.path.sub!('/', '') == 'migrate/tropo/voice'
|
45
|
+
migrate_tropo
|
46
|
+
end
|
47
|
+
|
48
|
+
@navigation = yaml_name.to_sym
|
49
|
+
render layout: 'landing'
|
50
|
+
end
|
51
|
+
|
52
|
+
def event_search
|
53
|
+
@events = Event.search(params[:query]) if params[:query]
|
54
|
+
|
55
|
+
@hash = Gmaps4rails.build_markers(@events.reject(&:remote?)) do |event, marker|
|
56
|
+
event.geocode
|
57
|
+
marker.lat event.latitude
|
58
|
+
marker.lng event.longitude
|
59
|
+
marker.infowindow event.title
|
60
|
+
end
|
61
|
+
|
62
|
+
respond_to do |format|
|
63
|
+
format.js { render partial: 'static/default_landing/partials/event_search_results.js.erb' }
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def landing
|
68
|
+
render layout: 'landing'
|
69
|
+
end
|
70
|
+
|
71
|
+
def documentation
|
72
|
+
document ||= Nexmo::Markdown::DocFinder.find(
|
73
|
+
root: "#{Rails.configuration.docs_base_path}/_documentation",
|
74
|
+
document: 'index',
|
75
|
+
language: params[:locale]
|
76
|
+
)
|
77
|
+
|
78
|
+
@document_path = document.path
|
79
|
+
|
80
|
+
# Parse frontmatter
|
81
|
+
@frontmatter = YAML.safe_load(document.path)
|
82
|
+
|
83
|
+
@document_title = @frontmatter['title']
|
84
|
+
|
85
|
+
@content = Nexmo::Markdown::Renderer.new(locale: params[:locale]).call(File.read(document.path))
|
86
|
+
|
87
|
+
@navigation = :documentation
|
88
|
+
|
89
|
+
@sidenav = Sidenav.new(
|
90
|
+
request_path: request.path,
|
91
|
+
navigation: @navigation,
|
92
|
+
product: @product,
|
93
|
+
locale: params[:locale]
|
94
|
+
)
|
95
|
+
|
96
|
+
render layout: 'documentation'
|
97
|
+
end
|
98
|
+
|
99
|
+
def community
|
100
|
+
@navigation = :community
|
101
|
+
@document_title = 'Community'
|
102
|
+
@upcoming_events = Event.upcoming
|
103
|
+
@past_events_count = Event.past.count
|
104
|
+
@sessions = Session.visible_to(current_user).order(created_at: :desc)
|
105
|
+
render layout: 'page'
|
106
|
+
end
|
107
|
+
|
108
|
+
def past_events
|
109
|
+
@navigation = :community
|
110
|
+
@document_title = 'Community'
|
111
|
+
@past_events = Event.past
|
112
|
+
render layout: 'page'
|
113
|
+
end
|
114
|
+
|
115
|
+
def robots
|
116
|
+
render 'robots.txt'
|
117
|
+
end
|
118
|
+
|
119
|
+
def podcast
|
120
|
+
# Get URL and split the / to retrieve the landing page name
|
121
|
+
yaml_name = request.fullpath.split('/')[1]
|
122
|
+
|
123
|
+
# Load the YAML for that particular page
|
124
|
+
@content = YAML.load_file("#{Rails.root}/config/landing_pages/#{yaml_name}.yml")
|
125
|
+
|
126
|
+
render layout: 'landing'
|
127
|
+
end
|
128
|
+
|
129
|
+
def team
|
130
|
+
@team ||= LoadConfig.load_file('config/team.yml')
|
131
|
+
@careers = Greenhouse.devrel_careers
|
132
|
+
|
133
|
+
render layout: 'page'
|
134
|
+
end
|
135
|
+
|
136
|
+
def migrate_tropo
|
137
|
+
@active_title = 'Migrate from Tropo'
|
138
|
+
|
139
|
+
@building_blocks = @landing_config['page'][0]['row'][0]['column'][0]['migrate_details']['blocks'].map do |block|
|
140
|
+
block['nexmo'] = "<h2>Nexmo</h2>
|
141
|
+
```code_snippets
|
142
|
+
code_only: true
|
143
|
+
source: #{block['nexmo']}
|
144
|
+
```"
|
145
|
+
|
146
|
+
block['tropo'] = "<h2>Tropo</h2>
|
147
|
+
```code_snippets
|
148
|
+
code_only: true
|
149
|
+
source: #{block['tropo']}
|
150
|
+
```"
|
151
|
+
|
152
|
+
block
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
def spotlight
|
157
|
+
response = RestClient.post(
|
158
|
+
'https://hooks.zapier.com/hooks/catch/1936493/oyzjr4i/',
|
159
|
+
params.permit(:name, :email_address, :background, :outline, :previous_content).to_h
|
160
|
+
)
|
161
|
+
|
162
|
+
if response.code == 200
|
163
|
+
head :ok
|
164
|
+
else
|
165
|
+
head :unprocessable_entity
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
def blog_cookie
|
170
|
+
# This is the first touch time so we only want to set it if it's not already set
|
171
|
+
set_utm_cookie('ft', Time.now.getutc.to_i) unless cookies[:ft]
|
172
|
+
|
173
|
+
# Clear out old values that might not be set
|
174
|
+
cookies.delete('utm_campaign', domain: :all)
|
175
|
+
cookies.delete('utm_term', domain: :all)
|
176
|
+
cookies.delete('utm_content', domain: :all)
|
177
|
+
|
178
|
+
# These are the things we'll be tracking through the customer dashboard
|
179
|
+
set_utm_cookie('utm_medium', 'dev_education')
|
180
|
+
set_utm_cookie('utm_source', 'blog')
|
181
|
+
set_utm_cookie('utm_campaign', params['c']) if params['c']
|
182
|
+
set_utm_cookie('utm_content', params['ct']) if params['ct']
|
183
|
+
set_utm_cookie('utm_term', params['t']) if params['t']
|
184
|
+
|
185
|
+
redirect_to 'https://dashboard.nexmo.com/sign-up'
|
186
|
+
end
|
187
|
+
|
188
|
+
private
|
189
|
+
|
190
|
+
def canonical_redirect
|
191
|
+
return if params[:locale] != I18n.default_locale.to_s
|
192
|
+
|
193
|
+
redirect_to documentation_path(locale: nil)
|
194
|
+
end
|
195
|
+
end
|