Skip to content

Commit

Permalink
Merge pull request #78 from publify/target-ruby-2-7
Browse files Browse the repository at this point in the history
Target Ruby 2.7 and up
  • Loading branch information
mvz committed May 19, 2023
2 parents 991e13c + 22b9a87 commit c86ca76
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

strategy:
matrix:
ruby: [2.6, 2.7, "3.0", "3.1", "3.2"]
ruby: ["2.7", "3.0", "3.1", "3.2"]

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: 3.2
bundler-cache: true
rubygems: latest
- name: Run RuboCop
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ AllCops:
- 'spec/dummy/bin/*'
- 'spec/dummy/db/schema.rb'
NewCops: enable
TargetRubyVersion: 2.5
TargetRubyVersion: 2.7

Rails:
Enabled: true
Expand Down
2 changes: 1 addition & 1 deletion app/models/article.rb
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def permalink_url_options
format_url.gsub!("%day%", sprintf("%<day>.2d", day: published_at.day))
format_url.gsub!("%title%", URI::DEFAULT_PARSER.escape(permalink.to_s))
if format_url[0, 1] == "/"
format_url[1..-1]
format_url[1..]
else
format_url
end
Expand Down
4 changes: 2 additions & 2 deletions app/models/text_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ def initialize(name: nil,
@params = params
end

def sanitize(*args, &blk)
self.class.sanitize(*args, &blk)
def sanitize(...)
self.class.sanitize(...)
end

def self.find_or_default(name)
Expand Down
2 changes: 1 addition & 1 deletion publify_core.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Gem::Specification.new do |s|

s.files = File.open("Manifest.txt").readlines.map(&:chomp)

s.required_ruby_version = ">= 2.5.0"
s.required_ruby_version = ">= 2.7.0"

s.add_dependency "aasm", "~> 5.0"
s.add_dependency "akismet", "~> 3.0"
Expand Down

0 comments on commit c86ca76

Please sign in to comment.