Skip to content

Commit

Permalink
chore: remove ruby-next-core dependency
Browse files Browse the repository at this point in the history
Modify LOAD_PATH manually and use a single set of transpiled files for all EOL Rubies
  • Loading branch information
palkan committed Aug 29, 2023
1 parent 1427df8 commit 830ef84
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
1 change: 1 addition & 0 deletions .rbnextrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
nextify: |
./lib
--min-version=2.2
--single-version
5 changes: 3 additions & 2 deletions lib/paco.rb
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
8 changes: 1 addition & 7 deletions paco.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,5 @@ Gem::Specification.new do |spec|

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
spec.add_development_dependency "ruby-next", ">= 0.15.0"
end

0 comments on commit 830ef84

Please sign in to comment.