Basic rubocops

This commit is contained in:
Greg Myers
2020-03-24 16:02:13 +00:00
parent 5060697761
commit 6b4f49aacb
25 changed files with 171 additions and 165 deletions

View File

@@ -1,9 +1,11 @@
# frozen_string_literal: true
require 'rswag/route_parser'
require 'rails/generators'
module Rspec
class SwaggerGenerator < ::Rails::Generators::NamedBase
source_root File.expand_path('../templates', __FILE__)
source_root File.expand_path('templates', __dir__)
def setup
@routes = Rswag::RouteParser.new(controller_path).routes

View File

@@ -1,10 +1,11 @@
# frozen_string_literal: true
require 'rails/generators'
module Rswag
module Specs
class InstallGenerator < Rails::Generators::Base
source_root File.expand_path('../templates', __FILE__)
source_root File.expand_path('templates', __dir__)
def add_swagger_helper
template('swagger_helper.rb', 'spec/swagger_helper.rb')

View File

@@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'rails_helper'
RSpec.configure do |config|
@@ -25,7 +27,7 @@ RSpec.configure do |config|
url: 'https://{defaultHost}',
variables: {
defaultHost: {
default: 'www.example.com'
default: 'www.example.com'
}
}
}