Skip to content

Commit 28adef0

Browse files
committed
Make compatible with Ruby 3
1 parent 31cec66 commit 28adef0

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

lib/.envied.rb.swp

16 KB
Binary file not shown.

lib/envied.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ class << self
1515

1616
def self.require(*args, **options)
1717
requested_groups = (args && !args.empty?) ? args : ENV['ENVIED_GROUPS']
18-
env!(requested_groups, options)
19-
error_on_duplicate_variables!(options)
20-
error_on_missing_variables!(options)
21-
error_on_uncoercible_variables!(options)
18+
env!(requested_groups, **options)
19+
error_on_duplicate_variables!(**options)
20+
error_on_missing_variables!(**options)
21+
error_on_uncoercible_variables!(**options)
2222

2323
intercept_env_vars!
24-
ensure_spring_after_fork_require(args, options)
24+
ensure_spring_after_fork_require(args, **options)
2525
end
2626

2727
def self.env!(requested_groups, **options)

lib/envied/configuration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def variable(name, type = :string, **options)
3232
raise ArgumentError, "#{type.inspect} is not a supported type. Should be one of #{coercer.supported_types}"
3333
end
3434
options[:group] = current_group if current_group
35-
variables << ENVied::Variable.new(name, type, options)
35+
variables << ENVied::Variable.new(name, type, **options)
3636
end
3737

3838
def group(*names, &block)

spec/configuration_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
it { is_expected.to respond_to :group }
44

55
def with_envfile(**options, &block)
6-
@config = ENVied::Configuration.new(options, &block)
6+
@config = ENVied::Configuration.new(**options, &block)
77
end
88
attr_reader :config
99

spec/envied_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def set_ENV(env = {})
2222
end
2323

2424
def configure(**options, &block)
25-
@config = ENVied::Configuration.new(options, &block)
25+
@config = ENVied::Configuration.new(**options, &block)
2626
end
2727

2828
def configured_with(**hash)

0 commit comments

Comments
 (0)