haml-edge 2.3.160 → 2.3.161
Sign up to get free protection for your applications and to get access to all the features.
- data/EDGE_GEM_VERSION +1 -1
- data/VERSION +1 -1
- data/extra/haml-mode.el +1 -1
- data/extra/sass-mode.el +2 -2
- 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/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,68 @@
|
|
1
|
+
$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
|
+
|
3
|
+
require 'fssm'
|
4
|
+
require 'pathname'
|
5
|
+
|
6
|
+
require 'rubygems'
|
7
|
+
require 'ruby-prof'
|
8
|
+
|
9
|
+
$test_path = "#{Pathname.new('..').expand_path}"
|
10
|
+
$iterations = 90000
|
11
|
+
|
12
|
+
class Pathname
|
13
|
+
# original segments implementation I was using with
|
14
|
+
# the plain ruby Pathname library.
|
15
|
+
def segments
|
16
|
+
prefix, names = split_names(@path)
|
17
|
+
names.unshift(prefix) unless prefix.empty?
|
18
|
+
names.shift if names[0] == '.'
|
19
|
+
names
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
core_result = Pathname.new($test_path).segments
|
24
|
+
fssm_result = FSSM::Pathname.new($test_path).segments
|
25
|
+
raise Exception, "#{core_result.inspect} != #{fssm_result.inspect}\nFSSM::Pathname is incompatible with Pathname" unless core_result == fssm_result
|
26
|
+
|
27
|
+
RubyProf.start
|
28
|
+
RubyProf.pause
|
29
|
+
|
30
|
+
$iterations.times do |num|
|
31
|
+
iteration = "%-6d" % (num + 1)
|
32
|
+
puts "FSSM::Pathname iteration #{iteration}"
|
33
|
+
|
34
|
+
RubyProf.resume
|
35
|
+
p = FSSM::Pathname.new($test_path)
|
36
|
+
segments = p.segments
|
37
|
+
RubyProf.pause
|
38
|
+
end
|
39
|
+
|
40
|
+
puts "\nFSSM Pathname profile finished\n\n"
|
41
|
+
|
42
|
+
result = RubyProf.stop
|
43
|
+
output = File.new('prof-fssm-pathname.html', 'w+')
|
44
|
+
|
45
|
+
printer = RubyProf::GraphHtmlPrinter.new(result)
|
46
|
+
printer.print(output, :min_percent => 1)
|
47
|
+
|
48
|
+
|
49
|
+
RubyProf.start
|
50
|
+
RubyProf.pause
|
51
|
+
|
52
|
+
$iterations.times do |num|
|
53
|
+
iteration = "%-6d" % (num + 1)
|
54
|
+
puts "::Pathname iteration #{iteration}"
|
55
|
+
|
56
|
+
RubyProf.resume
|
57
|
+
p = ::Pathname.new($test_path)
|
58
|
+
segments = p.segments
|
59
|
+
RubyProf.pause
|
60
|
+
end
|
61
|
+
|
62
|
+
puts "\nruby Pathname profile finished\n\n"
|
63
|
+
|
64
|
+
result = RubyProf.stop
|
65
|
+
output = File.new('prof-plain-pathname.html', 'w+')
|
66
|
+
|
67
|
+
printer = RubyProf::GraphHtmlPrinter.new(result)
|
68
|
+
printer.print(output, :min_percent => 1)
|