Skip to content

Commit

Permalink
Update Psych::safe_load Method Signature (#823)
Browse files Browse the repository at this point in the history
* fix error when parsing config file

YAML parser returns wrong number of arguments(given 4, expected 1),
this fix removes the extra parameters, while still passing in the
allowAliases flag.

* Deprecate Ruby 2.5; bump min Ruby version in gemspec; bump Ruby versions in Travis test matrix

Co-authored-by: John Schank <jschank@mac.com>
  • Loading branch information
ethagnawl and jschank committed Jun 7, 2021
1 parent e1d282f commit e323d53
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
language: ruby
rvm:
- "2.5.8"
- "2.6.6"
- "2.7.1"
- "2.6.7"
- "2.7.3"
- "3.0.1"
env:
- TMUX_VERSION=3.2
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Unreleased
- Deprecate Ruby 2.5; bump min Ruby version in gemspec; bump Ruby versions in Travis test matrix
- Fix config file parsing error: wrong number of arguments (given 4, expected 1) (#819)

## 2.0.3
### Misc
- Add Ruby 3 to the Travis test matrix
Expand Down
2 changes: 1 addition & 1 deletion lib/tmuxinator/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def self.load(path, options = {})
@args = args

content = Erubis::Eruby.new(raw_content).result(binding)
YAML.safe_load(content, [], [], true)
YAML.safe_load(content, aliases: true)
rescue SyntaxError, StandardError => error
raise "Failed to parse config file: #{error.message}"
end
Expand Down
2 changes: 1 addition & 1 deletion tmuxinator.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Gem::Specification.new do |s|
}

s.required_rubygems_version = ">= 1.8.23"
s.required_ruby_version = ">= 2.5.8"
s.required_ruby_version = ">= 2.6.7"

s.add_dependency "erubis", "~> 2.6"
s.add_dependency "thor", "~> 1.0"
Expand Down

0 comments on commit e323d53

Please sign in to comment.