File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 ruby-versions :
77 uses : ruby/actions/.github/workflows/ruby_versions.yml@master
88 with :
9- engine : cruby-truffleruby
109 min_version : 2.5
1110
1211 build :
Original file line number Diff line number Diff line change @@ -7,14 +7,20 @@ Rake::TestTask.new(:test) do |t|
77 t . test_files = FileList [ "test/**/test_*.rb" ]
88end
99
10- require 'rake/extensiontask'
11- Rake ::ExtensionTask . new ( "syslog_ext" ) do |ext |
12- ext . ext_dir = 'ext/syslog'
10+ if RUBY_ENGINE == 'jruby'
11+ # nothing to compile for JRuby
12+ task :compile do end
13+ else
14+ require 'rake/extensiontask'
15+ Rake ::ExtensionTask . new ( "syslog_ext" ) do |ext |
16+ ext . ext_dir = 'ext/syslog'
1317
14- # In contrast to "gem install" a "rake compile" is expecting the C-ext file even on Windows.
15- # Work around by creating a dummy so file.
16- task "#{ ext . tmp_dir } /#{ ext . platform } /stage/lib" do |t |
17- touch "#{ ext . tmp_dir } /#{ ext . platform } /#{ ext . name } /#{ RUBY_VERSION } /#{ ext . name } .so"
18+ # In contrast to "gem install" a "rake compile" is expecting the C-ext file even on Windows.
19+ # Work around by creating a dummy so file.
20+ task "#{ ext . tmp_dir } /#{ ext . platform } /stage/lib" do |t |
21+ touch "#{ ext . tmp_dir } /#{ ext . platform } /#{ ext . name } /#{ RUBY_VERSION } /#{ ext . name } .so"
22+ end
1823 end
1924end
25+
2026task :default => :test
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ def windows?
1414 RbConfig ::CONFIG [ "host_os" ] =~ /mswin|mingw/
1515end
1616
17- if windows?
17+ if windows? || RUBY_ENGINE == 'jruby'
1818 generate_dummy_makefile
1919else
2020 have_library ( "log" ) # for Android
Original file line number Diff line number Diff line change 11begin
2- require 'syslog_ext'
2+ if RUBY_ENGINE == 'jruby'
3+ require 'syslog/jruby'
4+ else
5+ require 'syslog_ext'
6+ end
37rescue LoadError
48 raise LoadError . new ( <<-EOS )
5- Can't load Syslog!
6-
7- Syslog is not supported on your system. For Windows
8- we recommend using the win32-eventlog gem.
9- EOS
9+ Can't load Syslog!
10+
11+ Syslog is not supported on your system. For Windows
12+ we recommend using the win32-eventlog gem.
13+ EOS
1014end
You can’t perform that action at this time.
0 commit comments