1
0
Fork 0
mirror of https://github.com/paper-trail-gem/paper_trail.git synced 2022-11-09 11:33:19 -05:00

Lint: Style/ExpandPathArguments

This commit is contained in:
Jared Beck 2018-03-27 18:32:52 -04:00
parent d840d6e6b5
commit c0633be405
9 changed files with 10 additions and 13 deletions

View file

@ -34,6 +34,3 @@ RSpec/NestedGroups:
# interface is a public API, so that would be a breaking change.
Security/YAMLLoad:
Enabled: false
Style/ExpandPathArguments:
Enabled: false

View file

@ -16,7 +16,7 @@ module PaperTrail
"ActiveRecord::ConnectionAdapters::Mysql2Adapter"
].freeze
source_root File.expand_path("../templates", __FILE__)
source_root File.expand_path("templates", __dir__)
class_option(
:with_changes,
type: :boolean,

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
$LOAD_PATH.unshift File.expand_path("lib", __dir__)
require "paper_trail/version_number"
Gem::Specification.new do |s|

View file

@ -3,7 +3,7 @@
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path("../config/application", __FILE__)
require File.expand_path("config/application", __dir__)
require "rake"
Dummy::Application.load_tasks

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
require File.expand_path("../boot", __FILE__)
require File.expand_path("boot", __dir__)
# Pick the frameworks you want:
require "active_record/railtie"

View file

@ -6,7 +6,7 @@ require "rubygems"
# BUNDLE_GEMFILE env. variable to ensure that the correct version of AR is used
# for e.g. migrations. See examples in CONTRIBUTING.md.
unless ENV.key?("BUNDLE_GEMFILE")
gemfile = File.expand_path("../../../../Gemfile", __FILE__)
gemfile = File.expand_path("../../../Gemfile", __dir__)
if File.exist?(gemfile)
puts "Booting PT test dummy app: Using gemfile: #{gemfile}"
ENV["BUNDLE_GEMFILE"] = gemfile
@ -15,4 +15,4 @@ end
require "bundler"
Bundler.setup
$LOAD_PATH.unshift(File.expand_path("../../../../lib", __FILE__))
$LOAD_PATH.unshift(File.expand_path("../../../lib", __dir__))

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
# Load the rails application
require File.expand_path("../application", __FILE__)
require File.expand_path("application", __dir__)
# Initialize the rails application
Dummy::Application.initialize!

View file

@ -2,11 +2,11 @@
require "spec_helper"
require "generator_spec/test_case"
require File.expand_path("../../../../lib/generators/paper_trail/install_generator", __FILE__)
require File.expand_path("../../../lib/generators/paper_trail/install_generator", __dir__)
RSpec.describe PaperTrail::InstallGenerator, type: :generator do
include GeneratorSpec::TestCase
destination File.expand_path("../tmp", __FILE__)
destination File.expand_path("tmp", __dir__)
after do
prepare_destination # cleanup the tmp directory

View file

@ -55,7 +55,7 @@ def params_wrapper(args)
end
end
require File.expand_path("../dummy_app/config/environment", __FILE__)
require File.expand_path("dummy_app/config/environment", __dir__)
require "rspec/rails"
require "paper_trail/frameworks/rspec"
require "ffaker"