Skip to content

Commit

Permalink
Merge pull request #3 from DannyBen/remove/ruby-2-support
Browse files Browse the repository at this point in the history
Drop support for Ruby 2.x
  • Loading branch information
DannyBen committed Jun 25, 2023
2 parents 15b0c96 + 3cf808d commit fef926b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
LC_ALL: en_US.UTF-8 # consistent sort order

strategy:
matrix: { ruby: ['2.7', '3.0', '3.1', head] }
matrix: { ruby: ['3.0', '3.1', '3.2', head] }

steps:
- name: Checkout code
Expand Down
3 changes: 1 addition & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ inherit_gem:
- rspec.yml

AllCops:
TargetRubyVersion: 2.7.0
TargetRubyVersion: 3.0
Exclude:
- 'debug.rb'
- 'dev/**/*'

# Allow methods that start with `get_` in some cases
Expand Down
2 changes: 1 addition & 1 deletion gtx.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Gem::Specification.new do |s|
s.files = Dir['README.md', 'lib/**/*.*']
s.homepage = 'https://github.com/dannyben/gtx'
s.license = 'MIT'
s.required_ruby_version = '>= 2.7.0'
s.required_ruby_version = '>= 3.0'

s.metadata = {
'bug_tracker_uri' => 'https://github.com/DannyBen/gtx/issues',
Expand Down
4 changes: 2 additions & 2 deletions lib/gtx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def parse(context = nil)

def eval_vars(string)
string.gsub(/{{([^{].*?)}}/, '<%=\1%>')
.gsub(/\\\}\\\}/, '}}')
.gsub(/\\\{\\\{/, '{{')
.gsub('\\}\\}', '}}')
.gsub('\\{\\{', '{{')
end
end

0 comments on commit fef926b

Please sign in to comment.