Skip to content

Commit 501bde5

Browse files
committed
Upgrade to Ruby 3.x and allows up to ActiveRecord 7.x; fix all test failures related to keyword/hash argument incompatibility
1 parent ff68712 commit 501bde5

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ruby-2.6.8
1+
ruby-3.0.5

data_works.gemspec

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ Gem::Specification.new do |s|
1919

2020
# Most of the below must match the rails app
2121

22-
s.add_dependency 'activerecord', '5.2.6'
23-
s.add_dependency 'activesupport', '5.2.6'
22+
s.required_ruby_version = '>= 3.0.0'
23+
24+
s.add_dependency 'activerecord', '>= 4.2', '< 8'
25+
s.add_dependency 'activesupport', '>= 4.2', '< 8'
2426
s.add_dependency 'factory_bot'
2527
s.add_dependency 'graphviz', '~> 0' # 1.0 breaks things
2628
s.add_dependency 'launchy'

lib/data_works/base.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ def initialize
99
end
1010

1111
# we expose the public interface here
12-
def method_missing(method_name, *args, &block)
12+
def method_missing(method_name, *args, **kwargs, &block)
1313
method_name = method_name.to_s
1414
if method_name =~ /\A(add_|the_)(\w+)\Z/ ||
1515
method_name =~ /\A(\w+)(\d+)\Z/ ||
1616
method_name =~ /\Aset_(current_default|restriction)\Z/ ||
1717
method_name =~ /\Aclear_(current_default|restriction)_for\Z/ ||
1818
method_name == 'visualize'
19-
@works.send(method_name, *args, &block)
19+
@works.send(method_name, *args, **kwargs, &block)
2020
else
2121
raise NoMethodError.new("#{method_name} method not found in data works")
2222
end

lib/data_works/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module DataWorks
2-
VERSION = "0.1.4"
2+
VERSION = "0.1.6"
33
end

0 commit comments

Comments
 (0)