Skip to content

Commit bb4426b

Browse files
committed
Drop Ruby 2.x support
1 parent d0768b6 commit bb4426b

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

.github/workflows/main.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
pull_request:
88

99
env:
10-
RUBY_VERSION: '2.7.6'
10+
RUBY_VERSION: '3.3'
1111

1212
jobs:
1313
rubocop:
@@ -27,10 +27,10 @@ jobs:
2727
strategy:
2828
matrix:
2929
ruby:
30-
- 2.6
31-
- 2.7
3230
- 3.0
3331
- 3.1
32+
- 3.2
33+
- 3.3
3434
steps:
3535
- uses: actions/checkout@v2
3636
- name: Set up Ruby

.rubocop.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
# See https://docs.rubocop.org/rubocop/configuration
1111

1212
AllCops:
13-
TargetRubyVersion: 2.5
13+
TargetRubyVersion: 3.0
14+
SuggestExtensions: false
1415
NewCops: enable
1516

1617
Metrics/BlockLength:

boxing.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
1111
spec.summary = 'The zero-configuration Dockerfile generator for Ruby'
1212
spec.description = 'The zero-configuration Dockerfile generator for Ruby'
1313
spec.homepage = 'https://github.com/elct9620/boxing'
14-
spec.required_ruby_version = '>= 2.5.0'
14+
spec.required_ruby_version = '>= 3.0.0'
1515

1616
spec.metadata['homepage_uri'] = spec.homepage
1717
spec.metadata['source_code_uri'] = 'https://github.com/elct9620/boxing'

lib/boxing/generator.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ class Generator
1111
ASCII_BOLD = "\e[1m"
1212
ASCII_RED = "\e[31m"
1313

14-
CREATED_MESSAGE = "#{ASCII_BOLD}create#{ASCII_CLEAR}\t%s"
15-
IDENTICAL_MESSAGE = "#{ASCII_BOLD}identical#{ASCII_CLEAR}\t%s"
16-
CONFLICT_MESSAGE = "#{ASCII_BOLD}#{ASCII_RED}conflict#{ASCII_CLEAR}\t%s"
14+
CREATED_MESSAGE = "#{ASCII_BOLD}create#{ASCII_CLEAR}\t%s".freeze
15+
IDENTICAL_MESSAGE = "#{ASCII_BOLD}identical#{ASCII_CLEAR}\t%s".freeze
16+
CONFLICT_MESSAGE = "#{ASCII_BOLD}#{ASCII_RED}conflict#{ASCII_CLEAR}\t%s".freeze
1717
OVERWRITE_MESSAGE = 'Overwrite %s? (enter "h" for help) [Ynqdhm] '
18-
FORCE_MESSAGE = "#{ASCII_BOLD}force#{ASCII_CLEAR}\t%s"
19-
SKIP_MESSAGE = "#{ASCII_BOLD}skip#{ASCII_CLEAR}\t%s"
18+
FORCE_MESSAGE = "#{ASCII_BOLD}force#{ASCII_CLEAR}\t%s".freeze
19+
SKIP_MESSAGE = "#{ASCII_BOLD}skip#{ASCII_CLEAR}\t%s".freeze
2020
MERGE_TOOL_NOT_FOUND = 'Please configure merge.tool in your Git config.'
2121

2222
attr_reader :destination, :path

lib/boxing/package.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class << self
1414
#
1515
# @since 0.1.0
1616
def load(path)
17-
data = YAML.safe_load(File.read(path))
17+
data = YAML.safe_load_file(path)
1818
mode = 0b00
1919
mode |= Package::RUNTIME if data['runtime']
2020
mode |= Package::BUILD if data['build']

0 commit comments

Comments
 (0)