Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rake create_databases #33

Merged
merged 2 commits into from
Dec 12, 2023
Merged

Conversation

sj26
Copy link
Contributor

@sj26 sj26 commented Dec 9, 2023

It looks like the signature of this method was changed without being updated in these calling sites.

Before

$ rake create_databases --trace
** Invoke create_databases (first_time)
** Execute create_databases
** Invoke mysql2:create_database (first_time)
** Execute mysql2:create_database

wrong number of arguments (given 1, expected 0)
** Invoke postgresql:create_database (first_time)
** Execute postgresql:create_database

wrong number of arguments (given 1, expected 0)
rake aborted!
Failure in: mysql2, postgresql
/opt/homebrew/lib/ruby/gems/3.2.0/gems/schema_dev-4.2.0/lib/schema_dev/tasks/dbms.rb:55:in `invoke_multiple'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/schema_dev-4.2.0/lib/schema_dev/tasks/dbms.rb:39:in `block in <top (required)>'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:281:in `block in execute'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:281:in `each'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:281:in `execute'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:199:in `synchronize'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:199:in `invoke_with_call_chain'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:188:in `invoke'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:182:in `invoke_task'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:138:in `block (2 levels) in top_level'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:138:in `each'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:138:in `block in top_level'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:147:in `run_with_threads'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:132:in `top_level'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:83:in `block in run'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:208:in `standard_exception_handling'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:80:in `run'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/rake-13.1.0/exe/rake:27:in `<top (required)>'
/Users/sj26/.rbenv/versions/3.2.2/bin/rake:25:in `load'
/Users/sj26/.rbenv/versions/3.2.2/bin/rake:25:in `<main>'
Tasks: TOP => create_databases

After

$ rake create_databases --trace
** Invoke create_databases (first_time)
** Execute create_databases
** Invoke mysql2:create_database (first_time)
** Execute mysql2:create_database
Created database 'schema_plus_test'
** Invoke postgresql:create_database (first_time)
** Execute postgresql:create_database
Created database 'schema_plus_test'

@coveralls
Copy link

coveralls commented Dec 9, 2023

Coverage Status

coverage: 99.366%. remained the same
when pulling a63a23d on sj26:fix-create-databases
into 8fcd930 on SchemaPlus:master.

@ronen ronen merged commit e7da618 into SchemaPlus:master Dec 12, 2023
18 checks passed
@ronen
Copy link
Member

ronen commented Dec 12, 2023

It looks like the signature of this method was changed without being updated in these calling sites.

...or is it due to upgrading to Ruby 3 and its handling of keyword args?

In any case, thanks for the fix!

@sj26 sj26 deleted the fix-create-databases branch December 12, 2023 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants