station 0.0.108 → 0.0.113
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nexmo_developer/Gemfile +11 -20
- data/lib/nexmo_developer/Gemfile.lock +11 -26
- data/lib/nexmo_developer/app/assets/config/manifest.js +1 -4
- data/lib/nexmo_developer/app/assets/javascripts/application.js +2 -7
- data/lib/nexmo_developer/app/assets/stylesheets/application.css +1 -1
- data/lib/nexmo_developer/app/controllers/dashboard_controller.rb +0 -5
- data/lib/nexmo_developer/app/controllers/static_controller.rb +3 -1
- data/lib/nexmo_developer/app/presenters/improve_page_presenter.rb +9 -6
- data/lib/nexmo_developer/app/services/translator/smartling/api/download_file.rb +6 -1
- data/lib/nexmo_developer/app/services/translator/smartling/api/file_status.rb +7 -1
- data/lib/nexmo_developer/app/services/translator/utils.rb +1 -1
- data/lib/nexmo_developer/app/views/contribute/guides/markdown-guide.md +36 -2
- data/lib/nexmo_developer/app/views/dashboard/stats.html.erb +2 -2
- data/lib/nexmo_developer/app/views/layouts/partials/_head.html.erb +0 -5
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_join_slack.html.erb +1 -1
- data/lib/nexmo_developer/app/views/static/{robots.txt.erb → robots.text.erb} +0 -0
- data/lib/nexmo_developer/app/webpacker/fonts/Lato-Black.woff +0 -0
- data/lib/nexmo_developer/app/webpacker/fonts/Lato-Black.woff2 +0 -0
- data/lib/nexmo_developer/app/webpacker/fonts/Lato-Regular.woff +0 -0
- data/lib/nexmo_developer/app/webpacker/fonts/Lato-Regular.woff2 +0 -0
- data/lib/nexmo_developer/app/webpacker/fonts/Lato-Semibold.woff +0 -0
- data/lib/nexmo_developer/app/webpacker/fonts/Lato-Semibold.woff2 +0 -0
- data/lib/nexmo_developer/app/webpacker/fonts/icomoon.eot +0 -0
- data/lib/nexmo_developer/app/webpacker/fonts/icomoon.json +1257 -0
- data/lib/nexmo_developer/app/webpacker/fonts/icomoon.svg +55 -0
- data/lib/nexmo_developer/app/webpacker/fonts/icomoon.ttf +0 -0
- data/lib/nexmo_developer/app/webpacker/fonts/icomoon.woff +0 -0
- data/lib/nexmo_developer/app/{assets → webpacker}/images/.keep +0 -0
- data/lib/nexmo_developer/app/{assets → webpacker}/images/logo@3x.png +0 -0
- data/lib/nexmo_developer/app/{assets → webpacker}/images/logo_vonage.png +0 -0
- data/lib/nexmo_developer/app/{assets → webpacker}/images/nexmo-developer-logo.svg +0 -0
- data/lib/nexmo_developer/app/{assets → webpacker}/images/nexmo-logo-collapsed.svg +0 -0
- data/lib/nexmo_developer/app/{assets → webpacker}/images/nexmo-vonage-white.svg +0 -0
- data/lib/nexmo_developer/app/{assets → webpacker}/images/posters/chatapp.jpg +0 -0
- data/lib/nexmo_developer/app/{assets → webpacker}/images/posters/chatapp_small.png +0 -0
- data/lib/nexmo_developer/app/{assets → webpacker}/images/posters/nexmo.jpg +0 -0
- data/lib/nexmo_developer/app/{assets → webpacker}/images/posters/numberinsight.jpg +0 -0
- data/lib/nexmo_developer/app/{assets → webpacker}/images/posters/numberinsight_small.png +0 -0
- data/lib/nexmo_developer/app/{assets → webpacker}/images/posters/sms.jpg +0 -0
- data/lib/nexmo_developer/app/{assets → webpacker}/images/posters/sms_small.png +0 -0
- data/lib/nexmo_developer/app/{assets → webpacker}/images/posters/verify.jpg +0 -0
- data/lib/nexmo_developer/app/{assets → webpacker}/images/posters/verify_small.png +0 -0
- data/lib/nexmo_developer/app/{assets → webpacker}/images/posters/voice.jpg +0 -0
- data/lib/nexmo_developer/app/{assets → webpacker}/images/posters/voice_small.png +0 -0
- data/lib/nexmo_developer/app/{assets → webpacker}/images/select-dropdown.png +0 -0
- data/lib/nexmo_developer/app/{assets → webpacker}/images/slack.svg +0 -0
- data/lib/nexmo_developer/app/{assets → webpacker}/images/themes/ea/topography.png +0 -0
- data/lib/nexmo_developer/app/webpacker/javascript/code_snippet_events/index.js +23 -85
- data/lib/nexmo_developer/app/webpacker/javascript/volta/volta.js +5 -1
- data/lib/nexmo_developer/app/webpacker/javascript/volta_tabbed_examples/index.js +23 -3
- data/lib/nexmo_developer/app/webpacker/packs/active_admin.js +5 -0
- data/lib/nexmo_developer/app/webpacker/packs/active_admin/print.scss +2 -0
- data/lib/nexmo_developer/app/webpacker/packs/application.js +12 -0
- data/lib/nexmo_developer/app/{assets → webpacker}/stylesheets/active_admin.scss +4 -4
- data/lib/nexmo_developer/app/webpacker/stylesheets/application.scss +0 -1
- data/lib/nexmo_developer/config/environments/development.rb +1 -1
- data/lib/nexmo_developer/config/initializers/active_admin.rb +3 -0
- data/lib/nexmo_developer/config/webpack/environment.js +10 -0
- data/lib/nexmo_developer/config/webpack/plugins/jquery.js +7 -0
- data/lib/nexmo_developer/nexmo_developer.rb +3 -4
- data/lib/nexmo_developer/version.rb +1 -1
- data/package.json +15 -7
- data/station.gemspec +6 -10
- data/yarn.lock +1447 -1008
- metadata +196 -217
- data/lib/nexmo_developer/app/assets/javascripts/active_admin.js.coffee +0 -1
- data/lib/nexmo_developer/app/assets/javascripts/stats.js +0 -14
- data/lib/nexmo_developer/app/assets/regex/matching_chars.rb +0 -1
- data/lib/nexmo_developer/app/assets/regex/sequence_diagram_regex.rb +0 -1
- data/lib/nexmo_developer/app/assets/regex/stats_regex.rb +0 -1
- data/lib/nexmo_developer/app/assets/regex/webfont_regex.rb +0 -1
- data/lib/nexmo_developer/app/webpacker/stylesheets/objects/_building-block.scss +0 -32
- data/lib/nexmo_developer/vendor/assets/javascripts/jquery-scrolltofixed.js +0 -567
- data/lib/nexmo_developer/vendor/assets/javascripts/mermaid.js +0 -49
- data/lib/nexmo_developer/vendor/assets/javascripts/underscore.js +0 -5
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/addons/jquery.tablesorter.js +0 -1031
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/addons/prism.js +0 -22
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/components/side-navigation/volta.menu.js +0 -377
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/components/volta.accordion.js +0 -249
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/components/volta.dropdown.js +0 -145
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/components/volta.flash.js +0 -175
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/components/volta.modal.js +0 -312
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/components/volta.tab.js +0 -203
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/components/volta.tooltip.js +0 -71
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/popper.min.js +0 -5
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/svgxuse.min.js +0 -12
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/tooltip.min.js +0 -5
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/volta.core.js +0 -238
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/volta.js +0 -2141
- data/lib/nexmo_developer/vendor/assets/javascripts/volta/volta.min.js +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e574d7fbbd63bd2ab6230d01648decb133d950f0a5031eb6879ee22296cde8c1
|
4
|
+
data.tar.gz: 945164d92a31fbf7c035a6d4b570435ccc8e63f8b42dd7a7f0f0757d0183685a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fca76a462e8bb3e2e6b1225bb7cfb1785fdfff065bd67060fbef2a0d6e7ed05a78dcb8b799d58d13b9a50dce75f8f7552fc7921fd2ac9b7ff15e84edafd2e4f
|
7
|
+
data.tar.gz: 6c7f79f2463188339b257558f4f07972ab9990d1ece8d16f9c83a1b111d597f40bc269fcb04ba632be395a2f76e1ce72eeb5690f2ed362f1ca8450d131fba8df
|
data/lib/nexmo_developer/Gemfile
CHANGED
@@ -14,20 +14,12 @@ gem 'webpacker'
|
|
14
14
|
gem 'pg', '~> 1.2'
|
15
15
|
# Use Puma as the app server
|
16
16
|
gem 'puma', '~> 5.1'
|
17
|
-
|
18
|
-
gem 'sassc-rails', '~> 2.1'
|
19
|
-
# Use Uglifier as compressor for JavaScript assets
|
20
|
-
gem 'uglifier', '>= 4.1.20'
|
17
|
+
|
21
18
|
# Use CoffeeScript for .coffee assets and views
|
22
19
|
gem 'coffee-rails', '~> 5.0'
|
23
20
|
# See https://github.com/rails/execjs#readme for more supported runtimes
|
24
21
|
# gem 'therubyracer', platforms: :ruby
|
25
22
|
|
26
|
-
# Use jquery as the JavaScript library
|
27
|
-
gem 'jquery-rails'
|
28
|
-
# Add clipboard for copying content
|
29
|
-
gem 'clipboard-rails'
|
30
|
-
|
31
23
|
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
32
24
|
gem 'jbuilder', '~> 2.10.1'
|
33
25
|
# Use Redis adapter to run Action Cable in production
|
@@ -37,9 +29,6 @@ gem 'jbuilder', '~> 2.10.1'
|
|
37
29
|
# Add Geocoder to get latitude and longitude for geographic places
|
38
30
|
gem 'geocoder'
|
39
31
|
|
40
|
-
# Add gmap4rails to integrate the Google Maps API
|
41
|
-
gem 'gmaps4rails'
|
42
|
-
|
43
32
|
# Use Capistrano for deployment
|
44
33
|
# gem 'capistrano-rails', group: :development
|
45
34
|
|
@@ -94,9 +83,6 @@ gem 'octokit', require: false
|
|
94
83
|
# Cross-language UserAgent classifier library, ruby implementation
|
95
84
|
gem 'woothee'
|
96
85
|
|
97
|
-
# Create beautiful JavaScript charts with one line of Ruby
|
98
|
-
gem 'chartkick', '3.4.2'
|
99
|
-
|
100
86
|
# The simplest way to group temporal data
|
101
87
|
gem 'groupdate', '5.2.1'
|
102
88
|
|
@@ -113,9 +99,6 @@ gem 'diffy', require: false
|
|
113
99
|
gem 'rubocop', '~> 1.8.1', require: false
|
114
100
|
gem 'rubocop-rails', '~> 2.9', require: false
|
115
101
|
|
116
|
-
# Volta needs a CSS autoprefixer
|
117
|
-
gem 'autoprefixer-rails'
|
118
|
-
|
119
102
|
# Titleize modifies the existing Titleize Rails functionality to better suit our needs
|
120
103
|
gem 'titleize'
|
121
104
|
|
@@ -129,9 +112,10 @@ gem 'lograge'
|
|
129
112
|
gem 'countries'
|
130
113
|
gem 'country_select', '~> 4.0'
|
131
114
|
|
132
|
-
gem 'nexmo-oas-renderer', '~> 2.
|
115
|
+
gem 'nexmo-oas-renderer', '~> 2.6', require: false
|
116
|
+
|
117
|
+
gem 'nexmo_markdown_renderer', '~> 0.8'
|
133
118
|
|
134
|
-
gem 'nexmo_markdown_renderer', '~> 0.7.5'
|
135
119
|
gem 'smartling'
|
136
120
|
|
137
121
|
gem 'newrelic_rpm'
|
@@ -150,6 +134,13 @@ gem 'barnes'
|
|
150
134
|
|
151
135
|
gem 'actionpack-page_caching', github: 'rails/actionpack-page_caching'
|
152
136
|
|
137
|
+
gem 'sassc-rails', '~> 2.1'
|
138
|
+
|
139
|
+
gem 'gmaps4rails', '2.1.2'
|
140
|
+
|
141
|
+
# Create beautiful JavaScript charts with one line of Ruby
|
142
|
+
gem 'chartkick', '3.4.2'
|
143
|
+
|
153
144
|
group :development, :test do
|
154
145
|
gem 'awesome_print'
|
155
146
|
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
@@ -95,8 +95,6 @@ GEM
|
|
95
95
|
activesupport (>= 3.0.0, < 6.2)
|
96
96
|
ruby2_keywords (>= 0.0.2, < 1.0)
|
97
97
|
ast (2.4.1)
|
98
|
-
autoprefixer-rails (10.2.0.0)
|
99
|
-
execjs
|
100
98
|
awesome_print (1.8.0)
|
101
99
|
banzai (0.1.3)
|
102
100
|
barnes (0.0.8)
|
@@ -125,7 +123,6 @@ GEM
|
|
125
123
|
regexp_parser (~> 1.5)
|
126
124
|
xpath (~> 3.2)
|
127
125
|
chartkick (3.4.2)
|
128
|
-
clipboard-rails (1.7.1)
|
129
126
|
coderay (1.1.3)
|
130
127
|
coffee-rails (5.0.0)
|
131
128
|
coffee-script (>= 2.2.0)
|
@@ -263,7 +260,7 @@ GEM
|
|
263
260
|
activerecord
|
264
261
|
kaminari-core (= 1.2.1)
|
265
262
|
kaminari-core (1.2.1)
|
266
|
-
listen (3.4.
|
263
|
+
listen (3.4.1)
|
267
264
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
268
265
|
rb-inotify (~> 0.9, >= 0.9.10)
|
269
266
|
lograge (0.11.2)
|
@@ -271,7 +268,7 @@ GEM
|
|
271
268
|
activesupport (>= 4)
|
272
269
|
railties (>= 4)
|
273
270
|
request_store (~> 1.0)
|
274
|
-
loofah (2.
|
271
|
+
loofah (2.9.0)
|
275
272
|
crass (~> 1.0.2)
|
276
273
|
nokogiri (>= 1.5.9)
|
277
274
|
lumberjack (1.2.8)
|
@@ -299,26 +296,25 @@ GEM
|
|
299
296
|
neatjson (0.9)
|
300
297
|
nenv (0.3.0)
|
301
298
|
netrc (0.11.0)
|
302
|
-
newrelic_rpm (6.
|
303
|
-
nexmo-oas-renderer (2.
|
299
|
+
newrelic_rpm (6.15.0)
|
300
|
+
nexmo-oas-renderer (2.6.0)
|
304
301
|
activemodel (~> 6.0)
|
305
302
|
activesupport (~> 6.0)
|
306
303
|
banzai (~> 0.1.2)
|
307
304
|
dotenv (~> 2.7)
|
308
305
|
neatjson (~> 0.8)
|
309
|
-
nexmo_markdown_renderer (~> 0.
|
306
|
+
nexmo_markdown_renderer (~> 0.8)
|
310
307
|
oas_parser (~> 0.25.1)
|
311
|
-
octicons_helper (~> 8.2)
|
312
308
|
redcarpet (= 3.5.1)
|
313
309
|
sass (~> 3.1)
|
314
310
|
shotgun (~> 0.9)
|
315
311
|
sinatra (~> 2.0)
|
316
|
-
nexmo_markdown_renderer (0.
|
312
|
+
nexmo_markdown_renderer (0.8.0)
|
313
|
+
actionview (~> 6.0)
|
317
314
|
activemodel (~> 6.0)
|
318
315
|
banzai (~> 0.1.2)
|
319
316
|
i18n (~> 1.7)
|
320
317
|
nokogiri (~> 1.10)
|
321
|
-
octicons_helper (~> 8.2)
|
322
318
|
redcarpet (~> 3.4)
|
323
319
|
rouge (~> 2.0.7)
|
324
320
|
nio4r (2.5.4)
|
@@ -336,11 +332,6 @@ GEM
|
|
336
332
|
hash-deep-merge
|
337
333
|
mustermann-contrib (~> 1.1.1)
|
338
334
|
nokogiri
|
339
|
-
octicons (8.5.0)
|
340
|
-
nokogiri (>= 1.6.3.1)
|
341
|
-
octicons_helper (8.5.0)
|
342
|
-
octicons (= 8.5.0)
|
343
|
-
rails
|
344
335
|
octokit (4.20.0)
|
345
336
|
faraday (>= 0.9)
|
346
337
|
sawyer (~> 0.8.0, >= 0.5.3)
|
@@ -520,8 +511,6 @@ GEM
|
|
520
511
|
nokogiri (>= 1.7.0, <= 2.0)
|
521
512
|
tzinfo (2.0.4)
|
522
513
|
concurrent-ruby (~> 1.0)
|
523
|
-
uglifier (4.2.0)
|
524
|
-
execjs (>= 0.3.0, < 3)
|
525
514
|
unf (0.1.4)
|
526
515
|
unf_ext
|
527
516
|
unf_ext (0.0.7.7)
|
@@ -534,7 +523,7 @@ GEM
|
|
534
523
|
activemodel (>= 6.0.0)
|
535
524
|
bindex (>= 0.4.0)
|
536
525
|
railties (>= 6.0.0)
|
537
|
-
webmock (3.11.
|
526
|
+
webmock (3.11.1)
|
538
527
|
addressable (>= 2.3.6)
|
539
528
|
crack (>= 0.3.2)
|
540
529
|
hashdiff (>= 0.4.0, < 2.0.0)
|
@@ -559,7 +548,6 @@ DEPENDENCIES
|
|
559
548
|
activeadmin (~> 2.9)
|
560
549
|
algoliasearch
|
561
550
|
apparition
|
562
|
-
autoprefixer-rails
|
563
551
|
awesome_print
|
564
552
|
barnes
|
565
553
|
better_errors
|
@@ -569,7 +557,6 @@ DEPENDENCIES
|
|
569
557
|
byebug
|
570
558
|
capybara
|
571
559
|
chartkick (= 3.4.2)
|
572
|
-
clipboard-rails
|
573
560
|
coffee-rails (~> 5.0)
|
574
561
|
colorize
|
575
562
|
countries
|
@@ -581,7 +568,7 @@ DEPENDENCIES
|
|
581
568
|
faker (= 2.15.1)
|
582
569
|
ffi (>= 1.9.24)
|
583
570
|
geocoder
|
584
|
-
gmaps4rails
|
571
|
+
gmaps4rails (= 2.1.2)
|
585
572
|
gravatar_image_tag (= 1.2.0)
|
586
573
|
greenhouse_io
|
587
574
|
groupdate (= 5.2.1)
|
@@ -589,13 +576,12 @@ DEPENDENCIES
|
|
589
576
|
guard-rspec
|
590
577
|
icalendar
|
591
578
|
jbuilder (~> 2.10.1)
|
592
|
-
jquery-rails
|
593
579
|
listen (~> 3.4)
|
594
580
|
lograge
|
595
581
|
neatjson
|
596
582
|
newrelic_rpm
|
597
|
-
nexmo-oas-renderer (~> 2.
|
598
|
-
nexmo_markdown_renderer (~> 0.
|
583
|
+
nexmo-oas-renderer (~> 2.6)
|
584
|
+
nexmo_markdown_renderer (~> 0.8)
|
599
585
|
nokogiri (~> 1.11.1)
|
600
586
|
octokit
|
601
587
|
pg (~> 1.2)
|
@@ -622,7 +608,6 @@ DEPENDENCIES
|
|
622
608
|
titleize
|
623
609
|
truncato
|
624
610
|
tzinfo-data
|
625
|
-
uglifier (>= 4.1.20)
|
626
611
|
web-console (>= 3.3.0)
|
627
612
|
webmock
|
628
613
|
webpacker
|
@@ -1,3 +1,4 @@
|
|
1
|
+
|
1
2
|
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
3
|
// listed below.
|
3
4
|
//
|
@@ -10,10 +11,4 @@
|
|
10
11
|
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
12
|
// about supported directives.
|
12
13
|
//
|
13
|
-
//= require
|
14
|
-
//= require jquery-scrolltofixed
|
15
|
-
//= require clipboard
|
16
|
-
//= require underscore
|
17
|
-
//= require gmaps/google
|
18
|
-
//= require javascripts/nexmo-oas-renderer
|
19
|
-
//= require mermaid
|
14
|
+
//= require javascripts/nexmo-oas-renderer
|
@@ -1 +1 @@
|
|
1
|
-
//= require stylesheets/nexmo-oas-renderer
|
1
|
+
//= require stylesheets/nexmo-oas-renderer
|
@@ -1,6 +1,5 @@
|
|
1
1
|
class DashboardController < ApplicationController
|
2
2
|
before_action :authenticate_admin!
|
3
|
-
before_action :set_additional_scripts
|
4
3
|
|
5
4
|
def stats
|
6
5
|
@feedbacks = Feedback::Feedback.created_between(created_after, created_before)
|
@@ -104,10 +103,6 @@ class DashboardController < ApplicationController
|
|
104
103
|
|
105
104
|
private
|
106
105
|
|
107
|
-
def set_additional_scripts
|
108
|
-
@additional_scripts = ['stats']
|
109
|
-
end
|
110
|
-
|
111
106
|
def ignore_languages
|
112
107
|
return params[:ignore].split(',') if params[:ignore].present?
|
113
108
|
|
@@ -7,13 +7,16 @@ class ImprovePagePresenter
|
|
7
7
|
@github_url ||= "https://github.com/#{docs_repo}/blob/#{ENV.fetch('branch', 'master')}/#{path_to_url}"
|
8
8
|
end
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
def docs_repo
|
11
|
+
@docs_repo ||= begin
|
12
|
+
path_to_url.start_with?('lib/nexmo_developer/app/') ? 'nexmo/station' : YAML.safe_load(File.open("#{Rails.configuration.docs_base_path}/config/business_info.yml"))['docs_repo']
|
13
|
+
end
|
14
14
|
end
|
15
15
|
|
16
|
-
def
|
17
|
-
@
|
16
|
+
def path_to_url
|
17
|
+
@path_to_url ||= begin
|
18
|
+
@document_path&.gsub!("#{Rails.configuration.docs_base_path}/", '')
|
19
|
+
@document_path.start_with?('app/views') ? @document_path.prepend('lib/nexmo_developer/') : @document_path
|
20
|
+
end
|
18
21
|
end
|
19
22
|
end
|
@@ -18,7 +18,12 @@ module Translator
|
|
18
18
|
def uri
|
19
19
|
@uri ||= begin
|
20
20
|
uri = URI("https://api.smartling.com/files-api/v2/projects/#{@project_id}/locales/#{@locale_id}/file")
|
21
|
-
uri.query = URI.encode_www_form(
|
21
|
+
uri.query = URI.encode_www_form(
|
22
|
+
{
|
23
|
+
'fileUri' => @file_uri,
|
24
|
+
'retrievalType' => 'published',
|
25
|
+
}
|
26
|
+
)
|
22
27
|
uri
|
23
28
|
end
|
24
29
|
end
|
@@ -31,7 +31,13 @@ module Translator
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def return_value
|
34
|
-
@return_value ||=
|
34
|
+
@return_value ||= begin
|
35
|
+
total_word_count = response_body['response']['data']['totalWordCount']
|
36
|
+
total_string_count = response_body['response']['data']['totalStringCount']
|
37
|
+
response_body['response']['data']['items'].map do |item|
|
38
|
+
item['localeId'] if total_word_count == item['completedWordCount'] && total_string_count == item['completedStringCount']
|
39
|
+
end.compact
|
40
|
+
end
|
35
41
|
end
|
36
42
|
|
37
43
|
def to_s
|
@@ -35,7 +35,7 @@ module Translator
|
|
35
35
|
dir_path = pathname.dirname.to_s == '.' ? '' : "/#{pathname.dirname}"
|
36
36
|
"#{Rails.configuration.docs_base_path}/config/tutorials/#{locale}#{dir_path}"
|
37
37
|
elsif filename.starts_with? '_tutorials'
|
38
|
-
pathname = Pathname.new(filename.gsub(
|
38
|
+
pathname = Pathname.new(filename.gsub('_tutorials/', ''))
|
39
39
|
dir_path = pathname.dirname.to_s == '.' ? '' : "/#{pathname.dirname}"
|
40
40
|
"#{Rails.configuration.docs_base_path}/_tutorials/#{locale}#{dir_path}"
|
41
41
|
else
|
@@ -126,6 +126,16 @@ They auto-magically color when you use verbs like [POST] or [DELETE]
|
|
126
126
|
|
|
127
127
|
| Nullam id dolor id nibh ultricies vehicula ut id elit. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
|
128
128
|
|
129
|
+
````
|
130
|
+
| ### Click me
|
131
|
+
|
|
132
|
+
| Here is some hidden content.
|
133
|
+
|
|
134
|
+
| Markdown _still_ works `here`!
|
135
|
+
|
|
136
|
+
| Nullam id dolor id nibh ultricies vehicula ut id elit. Donec ullamcorper nulla non metus auctor fringilla. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
|
137
|
+
````
|
138
|
+
|
129
139
|
| ### Alpha
|
130
140
|
|
|
131
141
|
| Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Donec id elit non mi porta gravida at eget metus. Sed posuere consectetur est at lobortis. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ullamcorper nulla non metus auctor fringilla.
|
@@ -134,14 +144,32 @@ They auto-magically color when you use verbs like [POST] or [DELETE]
|
|
134
144
|
|
|
135
145
|
| Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Donec id elit non mi porta gravida at eget metus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Aenean lacinia bibendum nulla sed consectetur. Nullam quis risus eget urna mollis ornare vel eu leo.
|
136
146
|
|
147
|
+
````
|
148
|
+
| ### Alpha
|
149
|
+
|
|
150
|
+
| Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Donec id elit non mi porta gravida at eget metus. Sed posuere consectetur est at lobortis. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ullamcorper nulla non metus auctor fringilla.
|
151
|
+
|
|
152
|
+
| Donec id elit non mi porta gravida at eget metus. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Nulla vitae elit libero, a pharetra augue. Donec sed odio dui. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Cras mattis consectetur purus sit amet fermentum.
|
153
|
+
|
|
154
|
+
| Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Donec id elit non mi porta gravida at eget metus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Aenean lacinia bibendum nulla sed consectetur. Nullam quis risus eget urna mollis ornare vel eu leo.
|
155
|
+
````
|
156
|
+
|
137
157
|
**Tooltips (custom plugin)**
|
138
158
|
|
139
159
|
Find out ^[more](Tooltips are useful for when you have more information to convey, but don't want to break context.).
|
140
160
|
|
161
|
+
````
|
162
|
+
Find out ^[more](Tooltips are useful for when you have more information to convey, but don't want to break context.).
|
163
|
+
````
|
164
|
+
|
141
165
|
## Images
|
142
166
|
|
143
167
|
![Please always add alt-text](https://media.giphy.com/media/pDTLSpqNvNxlu/giphy.gif)
|
144
168
|
|
169
|
+
````
|
170
|
+
![Please always add alt-text](https://media.giphy.com/media/pDTLSpqNvNxlu/giphy.gif)
|
171
|
+
````
|
172
|
+
|
145
173
|
> Images should be used sparingly, try to avoid using screenshots that might go out of date.
|
146
174
|
>
|
147
175
|
> Also... Please ALWAYS write descriptive alt text.
|
@@ -183,8 +211,6 @@ See our detailed [code examples guide](/contribute/guides/code-examples) for adv
|
|
183
211
|
## Tables
|
184
212
|
|
185
213
|
> Pipes should only be between cells. Two hyphens `--` should be used to 'underline' the headings.
|
186
|
-
>
|
187
|
-
> You'll have to view the `markdown-guide.md` source to see how since showing you the syntax would result in it being processed.
|
188
214
|
|
189
215
|
| Key | Description |
|
190
216
|
| ------------ | ------------------------------------------------------------------------------------------ |
|
@@ -192,6 +218,14 @@ See our detailed [code examples guide](/contribute/guides/code-examples) for adv
|
|
192
218
|
| `API_KEY` | You can find this in your [account overview](https://dashboard.nexmo.com/account-overview) |
|
193
219
|
| `API_SECRET` | You can find this in your [account overview](https://dashboard.nexmo.com/account-overview) |
|
194
220
|
|
221
|
+
````
|
222
|
+
| Key | Description |
|
223
|
+
| ------------ | ------------------------------------------------------------------------------------------ |
|
224
|
+
| `TO_NUMBER` | The number you are sending the SMS to |
|
225
|
+
| `API_KEY` | You can find this in your [account overview](https://dashboard.nexmo.com/account-overview) |
|
226
|
+
| `API_SECRET` | You can find this in your [account overview](https://dashboard.nexmo.com/account-overview) |
|
227
|
+
````
|
228
|
+
|
195
229
|
## Tabbed Content (custom plugin)
|
196
230
|
|
197
231
|
To use the tabbed content block, add a section like this to your markdown to point out where the directory holding the examples is:
|
@@ -70,7 +70,7 @@
|
|
70
70
|
{ name: 'Neutral', color: '#e1e2e6', data: @feedbacks.neutral.group_by_week('feedback_feedbacks.created_at').count },
|
71
71
|
{ name: 'Negative', color: '#ea5353', data: @feedbacks.negative.group_by_week('feedback_feedbacks.created_at').count },
|
72
72
|
],
|
73
|
-
stacked: true
|
73
|
+
stacked: true, defer: true
|
74
74
|
) %>
|
75
75
|
|
76
76
|
<%
|
@@ -109,7 +109,7 @@
|
|
109
109
|
{ name: 'Neutral', color: '#e1e2e6', data: neutral },
|
110
110
|
{ name: 'Negative', color: '#ea5353', data: negative },
|
111
111
|
],
|
112
|
-
stacked: true
|
112
|
+
stacked: true, defer: true
|
113
113
|
) %>
|
114
114
|
|
115
115
|
<hr>
|
@@ -76,11 +76,6 @@
|
|
76
76
|
<%= javascript_include_tag 'application', defer: true %>
|
77
77
|
|
78
78
|
<%= javascript_packs_with_chunks_tag 'application', defer: true %>
|
79
|
-
<% if @additional_scripts %>
|
80
|
-
<% @additional_scripts.each do |script| %>
|
81
|
-
<%= javascript_include_tag script %>
|
82
|
-
<% end %>
|
83
|
-
<% end %>
|
84
79
|
|
85
80
|
<% if ENV['ENVIRONMENT_SCRIPTS'] %>
|
86
81
|
<%= ENV['ENVIRONMENT_SCRIPTS'].html_safe %>
|