haml-edge 2.3.165 → 2.3.166
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/EDGE_GEM_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/haml/helpers/action_view_mods.rb +5 -1
- data/test/haml/spec/README.md +97 -0
- data/test/haml/spec/lua_haml_spec.lua +30 -0
- data/test/haml/spec/ruby_haml_test.rb +19 -0
- data/test/haml/spec/tests.json +534 -0
- data/test/haml/template_test.rb +18 -0
- data/vendor/fssm/LICENSE +20 -0
- data/vendor/fssm/README.markdown +55 -0
- data/vendor/fssm/Rakefile +59 -0
- data/vendor/fssm/VERSION.yml +5 -0
- data/vendor/fssm/example.rb +9 -0
- data/vendor/fssm/fssm.gemspec +77 -0
- data/vendor/fssm/lib/fssm/backends/fsevents.rb +36 -0
- data/vendor/fssm/lib/fssm/backends/inotify.rb +26 -0
- data/vendor/fssm/lib/fssm/backends/polling.rb +25 -0
- data/vendor/fssm/lib/fssm/backends/rubycocoa/fsevents.rb +131 -0
- data/vendor/fssm/lib/fssm/monitor.rb +26 -0
- data/vendor/fssm/lib/fssm/path.rb +91 -0
- data/vendor/fssm/lib/fssm/pathname.rb +502 -0
- data/vendor/fssm/lib/fssm/state/directory.rb +57 -0
- data/vendor/fssm/lib/fssm/state/file.rb +24 -0
- data/vendor/fssm/lib/fssm/support.rb +63 -0
- data/vendor/fssm/lib/fssm/tree.rb +176 -0
- data/vendor/fssm/lib/fssm.rb +33 -0
- data/vendor/fssm/profile/prof-cache.rb +40 -0
- data/vendor/fssm/profile/prof-fssm-pathname.html +1231 -0
- data/vendor/fssm/profile/prof-pathname.rb +68 -0
- data/vendor/fssm/profile/prof-plain-pathname.html +988 -0
- data/vendor/fssm/profile/prof.html +2379 -0
- data/vendor/fssm/spec/path_spec.rb +75 -0
- data/vendor/fssm/spec/root/duck/quack.txt +0 -0
- data/vendor/fssm/spec/root/file.css +0 -0
- data/vendor/fssm/spec/root/file.rb +0 -0
- data/vendor/fssm/spec/root/file.yml +0 -0
- data/vendor/fssm/spec/root/moo/cow.txt +0 -0
- data/vendor/fssm/spec/spec_helper.rb +14 -0
- metadata +36 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
|
2
|
+
|
|
3
|
+
describe "The File System State Monitor" do
|
|
4
|
+
describe "paths" do
|
|
5
|
+
it "should accept a valid filesystem directory" do
|
|
6
|
+
lambda {FSSM::Path.new("#{@watch_root}")}.should_not raise_error
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
it "should not accept an invalid filesystem directory" do
|
|
10
|
+
lambda {FSSM::Path.new('/does/not/exist/kthxbye')}.should raise_error
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
it "should default the path to the current directory" do
|
|
14
|
+
path = FSSM::Path.new
|
|
15
|
+
here = Pathname.new('.').realpath
|
|
16
|
+
|
|
17
|
+
"#{here}".should == "#{path}"
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
it "should accept an optional glob array parameter" do
|
|
21
|
+
path = FSSM::Path.new('.', ['**/*.yml'])
|
|
22
|
+
path.glob.should == ['**/*.yml']
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
it "should accept an optional glob string parameter" do
|
|
26
|
+
path = FSSM::Path.new('.', '**/*.yml')
|
|
27
|
+
path.glob.should == ['**/*.yml']
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
it "should default the glob to ['**/*']" do
|
|
31
|
+
path = FSSM::Path.new
|
|
32
|
+
path.glob.should == ['**/*']
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
it "should accept a callback for update events" do
|
|
36
|
+
path = FSSM::Path.new
|
|
37
|
+
callback = lambda {|base, relative| return true}
|
|
38
|
+
path.update(callback)
|
|
39
|
+
(path.update).should == callback
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
it "should accept a callback for delete events" do
|
|
43
|
+
path = FSSM::Path.new
|
|
44
|
+
callback = lambda {|base, relative| return true}
|
|
45
|
+
path.delete(callback)
|
|
46
|
+
(path.delete).should == callback
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
it "should accept a callback for create events" do
|
|
50
|
+
path = FSSM::Path.new
|
|
51
|
+
callback = lambda {|base, relative| return true}
|
|
52
|
+
path.create(callback)
|
|
53
|
+
(path.create).should == callback
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
it "should accept a configuration block" do
|
|
57
|
+
path = FSSM::Path.new "#{@watch_root}" do
|
|
58
|
+
glob '**/*.yml'
|
|
59
|
+
update {|base, relative| 'success'}
|
|
60
|
+
delete {|base, relative| 'success'}
|
|
61
|
+
create {|base, relative| 'success'}
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
"#{path}".should == "#{@watch_root}"
|
|
65
|
+
path.glob.should == ['**/*.yml']
|
|
66
|
+
path.update.should be_a_kind_of(Proc)
|
|
67
|
+
path.delete.should be_a_kind_of(Proc)
|
|
68
|
+
path.create.should be_a_kind_of(Proc)
|
|
69
|
+
path.update.call('', '').should == 'success'
|
|
70
|
+
path.delete.call('', '').should == 'success'
|
|
71
|
+
path.create.call('', '').should == 'success'
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
end
|
|
75
|
+
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
|
2
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|
3
|
+
|
|
4
|
+
require 'pathname'
|
|
5
|
+
require 'fssm'
|
|
6
|
+
|
|
7
|
+
require 'spec'
|
|
8
|
+
require 'spec/autorun'
|
|
9
|
+
|
|
10
|
+
Spec::Runner.configure do |config|
|
|
11
|
+
config.before :all do
|
|
12
|
+
@watch_root = Pathname.new(__FILE__).dirname.join('root').expand_path
|
|
13
|
+
end
|
|
14
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: haml-edge
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.3.
|
|
4
|
+
version: 2.3.166
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nathan Weizenbaum
|
|
@@ -111,6 +111,36 @@ files:
|
|
|
111
111
|
- lib/sass/tree/root_node.rb
|
|
112
112
|
- lib/sass/tree/variable_node.rb
|
|
113
113
|
- lib/sass/tree/while_node.rb
|
|
114
|
+
- vendor/fssm/LICENSE
|
|
115
|
+
- vendor/fssm/README.markdown
|
|
116
|
+
- vendor/fssm/Rakefile
|
|
117
|
+
- vendor/fssm/VERSION.yml
|
|
118
|
+
- vendor/fssm/example.rb
|
|
119
|
+
- vendor/fssm/fssm.gemspec
|
|
120
|
+
- vendor/fssm/lib/fssm.rb
|
|
121
|
+
- vendor/fssm/lib/fssm/backends/fsevents.rb
|
|
122
|
+
- vendor/fssm/lib/fssm/backends/inotify.rb
|
|
123
|
+
- vendor/fssm/lib/fssm/backends/polling.rb
|
|
124
|
+
- vendor/fssm/lib/fssm/backends/rubycocoa/fsevents.rb
|
|
125
|
+
- vendor/fssm/lib/fssm/monitor.rb
|
|
126
|
+
- vendor/fssm/lib/fssm/path.rb
|
|
127
|
+
- vendor/fssm/lib/fssm/pathname.rb
|
|
128
|
+
- vendor/fssm/lib/fssm/state/directory.rb
|
|
129
|
+
- vendor/fssm/lib/fssm/state/file.rb
|
|
130
|
+
- vendor/fssm/lib/fssm/support.rb
|
|
131
|
+
- vendor/fssm/lib/fssm/tree.rb
|
|
132
|
+
- vendor/fssm/profile/prof-cache.rb
|
|
133
|
+
- vendor/fssm/profile/prof-fssm-pathname.html
|
|
134
|
+
- vendor/fssm/profile/prof-pathname.rb
|
|
135
|
+
- vendor/fssm/profile/prof-plain-pathname.html
|
|
136
|
+
- vendor/fssm/profile/prof.html
|
|
137
|
+
- vendor/fssm/spec/path_spec.rb
|
|
138
|
+
- vendor/fssm/spec/root/duck/quack.txt
|
|
139
|
+
- vendor/fssm/spec/root/file.css
|
|
140
|
+
- vendor/fssm/spec/root/file.rb
|
|
141
|
+
- vendor/fssm/spec/root/file.yml
|
|
142
|
+
- vendor/fssm/spec/root/moo/cow.txt
|
|
143
|
+
- vendor/fssm/spec/spec_helper.rb
|
|
114
144
|
- bin/css2sass
|
|
115
145
|
- bin/haml
|
|
116
146
|
- bin/html2haml
|
|
@@ -144,6 +174,10 @@ files:
|
|
|
144
174
|
- test/haml/results/tag_parsing.xhtml
|
|
145
175
|
- test/haml/results/very_basic.xhtml
|
|
146
176
|
- test/haml/results/whitespace_handling.xhtml
|
|
177
|
+
- test/haml/spec/README.md
|
|
178
|
+
- test/haml/spec/lua_haml_spec.lua
|
|
179
|
+
- test/haml/spec/ruby_haml_test.rb
|
|
180
|
+
- test/haml/spec/tests.json
|
|
147
181
|
- test/haml/util_test.rb
|
|
148
182
|
- test/haml/template_test.rb
|
|
149
183
|
- test/haml/templates/_av_partial_1.haml
|
|
@@ -292,6 +326,7 @@ test_files:
|
|
|
292
326
|
- test/haml/engine_test.rb
|
|
293
327
|
- test/haml/helper_test.rb
|
|
294
328
|
- test/haml/html2haml_test.rb
|
|
329
|
+
- test/haml/spec/ruby_haml_test.rb
|
|
295
330
|
- test/haml/util_test.rb
|
|
296
331
|
- test/haml/template_test.rb
|
|
297
332
|
- test/haml/spec_test.rb
|