8000 Feature/ruby 3 by tagliala · Pull Request #108 · ifad/chronomodel · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Feature/ruby 3 #108

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

Merged
merged 2 commits into from
Jan 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ rvm:
- 2.5
- 2.6
- 2.7
- 3.0

gemfile:
- gemfiles/rails_5.0.gemfile
Expand All @@ -32,6 +33,12 @@ jobs:
gemfile: gemfiles/rails_5.1.gemfile
- rvm: 2.7
gemfile: gemfiles/rails_5.2.gemfile
- rvm: 3.0
gemfile: gemfiles/rails_5.0.gemfile
- rvm: 3.0
gemfile: gemfiles/rails_5.1.gemfile
- rvm: 3.0
gemfile: gemfiles/rails_5.2.gemfile

addons:
postgresql: "12"
Expand Down
8 changes: 4 additions & 4 deletions lib/chrono_model/adapter/migrati 8000 ons.rb
52A9
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Migrations
# Creates the given table, possibly creating the temporal schema
# objects if the `:temporal` option is given and set to true.
#
def create_table(table_name, options = {})
def create_table(table_name, **options)
# No temporal features requested, skip
return super unless options[:temporal]

Expand Down Expand Up @@ -63,7 +63,7 @@ def rename_table(name, new_name)
# features on the given table. Please note that you'll lose your history
# when demoting a temporal table to a plain one.
#
def change_table(table_name, options = {}, &block)
def change_table(table_name, **options, &block)
transaction do

# Add an empty proc to support calling change_table without a block.
Expand All @@ -76,15 +76,15 @@ def change_table(table_name, options = {}, &block)
end

drop_and_recreate_public_view(table_name, options) do
super table_name, options, &block
super table_name, **options, &block
end

else
if is_chrono?(table_name)
chrono_undo_temporal_table(table_name)
end

super table_name, options, &block
super table_name, **options, &block
end

end
Expand Down
0