bullet_train 1.0.32 → 1.0.35

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 37dd5a03aac762597257a5f6e30f585b9996cccc4259b05b03fb3b2686fcab65
4
- data.tar.gz: 941fec675c8b5380e43824c636cb653f90d4bae14f2c938904924c236301313a
3
+ metadata.gz: bf30474fa5f48c2365c9a4c10439870ada7afeebc830122d8789fc11fe27708f
4
+ data.tar.gz: c7486e57abca9d509b0865c912caabed1b391c0ae6ec1ad35cb8f9bf62f1a592
5
5
  SHA512:
6
- metadata.gz: 2dfd41ac5e331666e8de46561b40c2900931b0c870c99772b50b5a2e1ae6ae7726cc973f8bbac08c65c2098f04ca34f14aae51a07e7cb4944224072265fadba5
7
- data.tar.gz: 61620c1bc1f58b58e6c4b6490d8322c9dee3a9059389f74d1a68b7720ae6ff23233121ca4aaf95ce0e0d11dea8a0db63bbbf767c098e559440c175368c448ff7
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
- @file = params[:page].presence || "index"
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[:log_locales] || params[:show_locales]
43
- # Often times we're only receiving partial keys like `.section`, so this is a crazy hack to trick I18n.t into
44
- # telling us what the full key ended up being.
45
- begin
46
- super(key + "💣", options.except(:default))
47
- rescue I18n::MissingTranslationData => exception
48
- full_key = exception.message.rpartition(" ").last.gsub("💣", "")
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[:log_locales]
62
- if result == options[:default]
63
- puts "🌐 #{full_key}: Not found? Result matched default: \"#{result}\"".yellow
64
- else
65
- puts "🌐 #{full_key}: \"#{result}\"".green
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
- if params[:show_locales]
70
- return full_key
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('application.tagline')
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('application.description')
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&amp;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('application.tagline')].select(&:present?).uniq.first(2).reverse.join(' — ') %></title>
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('application.keywords') %>" name="keywords" />
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 + "/docs/#{@file}.md").gsub('.md)', ')')) %>
1
+ <%= @body = markdown(File.read(Rails.root.to_s + "/#{@file}").gsub('.md)', ')')) %>
@@ -1,3 +1,3 @@
1
1
  module BulletTrain
2
- VERSION = "1.0.32"
2
+ VERSION = "1.0.35"
3
3
  end
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.32
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-09 00:00:00.000000000 Z
11
+ date: 2022-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails