File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed
Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 1+ require 'delegate'
2+
13module ActiveRecord
24 # = Active Record Schema Dumper
35 #
Original file line number Diff line number Diff line change 11module FixDBSchemaConflicts
2- VERSION = '1.0.0 '
2+ VERSION = '1.0.1 '
33end
Original file line number Diff line number Diff line change @@ -2,7 +2,11 @@ namespace :db do
22 namespace :schema do
33 task :dump do
44 puts "Dumping database schema with fix-db-schema-conflicts gem"
5- filename = ENV [ 'SCHEMA' ] || File . join ( ActiveRecord ::Tasks ::DatabaseTasks . db_dir , 'schema.rb' )
5+ filename = ENV [ 'SCHEMA' ] || if defined? ActiveRecord ::Tasks ::DatabaseTasks
6+ File . join ( ActiveRecord ::Tasks ::DatabaseTasks . db_dir , 'schema.rb' )
7+ else
8+ "#{ Rails . root } /db/schema.rb"
9+ end
610 rubocop_yml = File . expand_path ( '../../../.rubocop_schema.yml' , __FILE__ )
711 `rubocop --auto-correct --config #{ rubocop_yml } #{ filename } `
812 `sed -E -e 's/, +/, /g' #{ filename } > db/schema.fixed.rb`
You can’t perform that action at this time.
0 commit comments