dpn_swagger_engine 2.0.0.rc → 2.0.1.rc

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/fonts/{swagger_engine → dpn_swagger_engine}/DroidSans-Bold.ttf +0 -0
  3. data/app/assets/fonts/{swagger_engine → dpn_swagger_engine}/DroidSans.ttf +0 -0
  4. data/app/assets/images/{swagger_engine → dpn_swagger_engine}/collapse.gif +0 -0
  5. data/app/assets/images/{swagger_engine → dpn_swagger_engine}/expand.gif +0 -0
  6. data/app/assets/images/{swagger_engine → dpn_swagger_engine}/explorer_icons.png +0 -0
  7. data/app/assets/images/{swagger_engine → dpn_swagger_engine}/favicon-16x16.png +0 -0
  8. data/app/assets/images/{swagger_engine → dpn_swagger_engine}/favicon-32x32.png +0 -0
  9. data/app/assets/images/{swagger_engine → dpn_swagger_engine}/favicon.ico +0 -0
  10. data/app/assets/images/{swagger_engine → dpn_swagger_engine}/logo_small.png +0 -0
  11. data/app/assets/images/{swagger_engine → dpn_swagger_engine}/pet_store_api.png +0 -0
  12. data/app/assets/images/{swagger_engine → dpn_swagger_engine}/throbber.gif +0 -0
  13. data/app/assets/images/{swagger_engine → dpn_swagger_engine}/wordnik_api.png +0 -0
  14. data/app/assets/javascripts/dpn_swagger_engine/application.js +24 -0
  15. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lang/ca.js +0 -0
  16. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lang/en.js +0 -0
  17. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lang/es.js +0 -0
  18. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lang/fr.js +0 -0
  19. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lang/geo.js +0 -0
  20. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lang/it.js +0 -0
  21. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lang/ja.js +0 -0
  22. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lang/ko-kr.js +0 -0
  23. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lang/pl.js +0 -0
  24. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lang/pt.js +0 -0
  25. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lang/ru.js +0 -0
  26. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lang/tr.js +0 -0
  27. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lang/translator.js +0 -0
  28. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lang/zh-cn.js +0 -0
  29. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lib/backbone-min.js +0 -0
  30. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lib/es5-shim.js +0 -0
  31. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lib/handlebars-4.0.5.js +0 -0
  32. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lib/highlight.9.1.0.pack.js +0 -0
  33. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lib/highlight.9.1.0.pack_extended.js +0 -0
  34. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lib/jquery-1.8.0.min.js +0 -0
  35. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lib/jquery.ba-bbq.min.js +0 -0
  36. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lib/jquery.slideto.min.js +0 -0
  37. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lib/jquery.wiggle.min.js +0 -0
  38. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lib/js-yaml.min.js +0 -0
  39. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lib/jsoneditor.min.js +0 -0
  40. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lib/lodash.min.js +0 -0
  41. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lib/marked.js +0 -0
  42. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lib/object-assign-pollyfill.js +0 -0
  43. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lib/sanitize-html.min.js +0 -0
  44. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/lib/swagger-oauth.js +0 -0
  45. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/o2c.html +0 -0
  46. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/swagger-ui.js +0 -0
  47. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/swagger-ui.min.js +0 -0
  48. data/app/assets/javascripts/{swagger_engine → dpn_swagger_engine}/swagger.json +1 -1
  49. data/app/assets/stylesheets/{swagger_engine → dpn_swagger_engine}/application.css +1 -1
  50. data/app/assets/stylesheets/{swagger_engine → dpn_swagger_engine}/print.css +0 -0
  51. data/app/assets/stylesheets/{swagger_engine → dpn_swagger_engine}/reset.css +0 -0
  52. data/app/assets/stylesheets/{swagger_engine → dpn_swagger_engine}/screen.css +0 -0
  53. data/app/assets/stylesheets/{swagger_engine → dpn_swagger_engine}/style.css +0 -0
  54. data/app/assets/stylesheets/{swagger_engine → dpn_swagger_engine}/typography.css +0 -0
  55. data/app/controllers/{swagger_engine → dpn_swagger_engine}/application_controller.rb +5 -4
  56. data/app/controllers/dpn_swagger_engine/swaggers_controller.rb +31 -0
  57. data/app/helpers/{swagger_engine → dpn_swagger_engine}/application_helper.rb +1 -1
  58. data/app/helpers/{swagger_engine → dpn_swagger_engine}/swagger_helper.rb +1 -1
  59. data/app/views/{swagger_engine → dpn_swagger_engine}/swaggers/index.html.erb +0 -0
  60. data/app/views/{swagger_engine → dpn_swagger_engine}/swaggers/o2c.html +0 -0
  61. data/app/views/dpn_swagger_engine/swaggers/show.html.erb +121 -0
  62. data/app/views/layouts/dpn_swagger_engine/application.html.erb +14 -0
  63. data/app/views/swagger_engine/swaggers/show.html.erb +4 -4
  64. data/config/routes.rb +1 -1
  65. data/dpn_swagger_engine.gemspec +2 -5
  66. data/lib/{swagger_engine → dpn_swagger_engine}/engine.rb +12 -7
  67. data/lib/{swagger_engine → dpn_swagger_engine}/version.rb +2 -2
  68. data/lib/{swagger_engine.rb → dpn_swagger_engine.rb} +3 -3
  69. data/lib/tasks/{swagger_engine_tasks.rake → dpn_swagger_engine_tasks.rake} +1 -1
  70. metadata +66 -65
  71. data/app/assets/javascripts/swagger_engine/application.js +0 -24
  72. data/app/controllers/swagger_engine/swaggers_controller.rb +0 -29
  73. data/app/views/layouts/swagger_engine/application.html.erb +0 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8d58edad77939a1a83206c5a41fc94889f743867
4
- data.tar.gz: ec1fc8e9b3dd973f087391ff787cde37c7aeb11b
3
+ metadata.gz: c6ee542ba2ba105deadabea8d63c3c694c29302c
4
+ data.tar.gz: f44597f58fa3651eaa6e172076c467008e38b52e
5
5
  SHA512:
6
- metadata.gz: 81a819b644aac99d43a13281341c3ba729c19b0e8f0134c02e9f774c16478c251195c4f307803f6776a7f7c85a7caddb33e0ddeed28bdb9e3827349912399ec5
7
- data.tar.gz: d35cc6997fc8b63bda578f67cfaa1c8a0de3df6f3e0466d5bbb6b5cd0a8ad0135eaa395a57b83f828078512d13ebfc392871634a4fafa4cb4a37178420720ba9
6
+ metadata.gz: 1b877472e20dac2119807f6f1514e34d2eb2a7e2dd587532e4fda286d5490c51a65ccb77906f768d6320ad5609977ef2341d6abe8f69b57b9c439d85f3e33d8d
7
+ data.tar.gz: 541c4dd19990096a39990b107839cdc674e45ae908bb73c220d93bfb1f879fdd5abb63a0297090e27f5caad80140f217958954c719e2f3fb5ecaec27f9833062
@@ -0,0 +1,24 @@
1
+ // the order matches swagger-ui dist/index.html
2
+
3
+ //= require 'dpn_swagger_engine/lib/object-assign-polyfill.js'
4
+ //= require 'dpn_swagger_engine/lib/jquery-1.8.0.min.js'
5
+ //= require 'dpn_swagger_engine/lib/jquery.slideto.min.js'
6
+ //= require 'dpn_swagger_engine/lib/jquery.wiggle.min.js'
7
+ //= require 'dpn_swagger_engine/lib/jquery.ba-bbq.min.js'
8
+ //= require 'dpn_swagger_engine/lib/handlebars-4.0.5.js'
9
+ //= require 'dpn_swagger_engine/lib/lodash.min.js'
10
+ //= require 'dpn_swagger_engine/lib/backbone-min.js'
11
+ //= require 'dpn_swagger_engine/swagger-ui.js'
12
+
13
+ //= require 'dpn_swagger_engine/lib/highlight.9.1.0.pack.js'
14
+ //= require 'dpn_swagger_engine/lib/highlight.9.1.0.pack_extended.js'
15
+ //= require 'dpn_swagger_engine/lib/jsoneditor.min.js'
16
+ //= require 'dpn_swagger_engine/lib/marked.js'
17
+ //= require 'dpn_swagger_engine/lib/swagger-oauth.js'
18
+
19
+ //= require 'dpn_swagger_engine/lib/es5-shim.js'
20
+ //= require 'dpn_swagger_engine/lib/sanitize-html.min.js'
21
+
22
+ // Some basic translations
23
+ //= require 'dpn_swagger_engine/lang/translator.js'
24
+ //= require 'dpn_swagger_engine/lang/en.js'
@@ -2,7 +2,7 @@
2
2
  "swagger": "2.0",
3
3
  "info": {
4
4
  "version": "0.0.0",
5
- "title": "Override me in app/assets/javascripts/swagger_engine/swagger.json"
5
+ "title": "Override me in app/assets/javascripts/dpn_swagger_engine/swagger.json"
6
6
  },
7
7
  "paths": {
8
8
  "/": {
@@ -5,7 +5,7 @@
5
5
  @import "screen";
6
6
 
7
7
  /*
8
- These are loaded by views/swagger_engine/swaggers/show.html.erb, but only
8
+ These are loaded by views/dpn_swagger_engine/swaggers/show.html.erb, but only
9
9
  for 'print' media.
10
10
  @import "reset";
11
11
  @import "print";
@@ -1,16 +1,17 @@
1
- module SwaggerEngine
1
+ module DpnSwaggerEngine
2
2
  class ApplicationController < ActionController::Base
3
3
 
4
4
  before_filter :authenticate
5
5
 
6
6
  protected
7
+
7
8
  def authenticate
8
- if SwaggerEngine.configuration.admin_username
9
+ config = DpnSwaggerEngine.configuration
10
+ if config.admin_username
9
11
  authenticate_or_request_with_http_basic do |username, password|
10
- username == SwaggerEngine.configuration.admin_username && password == SwaggerEngine.configuration.admin_password
12
+ username == config.admin_username && password == config.admin_password
11
13
  end
12
14
  end
13
15
  end
14
-
15
16
  end
16
17
  end
@@ -0,0 +1,31 @@
1
+ require_relative 'application_controller'
2
+
3
+ module DpnSwaggerEngine
4
+ class SwaggersController < ApplicationController
5
+ layout false
6
+
7
+ before_filter :load_json_files
8
+
9
+ def index
10
+ redirect_to swagger_path(@json_files.first[0]) if @json_files.size == 1
11
+ end
12
+
13
+ def show
14
+ respond_to do |format|
15
+ api_id = params[:id]
16
+ format.html do
17
+ @swagger_json_url = swagger_path(api_id, format: :json)
18
+ end
19
+ format.json do
20
+ send_file @json_files[api_id.to_sym], type: 'application/json', disposition: 'inline'
21
+ end
22
+ end
23
+ end
24
+
25
+ private
26
+
27
+ def load_json_files
28
+ @json_files ||= DpnSwaggerEngine.configuration.json_files || { default: "#{Rails.root}/lib/dpn_swagger_engine/swagger.json" }
29
+ end
30
+ end
31
+ end
@@ -1,4 +1,4 @@
1
- module SwaggerEngine
1
+ module DpnSwaggerEngine
2
2
  module ApplicationHelper
3
3
  end
4
4
  end
@@ -1,4 +1,4 @@
1
- module SwaggerEngine
1
+ module DpnSwaggerEngine
2
2
  module SwaggerHelper
3
3
  end
4
4
  end
@@ -0,0 +1,121 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <title>DPN REST API</title>
6
+
7
+ <!-- Content in this file is derived from swagger-ui:dist/index.html -->
8
+
9
+ <%#= favicon_link_tag 'favicon-32x32.png', rel: 'icon', type: 'image/png', sizes: '32x32' %>
10
+ <%#= favicon_link_tag 'favicon-16x16.png', rel: 'icon', type: 'image/png', sizes: '16x16' %>
11
+
12
+ <%= stylesheet_link_tag "dpn_swagger_engine/application" %>
13
+ <%= stylesheet_link_tag "dpn_swagger_engine/reset", media: "print" %>
14
+ <%= stylesheet_link_tag "dpn_swagger_engine/print", media: "print" %>
15
+
16
+ <%= javascript_include_tag "dpn_swagger_engine/application" %>
17
+
18
+ <%= csrf_meta_tags %>
19
+
20
+ <script type="text/javascript">
21
+ $(function () {
22
+ var url = window.location.search.match(/url=([^&]+)/);
23
+ if (url && url.length > 1) {
24
+ url = decodeURIComponent(url[1]);
25
+ } else {
26
+ url = '<%= @swagger_json_url %>';
27
+ }
28
+
29
+ hljs.configure({
30
+ highlightSizeThreshold: 5000
31
+ });
32
+
33
+ // Pre load translate...
34
+ if(window.SwaggerTranslator) {
35
+ window.SwaggerTranslator.translate();
36
+ }
37
+
38
+ window.swaggerUi = new SwaggerUi({
39
+ url: url,
40
+ dom_id: "swagger-ui-container",
41
+ supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
42
+ onComplete: function(swaggerApi, swaggerUi){
43
+ if(typeof initOAuth == "function") {
44
+ initOAuth({
45
+ clientId: "your-client-id",
46
+ clientSecret: "your-client-secret-if-required",
47
+ realm: "your-realms",
48
+ appName: "your-app-name",
49
+ scopeSeparator: ",",
50
+ additionalQueryStringParams: {}
51
+ });
52
+ }
53
+
54
+ if(window.SwaggerTranslator) {
55
+ window.SwaggerTranslator.translate();
56
+ }
57
+
58
+ headerTokenAuthorization();
59
+ },
60
+ onFailure: function(data) {
61
+ log("Unable to Load SwaggerUI");
62
+ },
63
+ docExpansion: "none",
64
+ jsonEditor: true,
65
+ // apisSorter: "alpha",
66
+ defaultModelRendering: 'schema',
67
+ showRequestHeaders: false
68
+ });
69
+
70
+ // Custom code for DPN authorization token
71
+ function headerTokenAuthorization(){
72
+ var token = encodeURIComponent($('#input_apiKey')[0].value);
73
+ if(token && token.trim() != "") {
74
+ var tokenAuth = new SwaggerClient.ApiKeyAuthorization("Authorization", "Token token=" + token, "header"));
75
+ window.swaggerUi.api.clientAuthorizations.add("api_key", tokenAuth);
76
+ // var tokenAuth = new ApiKeyAuthorization("Authorization", "Token token=" + token, "header"));
77
+ // window.authorizations.add("api_key", tokenAuth);
78
+ log("added token " + token);
79
+ }
80
+ }
81
+
82
+ $('#input_apiKey').change(headerTokenAuthorization);
83
+
84
+ // A DPN authorization token that should work in development
85
+ var dpnToken = "hathi_token";
86
+ $('#input_apiKey').val(dpnToken);
87
+
88
+ window.swaggerUi.load();
89
+
90
+ function log() {
91
+ if ('console' in window) {
92
+ console.log.apply(console, arguments);
93
+ }
94
+ }
95
+ });
96
+ </script>
97
+ </head>
98
+
99
+ <body class="swagger-section">
100
+ <div id='header'>
101
+ <div class="swagger-ui-wrap">
102
+ <a id="logo" href="http://swagger.io">
103
+ <img class="logo__img" alt="swagger" height="30" width="30" src="images/logo_small.png" />
104
+ <span class="logo__title">swagger</span>
105
+ </a>
106
+ <form id='api_selector'>
107
+ <div class='input'><input placeholder="http://example.com/api" id="input_baseUrl" name="baseUrl" type="text"/></div>
108
+ <!--
109
+ <div class='input'><input placeholder="api_key" id="input_apiKey" name="apiKey" type="text"/></div>
110
+ <div class='input'><a id="explore" href="#" data-sw-translate>Explore</a></div>
111
+ -->
112
+ <div id='auth_container'></div>
113
+ <div class='input'><a id="explore" class="header__btn" href="#" data-sw-translate>Explore</a></div>
114
+ </form>
115
+ </div>
116
+ </div>
117
+
118
+ <div id="message-bar" class="swagger-ui-wrap" data-sw-translate>&nbsp;</div>
119
+ <div id="swagger-ui-container" class="swagger-ui-wrap"></div>
120
+ </body>
121
+ </html>
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>DPN REST API</title>
5
+ <%= stylesheet_link_tag "dpn_swagger_engine/application", media: "all" %>
6
+ <%= javascript_include_tag "dpn_swagger_engine/application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -9,11 +9,11 @@
9
9
  <%#= favicon_link_tag 'favicon-32x32.png', rel: 'icon', type: 'image/png', sizes: '32x32' %>
10
10
  <%#= favicon_link_tag 'favicon-16x16.png', rel: 'icon', type: 'image/png', sizes: '16x16' %>
11
11
 
12
- <%= stylesheet_link_tag "swagger_engine/application" %>
13
- <%= stylesheet_link_tag "swagger_engine/reset", media: "print" %>
14
- <%= stylesheet_link_tag "swagger_engine/print", media: "print" %>
12
+ <%= stylesheet_link_tag "dpn_swagger_engine/application" %>
13
+ <%= stylesheet_link_tag "dpn_swagger_engine/reset", media: "print" %>
14
+ <%= stylesheet_link_tag "dpn_swagger_engine/print", media: "print" %>
15
15
 
16
- <%= javascript_include_tag "swagger_engine/application" %>
16
+ <%= javascript_include_tag "dpn_swagger_engine/application" %>
17
17
 
18
18
  <%= csrf_meta_tags %>
19
19
 
data/config/routes.rb CHANGED
@@ -1,4 +1,4 @@
1
- SwaggerEngine::Engine.routes.draw do
1
+ DpnSwaggerEngine::Engine.routes.draw do
2
2
  resources :swaggers, only: [:index, :show]
3
3
  root to: 'swaggers#index'
4
4
  end
@@ -4,12 +4,12 @@ lib = File.expand_path('../lib', __FILE__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  # Maintain your gem's version:
7
- require 'swagger_engine/version'
7
+ require 'dpn_swagger_engine/version'
8
8
 
9
9
  # Describe your gem and declare its dependencies:
10
10
  Gem::Specification.new do |spec|
11
11
  spec.name = 'dpn_swagger_engine'
12
- spec.version = SwaggerEngine::VERSION
12
+ spec.version = DpnSwaggerEngine::VERSION
13
13
  spec.authors = ['batdevis', 'Darren Weber']
14
14
  spec.email = ['batdevis@gmail.com', 'dweber.consulting@gmail.com']
15
15
  spec.homepage = 'https://github.com/dpn-admin/dpn_swagger_engine'
@@ -17,9 +17,6 @@ Gem::Specification.new do |spec|
17
17
  spec.description = 'API docs for dpn-server.'
18
18
  spec.license = 'MIT'
19
19
 
20
- # spec.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"]
21
- # spec.test_files = Dir["test/**/*"]
22
-
23
20
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
24
21
  spec.bindir = 'exe'
25
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
@@ -1,21 +1,26 @@
1
- module SwaggerEngine
1
+ module DpnSwaggerEngine
2
2
  class Engine < ::Rails::Engine
3
- isolate_namespace SwaggerEngine
3
+ isolate_namespace DpnSwaggerEngine
4
4
 
5
5
  #https://gist.github.com/parndt/11381872
6
6
  =begin
7
- initializer "swagger_engine.assets.precompile", group: :all do |app|
8
- app.config.assets.precompile += ['swagger_engine/print.css', 'swagger_engine/reset.css']
7
+ initializer "dpn_swagger_engine.assets.precompile", group: :all do |app|
8
+ app.config.assets.precompile += [
9
+ 'dpn_swagger_engine/print.css',
10
+ 'dpn_swagger_engine/reset.css'
11
+ ]
9
12
  end
10
13
  =end
11
14
  config.to_prepare do
12
- Rails.application.config.assets.precompile += ['swagger_engine/print.css', 'swagger_engine/reset.css']
15
+ Rails.application.config.assets.precompile += [
16
+ 'dpn_swagger_engine/print.css',
17
+ 'dpn_swagger_engine/reset.css'
18
+ ]
13
19
  end
14
-
15
20
  end
16
21
 
17
22
  class Configuration
18
- #[{ default: "swagger.json" }]
23
+ # [{ default: "swagger.json" }]
19
24
  attr_accessor :json_files
20
25
  attr_accessor :admin_username
21
26
  attr_accessor :admin_password
@@ -1,4 +1,4 @@
1
- module SwaggerEngine
1
+ module DpnSwaggerEngine
2
2
  # Major version number matches DPN REST API version
3
- VERSION = '2.0.0.rc'.freeze
3
+ VERSION = '2.0.1.rc'.freeze
4
4
  end
@@ -1,7 +1,7 @@
1
- require 'swagger_engine/engine'
2
- require 'swagger_engine/version'
1
+ require 'dpn_swagger_engine/engine'
2
+ require 'dpn_swagger_engine/version'
3
3
 
4
4
  # Mount swagger-ui as a rails engine to document and explore the
5
5
  # DPN REST API within the dpn-server project.
6
- module SwaggerEngine
6
+ module DpnSwaggerEngine
7
7
  end
@@ -1,4 +1,4 @@
1
1
  # desc "Explaining what the task does"
2
- # task :swagger_engine do
2
+ # task :dpn_swagger_engine do
3
3
  # # Task goes here
4
4
  # 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.0.0.rc
4
+ version: 2.0.1.rc
5
5
  platform: ruby
6
6
  authors:
7
7
  - batdevis
@@ -137,75 +137,76 @@ files:
137
137
  - LICENSE.txt
138
138
  - README.md
139
139
  - Rakefile
140
- - app/assets/fonts/swagger_engine/DroidSans-Bold.ttf
141
- - app/assets/fonts/swagger_engine/DroidSans.ttf
142
- - app/assets/images/swagger_engine/collapse.gif
143
- - app/assets/images/swagger_engine/expand.gif
144
- - app/assets/images/swagger_engine/explorer_icons.png
145
- - app/assets/images/swagger_engine/favicon-16x16.png
146
- - app/assets/images/swagger_engine/favicon-32x32.png
147
- - app/assets/images/swagger_engine/favicon.ico
148
- - app/assets/images/swagger_engine/logo_small.png
149
- - app/assets/images/swagger_engine/pet_store_api.png
150
- - app/assets/images/swagger_engine/throbber.gif
151
- - app/assets/images/swagger_engine/wordnik_api.png
152
- - app/assets/javascripts/swagger_engine/application.js
153
- - app/assets/javascripts/swagger_engine/lang/ca.js
154
- - app/assets/javascripts/swagger_engine/lang/en.js
155
- - app/assets/javascripts/swagger_engine/lang/es.js
156
- - app/assets/javascripts/swagger_engine/lang/fr.js
157
- - app/assets/javascripts/swagger_engine/lang/geo.js
158
- - app/assets/javascripts/swagger_engine/lang/it.js
159
- - app/assets/javascripts/swagger_engine/lang/ja.js
160
- - app/assets/javascripts/swagger_engine/lang/ko-kr.js
161
- - app/assets/javascripts/swagger_engine/lang/pl.js
162
- - app/assets/javascripts/swagger_engine/lang/pt.js
163
- - app/assets/javascripts/swagger_engine/lang/ru.js
164
- - app/assets/javascripts/swagger_engine/lang/tr.js
165
- - app/assets/javascripts/swagger_engine/lang/translator.js
166
- - app/assets/javascripts/swagger_engine/lang/zh-cn.js
167
- - app/assets/javascripts/swagger_engine/lib/backbone-min.js
168
- - app/assets/javascripts/swagger_engine/lib/es5-shim.js
169
- - app/assets/javascripts/swagger_engine/lib/handlebars-4.0.5.js
170
- - app/assets/javascripts/swagger_engine/lib/highlight.9.1.0.pack.js
171
- - app/assets/javascripts/swagger_engine/lib/highlight.9.1.0.pack_extended.js
172
- - app/assets/javascripts/swagger_engine/lib/jquery-1.8.0.min.js
173
- - app/assets/javascripts/swagger_engine/lib/jquery.ba-bbq.min.js
174
- - app/assets/javascripts/swagger_engine/lib/jquery.slideto.min.js
175
- - app/assets/javascripts/swagger_engine/lib/jquery.wiggle.min.js
176
- - app/assets/javascripts/swagger_engine/lib/js-yaml.min.js
177
- - app/assets/javascripts/swagger_engine/lib/jsoneditor.min.js
178
- - app/assets/javascripts/swagger_engine/lib/lodash.min.js
179
- - app/assets/javascripts/swagger_engine/lib/marked.js
180
- - app/assets/javascripts/swagger_engine/lib/object-assign-pollyfill.js
181
- - app/assets/javascripts/swagger_engine/lib/sanitize-html.min.js
182
- - app/assets/javascripts/swagger_engine/lib/swagger-oauth.js
183
- - app/assets/javascripts/swagger_engine/o2c.html
184
- - app/assets/javascripts/swagger_engine/swagger-ui.js
185
- - app/assets/javascripts/swagger_engine/swagger-ui.min.js
186
- - app/assets/javascripts/swagger_engine/swagger.json
187
- - app/assets/stylesheets/swagger_engine/application.css
188
- - app/assets/stylesheets/swagger_engine/print.css
189
- - app/assets/stylesheets/swagger_engine/reset.css
190
- - app/assets/stylesheets/swagger_engine/screen.css
191
- - app/assets/stylesheets/swagger_engine/style.css
192
- - app/assets/stylesheets/swagger_engine/typography.css
193
- - app/controllers/swagger_engine/application_controller.rb
194
- - app/controllers/swagger_engine/swaggers_controller.rb
195
- - app/helpers/swagger_engine/application_helper.rb
196
- - app/helpers/swagger_engine/swagger_helper.rb
197
- - app/views/layouts/swagger_engine/application.html.erb
198
- - app/views/swagger_engine/swaggers/index.html.erb
199
- - app/views/swagger_engine/swaggers/o2c.html
140
+ - app/assets/fonts/dpn_swagger_engine/DroidSans-Bold.ttf
141
+ - app/assets/fonts/dpn_swagger_engine/DroidSans.ttf
142
+ - app/assets/images/dpn_swagger_engine/collapse.gif
143
+ - app/assets/images/dpn_swagger_engine/expand.gif
144
+ - app/assets/images/dpn_swagger_engine/explorer_icons.png
145
+ - app/assets/images/dpn_swagger_engine/favicon-16x16.png
146
+ - app/assets/images/dpn_swagger_engine/favicon-32x32.png
147
+ - app/assets/images/dpn_swagger_engine/favicon.ico
148
+ - app/assets/images/dpn_swagger_engine/logo_small.png
149
+ - app/assets/images/dpn_swagger_engine/pet_store_api.png
150
+ - app/assets/images/dpn_swagger_engine/throbber.gif
151
+ - app/assets/images/dpn_swagger_engine/wordnik_api.png
152
+ - app/assets/javascripts/dpn_swagger_engine/application.js
153
+ - app/assets/javascripts/dpn_swagger_engine/lang/ca.js
154
+ - app/assets/javascripts/dpn_swagger_engine/lang/en.js
155
+ - app/assets/javascripts/dpn_swagger_engine/lang/es.js
156
+ - app/assets/javascripts/dpn_swagger_engine/lang/fr.js
157
+ - app/assets/javascripts/dpn_swagger_engine/lang/geo.js
158
+ - app/assets/javascripts/dpn_swagger_engine/lang/it.js
159
+ - app/assets/javascripts/dpn_swagger_engine/lang/ja.js
160
+ - app/assets/javascripts/dpn_swagger_engine/lang/ko-kr.js
161
+ - app/assets/javascripts/dpn_swagger_engine/lang/pl.js
162
+ - app/assets/javascripts/dpn_swagger_engine/lang/pt.js
163
+ - app/assets/javascripts/dpn_swagger_engine/lang/ru.js
164
+ - app/assets/javascripts/dpn_swagger_engine/lang/tr.js
165
+ - app/assets/javascripts/dpn_swagger_engine/lang/translator.js
166
+ - app/assets/javascripts/dpn_swagger_engine/lang/zh-cn.js
167
+ - app/assets/javascripts/dpn_swagger_engine/lib/backbone-min.js
168
+ - app/assets/javascripts/dpn_swagger_engine/lib/es5-shim.js
169
+ - app/assets/javascripts/dpn_swagger_engine/lib/handlebars-4.0.5.js
170
+ - app/assets/javascripts/dpn_swagger_engine/lib/highlight.9.1.0.pack.js
171
+ - app/assets/javascripts/dpn_swagger_engine/lib/highlight.9.1.0.pack_extended.js
172
+ - app/assets/javascripts/dpn_swagger_engine/lib/jquery-1.8.0.min.js
173
+ - app/assets/javascripts/dpn_swagger_engine/lib/jquery.ba-bbq.min.js
174
+ - app/assets/javascripts/dpn_swagger_engine/lib/jquery.slideto.min.js
175
+ - app/assets/javascripts/dpn_swagger_engine/lib/jquery.wiggle.min.js
176
+ - app/assets/javascripts/dpn_swagger_engine/lib/js-yaml.min.js
177
+ - app/assets/javascripts/dpn_swagger_engine/lib/jsoneditor.min.js
178
+ - app/assets/javascripts/dpn_swagger_engine/lib/lodash.min.js
179
+ - app/assets/javascripts/dpn_swagger_engine/lib/marked.js
180
+ - app/assets/javascripts/dpn_swagger_engine/lib/object-assign-pollyfill.js
181
+ - app/assets/javascripts/dpn_swagger_engine/lib/sanitize-html.min.js
182
+ - app/assets/javascripts/dpn_swagger_engine/lib/swagger-oauth.js
183
+ - app/assets/javascripts/dpn_swagger_engine/o2c.html
184
+ - app/assets/javascripts/dpn_swagger_engine/swagger-ui.js
185
+ - app/assets/javascripts/dpn_swagger_engine/swagger-ui.min.js
186
+ - app/assets/javascripts/dpn_swagger_engine/swagger.json
187
+ - app/assets/stylesheets/dpn_swagger_engine/application.css
188
+ - app/assets/stylesheets/dpn_swagger_engine/print.css
189
+ - app/assets/stylesheets/dpn_swagger_engine/reset.css
190
+ - app/assets/stylesheets/dpn_swagger_engine/screen.css
191
+ - app/assets/stylesheets/dpn_swagger_engine/style.css
192
+ - app/assets/stylesheets/dpn_swagger_engine/typography.css
193
+ - app/controllers/dpn_swagger_engine/application_controller.rb
194
+ - app/controllers/dpn_swagger_engine/swaggers_controller.rb
195
+ - app/helpers/dpn_swagger_engine/application_helper.rb
196
+ - app/helpers/dpn_swagger_engine/swagger_helper.rb
197
+ - app/views/dpn_swagger_engine/swaggers/index.html.erb
198
+ - app/views/dpn_swagger_engine/swaggers/o2c.html
199
+ - app/views/dpn_swagger_engine/swaggers/show.html.erb
200
+ - app/views/layouts/dpn_swagger_engine/application.html.erb
200
201
  - app/views/swagger_engine/swaggers/show.html.erb
201
202
  - bin/rails
202
203
  - bin/setup
203
204
  - config/routes.rb
204
205
  - dpn_swagger_engine.gemspec
205
- - lib/swagger_engine.rb
206
- - lib/swagger_engine/engine.rb
207
- - lib/swagger_engine/version.rb
208
- - lib/tasks/swagger_engine_tasks.rake
206
+ - lib/dpn_swagger_engine.rb
207
+ - lib/dpn_swagger_engine/engine.rb
208
+ - lib/dpn_swagger_engine/version.rb
209
+ - lib/tasks/dpn_swagger_engine_tasks.rake
209
210
  homepage: https://github.com/dpn-admin/dpn_swagger_engine
210
211
  licenses:
211
212
  - MIT
@@ -1,24 +0,0 @@
1
- // the order matches swagger-ui dist/index.html
2
-
3
- //= require 'swagger_engine/lib/object-assign-polyfill.js'
4
- //= require 'swagger_engine/lib/jquery-1.8.0.min.js'
5
- //= require 'swagger_engine/lib/jquery.slideto.min.js'
6
- //= require 'swagger_engine/lib/jquery.wiggle.min.js'
7
- //= require 'swagger_engine/lib/jquery.ba-bbq.min.js'
8
- //= require 'swagger_engine/lib/handlebars-4.0.5.js'
9
- //= require 'swagger_engine/lib/lodash.min.js'
10
- //= require 'swagger_engine/lib/backbone-min.js'
11
- //= require 'swagger_engine/swagger-ui.js'
12
-
13
- //= require 'swagger_engine/lib/highlight.9.1.0.pack.js'
14
- //= require 'swagger_engine/lib/highlight.9.1.0.pack_extended.js'
15
- //= require 'swagger_engine/lib/jsoneditor.min.js'
16
- //= require 'swagger_engine/lib/marked.js'
17
- //= require 'swagger_engine/lib/swagger-oauth.js'
18
-
19
- //= require 'swagger_engine/lib/es5-shim.js'
20
- //= require 'swagger_engine/lib/sanitize-html.min.js'
21
-
22
- // Some basic translations
23
- //= require 'swagger_engine/lang/translator.js'
24
- //= require 'swagger_engine/lang/en.js'
@@ -1,29 +0,0 @@
1
- require_dependency "swagger_engine/application_controller"
2
-
3
- module SwaggerEngine
4
- class SwaggersController < ApplicationController
5
- layout false
6
-
7
- before_filter :load_json_files
8
-
9
- def index
10
- redirect_to swagger_path(@json_files.first[0]) if ( @json_files.size == 1 )
11
- end
12
-
13
- def show
14
- respond_to do |format|
15
- format.html {
16
- @swagger_json_url = swagger_path(params[:id], format: :json)
17
- }
18
- format.json {
19
- send_file @json_files[params[:id].to_sym], type: 'application/json', disposition: 'inline'
20
- }
21
- end
22
- end
23
-
24
- private
25
- def load_json_files
26
- @json_files ||= SwaggerEngine.configuration.json_files || { default: "#{Rails.root}/lib/swagger_engine/swagger.json" }
27
- end
28
- end
29
- end
@@ -1,14 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>SwaggerEngine</title>
5
- <%= stylesheet_link_tag "swagger_engine/application", media: "all" %>
6
- <%= javascript_include_tag "swagger_engine/application" %>
7
- <%= csrf_meta_tags %>
8
- </head>
9
- <body>
10
-
11
- <%= yield %>
12
-
13
- </body>
14
- </html>