dpn_swagger_engine 2.0.4.rc → 2.2.3.5
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: 4522870f8798d1d1b889fe7b039783d19fe80971
|
4
|
+
data.tar.gz: dbd93255371f900478916fa85f7b14ad90fdb924
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b189c7feb7069870fdf1878009cbb62cf68670a2221e96b5f24457f401c72a125dbbe4861fdde4c20667d1688da3d65ad37b01e0bf5f3705c03ac589550956e0
|
7
|
+
data.tar.gz: 09ad576b379b5b21242f311339d8d5ef451056eebe2c54dfffc39a0dcb78205a630d153a514e8d77369c54d7588ca459ca46c424ad823b92ca28feb6480e01c7
|
data/README.md
CHANGED
@@ -17,7 +17,7 @@ gem 'dpn_swagger_engine'
|
|
17
17
|
Add to your config/routes.rb
|
18
18
|
|
19
19
|
```ruby
|
20
|
-
mount
|
20
|
+
mount DpnSwaggerEngine::Engine, at: "/api-docs"
|
21
21
|
```
|
22
22
|
|
23
23
|
### Protect your route
|
@@ -26,7 +26,7 @@ mount SwaggerEngine::Engine, at: "/api-docs"
|
|
26
26
|
|
27
27
|
```ruby
|
28
28
|
authenticate :user do
|
29
|
-
mount
|
29
|
+
mount DpnSwaggerEngine::Engine, at: "/api-docs"
|
30
30
|
end
|
31
31
|
```
|
32
32
|
|
@@ -34,7 +34,7 @@ or
|
|
34
34
|
|
35
35
|
```ruby
|
36
36
|
authenticate :user, lambda { |u| u.admin? } do
|
37
|
-
mount
|
37
|
+
mount DpnSwaggerEngine::Engine, at: "/api-docs"
|
38
38
|
end
|
39
39
|
```
|
40
40
|
|
@@ -43,7 +43,7 @@ end
|
|
43
43
|
Set username and password in `config/initializers/dpn_swagger_engine.rb`:
|
44
44
|
|
45
45
|
```ruby
|
46
|
-
|
46
|
+
DpnSwaggerEngine.configure do |config|
|
47
47
|
config.admin_username = ENV['ADMIN_USERNAME']
|
48
48
|
config.admin_password = ENV['ADMIN_PASSWORD']
|
49
49
|
end
|
@@ -58,14 +58,16 @@ Set the path of your JSON files in a initializer:
|
|
58
58
|
```ruby
|
59
59
|
#config/initializers/dpn_swagger_engine.rb
|
60
60
|
|
61
|
-
|
61
|
+
DpnSwaggerEngine.configure do |config|
|
62
62
|
config.json_files = {
|
63
63
|
v1: "lib/swagger/swagger_v1.json",
|
64
64
|
v2: "lib/swagger/swagger_v2.json"
|
65
65
|
}
|
66
66
|
end
|
67
67
|
```
|
68
|
-
`lib/swagger/` is a good place to place them
|
68
|
+
`lib/swagger/` is a good place to place them. Unless otherwise configured,
|
69
|
+
as above, a default file is assumed to be available in
|
70
|
+
`lib/swagger/swagger.json`
|
69
71
|
|
70
72
|
### Edit your JSON files
|
71
73
|
|
@@ -25,7 +25,7 @@ module DpnSwaggerEngine
|
|
25
25
|
private
|
26
26
|
|
27
27
|
def load_json_files
|
28
|
-
@json_files ||= DpnSwaggerEngine.configuration.json_files || { default: "#{Rails.root}/lib/
|
28
|
+
@json_files ||= DpnSwaggerEngine.configuration.json_files || { default: "#{Rails.root}/lib/swagger/swagger.json" }
|
29
29
|
end
|
30
30
|
end
|
31
31
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dpn_swagger_engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- batdevis
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-09-
|
12
|
+
date: 2016-09-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -221,9 +221,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
221
221
|
version: '0'
|
222
222
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
223
223
|
requirements:
|
224
|
-
- - "
|
224
|
+
- - ">="
|
225
225
|
- !ruby/object:Gem::Version
|
226
|
-
version:
|
226
|
+
version: '0'
|
227
227
|
requirements: []
|
228
228
|
rubyforge_project:
|
229
229
|
rubygems_version: 2.5.1
|