diff options
author | Hans de Graaff <graaff@gentoo.org> | 2011-08-14 07:23:25 +0000 |
---|---|---|
committer | Hans de Graaff <graaff@gentoo.org> | 2011-08-14 07:23:25 +0000 |
commit | 9b77a7c706fff8ff52528843a6edc3bb0506ec40 (patch) | |
tree | d5b8540a97b4b8ac5d4a200a2d20f8042b884181 /dev-ruby/fssm | |
parent | jruby has a native ffi implementation so don't require dev-ruby/ffi in the ge... (diff) | |
download | historical-9b77a7c706fff8ff52528843a6edc3bb0506ec40.tar.gz historical-9b77a7c706fff8ff52528843a6edc3bb0506ec40.tar.bz2 historical-9b77a7c706fff8ff52528843a6edc3bb0506ec40.zip |
Add dependency on rb-inotify as encouraged by upstream, so that inotify events can be used instead of polling. Dropped keywords, bug 379131.
Package-Manager: portage-2.1.10.3/cvs/Linux x86_64
Diffstat (limited to 'dev-ruby/fssm')
-rw-r--r-- | dev-ruby/fssm/ChangeLog | 9 | ||||
-rw-r--r-- | dev-ruby/fssm/Manifest | 12 | ||||
-rw-r--r-- | dev-ruby/fssm/files/fssm-0.2.7-test.patch | 237 | ||||
-rw-r--r-- | dev-ruby/fssm/fssm-0.2.7-r1.ebuild | 43 |
4 files changed, 295 insertions, 6 deletions
diff --git a/dev-ruby/fssm/ChangeLog b/dev-ruby/fssm/ChangeLog index 1e2be2a0416c..7bd734f9c69c 100644 --- a/dev-ruby/fssm/ChangeLog +++ b/dev-ruby/fssm/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-ruby/fssm # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-ruby/fssm/ChangeLog,v 1.9 2011/08/07 14:13:32 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/fssm/ChangeLog,v 1.10 2011/08/14 07:23:25 graaff Exp $ + +*fssm-0.2.7-r1 (14 Aug 2011) + + 14 Aug 2011; Hans de Graaff <graaff@gentoo.org> +fssm-0.2.7-r1.ebuild, + +files/fssm-0.2.7-test.patch: + Add dependency on rb-inotify as encouraged by upstream, so that inotify + events can be used instead of polling. Dropped keywords, bug 379131. 07 Aug 2011; Raúl Porcel <armin76@gentoo.org> fssm-0.2.5.ebuild, fssm-0.2.7.ebuild: diff --git a/dev-ruby/fssm/Manifest b/dev-ruby/fssm/Manifest index f464542f5955..065578a6cc40 100644 --- a/dev-ruby/fssm/Manifest +++ b/dev-ruby/fssm/Manifest @@ -1,16 +1,18 @@ -----BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 +Hash: SHA256 +AUX fssm-0.2.7-test.patch 11280 RMD160 9df5176d053e91906cabfd0363d0bd626f646b88 SHA1 57bb78f69bd593a2131020afa12b6e9c8de8d887 SHA256 f9506e9a08d21e1badc10842dde7d2724421a5b0d8e067aa82b265f667af10dd DIST fssm-0.2.5.gem 24064 RMD160 b634c0ae9add18688b1de0d8ac8c57bb05c0626b SHA1 2a8ec174e56982fe9c07dfddc2fcbe06df125a9b SHA256 8a7044a541fca288448091a72672da6f8287f4d1f0ec3de1cbfe19b15a1e95d7 DIST fssm-0.2.7.gem 25088 RMD160 2287126a9865f293269e88a3270d47dea133e282 SHA1 a76aad02acbc7ae1763533f3e50487745c017eba SHA256 4b9e3005602f079fbf64af17c311e1ecb324b4118460698dc4d54423dfe6c19b EBUILD fssm-0.2.5.ebuild 674 RMD160 b75ffb2a1cd00b95aff5fc9eddea647fd66b7c64 SHA1 df1ed365bc20eb47a91c18c8a56815dc0d26ff14 SHA256 6c881c97411f2c2548e04c7c35bc591cd847976f7958c8d292ba9b2873292d52 +EBUILD fssm-0.2.7-r1.ebuild 1026 RMD160 74d2ffe199e1a25c5d4e467d5c182249614887bf SHA1 5686c5366afadbcb47081d801087217169b329ca SHA256 01a705eea6a3904d86bdd39a6eb407fb6adbf357b72dba8986ce0b8f01291ec0 EBUILD fssm-0.2.7.ebuild 773 RMD160 28219197e9746635a133c40fe7fdfee9613bc684 SHA1 40b2817c48cb6315f487dbb9989e607d7d56e531 SHA256 6b215fb39d31713eb2492c46767621d4bbb2d55025447949566aa9e7976182f1 -MISC ChangeLog 1232 RMD160 e33499aa1e9be6328362606c644bf0f67d95d6d4 SHA1 ddb5d31134e668c120f21d7b322980417a8a6cad SHA256 965020b23e6d00d68a9f5592e029490cf1e78ae226fe9821c98412026dc48fc1 +MISC ChangeLog 1513 RMD160 96274cb0eb3e0ceef82414fe72721672b5861ba5 SHA1 786ed1058c29020be81e931fc846f4f6d0cbc0ac SHA256 75970a473538ae1de0c02654d9b7eca85b74e42f97b19f72a82e5d757f02b66b MISC metadata.xml 219 RMD160 c4f05e85bd9645a64124d3847da25522de568428 SHA1 13b624bb74ad54c50dd466cb811f39ed171fe913 SHA256 670b7642b3830f31d24a317577d842b3499592b6e9a6283312b89c59397a2932 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) -iEYEARECAAYFAk4+nZMACgkQuQc30/atMkDxPwCfapn5xtGxmUoehINopOZtcUp0 -78gAnixqq4O++FmG14Ki8nkCNxAiFui/ -=Dzaw +iF4EAREIAAYFAk5Hd/IACgkQiIP6VqMIqNcCqwD+M9ODcMt3YpjdP9txKqYerjYF +BVBJVV2etqfQr7h9ljsBAJROnvdZ1hLzjvPF0sH7A9s4Ij++KD6T5jKk8JzgmI+u +=Vi5s -----END PGP SIGNATURE----- diff --git a/dev-ruby/fssm/files/fssm-0.2.7-test.patch b/dev-ruby/fssm/files/fssm-0.2.7-test.patch new file mode 100644 index 000000000000..775a016f8d95 --- /dev/null +++ b/dev-ruby/fssm/files/fssm-0.2.7-test.patch @@ -0,0 +1,237 @@ +commit e997e7411d5ffd041331b03b298b0919a3250ff7 +Author: Travis Tilley <ttilley@gmail.com> +Date: Sat Jul 30 02:19:10 2011 -0400 + + more brutal honesty, document important FIXME items, and comment out specs for functionality that has never worked outside the polling backend ever + +diff --git a/spec/monitor_spec.rb b/spec/monitor_spec.rb +index 08d465f..2ebba9a 100644 +--- a/spec/monitor_spec.rb ++++ b/spec/monitor_spec.rb +@@ -1,3 +1,8 @@ ++# FIXME: burn this shit with fire for chrissake. this is not an acceptable ++# test suite. given variance between ruby versions and backends ++# regarding threads this is quite likely one of the most brittle ++# test suites EVAR. ++ + require 'spec_helper' + + require 'count_down_latch' +@@ -43,6 +48,12 @@ module FSSM::MonitorSpecHelpers + end + end + ++RSpec::Matchers.define :intersect_with do |test_enum| ++ match do |result_enum| ++ (result_enum & test_enum).length == test_enum.length ++ end ++end ++ + describe "The File System State Monitor" do + describe "monitor" do + include FSSM::MonitorSpecHelpers +@@ -62,29 +73,29 @@ describe "The File System State Monitor" do + File.exists?(file).should be_false + FileUtils.touch file + end +- @handler_results[:create].should == [[@tmp_dir, 'newfile.rb']] ++ @handler_results[:create].should include([@tmp_dir, 'newfile.rb']) + end + + it "should call update callback upon file modification" do + run_monitor(1) do + FileUtils.touch @tmp_dir + '/root/file.rb' + end +- @handler_results[:update].should == [[@tmp_dir, 'root/file.rb']] ++ @handler_results[:update].should include([@tmp_dir, 'root/file.rb']) + end + + it "should call delete callback upon file deletion" do + run_monitor(1) do + FileUtils.rm @tmp_dir + "/root/file.rb" + end +- @handler_results[:delete].should == [[@tmp_dir, 'root/file.rb']] ++ @handler_results[:delete].should include([@tmp_dir, 'root/file.rb']) + end + + it "should call create and delete callbacks upon file renaming in the same directory" do + run_monitor(2) do + FileUtils.mv @tmp_dir + "/root/file.rb", @tmp_dir + "/root/old_file.rb" + end +- @handler_results[:create].should == [[@tmp_dir, 'root/old_file.rb']] +- @handler_results[:delete].should == [[@tmp_dir, 'root/file.rb']] ++ @handler_results[:create].should include([@tmp_dir, 'root/old_file.rb']) ++ @handler_results[:delete].should include([@tmp_dir, 'root/file.rb']) + @handler_results[:update].should == [] + end + +@@ -92,8 +103,8 @@ describe "The File System State Monitor" do + run_monitor(2) do + FileUtils.mv @tmp_dir + "/root/file.rb", @tmp_dir + "/old_file.rb" + end +- @handler_results[:create].should == [[@tmp_dir, 'old_file.rb']] +- @handler_results[:delete].should == [[@tmp_dir, 'root/file.rb']] ++ @handler_results[:create].should include([@tmp_dir, 'old_file.rb']) ++ @handler_results[:delete].should include([@tmp_dir, 'root/file.rb']) + @handler_results[:update].should == [] + end + +@@ -122,81 +133,83 @@ describe "The File System State Monitor" do + @handler_results[:delete].should include([@tmp_dir, 'root/yawn', :directory]) + end + +- it "should call create, update, and delete callbacks upon directory renaming in the same directory" do +- run_monitor(3, :directories => true) do +- FileUtils.mv @tmp_dir + "/root/yawn", @tmp_dir + "/root/old_yawn" +- end +- @handler_results[:create].should include([@tmp_dir, 'root/old_yawn', :directory]) +- @handler_results[:delete].should include([@tmp_dir, 'root/yawn', :directory]) +- @handler_results[:update].should include([@tmp_dir, 'root', :directory]) +- end +- +- it "should call create, update, and delete callbacks upon directory moving to another directory" do +- run_monitor(3, :directories => true) do +- FileUtils.mv @tmp_dir + "/root/yawn", @tmp_dir + "/old_yawn" +- end +- @handler_results[:create].should include([@tmp_dir, 'old_yawn', :directory]) +- @handler_results[:delete].should include([@tmp_dir, 'root/yawn', :directory]) +- @handler_results[:update].should include([@tmp_dir, 'root', :directory]) +- end +- +- it "should call create, update, and delete callbacks upon file renaming in the same directory" do +- run_monitor(3, :directories => true) do +- FileUtils.mv @tmp_dir + "/root/file.rb", @tmp_dir + "/root/old_file.rb" +- end +- @handler_results[:create].should include([@tmp_dir, 'root/old_file.rb', :file]) +- @handler_results[:delete].should include([@tmp_dir, 'root/file.rb', :file]) +- @handler_results[:update].should include([@tmp_dir, 'root', :directory]) +- end +- +- it "should call create, update, and delete callbacks upon file moving to another directory" do +- run_monitor(3, :directories => true) do +- FileUtils.mv @tmp_dir + "/root/file.rb", @tmp_dir + "/old_file.rb" +- end +- @handler_results[:create].should include([@tmp_dir, 'old_file.rb', :file]) +- @handler_results[:delete].should include([@tmp_dir, 'root/file.rb', :file]) +- @handler_results[:update].should include([@tmp_dir, 'root', :directory]) +- end +- +- it "should call delete callbacks upon directory structure deletion, in reverse order" do +- expected_delete_events = [ +- ['root/yawn', :directory], +- ['root/moo/cow.txt', :file], +- ['root/moo', :directory], +- ['root/file.yml', :file], +- ['root/file.rb', :file], +- ['root/file.css', :file], +- ['root/duck/quack.txt', :file], +- ['root/duck', :directory], +- ['root', :directory] +- ] +- run_monitor(expected_delete_events.size, :directories => true) do +- FileUtils.rm_rf @tmp_dir + '/.' +- end +- @handler_results[:create].should == [] +- @handler_results[:delete].should == expected_delete_events.map { |(file, type)| [@tmp_dir, file, type] } +- @handler_results[:update].should == [] +- end +- +- it "should call create callbacks upon directory structure creation, in order" do +- expected_create_events = [ +- ['new_root', :directory], +- ['new_root/duck', :directory], +- ['new_root/duck/quack.txt', :file], +- ['new_root/file.css', :file], +- ['new_root/file.rb', :file], +- ['new_root/file.yml', :file], +- ['new_root/moo', :directory], +- ['new_root/moo/cow.txt', :file], +- ['new_root/yawn', :directory] +- ] +- run_monitor(expected_create_events.size, :directories => true) do +- FileUtils.cp_r @tmp_dir + '/root/.', @tmp_dir + '/new_root' +- end +- @handler_results[:create].should == expected_create_events.map { |(file, type)| [@tmp_dir, file, type] } +- @handler_results[:delete].should == [] +- @handler_results[:update].should == [] +- end ++# FIXME: this never worked outside the polling backend. ++# ++# it "should call create, update, and delete callbacks upon directory renaming in the same directory" do ++# run_monitor(3, :directories => true) do ++# FileUtils.mv @tmp_dir + "/root/yawn", @tmp_dir + "/root/old_yawn" ++# end ++# @handler_results[:create].should include([@tmp_dir, 'root/old_yawn', :directory]) ++# @handler_results[:delete].should include([@tmp_dir, 'root/yawn', :directory]) ++# @handler_results[:update].should include([@tmp_dir, 'root', :directory]) ++# end ++# ++# it "should call create, update, and delete callbacks upon directory moving to another directory" do ++# run_monitor(3, :directories => true) do ++# FileUtils.mv @tmp_dir + "/root/yawn", @tmp_dir + "/old_yawn" ++# end ++# @handler_results[:create].should include([@tmp_dir, 'old_yawn', :directory]) ++# @handler_results[:delete].should include([@tmp_dir, 'root/yawn', :directory]) ++# @handler_results[:update].should include([@tmp_dir, 'root', :directory]) ++# end ++# ++# it "should call create, update, and delete callbacks upon file renaming in the same directory" do ++# run_monitor(3, :directories => true) do ++# FileUtils.mv @tmp_dir + "/root/file.rb", @tmp_dir + "/root/old_file.rb" ++# end ++# @handler_results[:create].should include([@tmp_dir, 'root/old_file.rb', :file]) ++# @handler_results[:delete].should include([@tmp_dir, 'root/file.rb', :file]) ++# @handler_results[:update].should include([@tmp_dir, 'root', :directory]) ++# end ++# ++# it "should call create, update, and delete callbacks upon file moving to another directory" do ++# run_monitor(3, :directories => true) do ++# FileUtils.mv @tmp_dir + "/root/file.rb", @tmp_dir + "/old_file.rb" ++# end ++# @handler_results[:create].should include([@tmp_dir, 'old_file.rb', :file]) ++# @handler_results[:delete].should include([@tmp_dir, 'root/file.rb', :file]) ++# @handler_results[:update].should include([@tmp_dir, 'root', :directory]) ++# end ++# ++# it "should call delete callbacks upon directory structure deletion" do ++# expected_delete_events = [ ++# [@tmp_dir, 'root/yawn', :directory], ++# [@tmp_dir, 'root/moo/cow.txt', :file], ++# [@tmp_dir, 'root/moo', :directory], ++# [@tmp_dir, 'root/file.yml', :file], ++# [@tmp_dir, 'root/file.rb', :file], ++# [@tmp_dir, 'root/file.css', :file], ++# [@tmp_dir, 'root/duck/quack.txt', :file], ++# [@tmp_dir, 'root/duck', :directory], ++# [@tmp_dir, 'root', :directory] ++# ] ++# run_monitor(expected_delete_events.size, :directories => true) do ++# FileUtils.rm_rf @tmp_dir + '/.' ++# end ++# @handler_results[:create].should == [] ++# @handler_results[:delete].should intersect_with(expected_delete_events) ++# @handler_results[:update].should == [] ++# end ++# ++# it "should call create callbacks upon directory structure creation" do ++# expected_create_events = [ ++# [@tmp_dir, 'new_root', :directory], ++# [@tmp_dir, 'new_root/duck', :directory], ++# [@tmp_dir, 'new_root/duck/quack.txt', :file], ++# [@tmp_dir, 'new_root/file.css', :file], ++# [@tmp_dir, 'new_root/file.rb', :file], ++# [@tmp_dir, 'new_root/file.yml', :file], ++# [@tmp_dir, 'new_root/moo', :directory], ++# [@tmp_dir, 'new_root/moo/cow.txt', :file], ++# [@tmp_dir, 'new_root/yawn', :directory] ++# ] ++# run_monitor(expected_create_events.size, :directories => true) do ++# FileUtils.cp_r @tmp_dir + '/root/.', @tmp_dir + '/new_root' ++# end ++# @handler_results[:create].should intersect_with(expected_create_events) ++# @handler_results[:delete].should == [] ++# @handler_results[:update].should == [] ++# end + end + end + end diff --git a/dev-ruby/fssm/fssm-0.2.7-r1.ebuild b/dev-ruby/fssm/fssm-0.2.7-r1.ebuild new file mode 100644 index 000000000000..162a62a5effc --- /dev/null +++ b/dev-ruby/fssm/fssm-0.2.7-r1.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/fssm/fssm-0.2.7-r1.ebuild,v 1.1 2011/08/14 07:23:25 graaff Exp $ + +EAPI=4 + +USE_RUBY="ruby18 ree18 jruby" + +RUBY_FAKEGEM_TASK_TEST="spec" + +RUBY_FAKEGEM_TASK_DOC="" +RUBY_FAKEGEM_EXTRADOC="README.markdown" + +inherit ruby-fakegem + +DESCRIPTION="Monitor API" +HOMEPAGE="http://github.com/ttilley/fssm" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +# rb-inotify is a Linux-specific extension, so we will need to make this +# conditional when keywords are added that are not linux-specific. +ruby_add_rdepend ">=dev-ruby/rb-inotify-0.8.6-r1" + +ruby_add_bdepend "test? ( >=dev-ruby/rspec-2.4.0:2 )" + +all_ruby_prepare() { + # Remove bundler support + sed -i -e '/[Bb]undler/d' Rakefile spec/spec_helper.rb || die + rm Gemfile || die + + # Fix/ignore broken specs with patch from upstream + epatch "${FILESDIR}/${P}-test.patch" +} + +all_ruby_install() { + all_fakegem_install + + dodoc example.rb +} |