vanilla 1.17.4 → 1.17.5
Sign up to get free protection for your applications and to get access to all the features.
data/lib/vanilla.rb
CHANGED
data/lib/vanilla/app.rb
CHANGED
@@ -49,6 +49,7 @@ module Vanilla
|
|
49
49
|
response_format = request.format
|
50
50
|
response_format = 'plain' if response_format == 'raw'
|
51
51
|
@response['Content-Type'] = "text/#{response_format}"
|
52
|
+
output = "" if @request.method == "head"
|
52
53
|
@response.write(output)
|
53
54
|
@response.finish # returns the array
|
54
55
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# encoding: utf-8
|
1
2
|
require "parslet"
|
2
3
|
|
3
4
|
module Vanilla
|
@@ -30,7 +31,7 @@ module Vanilla
|
|
30
31
|
rule(:html_squote) { str("‘") | str('’') }
|
31
32
|
rule(:squote) { normal_squote | html_squote }
|
32
33
|
rule(:normal_dquote) { str('"') }
|
33
|
-
rule(:html_dquote) { str('“') | str('”') }
|
34
|
+
rule(:html_dquote) { str('“') | str('”') | str('“') | str('”') }
|
34
35
|
rule(:dquote) { normal_dquote | html_dquote }
|
35
36
|
rule(:escaped_dquote) { str('"') }
|
36
37
|
rule(:left_brace) { str("{") }
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
require "test_helper"
|
2
4
|
|
3
5
|
context "The SnipReference parser" do
|
@@ -88,6 +90,7 @@ context "The SnipReference parser" do
|
|
88
90
|
|
89
91
|
:html_quoting_arguments => {
|
90
92
|
%|{s “arg”}| => {:snip => 's', :attribute => nil, :arguments => ['arg']},
|
93
|
+
%|{s “arg”}| => {:snip => 's', :attribute => nil, :arguments => ['arg']}
|
91
94
|
}
|
92
95
|
}
|
93
96
|
|
@@ -10,6 +10,14 @@ describe Vanilla::App do
|
|
10
10
|
assert_kind_of Hash, last_response.headers
|
11
11
|
assert_equal "content", last_response.body
|
12
12
|
end
|
13
|
+
|
14
|
+
should "return an empty body for HEAD request" do
|
15
|
+
create_snip(:name => "test", :content => "content")
|
16
|
+
head "/test.text"
|
17
|
+
assert_equal 200, last_response.status
|
18
|
+
assert_kind_of Hash, last_response.headers
|
19
|
+
assert last_response.body.empty?
|
20
|
+
end
|
13
21
|
end
|
14
22
|
|
15
23
|
context "when detecting the snip renderer" do
|
@@ -48,4 +56,4 @@ describe Vanilla::App do
|
|
48
56
|
assert_raises(Vanilla::MissingRendererError) { app.renderer_for(snip) }
|
49
57
|
end
|
50
58
|
end
|
51
|
-
end
|
59
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vanilla
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.17.
|
4
|
+
version: 1.17.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -329,7 +329,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
329
329
|
version: '0'
|
330
330
|
segments:
|
331
331
|
- 0
|
332
|
-
hash:
|
332
|
+
hash: 3866580506206646431
|
333
333
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
334
334
|
none: false
|
335
335
|
requirements:
|
@@ -338,7 +338,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
338
338
|
version: '0'
|
339
339
|
segments:
|
340
340
|
- 0
|
341
|
-
hash:
|
341
|
+
hash: 3866580506206646431
|
342
342
|
requirements: []
|
343
343
|
rubyforge_project: vanilla
|
344
344
|
rubygems_version: 1.8.23
|