From 01d4c67a4406d3762f775c6828a7bc41c56aa68d Mon Sep 17 00:00:00 2001 From: Vladimir Dementyev Date: Mon, 28 Aug 2023 17:13:54 -0700 Subject: [PATCH] chore: remove ruby-next-core dependency Modify LOAD_PATH manually and use a single set of transpiled files for all EOL Rubies --- .rbnextrc | 1 + lib/paco.rb | 5 +++-- paco.gemspec | 8 -------- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.rbnextrc b/.rbnextrc index c73b7eb..9385344 100644 --- a/.rbnextrc +++ b/.rbnextrc @@ -1,3 +1,4 @@ nextify: | ./lib --min-version=2.2 + --single-version diff --git a/lib/paco.rb b/lib/paco.rb index 8171b4c..f4e5f94 100644 --- a/lib/paco.rb +++ b/lib/paco.rb @@ -1,7 +1,8 @@ # frozen_string_literal: true -require "ruby-next/language/setup" -RubyNext::Language.setup_gem_load_path(transpile: true) +if RUBY_VERSION < "2.6.0" + $LOAD_PATH.unshift File.expand_path("./.rbnext", __dir__) +end require "paco/version" require "paco/parse_error" diff --git a/paco.gemspec b/paco.gemspec index 16ec7ba..3490b5c 100644 --- a/paco.gemspec +++ b/paco.gemspec @@ -25,12 +25,4 @@ Gem::Specification.new do |spec| spec.files = Dir.glob("lib/**/*") + Dir.glob("lib/.rbnext/**/*") + %w[README.md LICENSE.txt CHANGELOG.md] spec.require_paths = ["lib"] - - # When gem is installed from source, we add `ruby-next` as a dependency - # to auto-transpile source files during the first load - if ENV["RELEASING_PACO"].nil? && File.directory?(File.join(__dir__, ".git")) - spec.add_runtime_dependency "ruby-next", ">= 0.15.0" - else - spec.add_runtime_dependency "ruby-next-core", ">= 0.15.0" - end end