easy_swagger_ui 0.1.1 → 0.1.2
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +3 -1
- data/config/initializers/assets.rb +11 -7
- data/config/routes.rb +4 -0
- data/lib/easy_swagger_ui/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e90ab29f418dd69dc1737be17ff10afa828df33c
|
|
4
|
+
data.tar.gz: da13944d26fe609c1e4bafaaa412c6abe7493a72
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 15068018a03fc497126d370b6ce6aeadb74e33acebab31f7710d363a5a51e9c46180defe4be260c95a2f24bd58437d89124f13984c1e9c03ca263a5ae65926ef
|
|
7
|
+
data.tar.gz: 0a1078ea03dfa01f5d631167371bfe5666d450798c6561c5e219dd6d3a45114b9df736b386b68be9b2ac46a5438973853f93b53c8c07f217f19ee53131806904
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## master
|
|
4
4
|
|
|
5
|
+
## 0.1.2
|
|
6
|
+
|
|
7
|
+
* Fix routing error when docs are not in sub directories of `EasySwaggerUi.base_path`
|
|
8
|
+
* Add support for [Sprockets](https://github.com/rails/sprockets) >= 4
|
|
9
|
+
|
|
5
10
|
## 0.1.1
|
|
6
11
|
|
|
7
12
|
* Fix checking whether an asset exists in production environment
|
data/README.md
CHANGED
|
@@ -6,6 +6,8 @@ Test against Rails 5.x. Should also work with Rails 4.2.x.
|
|
|
6
6
|
|
|
7
7
|
Swagger UI version: 2.2.10. Accessible by in `EasySwaggerUi::SWAGGER_UI_VERSION`.
|
|
8
8
|
|
|
9
|
+
[](https://travis-ci.org/bianjp/easy_swagger_ui) [](https://badge.fury.io/rb/easy_swagger_ui) [](https://gemnasium.com/github.com/bianjp/easy_swagger_ui) [](https://lima.codeclimate.com/github/bianjp/easy_swagger_ui)
|
|
10
|
+
|
|
9
11
|
## Features
|
|
10
12
|
|
|
11
13
|
* Parse API documentation in YAML files and serve as JSON to be consumed by Swagger UI
|
|
@@ -34,7 +36,7 @@ Mount it in `config/routes.rb`:
|
|
|
34
36
|
|
|
35
37
|
```
|
|
36
38
|
# Change the mount point as you like
|
|
37
|
-
mount EasySwaggerUi::Engine => '
|
|
39
|
+
mount EasySwaggerUi::Engine => 'docs'
|
|
38
40
|
```
|
|
39
41
|
|
|
40
42
|
### Write your API documentation
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
if Gem::Version.new(Sprockets::VERSION) >= Gem::Version.new('4.x')
|
|
2
|
+
Rails.application.config.assets.precompile += %w(easy_swagger_ui_manifest.js)
|
|
3
|
+
else
|
|
4
|
+
Rails.application.config.assets.precompile += %w(
|
|
5
|
+
easy_swagger_ui/*.png
|
|
6
|
+
easy_swagger_ui/*.gif
|
|
7
|
+
easy_swagger_ui/*.jpg
|
|
8
|
+
easy_swagger_ui/print.css
|
|
9
|
+
easy_swagger_ui/lang/*.js
|
|
10
|
+
)
|
|
11
|
+
end
|
data/config/routes.rb
CHANGED
|
@@ -2,6 +2,10 @@ EasySwaggerUi::Engine.routes.draw do
|
|
|
2
2
|
get 'oauth2', to: 'swagger#oauth2', format: false
|
|
3
3
|
|
|
4
4
|
constraints(EasySwaggerUi::RouteMatcher) do
|
|
5
|
+
get '/', to: 'swagger#view', format: false, doc_path: ''
|
|
6
|
+
get '.json', to: 'swagger#spec', format: false, doc_path: ''
|
|
7
|
+
|
|
8
|
+
# when docs are in sub directories
|
|
5
9
|
get '*doc_path', to: 'swagger#view', format: false, as: 'view'
|
|
6
10
|
get '*doc_path.json', to: 'swagger#spec', format: false, as: 'spec'
|
|
7
11
|
end
|
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.2
|
|
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-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|