swordfish 0.0.13 → 0.0.14
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 +8 -8
- data/lib/swordfish/nodes/image.rb +4 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MWFmYzdlYjRmNTNiMmNiNzJhZTY5NTU0N2MyZWY3NTM2ZTM1MGQ5Yg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
N2I2MTM2ZjFmNWFjYTQ2ZTliZDhlMzU4ZDc1YjdmNTA2MWYwMmU5ZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MWY3MjFjNzUwMWRhNDc0N2NjZjQ4NTc5MTVlZWU2ZmQ2ZThkZDFlM2QxZmE3
|
10
|
+
YzBjMzIyMGU5NTdiNzk1NGY3MTBkNjZhNzk3MTExMGZiZmMzYzJjMWQzNzA0
|
11
|
+
MDhjOTVmNmJhMDM3NjY3ZWM1ZmE5NmVkMjE3YjIyMmM0Mjc1MWI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTViZTcwMWM2YjI0MmI1NjEzMTI4YjgzZjNkMjI0ZDM2MzFiZDIwYTRmZDRk
|
14
|
+
MjVkYWQ2Y2Q5MDZkMGQxNWZiY2NhNTIyMzZhYmE3MWEwYWNkZTc1ZGI5NDM0
|
15
|
+
N2IyMTk2NWM3YzA5YmY5MmY3YjI5MTQ4MGVhNDEwNjMzNjI3YzE=
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'uri'
|
2
|
+
|
1
3
|
# An image node
|
2
4
|
# Actual image data is stored at the document level, and can be
|
3
5
|
# retrieved by calling get_image(image_image) on the document
|
@@ -20,9 +22,9 @@ module Swordfish
|
|
20
22
|
|
21
23
|
def to_html
|
22
24
|
@caption ||= ""
|
23
|
-
|
25
|
+
src = URI::escape(@path ? @path : @original_name)
|
26
|
+
"<img src=\"#{src}\" alt=\"#{CGI::escapeHTML(@caption)}\" title=\"#{CGI::escapeHTML(@caption)}\" />"
|
24
27
|
end
|
25
|
-
|
26
28
|
end
|
27
29
|
end
|
28
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: swordfish
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Posthumus
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|