guard 1.0.3 → 1.1.0.alpha

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. data/CHANGELOG.md +0 -6
  2. data/README.md +38 -30
  3. data/lib/guard.rb +158 -285
  4. data/lib/guard/cli.rb +16 -2
  5. data/lib/guard/dsl.rb +41 -20
  6. data/lib/guard/dsl_describer.rb +1 -1
  7. data/lib/guard/group.rb +1 -1
  8. data/lib/guard/guard.rb +39 -5
  9. data/lib/guard/guardfile.rb +70 -0
  10. data/lib/guard/runner.rb +179 -0
  11. data/lib/guard/ui.rb +1 -1
  12. data/lib/guard/version.rb +2 -4
  13. data/lib/guard/watcher.rb +1 -0
  14. metadata +16 -77
  15. data/bin/fsevent_watch_guard_guard +0 -0
  16. data/lib/guard/listener.rb +0 -376
  17. data/lib/guard/listeners/darwin.rb +0 -62
  18. data/lib/guard/listeners/linux.rb +0 -93
  19. data/lib/guard/listeners/polling.rb +0 -55
  20. data/lib/guard/listeners/windows.rb +0 -63
  21. data/lib/vendor/darwin/Gemfile +0 -6
  22. data/lib/vendor/darwin/Guardfile +0 -8
  23. data/lib/vendor/darwin/LICENSE +0 -20
  24. data/lib/vendor/darwin/README.rdoc +0 -255
  25. data/lib/vendor/darwin/Rakefile +0 -21
  26. data/lib/vendor/darwin/bin/fsevent_watch +0 -0
  27. data/lib/vendor/darwin/ext/fsevent_watch/Info.plist +0 -38
  28. data/lib/vendor/darwin/ext/fsevent_watch/LICENSE +0 -21
  29. data/lib/vendor/darwin/ext/fsevent_watch/fsevent_watch.xcodeproj/project.pbxproj +0 -254
  30. data/lib/vendor/darwin/ext/fsevent_watch/fsevent_watch/TSICTString.c +0 -394
  31. data/lib/vendor/darwin/ext/fsevent_watch/fsevent_watch/TSICTString.h +0 -74
  32. data/lib/vendor/darwin/ext/fsevent_watch/fsevent_watch/cli.c +0 -160
  33. data/lib/vendor/darwin/ext/fsevent_watch/fsevent_watch/cli.h +0 -45
  34. data/lib/vendor/darwin/ext/fsevent_watch/fsevent_watch/common.h +0 -34
  35. data/lib/vendor/darwin/ext/fsevent_watch/fsevent_watch/compat.c +0 -20
  36. data/lib/vendor/darwin/ext/fsevent_watch/fsevent_watch/compat.h +0 -40
  37. data/lib/vendor/darwin/ext/fsevent_watch/fsevent_watch/main.c +0 -509
  38. data/lib/vendor/darwin/ext/fsevent_watch/xcconfig/Common.xcconfig +0 -82
  39. data/lib/vendor/darwin/ext/fsevent_watch/xcconfig/Debug.xcconfig +0 -19
  40. data/lib/vendor/darwin/ext/fsevent_watch/xcconfig/Release.xcconfig +0 -23
  41. data/lib/vendor/darwin/ext/fsevent_watch/xcconfig/fsevent_watch.xcconfig +0 -17
  42. data/lib/vendor/darwin/ext/rakefile.rb +0 -47
  43. data/lib/vendor/darwin/ext/rb-fsevent.xcconfig +0 -33
  44. data/lib/vendor/darwin/lib/rb-fsevent.rb +0 -2
  45. data/lib/vendor/darwin/lib/rb-fsevent/fsevent.rb +0 -111
  46. data/lib/vendor/darwin/lib/rb-fsevent/version.rb +0 -3
  47. data/lib/vendor/darwin/rb-fsevent.gemspec +0 -25
  48. data/lib/vendor/darwin/spec/fixtures/folder1/file1.txt +0 -0
  49. data/lib/vendor/darwin/spec/fixtures/folder1/folder2/file2.txt +0 -0
  50. data/lib/vendor/darwin/spec/rb-fsevent/fsevent_spec.rb +0 -88
  51. data/lib/vendor/darwin/spec/spec_helper.rb +0 -23
  52. data/lib/vendor/linux/MIT-LICENSE +0 -20
  53. data/lib/vendor/linux/README.md +0 -66
  54. data/lib/vendor/linux/Rakefile +0 -54
  55. data/lib/vendor/linux/VERSION +0 -1
  56. data/lib/vendor/linux/lib/rb-inotify.rb +0 -17
  57. data/lib/vendor/linux/lib/rb-inotify/event.rb +0 -139
  58. data/lib/vendor/linux/lib/rb-inotify/native.rb +0 -31
  59. data/lib/vendor/linux/lib/rb-inotify/native/flags.rb +0 -89
  60. data/lib/vendor/linux/lib/rb-inotify/notifier.rb +0 -308
  61. data/lib/vendor/linux/lib/rb-inotify/watcher.rb +0 -83
  62. data/lib/vendor/linux/rb-inotify.gemspec +0 -53
  63. data/lib/vendor/windows/Gemfile +0 -4
  64. data/lib/vendor/windows/README.md +0 -34
  65. data/lib/vendor/windows/Rakefile +0 -18
  66. data/lib/vendor/windows/lib/rb-fchange.rb +0 -14
  67. data/lib/vendor/windows/lib/rb-fchange/event.rb +0 -29
  68. data/lib/vendor/windows/lib/rb-fchange/native.rb +0 -45
  69. data/lib/vendor/windows/lib/rb-fchange/native/flags.rb +0 -78
  70. data/lib/vendor/windows/lib/rb-fchange/notifier.rb +0 -149
  71. data/lib/vendor/windows/lib/rb-fchange/version.rb +0 -3
  72. data/lib/vendor/windows/lib/rb-fchange/watcher.rb +0 -99
  73. data/lib/vendor/windows/rb-fchange.gemspec +0 -34
  74. data/lib/vendor/windows/spec/fixtures/folder1/file1.txt +0 -0
  75. data/lib/vendor/windows/spec/fixtures/folder1/folder2/file2.txt +0 -0
  76. data/lib/vendor/windows/spec/rb-fchange/fchange_spec.rb +0 -119
  77. data/lib/vendor/windows/spec/spec_helper.rb +0 -21
@@ -1,34 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "rb-fchange/version"
4
-
5
- Gem::Specification.new do |s|
6
- s.name = %q{rb-fchange}
7
- s.version = FChange::VERSION
8
- s.platform = Gem::Platform::RUBY
9
- s.authors = ["stereobooster"]
10
- s.date = %q{2011-05-15}
11
- s.description = %q{A Ruby wrapper for Windows Kernel functions for monitoring the specified directory or subtree}
12
- s.email = ["stereobooster@gmail.com"]
13
- s.extra_rdoc_files = [
14
- "README.md"
15
- ]
16
- s.files = [
17
- "README.md",
18
- "Rakefile",
19
- "lib/rb-fchange.rb",
20
- "lib/rb-fchange/event.rb",
21
- "lib/rb-fchange/native.rb",
22
- "lib/rb-fchange/native/flags.rb",
23
- "lib/rb-fchange/notifier.rb",
24
- "lib/rb-fchange/watcher.rb",
25
- "rb-fchange.gemspec"
26
- ]
27
- s.homepage = %q{http://github.com/stereobooster/rb-fchange}
28
- s.require_paths = ["lib"]
29
- s.rubygems_version = %q{1.3.7}
30
- s.summary = %q{A Ruby wrapper for Windows Kernel functions for monitoring the specified directory or subtree}
31
- s.add_dependency 'ffi'
32
- s.add_development_dependency 'bundler'
33
- s.add_development_dependency 'rspec'
34
- end
File without changes
@@ -1,119 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- require 'spec_helper'
3
-
4
- describe FChange do
5
-
6
- before(:each) do
7
- @results = []
8
- @notifier = FChange::Notifier.new
9
- @notifier.watch(@fixture_path.to_s) do |event|
10
- @results += [event.watcher.path]
11
- end
12
- end
13
-
14
- it "should work with path with an apostrophe" do
15
- custom_path = @fixture_path.join("custom 'path")
16
- file = custom_path.join("newfile.rb").to_s
17
- File.delete file if File.exists? file
18
- run
19
- FileUtils.touch file
20
- stop
21
- File.delete file
22
- @results.should == [@fixture_path.to_s, @fixture_path.to_s]
23
- end
24
-
25
- it "should catch new file" do
26
- file = @fixture_path.join("newfile.rb")
27
- File.delete file if File.exists? file
28
- run
29
- FileUtils.touch file
30
- stop
31
- File.delete file
32
- @results.should == [@fixture_path.to_s]
33
- end
34
-
35
- it "should catch file update" do
36
- file = @fixture_path.join("folder1/file1.txt")
37
- File.exists?(file).should be_true
38
- run
39
- FileUtils.touch file
40
- stop
41
- @results.should == [@fixture_path.to_s]
42
- end
43
-
44
- it "should catch files update" do
45
- file1 = @fixture_path.join("folder1/file1.txt")
46
- file2 = @fixture_path.join("folder1/folder2/file2.txt")
47
- File.exists?(file1).should be_true
48
- File.exists?(file2).should be_true
49
- run
50
- FileUtils.touch file1
51
- FileUtils.touch file2
52
- stop
53
- @results.should == [@fixture_path.to_s, @fixture_path.to_s]
54
- end
55
-
56
- it "should catch new directory" do
57
- dir = @fixture_path.join("new_dir")
58
- Dir.delete dir if Dir.exists? dir
59
- Dir.exists?(dir).should be_false
60
- run
61
- Dir.mkdir dir
62
- stop
63
- Dir.delete dir
64
- @results.should == [@fixture_path.to_s]
65
- end
66
-
67
- it "should catch directory rename" do
68
- dir = @fixture_path.join("new_dir")
69
- dir_new = @fixture_path.join("new_dir1")
70
- Dir.mkdir dir unless Dir.exists? dir
71
- Dir.delete dir_new if Dir.exists? dir_new
72
- run
73
- File.rename(dir, dir_new)
74
- stop
75
- Dir.delete(dir_new)
76
- @results.should == [@fixture_path.to_s, @fixture_path.to_s]
77
- end
78
-
79
- it "should catch file rename" do
80
- file = @fixture_path.join("folder1/file1.txt")
81
- file_new = @fixture_path.join("folder1/file3.txt")
82
- File.exists?(file).should be_true
83
- File.exists?(file_new).should be_false
84
- run
85
- File.rename(file, file_new)
86
- stop
87
- File.rename(file_new, file)
88
- @results.should == [@fixture_path.to_s, @fixture_path.to_s]
89
- end
90
-
91
- # it "should work with none-ANSI path" do
92
- # dir = @fixture_path.join("../тест")
93
- # Dir.mkdir dir unless Dir.exists? dir
94
- # file = dir.join("тест");
95
- # File.delete file if File.exists? file
96
- # File.exists?(file).should be_false
97
- # @notifier.watch(dir.to_s, :all_events, :recursive) do |event|
98
- # @results += [event.watcher.path]
99
- # end
100
- # run
101
- # FileUtils.touch file
102
- # stop
103
- # File.delete file
104
- # Dir.delete dir
105
- # @results.should == [@fixture_path.to_s, @fixture_path.to_s]
106
- # end
107
-
108
- def run
109
- sleep 0.6
110
- Thread.new { @notifier.run }
111
- sleep 0.6
112
- end
113
-
114
- def stop
115
- sleep 0.6
116
- @notifier.stop
117
- end
118
-
119
- end
@@ -1,21 +0,0 @@
1
- require 'rspec'
2
- require 'rb-fchange'
3
-
4
- RSpec.configure do |config|
5
- # config.color_enabled = true
6
- config.filter_run :focus => true
7
- config.run_all_when_everything_filtered = true
8
-
9
- config.before(:each) do
10
- @fixture_path = Pathname.new(File.expand_path('../fixtures/', __FILE__))
11
- end
12
-
13
- config.before(:all) do
14
-
15
- end
16
-
17
- config.after(:all) do
18
- gem_root = Pathname.new(File.expand_path('../../', __FILE__))
19
- end
20
-
21
- end