rails-footnotes 4.1.3 → 4.1.4
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.
- checksums.yaml +4 -4
- data/CHANGELOG +2 -0
- data/lib/rails-footnotes/filter.rb +2 -0
- data/lib/rails-footnotes/version.rb +1 -1
- data/spec/footnotes_spec.rb +14 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 803d3d85a6d449ddde04bfe4d17245c7dfb7a2e5
|
4
|
+
data.tar.gz: 40c0a64bf8f12a66a2354c13d887d72e5299e6ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d12c0a1fbf3126730c738ecd3da4cc4051c8af71c6da82b78523d55f7ddab3680e80ec54dc48a62b8642cf1322e16b575543e7210929f23dfc69623a4c871027
|
7
|
+
data.tar.gz: 6e791ef289186ce48faaa7f4d4c821c2dbb0f766ae1cfb12862cc04d0f38cd9c82cd00b949ee92db0f0ed39d4c9e725edadf5b13d35fc0134430b0ab00694adb
|
data/CHANGELOG
CHANGED
data/spec/footnotes_spec.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
require "spec_helper"
|
2
4
|
require 'action_controller'
|
3
5
|
require 'action_controller/test_case'
|
@@ -16,6 +18,12 @@ module Footnotes::Notes
|
|
16
18
|
class NoteXNote < TestNote; end
|
17
19
|
class NoteYNote < TestNote; end
|
18
20
|
class NoteZNote < TestNote; end
|
21
|
+
|
22
|
+
class FileURINote < TestNote
|
23
|
+
def link
|
24
|
+
"/example/local file path/with-special-chars/öäü/file"
|
25
|
+
end
|
26
|
+
end
|
19
27
|
end
|
20
28
|
|
21
29
|
describe "Footnotes" do
|
@@ -61,6 +69,12 @@ describe "Footnotes" do
|
|
61
69
|
@controller.response_body.should_not == HTML_DOCUMENT
|
62
70
|
end
|
63
71
|
|
72
|
+
it "should escape links with special chars" do
|
73
|
+
note_with_link = Footnotes::Notes::FileURINote.new
|
74
|
+
link = Footnotes::Filter.prefix(note_with_link.link, 1, 1, 1)
|
75
|
+
link.should eql "txmt://open?url=file:///example/local%20file%20path/with-special-chars/%C3%B6%C3%A4%C3%BC/file&line=1&column=1"
|
76
|
+
end
|
77
|
+
|
64
78
|
specify "footnotes_not_included_when_request_is_xhr" do
|
65
79
|
@controller.request.env['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest'
|
66
80
|
@controller.request.env['HTTP_ACCEPT'] = 'text/javascript, text/html, application/xml, text/xml, */*'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-footnotes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
4
|
+
version: 4.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roman V. Babenko
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2014-11-
|
15
|
+
date: 2014-11-07 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rails
|