Skip to content

Commit

Permalink
fix: compatibility with ruby 3.1.0 (close #2) (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElMassimo authored Mar 29, 2022
1 parent ca229b4 commit b1d504b
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 15 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ jobs:
matrix:
os: [ubuntu-latest]
ruby: [
2.7
3.1.0,
3.1.1,
]

steps:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ jobs:
matrix:
os: [ubuntu-latest]
ruby: [
2.3,
2.5,
2.7,
3.0
3.1.0,
3.1.1,
]
experimental: [false]

Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-3.0.0
ruby-3.1.1
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
## BetterSettings 1.0.2 (2022-03-29) ##

* Pass `aliases: true` now that Ruby 3.1.1 uses `psych-4.0.3` (#3)

## BetterSettings 1.0.1 (2021-02-07) ##

* No code changes.
* Allow the gem to be installed in Ruby 3.0. Thanks @pablomdiaz!


## BetterSettings 1.0.0 (2017-12-29) ##

* Initial Release.
2 changes: 1 addition & 1 deletion better_settings.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Gem::Specification.new do |s|
s.test_files = Dir.glob('{spec}/**/*.rb')
s.require_path = 'lib'

s.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
s.required_ruby_version = Gem::Requirement.new('>= 3.1.0')

s.add_development_dependency 'pry-byebug'
s.add_development_dependency 'rake'
Expand Down
2 changes: 1 addition & 1 deletion lib/better_settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def root_settings
def yaml_to_hash(file_name)
return {} if (content = File.open(file_name).read).empty?

YAML.load(ERB.new(content).result).to_hash
YAML.load(ERB.new(content).result, aliases: true).to_hash
end
end
end
2 changes: 1 addition & 1 deletion lib/better_settings/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

class BetterSettings
VERSION = '1.0.1'
VERSION = '1.0.2'
end
7 changes: 2 additions & 5 deletions spec/support/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ global: 'wat'
name: test

development:
language:
language: &language_defaults
haskell:
paradigm: functional
smalltalk:
Expand All @@ -20,10 +20,7 @@ development:
environment: development

language:
haskell:
paradigm: functional
smalltalk:
paradigm: object oriented
<<: *language_defaults

collides:
does: not
Expand Down

0 comments on commit b1d504b

Please sign in to comment.