station 0.0.113 → 0.0.120

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/Dockerfile +9 -7
  3. data/Gemfile +1 -1
  4. data/Gemfile.lock +2 -2
  5. data/docs/How-To-Use.md +2 -0
  6. data/lib/nexmo_developer/.nvmrc +1 -1
  7. data/lib/nexmo_developer/.ruby-version +1 -1
  8. data/lib/nexmo_developer/Gemfile +11 -12
  9. data/lib/nexmo_developer/Gemfile.lock +178 -117
  10. data/lib/nexmo_developer/Runbook.md +4 -4
  11. data/lib/nexmo_developer/app/controllers/jobs_controller.rb +7 -7
  12. data/lib/nexmo_developer/app/controllers/static_controller.rb +2 -13
  13. data/lib/nexmo_developer/app/models/feedback/feedback.rb +2 -0
  14. data/lib/nexmo_developer/app/models/tutorial/file_loader.rb +11 -7
  15. data/lib/nexmo_developer/app/models/tutorial/task.rb +27 -1
  16. data/lib/nexmo_developer/app/presenters/head.rb +5 -1
  17. data/lib/nexmo_developer/app/presenters/improve_page_presenter.rb +1 -1
  18. data/lib/nexmo_developer/app/services/orbit_feedback_notifier.rb +50 -0
  19. data/lib/nexmo_developer/app/services/translator/files_list_coordinator.rb +1 -1
  20. data/lib/nexmo_developer/app/views/contribute/guides/landing-pages.md +0 -10
  21. data/lib/nexmo_developer/app/views/contribute/guides/markdown-guide.md +3 -41
  22. data/lib/nexmo_developer/app/views/contribute/guides/platform.md +0 -1
  23. data/lib/nexmo_developer/app/views/layouts/documentation.html.erb +6 -0
  24. data/lib/nexmo_developer/app/views/layouts/partials/_sidenav_subitem.html.erb +3 -0
  25. data/lib/nexmo_developer/app/webpacker/javascript/components/jwt_generator/JwtGenerator.vue +1 -1
  26. data/lib/nexmo_developer/app/webpacker/javascript/sidenav/index.js +17 -0
  27. data/lib/nexmo_developer/app/webpacker/packs/application.js +1 -5
  28. data/lib/nexmo_developer/app/webpacker/stylesheets/custom/_core.scss +9 -3
  29. data/lib/nexmo_developer/app/webpacker/stylesheets/layout/_header.scss +3 -1
  30. data/lib/nexmo_developer/app/webpacker/stylesheets/objects/_navigation.scss +21 -2
  31. data/lib/nexmo_developer/config/routes.rb +0 -2
  32. data/lib/nexmo_developer/lib/tasks/cache.rake +1 -1
  33. data/lib/nexmo_developer/lib/tasks/careers.rake +1 -1
  34. data/lib/nexmo_developer/lib/tasks/ci.rake +30 -8
  35. data/lib/nexmo_developer/lib/tasks/diff.rake +5 -5
  36. data/lib/nexmo_developer/lib/tasks/documentation.rake +1 -1
  37. data/lib/nexmo_developer/lib/tasks/generate_search_terms.rake +2 -2
  38. data/lib/nexmo_developer/lib/tasks/links.rake +6 -6
  39. data/lib/nexmo_developer/lib/tasks/smartling.rake +1 -1
  40. data/lib/nexmo_developer/version.rb +1 -1
  41. data/package.json +33 -33
  42. data/station.gemspec +13 -13
  43. data/yarn.lock +1186 -2909
  44. metadata +68 -75
  45. data/lib/nexmo_developer/.dockerignore +0 -1
  46. data/lib/nexmo_developer/Dockerfile +0 -28
  47. data/lib/nexmo_developer/app/screenshots/webhook-url-for-delivery-receipt.js +0 -44
  48. data/lib/nexmo_developer/app/screenshots/webhook-url-for-inbound-message.js +0 -44
  49. data/lib/nexmo_developer/app/views/static/default_landing/partials/_submit_your_idea_form.html.erb +0 -58
  50. data/lib/nexmo_developer/app/webpacker/javascript/spotlight/index.js +0 -12
  51. data/lib/nexmo_developer/docker-compose.yml +0 -43
  52. data/lib/nexmo_developer/lib/tasks/screenshots.rake +0 -11
@@ -32,12 +32,14 @@ em {
32
32
 
33
33
  .Nxd-main {
34
34
  outline: none;
35
+ height: calc(100vh - 150px);
36
+ margin-top: 150px;
35
37
  }
36
38
 
37
- @media #{$M-plus} {
39
+ @media #{'only screen and (min-width: #{$small-screen} ) and (max-width: #{$big-screen})'} {
38
40
  .Nxd-main {
39
- height: calc(100vh - 150px);
40
- margin-top: 150px;
41
+ height: calc(100vh - 250px);
42
+ margin-top: 250px;
41
43
  padding: 0px 32px;
42
44
  }
43
45
  }
@@ -194,3 +196,7 @@ table {
194
196
  code .token.function{
195
197
  color: #E75B2F !important;
196
198
  }
199
+
200
+ pre.Vlt-prism--dark code {
201
+ white-space: pre-wrap;
202
+ }
@@ -122,6 +122,8 @@
122
122
 
123
123
  &__menu {
124
124
  flex: 1;
125
+ display: flex;
126
+ overflow-x: auto;
125
127
 
126
128
  a {
127
129
  display: inline-block;
@@ -197,7 +199,7 @@
197
199
  #skip-to-content, #skip-to-navigation {
198
200
  left: 67%;
199
201
  position: absolute;
200
- transform: translateY(-140%);
202
+ transform: translateY(-2000%);
201
203
  transition: transform 0.3s;
202
204
 
203
205
  &:focus {
@@ -13,6 +13,20 @@
13
13
  .Vlt-sidenav {
14
14
  flex: 0 0 300px;
15
15
  width: 300px;
16
+
17
+ &__collapse__close {
18
+ position: absolute;
19
+ right: 20px;
20
+ }
21
+
22
+ &--collapsed .Vlt-badge {
23
+ font-size: 0px;
24
+ left: 20px;
25
+ top: 20px;
26
+ right: 0px;
27
+ width: 20px;
28
+ height: 20px;
29
+ }
16
30
  }
17
31
 
18
32
  .Vlt-sidemenu--flat {
@@ -95,8 +109,13 @@
95
109
  }
96
110
 
97
111
  .Nxd-sidenav {
98
- @media #{$M-plus} {
99
- margin-top: 150px;
112
+ margin-top: 150px;
113
+
114
+ @media #{'only screen and (min-width: #{$small-screen} ) and (max-width: #{$big-screen})'} {
115
+ margin-top: 250px;
116
+ }
117
+ @media #{$S-only} {
118
+ margin-top: 0px;
100
119
  }
101
120
  }
102
121
 
@@ -57,8 +57,6 @@ Rails.application.routes.draw do
57
57
 
58
58
  get '(/:locale)/documentation', to: 'static#documentation', constraints: LocaleConstraint.new, as: :documentation
59
59
 
60
- post '/spotlight', to: 'static#spotlight'
61
-
62
60
  get '/community/slack', to: 'slack#join'
63
61
  post '/community/slack', to: 'slack#invite'
64
62
 
@@ -1,6 +1,6 @@
1
1
  namespace :cache do
2
2
  desc "Clear Rails' redis cache"
3
- task 'clear': :environment do
3
+ task clear: :environment do
4
4
  Rails.cache.clear
5
5
  end
6
6
  end
@@ -1,6 +1,6 @@
1
1
  namespace :careers do
2
2
  desc 'Expire careers cache'
3
- task 'expire_cache': :environment do
3
+ task expire_cache: :environment do
4
4
  p 'Expiring cache...'
5
5
  Greenhouse.expire_cache
6
6
  p 'Done'
@@ -2,7 +2,7 @@ require_relative '../common_errors'
2
2
 
3
3
  namespace :ci do
4
4
  desc 'Verify all pages to make sure that no exceptions are thrown'
5
- task 'verify_pages': :environment do
5
+ task verify_pages: :environment do
6
6
  document_paths =
7
7
  [
8
8
  "#{Rails.configuration.docs_base_path}/_documentation/en/**/*.md",
@@ -24,7 +24,7 @@ namespace :ci do
24
24
  end
25
25
 
26
26
  desc 'Verify side navigation to make sure every page has valid YAML metadata'
27
- task 'verify_navigation': :environment do
27
+ task verify_navigation: :environment do
28
28
  session = ActionDispatch::Integration::Session.new(Rails.application)
29
29
  res = session.get '/documentation'
30
30
 
@@ -35,7 +35,7 @@ namespace :ci do
35
35
  end
36
36
 
37
37
  desc 'Render all OAS based API references'
38
- task 'verify_oas_reference': :environment do
38
+ task verify_oas_reference: :environment do
39
39
  session = ActionDispatch::Integration::Session.new(Rails.application)
40
40
  OpenApiConstraint.list.each do |name|
41
41
  res = session.get "/api/#{name}"
@@ -48,7 +48,7 @@ namespace :ci do
48
48
  end
49
49
 
50
50
  desc 'Ensure all OAS error URLS resolve'
51
- task 'verify_error_urls_resolve': :environment do
51
+ task verify_error_urls_resolve: :environment do
52
52
  session = ActionDispatch::Integration::Session.new(Rails.application)
53
53
  session.host! 'localhost' unless Rails.env.test?
54
54
 
@@ -114,7 +114,7 @@ namespace :ci do
114
114
  end
115
115
  end
116
116
 
117
- task 'check_word_blocklist': :environment do
117
+ task check_word_blocklist: :environment do
118
118
  markdown_files =
119
119
  [
120
120
  "#{Rails.configuration.docs_base_path}/_documentation/en/**/*.md",
@@ -145,7 +145,7 @@ namespace :ci do
145
145
  end
146
146
  end
147
147
 
148
- task 'check_ruby_version': :environment do
148
+ task check_ruby_version: :environment do
149
149
  # We treat .ruby-version as the canonical source
150
150
  ruby_version = File.read('.ruby-version').strip
151
151
 
@@ -154,7 +154,7 @@ namespace :ci do
154
154
  gemfile_version = gemfile.match(/RUBY VERSION.*ruby (\d+\.\d+\.\d+).*BUNDLED WITH/m)[1].strip
155
155
 
156
156
  # How about Docker?
157
- docker = File.read('Dockerfile')
157
+ docker = File.read('../../Dockerfile')
158
158
  docker_version = docker.match(/FROM ruby:(\d+\.\d+\.\d+).*/)[1].strip
159
159
 
160
160
  errors = []
@@ -167,5 +167,27 @@ namespace :ci do
167
167
  end
168
168
  end
169
169
 
170
- task all: %i[verify_pages verify_navigation verify_oas_reference verify_error_urls_resolve check_word_blocklist]
170
+ task validate_tutorials: :environment do
171
+ p 'Validating tutorials...'
172
+ TutorialList.all.each do |tutorial_list_item|
173
+ # Consider every code language and the case when it is nil
174
+ tutorial_list_item.languages.append(nil).each do |code_language|
175
+ tutorial = Tutorial.load(tutorial_list_item.filename, nil, nil, code_language)
176
+
177
+ tasks = tutorial.subtasks
178
+ tasks.map(&:validate!)
179
+
180
+ messages = tasks.map(&:errors).map(&:messages).flatten.reject(&:empty?)
181
+ if messages.any?
182
+ p "Errors for: #{tutorial.path}"
183
+ messages.each do |errors|
184
+ errors.each { |_k, v| p "* #{v.join(',')}".indent(4) }
185
+ end
186
+ end
187
+ end
188
+ end
189
+ p 'Done!'
190
+ end
191
+
192
+ task all: %i[verify_pages verify_navigation verify_oas_reference verify_error_urls_resolve check_word_blocklist validate_tutorials]
171
193
  end
@@ -1,6 +1,6 @@
1
1
  namespace :diff do
2
2
  desc 'Build files for comparison'
3
- task 'execute': :environment do
3
+ task execute: :environment do
4
4
  puts 'Building base'.colorize(:yellow)
5
5
  Rake::Task['diff:build:base'].invoke
6
6
 
@@ -15,24 +15,24 @@ namespace :diff do
15
15
  end
16
16
 
17
17
  desc 'Build files for comparison'
18
- task 'build:base': :environment do
18
+ task 'build:base' => :environment do
19
19
  Diff.generate(mode: 'base')
20
20
  end
21
21
 
22
22
  desc 'Build files for comparison'
23
- task 'build:compare': :environment do
23
+ task 'build:compare' => :environment do
24
24
  Diff.generate(mode: 'compare')
25
25
  end
26
26
 
27
27
  desc 'Build files for comparison'
28
- task 'compare:cli': :environment do
28
+ task 'compare:cli' => :environment do
29
29
  diff = Diff.new
30
30
  diff.diff(:color)
31
31
  diff.report_cli
32
32
  end
33
33
 
34
34
  desc 'Build files for comparison'
35
- task 'compare:pr': :environment do
35
+ task 'compare:pr' => :environment do
36
36
  diff = Diff.new
37
37
  diff.diff(:text)
38
38
  diff.report_pull_request
@@ -1,6 +1,6 @@
1
1
  namespace :documentation do
2
2
  desc 'Verify all pages have meta_title and description keys'
3
- task 'check_keys': :environment do
3
+ task check_keys: :environment do
4
4
  documentation_path = "#{Rails.configuration.docs_base_path}/_documentation/**/*.md"
5
5
  documents = []
6
6
 
@@ -21,7 +21,7 @@ namespace :search_terms do
21
21
  end
22
22
 
23
23
  desc 'Clear the index in Algolia'
24
- task 'algolia:clear': :environment do
24
+ task 'algolia:clear' => :environment do
25
25
  unless ENV['ALGOLIA_APPLICATION_ID']
26
26
  puts 'Not rebuilding search index, Algolia Application ID not set'
27
27
  next
@@ -32,7 +32,7 @@ namespace :search_terms do
32
32
  end
33
33
 
34
34
  desc 'Refresh the Algolia index'
35
- task 'algolia:refresh': :environment do
35
+ task 'algolia:refresh' => :environment do
36
36
  Rake::Task['search_terms:algolia:clear'].invoke
37
37
  Rake::Task['search_terms:algolia:generate'].invoke
38
38
  end
@@ -2,7 +2,7 @@ require 'terminal-table'
2
2
 
3
3
  namespace :links do
4
4
  desc 'Generate a report of all links FROM a given page'
5
- task 'report_outbound': :environment do
5
+ task report_outbound: :environment do
6
6
  ARGV.each { |a| task a.to_sym }
7
7
  filter = ARGV[1]
8
8
  table = Terminal::Table.new do |t|
@@ -18,7 +18,7 @@ namespace :links do
18
18
  end
19
19
 
20
20
  desc 'Generate a report of all links TO a given page'
21
- task 'report_inbound': :environment do
21
+ task report_inbound: :environment do
22
22
  ARGV.each { |a| task a.to_sym }
23
23
  filter = ARGV[1]
24
24
  table = Terminal::Table.new do |t|
@@ -34,21 +34,21 @@ namespace :links do
34
34
  end
35
35
 
36
36
  desc 'Show all pages with no outbound links'
37
- task 'no_links_outbound': :environment do
37
+ task no_links_outbound: :environment do
38
38
  get_links_on_a_page("#{Rails.configuration.docs_base_path}/_documentation/**/*.md").each do |from, to|
39
39
  puts from if to.empty?
40
40
  end
41
41
  end
42
42
 
43
43
  desc 'Show all pages with no inbound links'
44
- task 'no_links_inbound': :environment do
44
+ task no_links_inbound: :environment do
45
45
  get_links_to_a_page("#{Rails.configuration.docs_base_path}/_documentation/**/*.md").each do |to, from|
46
46
  puts to if from.empty?
47
47
  end
48
48
  end
49
49
 
50
50
  desc 'Generate graph of all links out of pages'
51
- task 'graph_outbound': :environment do
51
+ task graph_outbound: :environment do
52
52
  ARGV.each { |a| task a.to_sym }
53
53
  filter = ARGV[1]
54
54
  additional_title = ''
@@ -69,7 +69,7 @@ namespace :links do
69
69
  end
70
70
 
71
71
  desc 'Generate graph of all links to pages'
72
- task 'graph_inbound': :environment do
72
+ task graph_inbound: :environment do
73
73
  ARGV.each { |a| task a.to_sym }
74
74
  filter = ARGV[1]
75
75
  additional_title = ''
@@ -41,7 +41,7 @@ namespace :smartling do
41
41
  end
42
42
 
43
43
  desc 'Check for new translations by locale and download them'
44
- task 'download': :environment do
44
+ task download: :environment do
45
45
  puts 'Checking for completed translations and downloading them'
46
46
 
47
47
  Translator::SmartlingDownloader.new.call
@@ -1,3 +1,3 @@
1
1
  module NexmoDeveloper
2
- VERSION = '0.0.113'.freeze
2
+ VERSION = '0.0.120'.freeze
3
3
  end
data/package.json CHANGED
@@ -1,47 +1,47 @@
1
1
  {
2
2
  "dependencies": {
3
3
  "@activeadmin/activeadmin": "^2.9.0",
4
- "@babel/core": "^7.12.10",
5
- "@babel/plugin-proposal-class-properties": "^7.12.1",
6
- "@babel/plugin-proposal-decorators": "^7.12.12",
7
- "@babel/plugin-proposal-export-namespace-from": "^7.12.1",
8
- "@babel/plugin-proposal-function-sent": "^7.12.1",
9
- "@babel/plugin-proposal-json-strings": "^7.12.1",
4
+ "@babel/core": "^7.14.0",
5
+ "@babel/plugin-proposal-class-properties": "^7.12.13",
6
+ "@babel/plugin-proposal-decorators": "^7.13.15",
7
+ "@babel/plugin-proposal-export-namespace-from": "^7.12.13",
8
+ "@babel/plugin-proposal-function-sent": "^7.12.13",
9
+ "@babel/plugin-proposal-json-strings": "^7.12.13",
10
10
  "@babel/plugin-proposal-numeric-separator": "^7.12.5",
11
11
  "@babel/plugin-proposal-object-rest-spread": "^7.11.0",
12
- "@babel/plugin-proposal-throw-expressions": "^7.12.1",
12
+ "@babel/plugin-proposal-throw-expressions": "^7.12.13",
13
13
  "@babel/plugin-syntax-dynamic-import": "^7.0.0",
14
14
  "@babel/plugin-syntax-import-meta": "^7.10.4",
15
- "@babel/preset-env": "^7.12.11",
15
+ "@babel/preset-env": "^7.14.1",
16
16
  "@googlemaps/google-maps-services-js": "^3.1.16",
17
- "@rails/ujs": "^6.1.0",
17
+ "@rails/ujs": "^6.1.3",
18
18
  "@rails/webpacker": "^5.2.1",
19
19
  "@vonagevolta/volta2": "^0.1.6",
20
- "algoliasearch": "^4.8.4",
20
+ "algoliasearch": "^4.9.1",
21
21
  "autoprefixer": "9.8.6",
22
22
  "babel-loader": "^8.2.2",
23
23
  "babel-preset-babili": "^0.1.4",
24
- "chart.js": "^2.9.4",
25
- "chartkick": "^3.2.1",
26
- "clipboard": "^2.0.6",
24
+ "chart.js": "^3.2.1",
25
+ "chartkick": "^4.0.4",
26
+ "clipboard": "^2.0.8",
27
27
  "coffee-loader": "^1.0.1",
28
28
  "coffee-script": "^1.12.7",
29
29
  "compression-webpack-plugin": "^6.1.1",
30
- "css-loader": "^5.0.1",
31
- "dotenv": "^8.2.0",
30
+ "css-loader": "^5.2.4",
31
+ "dotenv": "^8.4.0",
32
32
  "fetch-mock": "^9.11.0",
33
33
  "file-loader": "^6.2.0",
34
34
  "foundation-sites": "^6.6.3",
35
35
  "glob": "^7.1.2",
36
- "gsap": "^3.6.0",
36
+ "gsap": "^3.6.1",
37
37
  "https-proxy-agent": "^5.0.0",
38
- "jquery": "^3.5.0",
39
- "js-yaml": "4.0.0",
40
- "jsrsasign": "^10.1.5",
38
+ "jquery": "^3.6.0",
39
+ "js-yaml": "4.1.0",
40
+ "jsrsasign": "^10.2.0",
41
41
  "kind-of": "^6.0.3",
42
- "lodash": "^4.17.20",
42
+ "lodash": "^4.17.21",
43
43
  "markdown-spellcheck": "^1.3.1",
44
- "mermaid": "^8.8.3",
44
+ "mermaid": "^8.9.3",
45
45
  "node-sass": "^5.0.0",
46
46
  "path-complete-extname": "^1.0.0",
47
47
  "postcss-cssnext": "^3.0.2",
@@ -49,24 +49,22 @@
49
49
  "postcss-smart-import": "^0.7.5",
50
50
  "precss": "^4.0.0",
51
51
  "prop-types": "^15.7.2",
52
- "puppeteer": "^5.5.0",
53
52
  "rails-erb-loader": "^5.1.0",
54
- "resolve-url-loader": "^3.1.2",
53
+ "resolve-url-loader": "^3.1.3",
55
54
  "sass-loader": "^10.1.1",
56
55
  "serialize-javascript": "^5.0.1",
57
56
  "sha1-file": "^1.0.0",
58
57
  "style-loader": "^2.0.0",
59
- "underscore": "^1.12.0",
58
+ "underscore": "^1.13.1",
60
59
  "vue": "^2.6.12",
61
60
  "vue-loader": "^15.9.6",
62
61
  "vue-template-compiler": "^2.6.12",
63
62
  "webfontloader": "^1.6.28",
64
63
  "webpack": "^4.44.2",
65
- "webpack-manifest-plugin": "^3.0.0",
64
+ "webpack-manifest-plugin": "^3.1.1",
66
65
  "webpack-merge": "^5.7.3",
67
- "webpacker": "^4",
68
66
  "websocket-extensions": "^0.1.4",
69
- "whatwg-fetch": "^3.5.0"
67
+ "whatwg-fetch": "^3.6.2"
70
68
  },
71
69
  "resolutions": {
72
70
  "acorn": "^6.4.1",
@@ -76,30 +74,32 @@
76
74
  "http-proxy": "^1.18.1",
77
75
  "serialize-javascript": "^5.0.1",
78
76
  "url-regex": "^5.0.0",
79
- "marked": "^0.7.0"
77
+ "marked": "^0.7.0",
78
+ "is-svg": "^4.2.2",
79
+ "ssri": "^8.0.1"
80
80
  },
81
81
  "devDependencies": {
82
- "@vue/test-utils": "1.1.2",
82
+ "@vue/test-utils": "1.2.0",
83
83
  "alex": "^9.1.0",
84
84
  "babel-core": "^7.0.0-bridge.0",
85
85
  "babel-jest": "^26.6.3",
86
- "eslint": "^7.18.0",
86
+ "eslint": "^7.25.0",
87
87
  "eslint-config-standard": "^16.0.2",
88
88
  "eslint-plugin-import": "^2.22.1",
89
89
  "eslint-plugin-node": "^11.1.0",
90
- "eslint-plugin-promise": "^4.2.1",
90
+ "eslint-plugin-promise": "^4.3.1",
91
91
  "eslint-plugin-standard": "^5.0.0",
92
92
  "extract-text-webpack-plugin": "^3.0.2",
93
93
  "flush-promises": "^1.0.2",
94
94
  "jest": "^26.6.3",
95
95
  "node-fetch": "^2.6.1",
96
96
  "vue-jest": "^3.0.7",
97
- "webpack-bundle-analyzer": "^4.3.0",
97
+ "webpack-bundle-analyzer": "^4.4.1",
98
98
  "webpack-dev-server": "^3.11.2"
99
99
  },
100
100
  "version": "1.1.0",
101
101
  "engines": {
102
- "node": ">= 12.0.0 < 13",
102
+ "node": ">= 12.0.0 < 15",
103
103
  "yarn": ">=0.25.2"
104
104
  },
105
105
  "scripts": {