haml-edge 2.3.199 → 2.3.200

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. data/EDGE_GEM_VERSION +1 -1
  2. data/VERSION +1 -1
  3. data/lib/haml/helpers/action_view_mods.rb +2 -3
  4. data/lib/haml/helpers.rb +1 -1
  5. data/lib/sass/environment.rb +1 -1
  6. data/lib/sass/script/lexer.rb +1 -1
  7. data/lib/sass.rb +1 -1
  8. metadata +1 -36
  9. data/test/haml/spec/README.md +0 -97
  10. data/test/haml/spec/lua_haml_spec.lua +0 -30
  11. data/test/haml/spec/ruby_haml_test.rb +0 -19
  12. data/test/haml/spec/tests.json +0 -534
  13. data/vendor/fssm/LICENSE +0 -20
  14. data/vendor/fssm/README.markdown +0 -55
  15. data/vendor/fssm/Rakefile +0 -59
  16. data/vendor/fssm/VERSION.yml +0 -5
  17. data/vendor/fssm/example.rb +0 -9
  18. data/vendor/fssm/fssm.gemspec +0 -77
  19. data/vendor/fssm/lib/fssm/backends/fsevents.rb +0 -36
  20. data/vendor/fssm/lib/fssm/backends/inotify.rb +0 -26
  21. data/vendor/fssm/lib/fssm/backends/polling.rb +0 -25
  22. data/vendor/fssm/lib/fssm/backends/rubycocoa/fsevents.rb +0 -131
  23. data/vendor/fssm/lib/fssm/monitor.rb +0 -26
  24. data/vendor/fssm/lib/fssm/path.rb +0 -91
  25. data/vendor/fssm/lib/fssm/pathname.rb +0 -502
  26. data/vendor/fssm/lib/fssm/state/directory.rb +0 -57
  27. data/vendor/fssm/lib/fssm/state/file.rb +0 -24
  28. data/vendor/fssm/lib/fssm/support.rb +0 -63
  29. data/vendor/fssm/lib/fssm/tree.rb +0 -176
  30. data/vendor/fssm/lib/fssm.rb +0 -33
  31. data/vendor/fssm/profile/prof-cache.rb +0 -40
  32. data/vendor/fssm/profile/prof-fssm-pathname.html +0 -1231
  33. data/vendor/fssm/profile/prof-pathname.rb +0 -68
  34. data/vendor/fssm/profile/prof-plain-pathname.html +0 -988
  35. data/vendor/fssm/profile/prof.html +0 -2379
  36. data/vendor/fssm/spec/path_spec.rb +0 -75
  37. data/vendor/fssm/spec/root/duck/quack.txt +0 -0
  38. data/vendor/fssm/spec/root/file.css +0 -0
  39. data/vendor/fssm/spec/root/file.rb +0 -0
  40. data/vendor/fssm/spec/root/file.yml +0 -0
  41. data/vendor/fssm/spec/root/moo/cow.txt +0 -0
  42. data/vendor/fssm/spec/spec_helper.rb +0 -14
data/EDGE_GEM_VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.199
1
+ 2.3.200
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.199
1
+ 2.3.200
@@ -125,9 +125,8 @@ module ActionView
125
125
  @template_object.send :is_haml?
126
126
  end
127
127
 
128
- unless defined?(ActionView::Helpers) && defined?(ActionView::Helpers::ActiveRecordInstanceTag)
129
- alias_method :content_tag_without_haml, :content_tag
130
- alias_method :content_tag, :content_tag_with_haml
128
+ def content_tag(*args)
129
+ content_tag_with_haml(*args)
131
130
  end
132
131
  end
133
132
 
data/lib/haml/helpers.rb CHANGED
@@ -513,7 +513,7 @@ MESSAGE
513
513
  # @param text [String] The string to sanitize
514
514
  # @return [String] The sanitized string
515
515
  def html_escape(text)
516
- text.to_s.gsub(/[\"><&]/n) {|s| HTML_ESCAPE[s]}
516
+ Haml::Util.silence_warnings {text.to_s.gsub(/[\"><&]/n) {|s| HTML_ESCAPE[s]}}
517
517
  end
518
518
 
519
519
  # Escapes HTML entities in `text`, but without escaping an ampersand
@@ -76,7 +76,7 @@ module Sass
76
76
  # The last element in the list is the most deeply-nested frame.
77
77
  #
78
78
  # @return [Array<{Symbol => Object}>] The stack frames,
79
- # of the form passed to \{#push}.
79
+ # of the form passed to \{#push\_frame}.
80
80
  def stack
81
81
  @stack ||= @parent.stack
82
82
  end
@@ -111,7 +111,7 @@ module Sass
111
111
 
112
112
  # A hash of regular expressions that are used for tokenizing strings.
113
113
  #
114
- # The key is a [Symbol, Boolean] pair.
114
+ # The key is a `[Symbol, Boolean]` pair.
115
115
  # The symbol represents which style of quotation to use,
116
116
  # while the boolean represents whether or not the string
117
117
  # is following an interpolated segment.
data/lib/sass.rb CHANGED
@@ -15,7 +15,7 @@ module Sass
15
15
  extend Haml::Version
16
16
 
17
17
  # A string representing the version of Sass.
18
- # A more fine-grained representation is available from {Sass.version}.
18
+ # A more fine-grained representation is available from {Haml::Version#version Sass.version}.
19
19
  VERSION = version[:string] unless defined?(Sass::VERSION)
20
20
  end
21
21
 
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.199
4
+ version: 2.3.200
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Weizenbaum
@@ -126,36 +126,6 @@ files:
126
126
  - lib/sass/scss/rx.rb
127
127
  - lib/sass/scss/script_lexer.rb
128
128
  - lib/sass/scss/script_parser.rb
129
- - vendor/fssm/LICENSE
130
- - vendor/fssm/README.markdown
131
- - vendor/fssm/Rakefile
132
- - vendor/fssm/VERSION.yml
133
- - vendor/fssm/example.rb
134
- - vendor/fssm/fssm.gemspec
135
- - vendor/fssm/lib/fssm.rb
136
- - vendor/fssm/lib/fssm/backends/fsevents.rb
137
- - vendor/fssm/lib/fssm/backends/inotify.rb
138
- - vendor/fssm/lib/fssm/backends/polling.rb
139
- - vendor/fssm/lib/fssm/backends/rubycocoa/fsevents.rb
140
- - vendor/fssm/lib/fssm/monitor.rb
141
- - vendor/fssm/lib/fssm/path.rb
142
- - vendor/fssm/lib/fssm/pathname.rb
143
- - vendor/fssm/lib/fssm/state/directory.rb
144
- - vendor/fssm/lib/fssm/state/file.rb
145
- - vendor/fssm/lib/fssm/support.rb
146
- - vendor/fssm/lib/fssm/tree.rb
147
- - vendor/fssm/profile/prof-cache.rb
148
- - vendor/fssm/profile/prof-fssm-pathname.html
149
- - vendor/fssm/profile/prof-pathname.rb
150
- - vendor/fssm/profile/prof-plain-pathname.html
151
- - vendor/fssm/profile/prof.html
152
- - vendor/fssm/spec/path_spec.rb
153
- - vendor/fssm/spec/root/duck/quack.txt
154
- - vendor/fssm/spec/root/file.css
155
- - vendor/fssm/spec/root/file.rb
156
- - vendor/fssm/spec/root/file.yml
157
- - vendor/fssm/spec/root/moo/cow.txt
158
- - vendor/fssm/spec/spec_helper.rb
159
129
  - bin/css2sass
160
130
  - bin/haml
161
131
  - bin/html2haml
@@ -190,10 +160,6 @@ files:
190
160
  - test/haml/results/tag_parsing.xhtml
191
161
  - test/haml/results/very_basic.xhtml
192
162
  - test/haml/results/whitespace_handling.xhtml
193
- - test/haml/spec/README.md
194
- - test/haml/spec/lua_haml_spec.lua
195
- - test/haml/spec/ruby_haml_test.rb
196
- - test/haml/spec/tests.json
197
163
  - test/haml/template_test.rb
198
164
  - test/haml/util_test.rb
199
165
  - test/haml/templates/_av_partial_1.haml
@@ -356,7 +322,6 @@ test_files:
356
322
  - test/haml/engine_test.rb
357
323
  - test/haml/helper_test.rb
358
324
  - test/haml/html2haml_test.rb
359
- - test/haml/spec/ruby_haml_test.rb
360
325
  - test/haml/template_test.rb
361
326
  - test/haml/util_test.rb
362
327
  - test/haml/spec_test.rb
@@ -1,97 +0,0 @@
1
- # Haml Spec #
2
-
3
- Haml Spec provides a basic suite of tests for Haml interpreters.
4
-
5
- It is intented for developers who are creating or maintaining an implementation
6
- of the [Haml](http://haml-lang.com) markup language.
7
-
8
- At the moment, there are test runners for the [original Haml](http://github.com/nex3/haml)
9
- in Ruby, and for [Lua Haml](http://github.com/norman/lua-haml). Support for
10
- other versions of Haml will be added if their developers/maintainers
11
- are interested in using it.
12
-
13
- ## The Tests ##
14
-
15
- The tests are kept in JSON format for portability across languages. Each test
16
- is a JSON object with expected input, output, local variables and configuration
17
- parameters (see below). The test suite only provides tests for features which
18
- are portable, therefore no tests for script are provided, nor for external
19
- filters such as :markdown or :textile.
20
-
21
- The one major exception to this are the tests for interpolation, which you may
22
- need to modify with a regular expression to run under PHP or Perl, which
23
- require a symbol before variable names. These tests are included despite being
24
- less than 100% portable because interpolation is an important part of Haml and
25
- can be tricky to implement.
26
-
27
- ## Running the Tests ##
28
-
29
- ### Ruby ###
30
-
31
- In order to make it as easy as possible for non-Ruby programmers to run the
32
- Ruby Haml tests, the Ruby test runner uses test/unit, rather than something
33
- fancier like Rspec. To run them you probably only need to install `haml`, and
34
- possibly `ruby` if your platform doesn't come with it by default. If you're
35
- using Ruby 1.8.x, you'll also need to install `json`:
36
-
37
- sudo gem install haml
38
- # for Ruby 1.8.x; check using "ruby --version" if unsure
39
- sudo gem install json
40
-
41
- Then, running the Ruby test suite is easy:
42
-
43
- ruby ruby_haml_test.rb
44
-
45
- ### Lua ###
46
-
47
- The Lua test depends on [Telescope](http://telescope.luaforge.net/),
48
- [jason4lua](http://json.luaforge.net/), and
49
- [Lua Haml](http://github.com/norman/lua-haml). Install and
50
- run `tsc lua_haml_spec.lua`.
51
-
52
- ## Contributing ##
53
-
54
- ### Getting it ###
55
-
56
- You can access the [Git repository](http://github.com/norman/haml-spec) at:
57
-
58
- git://github.com/norman/haml-spec.git
59
-
60
- Patches are *very* welcome, as are test runners for your Haml implementation.
61
-
62
- As long as any test you add run against Ruby Haml and are not redundant, I'll
63
- be very happy to add them.
64
-
65
- ### Test JSON format ###
66
-
67
- "test name" : {
68
- "haml" : "haml input",
69
- "html" : "expected html output",
70
- "result" : "expected test result",
71
- "locals" : "local vars",
72
- "config" : "config params"
73
- }
74
-
75
- * test name: This should be a *very* brief description of what's being tested. It can
76
- be used by the test runners to name test methods, or to exclude certain tests from being
77
- run.
78
- * haml: The Haml code to be evaluated. Always required.
79
- * html: The HTML output that should be generated. Required unless "result" is "error".
80
- * result: Can be "pass" or "error". If it's absent, then "pass" is assumed. If it's "error",
81
- then the goal of the test is to make sure that malformed Haml code generates an error.
82
- * locals: An object containing local variables needed for the test.
83
- * config: An object containing configuration parameters used to run the test.
84
- The configuration parameters should be usable directly by Ruby's Haml with no
85
- modification. If your implementation uses config parameters with different
86
- names, you may need to process them to make them match your implementation.
87
- If your implementation has options that do not exist in Ruby's Haml, then you
88
- should add tests for this in your implementation's test rather than here.
89
-
90
- ## License ##
91
-
92
- This project is released under the [WTFPL](http://sam.zoy.org/wtfpl/) in order
93
- to be as usable as possible in any project, commercial or free.
94
-
95
- ## Author ##
96
-
97
- [Norman Clarke](mailto:norman@njclarke.com)
@@ -1,30 +0,0 @@
1
- require 'luarocks.require'
2
- require 'json'
3
- require 'telescope'
4
- require 'haml'
5
-
6
- local function get_tests(filename)
7
- local self = debug.getinfo(1).short_src
8
- if self:match("/") then return "./" .. self:gsub("[^/]*%.lua$", "/" .. filename)
9
- elseif self:match("\\") then return self:gsub("[^\\]*%.lua$", "\\" .. filename)
10
- else return filename
11
- end
12
- end
13
-
14
- local fh = assert(io.open(get_tests("tests.json")))
15
- local input = fh:read '*a'
16
- fh:close()
17
-
18
- local contexts = json.decode(input)
19
-
20
- describe("LuaHaml", function()
21
- for context, expectations in pairs(contexts) do
22
- describe("When handling " .. context, function()
23
- for name, exp in pairs(expectations) do
24
- it(string.format("should correctly render %s", name), function()
25
- assert_equal(haml.render(exp.haml, exp.config or {}, exp.locals or {}), exp.html)
26
- end)
27
- end
28
- end)
29
- end
30
- end)
@@ -1,19 +0,0 @@
1
- require "test/unit"
2
- require "json"
3
- require "haml"
4
-
5
- class HamlTest < Test::Unit::TestCase
6
- contexts = JSON.parse(File.read(File.dirname(__FILE__) + "/tests.json"))
7
- contexts.each do |context|
8
- context[1].each do |name, test|
9
- class_eval(<<-EOTEST)
10
- def test_#{name.gsub(/\s+|[^a-zA-Z0-9_]/, "_")}
11
- locals = Hash[*(#{test}["locals"] || {}).collect {|k, v| [k.to_sym, v] }.flatten]
12
- options = Hash[*(#{test}["config"] || {}).collect {|k, v| [k.to_sym, v.to_sym] }.flatten]
13
- engine = Haml::Engine.new(#{test}["haml"], options)
14
- assert_equal(engine.render(Object.new, locals).chomp, #{test}["html"])
15
- end
16
- EOTEST
17
- end
18
- end
19
- end