swagger-ui_rails 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,4 @@
1
+ /*
2
+ *=require screen
3
+ *=require hightlight.default
4
+ */
@@ -0,0 +1,37 @@
1
+ <script type="text/javascript">
2
+ $(function () {
3
+ window.swaggerUi = new SwaggerUi({
4
+ discoveryUrl: '<%= discovery_url %>',
5
+ <% if defined?(api_key) %>
6
+ apiKey: '<%= api_key %>',
7
+ <% end %>
8
+ dom_id:"swagger-ui-container",
9
+ supportHeaderParams: false,
10
+ supportedSubmitMethods: ['get', 'post', 'put'],
11
+ onComplete: function(swaggerApi, swaggerUi){
12
+ if(console) {
13
+ console.log("Loaded SwaggerUI")
14
+ console.log(swaggerApi);
15
+ console.log(swaggerUi);
16
+ }
17
+ $('pre code').each(function(i, e) {hljs.highlightBlock(e)});
18
+ },
19
+ onFailure: function(data) {
20
+ if(console) {
21
+ console.log("Unable to Load SwaggerUI");
22
+ console.log(data);
23
+ }
24
+ },
25
+ docExpansion: "none"
26
+ });
27
+
28
+ window.swaggerUi.load();
29
+ });
30
+
31
+ </script>
32
+
33
+ <div id="message-bar" class="swagger-ui-wrap">
34
+ &nbsp;
35
+ </div>
36
+
37
+ <div id="swagger-ui-container" class="swagger-ui-wrap"></div>
@@ -0,0 +1,7 @@
1
+ require "swagger-ui_rails/version"
2
+ require "swagger-ui_rails/engine"
3
+
4
+ module Swagger
5
+ module UiRails
6
+ end
7
+ end
@@ -0,0 +1,4 @@
1
+ module Swagger
2
+ class Engine < Rails::Engine
3
+ end
4
+ end
@@ -0,0 +1,5 @@
1
+ module Swagger
2
+ module UiRails
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,22 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'swagger-ui_rails/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "swagger-ui_rails"
8
+ gem.version = Swagger::UiRails::VERSION
9
+ gem.authors = ["Stjepan Hadjic"]
10
+ gem.email = ["Stjepan.hadjic@infinum.hr"]
11
+ gem.description = %q{A gem to add swagger-ui to rails asset pipeline}
12
+ gem.summary = %q{Add swagger-ui to your rails app easily}
13
+ gem.homepage = "https://github.com/d4be4st/swagger-ui_rails"
14
+
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.require_paths = ["lib"]
19
+
20
+ gem.add_development_dependency "bundler", "~> 1.3"
21
+ gem.add_development_dependency "rake"
22
+ end
metadata ADDED
@@ -0,0 +1,109 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: swagger-ui_rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Stjepan Hadjic
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-07-29 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: bundler
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '1.3'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '1.3'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rake
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ description: A gem to add swagger-ui to rails asset pipeline
47
+ email:
48
+ - Stjepan.hadjic@infinum.hr
49
+ executables: []
50
+ extensions: []
51
+ extra_rdoc_files: []
52
+ files:
53
+ - .gitignore
54
+ - Gemfile
55
+ - LICENSE.txt
56
+ - README.md
57
+ - Rakefile
58
+ - app/assets/images/logo_small.png
59
+ - app/assets/images/throbber.gif
60
+ - app/assets/javascripts/lib/backbone-min.js
61
+ - app/assets/javascripts/lib/handlebars-1.0.rc.1.js
62
+ - app/assets/javascripts/lib/highlight.7.3.pack.js
63
+ - app/assets/javascripts/lib/jquery-1.8.0.min.js
64
+ - app/assets/javascripts/lib/jquery.ba-bbq.min.js
65
+ - app/assets/javascripts/lib/jquery.slideto.min.js
66
+ - app/assets/javascripts/lib/jquery.wiggle.min.js
67
+ - app/assets/javascripts/lib/swagger.js
68
+ - app/assets/javascripts/lib/underscore-min.js
69
+ - app/assets/javascripts/swagger-ui.js
70
+ - app/assets/javascripts/swagger-ui.min.js
71
+ - app/assets/stylesheets/hightlight.default.css
72
+ - app/assets/stylesheets/screen.css
73
+ - app/assets/stylesheets/swagger-ui.css
74
+ - app/views/swagger_ui/_swagger_ui.html.erb
75
+ - lib/swagger-ui_rails.rb
76
+ - lib/swagger-ui_rails/engine.rb
77
+ - lib/swagger-ui_rails/version.rb
78
+ - swagger-ui_rails.gemspec
79
+ homepage: https://github.com/d4be4st/swagger-ui_rails
80
+ licenses: []
81
+ post_install_message:
82
+ rdoc_options: []
83
+ require_paths:
84
+ - lib
85
+ required_ruby_version: !ruby/object:Gem::Requirement
86
+ none: false
87
+ requirements:
88
+ - - ! '>='
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ segments:
92
+ - 0
93
+ hash: -2457577872053855991
94
+ required_rubygems_version: !ruby/object:Gem::Requirement
95
+ none: false
96
+ requirements:
97
+ - - ! '>='
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ segments:
101
+ - 0
102
+ hash: -2457577872053855991
103
+ requirements: []
104
+ rubyforge_project:
105
+ rubygems_version: 1.8.23
106
+ signing_key:
107
+ specification_version: 3
108
+ summary: Add swagger-ui to your rails app easily
109
+ test_files: []