Skip to content

Commit

Permalink
Update Ruby version to include v3.3 (#45)
Browse files Browse the repository at this point in the history
* Update Ruby version to include v3.3
* Move development dependencies to the Gemfile
* Fix logic bug in `server_read`
  • Loading branch information
abrom committed May 1, 2024
1 parent 21fabbc commit b5534fc
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['2.7', '3.0', '3.1', '3.2']
ruby-version: ['3.0', '3.1', '3.2', '3.3']

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ require:

AllCops:
NewCops: enable
TargetRubyVersion: 2.7
TargetRubyVersion: 3.0

Layout/EmptyLinesAroundAttributeAccessor:
Enabled: true
Expand Down
9 changes: 9 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,12 @@ source 'https://rubygems.org'

# Specify your gem's dependencies in henkei.gemspec
gemspec

gem 'bundler', '~> 2.0'
gem 'rake', '~> 12.3'
gem 'rspec', '~> 3.7'
gem 'rubocop', '~> 1.26'
gem 'rubocop-performance', '~> 1.13'
gem 'rubocop-rake', '~> 0.6'
gem 'rubocop-rspec', '~> 2.9'
gem 'simplecov', '~> 0.15', '< 0.18'
12 changes: 1 addition & 11 deletions henkei.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
'(.doc, .docx, .pages, .odt, .rtf, .pdf) using Apache Tika toolkit'
spec.homepage = 'https://github.com/abrom/henkei'
spec.license = 'MIT'
spec.required_ruby_version = ['>= 2.7.0', '< 3.3.0']
spec.required_ruby_version = ['>= 3.0.0', '< 3.4.0']

# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
# delete this section to allow pushing this gem to any host.
Expand All @@ -30,14 +30,4 @@ Gem::Specification.new do |spec|

spec.add_runtime_dependency 'json', '>= 1.8', '< 3'
spec.add_runtime_dependency 'mini_mime', '>= 0.1.1', '< 2'

spec.add_development_dependency 'bundler', '~> 2.0'
spec.add_development_dependency 'rails', '~> 5.0'
spec.add_development_dependency 'rake', '~> 12.3'
spec.add_development_dependency 'rspec', '~> 3.7'
spec.add_development_dependency 'rubocop', '~> 1.26'
spec.add_development_dependency 'rubocop-performance', '~> 1.13'
spec.add_development_dependency 'rubocop-rake', '~> 0.6'
spec.add_development_dependency 'rubocop-rspec', '~> 2.9'
spec.add_development_dependency 'simplecov', '~> 0.15', '< 0.18'
end
2 changes: 1 addition & 1 deletion lib/henkei.rb
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def self.server_read(data)
resp = +''
loop do
chunk = s.recv(65_536)
break if chunk.empty? || !chunk
break if !chunk || chunk.empty?

resp << chunk
end
Expand Down

0 comments on commit b5534fc

Please sign in to comment.