easy_swagger_ui 0.1.2 → 0.1.3
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 172af30977a462f13d6458b4e79d82bde68ce24f
|
4
|
+
data.tar.gz: d7e89ffe4b43b6a41a2bb417acf387568eea95fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 951f5a67f4e3d42dbb31e6cf45b426227a58c945826d6309690a7d268bf60d4c41f9e6173cb25e40f1c38bed19555e58e76b464cd2939d4f77596651dd08cff7
|
7
|
+
data.tar.gz: eecd54fd3adeeaa25ad054b70753d26feb37fc078ecdd05b31962c5bf1c35242a35501c56a1df490ece8d4bc99cece06fcd84d3f66d61fbda5c3005f299c1476
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
## master
|
4
4
|
|
5
|
+
## 0.1.3
|
6
|
+
|
7
|
+
* Explicitly include `ApplicationHelper` in controller to avoid tricky issues that sometimes helper methods are not available in view
|
8
|
+
|
5
9
|
## 0.1.2
|
6
10
|
|
7
11
|
* Fix routing error when docs are not in sub directories of `EasySwaggerUi.base_path`
|
@@ -4,6 +4,12 @@ module EasySwaggerUi
|
|
4
4
|
Engine.routes.url_helpers
|
5
5
|
end
|
6
6
|
|
7
|
+
def load_translation_if_available
|
8
|
+
translation_js = "easy_swagger_ui/lang/#{I18n.locale.to_s.downcase}.js"
|
9
|
+
return unless asset_available?(translation_js)
|
10
|
+
javascript_include_tag('easy_swagger_ui/lang/translator', translation_js)
|
11
|
+
end
|
12
|
+
|
7
13
|
def asset_available?(path)
|
8
14
|
if Rails.configuration.assets.compile
|
9
15
|
Rails.application.precompiled_assets.include?(path)
|
@@ -11,14 +11,7 @@
|
|
11
11
|
<%= stylesheet_link_tag "easy_swagger_ui/print", media: "print" %>
|
12
12
|
|
13
13
|
<%= javascript_include_tag "easy_swagger_ui/application" %>
|
14
|
-
|
15
|
-
<%
|
16
|
-
translation_js = "easy_swagger_ui/lang/#{I18n.locale.to_s.downcase}.js"
|
17
|
-
%>
|
18
|
-
<% if asset_available?(translation_js) %>
|
19
|
-
<%= javascript_include_tag "easy_swagger_ui/lang/translator" %>
|
20
|
-
<%= javascript_include_tag translation_js %>
|
21
|
-
<% end %>
|
14
|
+
<%= load_translation_if_available %>
|
22
15
|
|
23
16
|
<script type="text/javascript">
|
24
17
|
$(function () {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_swagger_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bian Jiaping
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|