Skip to content

Commit

Permalink
Drop to support fat gem support.
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Jul 21, 2019
1 parent 9397542 commit 25ae263
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 21 deletions.
1 change: 0 additions & 1 deletion Gemfile
Expand Up @@ -5,6 +5,5 @@ gemspec
group :development do
gem 'rake-compiler', ">= 0.4.1"
gem 'minitest', "~> 5.0"
gem 'rake-compiler-dock', ">= 0.6.3", :platforms => :ruby
gem 'ruby-maven', :platforms => :jruby
end
16 changes: 1 addition & 15 deletions Rakefile
Expand Up @@ -28,21 +28,7 @@ if RUBY_PLATFORM =~ /java/
end
else
require 'rake/extensiontask'
spec = Gem::Specification.load("psych.gemspec")
Rake::ExtensionTask.new("psych", spec) do |ext|
ext.lib_dir = File.join(*['lib', ENV['FAT_DIR']].compact)
ext.cross_compile = true
ext.cross_platform = %w[x86-mingw32 x64-mingw32]
ext.cross_compiling do |s|
s.files.concat ["lib/2.3/psych.so", "lib/2.4/psych.so", "lib/2.5/psych.so"]
end
end
end

desc "Compile binaries for mingw platform using rake-compiler-dock"
task 'build:mingw' do
require 'rake_compiler_dock'
RakeCompilerDock.sh "bundle && rake cross native gem RUBY_CC_VERSION=2.5.0:2.4.0:2.3.0"
Rake::ExtensionTask.new("psych")
end

task :default => [:compile, :test]
6 changes: 1 addition & 5 deletions lib/psych.rb
Expand Up @@ -10,11 +10,7 @@
org.jruby.ext.psych.PsychLibrary.new.load(JRuby.runtime, false)
end
else
begin
require "#{RUBY_VERSION[/\d+\.\d+/]}/psych.so"
rescue LoadError
require 'psych.so'
end
require 'psych.so'
end
require 'psych/nodes'
require 'psych/streaming'
Expand Down

0 comments on commit 25ae263

Please sign in to comment.