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 01d4c67
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 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: 0 additions & 8 deletions paco.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 01d4c67

Please sign in to comment.