Skip to content

Commit 2462b56

Browse files
committed
revert changes from bad rebase
1 parent ec22c85 commit 2462b56

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

Diff for: Rakefile

+8-8
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@ Bundler::GemHelper.install_tasks
88

99
desc "Copy the database.DB.yml per ENV['DB']"
1010
task :install_database_yml do
11-
puts format("installing database.yml for %s", ENV.fetch("DB", nil))
11+
puts format("installing database.yml for %s", ENV["DB"])
1212

1313
# It's tempting to use `git clean` here, but this rake task will be run by
1414
# people working on changes that haven't been committed yet, so we have to
1515
# be more selective with what we delete.
1616
FileUtils.rm("spec/dummy_app/db/database.yml", force: true)
1717

1818
FileUtils.cp(
19-
"spec/dummy_app/config/database.#{ENV.fetch('DB', nil)}.yml",
19+
"spec/dummy_app/config/database.#{ENV['DB']}.yml",
2020
"spec/dummy_app/config/database.yml"
2121
)
2222
end
2323

2424
desc "Delete generated files and databases"
2525
task :clean do
26-
puts format("dropping %s database", ENV.fetch("DB", nil))
27-
case ENV.fetch("DB", nil)
26+
puts format("dropping %s database", ENV["DB"])
27+
case ENV["DB"]
2828
when "mysql"
2929
# TODO: only works locally. doesn't respect database.yml
3030
system "mysqladmin drop -f paper_trail_test > /dev/null 2>&1"
@@ -34,14 +34,14 @@ task :clean do
3434
when nil, "sqlite"
3535
FileUtils.rm(Dir.glob("spec/dummy_app/db/*.sqlite3"))
3636
else
37-
raise "Don't know how to clean specified RDBMS: #{ENV.fetch('DB', nil)}"
37+
raise "Don't know how to clean specified RDBMS: #{ENV['DB']}"
3838
end
3939
end
4040

4141
desc "Create the database."
4242
task :create_db do
43-
puts format("creating %s database", ENV.fetch("DB", nil))
44-
case ENV.fetch("DB", nil)
43+
puts format("creating %s database", ENV["DB"])
44+
case ENV["DB"]
4545
when "mysql"
4646
# TODO: only works locally. doesn't respect database.yml
4747
system "mysqladmin create paper_trail_test"
@@ -52,7 +52,7 @@ task :create_db do
5252
# noop. test.sqlite3 will be created when migration happens
5353
nil
5454
else
55-
raise "Don't know how to create specified DB: #{ENV.fetch('DB', nil)}"
55+
raise "Don't know how to create specified DB: #{ENV['DB']}"
5656
end
5757
end
5858

Diff for: spec/dummy_app/app/models/person.rb

+6-2
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,13 @@ def load(value)
4040
end
4141
end
4242

43-
delegate :dump, to: :class
43+
def dump(zone)
44+
self.class.dump(zone)
45+
end
4446

45-
delegate :load, to: :class
47+
def load(value)
48+
self.class.load(value)
49+
end
4650
end
4751

4852
# Rails 7.1 deprecates positional argument for coder

0 commit comments

Comments
 (0)