bullet_train 1.0.32 → 1.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf30474fa5f48c2365c9a4c10439870ada7afeebc830122d8789fc11fe27708f
|
4
|
+
data.tar.gz: c7486e57abca9d509b0865c912caabed1b391c0ae6ec1ad35cb8f9bf62f1a592
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 408956ef34bdde97f9ed66506f9e6a1f3aaba977e83663417e2ea4ce53b8ce2e2d96e64b2291026e0f3859f62ffb794edd99ff3ef2acbe01cd4177f5ee77bae2
|
7
|
+
data.tar.gz: 75cf7bcca374f6d1fb0bac044891deba140aa08303d70351b28c7091a9f5b853b9a8dfea7b8e912ad50267eaaf2288c31014d934011ea7e5b4844c4747d73f21
|
@@ -2,7 +2,9 @@ module DocumentationSupport
|
|
2
2
|
extend ActiveSupport::Concern
|
3
3
|
|
4
4
|
def docs
|
5
|
-
|
5
|
+
target = params[:page].presence || "index"
|
6
|
+
files = `find -L tmp/gems/*/docs | grep \.md`.lines.map(&:chomp).sort
|
7
|
+
@file = files.detect { |file| file.include?(target) }
|
6
8
|
render :docs, layout: "docs"
|
7
9
|
end
|
8
10
|
end
|
@@ -39,13 +39,15 @@ module Account::LocaleHelper
|
|
39
39
|
# application are coming from where. To help with this, you can add `?debug=true` to any URL and we'll output
|
40
40
|
# any rendered strings and their translation keys on the console.
|
41
41
|
unless Rails.env.production?
|
42
|
-
if params
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
42
|
+
if params.present?
|
43
|
+
if params[:log_locales] || params[:show_locales]
|
44
|
+
# Often times we're only receiving partial keys like `.section`, so this is a crazy hack to trick I18n.t into
|
45
|
+
# telling us what the full key ended up being.
|
46
|
+
begin
|
47
|
+
super(key + "💣", options.except(:default))
|
48
|
+
rescue I18n::MissingTranslationData => exception
|
49
|
+
full_key = exception.message.rpartition(" ").last.gsub("💣", "")
|
50
|
+
end
|
49
51
|
end
|
50
52
|
end
|
51
53
|
end
|
@@ -58,16 +60,18 @@ module Account::LocaleHelper
|
|
58
60
|
result = super(key, options)
|
59
61
|
|
60
62
|
unless Rails.env.production?
|
61
|
-
if params
|
62
|
-
if
|
63
|
-
|
64
|
-
|
65
|
-
|
63
|
+
if params.present?
|
64
|
+
if params[:log_locales]
|
65
|
+
if result == options[:default]
|
66
|
+
puts "🌐 #{full_key}: Not found? Result matched default: \"#{result}\"".yellow
|
67
|
+
else
|
68
|
+
puts "🌐 #{full_key}: \"#{result}\"".green
|
69
|
+
end
|
66
70
|
end
|
67
|
-
end
|
68
71
|
|
69
|
-
|
70
|
-
|
72
|
+
if params[:show_locales]
|
73
|
+
return full_key
|
74
|
+
end
|
71
75
|
end
|
72
76
|
end
|
73
77
|
|
@@ -5,20 +5,20 @@
|
|
5
5
|
<%
|
6
6
|
# we're going to use the
|
7
7
|
body = Nokogiri::HTML(@body)
|
8
|
-
title = body.css('h1').first.text.presence || t('
|
8
|
+
title = body.css('h1').first.text.presence || t('bullet_train.tagline')
|
9
9
|
first_paragraph = body.css('p').first
|
10
10
|
preceding_heading = first_paragraph&.xpath("preceding-sibling::h2")
|
11
|
-
description = [preceding_heading&.text, first_paragraph&.text].select(&:present?).join(" — ") || t('
|
11
|
+
description = [preceding_heading&.text, first_paragraph&.text].select(&:present?).join(" — ") || t('bullet_train.description')
|
12
12
|
image_url = "https://avatars.githubusercontent.com/u/5976880?s=280&v=4"
|
13
13
|
site_name = "Bullet Train Developer Documentation"
|
14
14
|
%>
|
15
15
|
|
16
16
|
<% content_for :title do %>
|
17
|
-
<title><%= [site_name, title, t('
|
17
|
+
<title><%= [site_name, title, t('bullet_train.tagline')].select(&:present?).uniq.first(2).reverse.join(' — ') %></title>
|
18
18
|
<% end %>
|
19
19
|
|
20
20
|
<%= render 'themes/light/layouts/head' %>
|
21
|
-
<meta content="<%= t('
|
21
|
+
<meta content="<%= t('bullet_train.keywords') %>" name="keywords" />
|
22
22
|
<meta content="<%= description.truncate(200) %>" name="description" />
|
23
23
|
<meta name="twitter:image:src" content="<%= image_url %>" />
|
24
24
|
<meta name="twitter:site" content="@bullettrainco" />
|
@@ -1 +1 @@
|
|
1
|
-
<%= @body = markdown(File.read(Rails.root.to_s + "
|
1
|
+
<%= @body = markdown(File.read(Rails.root.to_s + "/#{@file}").gsub('.md)', ')')) %>
|
data/lib/bullet_train/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet_train
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.35
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|