guard / rb-inotify

A thorough inotify wrapper for Ruby using FFI.
MIT License
312 stars 64 forks source link

Add JRuby and Rubinius cases on Travis CI #65

Closed junaruga closed 7 years ago

junaruga commented 7 years ago

I just knew that rb-inotify is used with JRuby seeing issue page's user report. This PR must be useful to share issues of JRuby and Rubinius easily.

I added Rubinius (rbx-3) as allow_failures as it is sometimes unstable. This set of CRuby, JRuby and Rubinius in .travis.yml is typically used for some RubyGem packages.

ioquatix commented 7 years ago

Can you rebase on master?

I've never had rbx-3 work on travis- is it working now?

junaruga commented 7 years ago

Yes, I rebased it on latest master branch right now.

I've never had rbx-3 work on travis- is it working now?

Yes, I have never tried to run rb-inotify on rbx-3 too. But at least the rbx-3 is available on Travis CI. Please look at below case of unit-test project.

https://github.com/test-unit/test-unit/pull/145 https://travis-ci.org/test-unit/test-unit/jobs/231604875

$ ruby --version rubinius 3.77 (2.3.1 d8751792 2017-05-06 3.8.0) [x86_64-linux-gnu]

But there is a issue for all the Rubies right now in rb-notify.

I think that the rake test does not work seeing Travis log for maybe all the Rubies.

The reason is I suppose that Rake::TestTask.new does not work.

Referring below sample. rspec-core is reliable as rspec sample, isn't it? :) https://github.com/rspec/rspec-core/blob/master/Rakefile

After below modification on local, it works.

$ git diff
diff --git a/Rakefile b/Rakefile
index 5e8c4b6..939bb91 100755
--- a/Rakefile
+++ b/Rakefile
@@ -1,16 +1,16 @@
 require "bundler/gem_tasks"
-require 'rake/testtask'
+require "rspec/core/rake_task"

-Rake::TestTask.new do |t|
-  t.libs << 'test'
+RSpec::Core::RakeTask.new(:spec) do |t|
+  t.ruby_opts = %w[-w]
 end

 desc "Run tests"
-task :default => :test
+task :default => :spec
$ bundle exec rake
/usr/local/ruby-2.4.1/bin/ruby -w -I/home/jaruga/git/rb-inotify/vendor/bundle/ruby/2.4.0/gems/rspec-core-3.4.4/lib:/home/jaruga/git/rb-inotify/vendor/bundle/ruby/2.4.0/gems/rspec-support-3.4.1/lib /home/jaruga/git/rb-inotify/vendor/bundle/ruby/2.4.0/gems/rspec-core-3.4.4/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
..

Finished in 0.00142 seconds (files took 0.07768 seconds to load)
2 examples, 0 failures

And one more thing, below files have executable bit (+x). It was not before rebase. I guess that it is your text editor's issue.

$ find . -type f -a -executable | grep -v vendor | grep -v '/.git/' | xargs ls -l
-rwxrwxr-x 1 jaruga jaruga  239 May 20 15:55 ./Gemfile
-rwxrwxr-x 1 jaruga jaruga  174 May 20 15:55 ./.gitignore
-rwxrwxr-x 1 jaruga jaruga  461 May 20 15:55 ./lib/rb-inotify.rb
-rwxrwxr-x 1 jaruga jaruga 1211 May 20 15:55 ./lib/rb-inotify/version.rb
-rwxrwxr-x 1 jaruga jaruga  244 May 20 16:04 ./Rakefile
-rwxrwxr-x 1 jaruga jaruga  985 May 20 15:55 ./rb-inotify.gemspec
-rwxrwxr-x 1 jaruga jaruga 3971 May 20 15:55 ./README.md
-rwxrwxr-x 1 jaruga jaruga  516 May 20 15:55 ./spec/spec_helper.rb
-rwxrwxr-x 1 jaruga jaruga  278 May 20 15:56 ./.travis.yml
ioquatix commented 7 years ago

Oh god, yes, I think something went wrong with the samba file sharing. I have to develop this on my linux box and I'm in bed right now, I mount it via SMB, and the editor has foo barred everything. This is sufficiently ugly.. I may force push to fix this.

ioquatix commented 7 years ago

I've merged your changes, and I've rewritten history to fix the x bit. My apologies and thanks for catching it. It's 2AM so my bad.

junaruga commented 7 years ago

I am fine. No problem. Thank you for your work at midnight.

ioquatix commented 7 years ago

Okay, you were right, and it worked: https://travis-ci.org/guard/rb-inotify/builds/234325378

Last time I tried rbx-3 it didn't work, so that's awesome.

Okay, so now we just need a few more specs :)