diff --git a/README.md b/README.md index ab81d66..a3ea5b8 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Include [swagger-ui](https://github.com/swagger-api/swagger-ui) as Rails engine Swagger UI version | Rails version ------------------ | ---------------- -2.2.10 | >= 4.2 +2.2.10 | >= 4.2, <6 ## Features * Supports API documentation versioning / multiple APIs documentation @@ -133,7 +133,7 @@ Here's an example use of [SwaggerUiEngine in Rails application](https://github.c ## Contributing -You're very much welcome to contribute to this repository. Start by creating a Github issue and describing your change thoroughly. If you decide to publish a pull request, please make sure it points to the latest versioned branch instead of master. +You're very much welcome to contribute to this repository. Start by creating a Github issue and describing your change thoroughly. If you decide to publish a pull request, please make sure it points to the latest versioned branch instead of master. ## License diff --git a/_config.yml b/_config.yml deleted file mode 100644 index 059155b..0000000 --- a/_config.yml +++ /dev/null @@ -1,3 +0,0 @@ -theme: jekyll-theme-cayman -gems: - - jemoji diff --git a/app/controllers/swagger_ui_engine/swagger_docs_controller.rb b/app/controllers/swagger_ui_engine/swagger_docs_controller.rb index a6d0412..1109c4a 100644 --- a/app/controllers/swagger_ui_engine/swagger_docs_controller.rb +++ b/app/controllers/swagger_ui_engine/swagger_docs_controller.rb @@ -1,5 +1,5 @@ module SwaggerUiEngine - class SwaggerDocsController < ApplicationController + class SwaggerDocsController < SwaggerUiEngine::ApplicationController include SwaggerUiEngine::ConfigParser include SwaggerUiEngine::OauthConfigParser diff --git a/lib/swagger_ui_engine.rb b/lib/swagger_ui_engine.rb index 42cbc76..cd46ac3 100644 --- a/lib/swagger_ui_engine.rb +++ b/lib/swagger_ui_engine.rb @@ -1,3 +1,5 @@ +require 'rails/engine' +require 'action_controller/railtie' require 'swagger_ui_engine/engine' require 'swagger_ui_engine/version' require 'swagger_ui_engine/configuration' diff --git a/lib/swagger_ui_engine/engine.rb b/lib/swagger_ui_engine/engine.rb index 7dfc19d..1430422 100644 --- a/lib/swagger_ui_engine/engine.rb +++ b/lib/swagger_ui_engine/engine.rb @@ -1,11 +1,11 @@ -require 'sass/rails' +require 'sassc/rails' module SwaggerUiEngine class Engine < ::Rails::Engine isolate_namespace SwaggerUiEngine config.to_prepare do - Rails.application.config.assets.precompile += %w( + Rails.application.config.assets.precompile += %w[ swagger_ui_engine/lib/typography.css swagger_ui_engine/lib/reset.css swagger_ui_engine/lib/screen.css @@ -16,10 +16,11 @@ class Engine < ::Rails::Engine swagger_ui_engine/favicon-32x32.png swagger_ui_engine/favicon-16x16.png swagger_ui_engine/lang/*.js - ) + swagger_ui_engine/DroidSans-Bold.ttf + swagger_ui_engine/DroidSans.ttf + ] Rails.application.config.assets.paths << Rails.root.join('vendor', 'assets', 'fonts') - Rails.application.config.assets.precompile << /\.(?:svg|eot|woff|ttf)$/ end end end diff --git a/swagger_ui_engine.gemspec b/swagger_ui_engine.gemspec index a90a4a3..a75e97e 100644 --- a/swagger_ui_engine.gemspec +++ b/swagger_ui_engine.gemspec @@ -22,6 +22,6 @@ Gem::Specification.new do |s| 'CHANGELOG.md' ] - s.add_runtime_dependency 'rails', '>= 4.2' - s.add_runtime_dependency 'sass-rails' + s.add_runtime_dependency 'rails', '>= 4.2', '< 6' + s.add_runtime_dependency 'sassc-rails' end diff --git a/test/dummy/config/environments/development.rb b/test/dummy/config/environments/development.rb deleted file mode 100644 index d0db72f..0000000 --- a/test/dummy/config/environments/development.rb +++ /dev/null @@ -1,46 +0,0 @@ -Rails.application.configure do - # Settings specified here will take precedence over those in config/application.rb. - - # In the development environment your application's code is reloaded on - # every request. This slows down response time but is perfect for development - # since you don't have to restart the web server when you make code changes. - config.cache_classes = false - - # Do not eager load code on boot. - config.eager_load = false - - # Show full error reports. - config.consider_all_requests_local = true - - # Enable/disable caching. By default caching is disabled. - if Rails.root.join('tmp', 'caching-dev.txt').exist? - config.action_controller.perform_caching = true - - config.cache_store = :memory_store - config.public_file_server.headers = { - 'Cache-Control' => 'public, max-age=172800', - } - else - config.action_controller.perform_caching = false - - config.cache_store = :null_store - end - - # Print deprecation notices to the Rails logger. - config.active_support.deprecation = :log - - # Debug mode disables concatenation and preprocessing of assets. - # This option may cause significant delays in view rendering with a large - # number of complex assets. - config.assets.debug = true - - # Suppress logger output for asset requests. - config.assets.quiet = true - - # Raises error for missing translations - # config.action_view.raise_on_missing_translations = true - - # Use an evented file watcher to asynchronously detect changes in source code, - # routes, locales, etc. This feature depends on the listen gem. - # config.file_watcher = ActiveSupport::EventedFileUpdateChecker -end diff --git a/test/dummy/config/environments/test.rb b/test/dummy/config/environments/test.rb index 4b2725c..31e0c0e 100644 --- a/test/dummy/config/environments/test.rb +++ b/test/dummy/config/environments/test.rb @@ -1,5 +1,6 @@ Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. + config.active_support.test_order = :random # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that