yaks-html 0.6.2 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/yaks/format/html.rb +6 -5
- data/lib/yaks-html.rb +4 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1712b24b647d3652edfd89a0496157c02e9c31c2
|
4
|
+
data.tar.gz: accaabeff3f59cbafd064700c2bd6b3c49fc9151
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24702a449c3a81e79c68b790bce2c0df3e38b476fc6465e8151c6e3f3c3463bb28224ddfd33c299afafe6055c7ef6a22c36f646fe5565f499f267b70be93f60b
|
7
|
+
data.tar.gz: 02e961efef34ad9be79cc9da58196869ac92a61bd6e762da91af388bd71eee980aa8fa75b62bc5e69918a173671026a083c3db1d050598663d9db74f236ec30d
|
data/lib/yaks/format/html.rb
CHANGED
@@ -47,7 +47,7 @@ module Yaks
|
|
47
47
|
templ
|
48
48
|
.replace('.rel a') {|a| a.attr('href', link.rel.to_s).content(link.rel.to_s) }
|
49
49
|
.replace('.uri a') {|a| a.attr('href', link.uri).content(link.uri) }
|
50
|
-
.replace('.title') {|x| x.content(link.title) }
|
50
|
+
.replace('.title') {|x| x.content(link.title.to_s) }
|
51
51
|
.replace('.templated') {|x| x.content(link.templated?.inspect) }
|
52
52
|
end
|
53
53
|
end
|
@@ -56,14 +56,15 @@ module Yaks
|
|
56
56
|
def render_subresources(resource, templ, sub_templ)
|
57
57
|
templ = templ.replace('h1,h2,h3,h4') {|h| h.set_tag("h#{h.tag[/\d/].to_i.next}") }
|
58
58
|
if resource.collection?
|
59
|
-
resource.map do |r|
|
59
|
+
resource.seq.map do |r|
|
60
60
|
render_resource(r, templ)
|
61
61
|
end
|
62
62
|
else
|
63
|
-
resource.subresources.map do |
|
63
|
+
resource.subresources.map do |resources|
|
64
|
+
rel = resources.rels.first.to_s
|
64
65
|
sub_templ
|
65
|
-
.replace('.rel a') {|a| a.attr('href', rel
|
66
|
-
.replace('.value') {|x| x.content(resources.map { |resource| render_resource(resource, templ) })}
|
66
|
+
.replace('.rel a') {|a| a.attr('href', rel).content(rel) }
|
67
|
+
.replace('.value') {|x| x.content(resources.seq.map { |resource| render_resource(resource, templ) })}
|
67
68
|
end
|
68
69
|
end
|
69
70
|
end
|
data/lib/yaks-html.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yaks-html
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arne Brasseur
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: yaks
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.7.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.7.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: hexp
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|