From a32ad22fd2f2c3f4546aa46c6372e0c662b28dd4 Mon Sep 17 00:00:00 2001 From: Horst Duchene Date: Sun, 10 May 2026 13:19:25 +0000 Subject: [PATCH] chore: Ruby modernization and CI cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add frozen_string_literal: true to lib/stream.rb - Remove deprecated gemspec fields: autorequire, require_path → require_paths - Remove obsolete require 'rubygems' from Rakefile and test_helper.rb - Remove manual $LOAD_PATH manipulation from Rakefile (Bundler handles it) - Delete .travis.yml (CI runs on GitHub Actions) Closes #13 --- .travis.yml | 24 ------------------------ Rakefile | 3 --- lib/stream.rb | 2 ++ stream.gemspec | 3 +-- test/test_helper.rb | 1 - 5 files changed, 3 insertions(+), 30 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d664292..0000000 --- a/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -language: ruby -branches: - only: - - master -rvm: - - 2.0.0 - - 2.1.6 - - 2.2.4 - - 2.3.0 - - 2.4 - - 2.5 - - 2.6 - - 2.7 - - ruby-head - - jruby - - jruby-head - -before_install: - - which bundle >/dev/null 2>&1 || gem install bundler - -matrix: - allow_failures: - - rvm: ruby-head - - rvm: jruby-head diff --git a/Rakefile b/Rakefile index 08305ab..ee8c4e1 100644 --- a/Rakefile +++ b/Rakefile @@ -1,6 +1,5 @@ # Rakefile for stream -*- ruby -*- -require 'rubygems' require 'bundler/setup' require 'rubygems/package_task' @@ -8,8 +7,6 @@ require 'rake/testtask' require 'rake/clean' require 'yard' -$:.unshift File.join(File.dirname(__FILE__), 'lib') -require 'stream' # require module to STREAM_VERSION SRC_RB = FileList['lib/*.rb'] diff --git a/lib/stream.rb b/lib/stream.rb index 0501294..c55d5bd 100644 --- a/lib/stream.rb +++ b/lib/stream.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'stream/version' ## diff --git a/stream.gemspec b/stream.gemspec index 130537b..69913a5 100644 --- a/stream.gemspec +++ b/stream.gemspec @@ -28,8 +28,7 @@ Gem::Specification.new do |s| #### Load-time details: library and application (you will need one or both). - s.require_path = 'lib' - s.autorequire = 'stream' + s.require_paths = ['lib'] s.license = 'ruby' #### Documentation and testing. diff --git a/test/test_helper.rb b/test/test_helper.rb index cf8eceb..7042d68 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,2 +1 @@ -require 'rubygems' require 'test/unit'