Skip to content

Commit

Permalink
Make compatible with Ruby 3
Browse files Browse the repository at this point in the history
  • Loading branch information
robjlucas committed May 16, 2022
1 parent 31cec66 commit 28adef0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Binary file added lib/.envied.rb.swp
Binary file not shown.
10 changes: 5 additions & 5 deletions lib/envied.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ class << self

def self.require(*args, **options)
requested_groups = (args && !args.empty?) ? args : ENV['ENVIED_GROUPS']
env!(requested_groups, options)
error_on_duplicate_variables!(options)
error_on_missing_variables!(options)
error_on_uncoercible_variables!(options)
env!(requested_groups, **options)
error_on_duplicate_variables!(**options)
error_on_missing_variables!(**options)
error_on_uncoercible_variables!(**options)

intercept_env_vars!
ensure_spring_after_fork_require(args, options)
ensure_spring_after_fork_require(args, **options)
end

def self.env!(requested_groups, **options)
Expand Down
2 changes: 1 addition & 1 deletion lib/envied/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def variable(name, type = :string, **options)
raise ArgumentError, "#{type.inspect} is not a supported type. Should be one of #{coercer.supported_types}"
end
options[:group] = current_group if current_group
variables << ENVied::Variable.new(name, type, options)
variables << ENVied::Variable.new(name, type, **options)
end

def group(*names, &block)
Expand Down
2 changes: 1 addition & 1 deletion spec/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
it { is_expected.to respond_to :group }

def with_envfile(**options, &block)
@config = ENVied::Configuration.new(options, &block)
@config = ENVied::Configuration.new(**options, &block)
end
attr_reader :config

Expand Down
2 changes: 1 addition & 1 deletion spec/envied_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def set_ENV(env = {})
end

def configure(**options, &block)
@config = ENVied::Configuration.new(options, &block)
@config = ENVied::Configuration.new(**options, &block)
end

def configured_with(**hash)
Expand Down

0 comments on commit 28adef0

Please sign in to comment.