swagger-ui as middleware & upgrade to 3.12.2

This commit is contained in:
domaindrivendev
2018-04-26 20:39:42 -07:00
parent 4c708295b9
commit fee8491ab6
74 changed files with 258 additions and 37700 deletions

4
test-app/.byebug_history Normal file
View File

@@ -0,0 +1,4 @@
exit
env['PATH_INFO']
env['SCRIPT_NAME']
env

View File

@@ -37,7 +37,7 @@ class BlogsController < ApplicationController
def save_uploaded_file(field)
return if field.nil?
file = File.join('tmp', field.original_filename)
file = File.join('public/uploads', field.original_filename)
FileUtils.cp field.tempfile.path, file
field.original_filename
end

View File

@@ -5,5 +5,6 @@ Rswag::Ui.configure do |c|
# JSON endpoint and the second is a title that will be displayed in the document selector
# NOTE: If you're using rspec-api to expose Swagger files (under swagger_root) as JSON endpoints,
# then the list below should correspond to the relative paths for those endpoints
c.swagger_endpoint '/api-docs/v1/swagger.json', 'API V1 Docs'
end

View File

@@ -10,14 +10,14 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2016_02_18_212104) do
ActiveRecord::Schema.define(version: 20160218212104) do
create_table "blogs", force: :cascade do |t|
t.string "title", limit: 255
t.string "title"
t.text "content"
t.string "thumbnail", limit: 255
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "thumbnail"
t.datetime "created_at"
t.datetime "updated_at"
end
end

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -53,3 +53,7 @@ RSpec.configure do |config|
Capybara.javascript_driver = :webkit
end
Capybara::Webkit.configure do |config|
config.block_unknown_urls
end