laydown 0.6.0 → 0.6.1

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.0
1
+ 0.6.1
data/laydown.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{laydown}
8
- s.version = "0.6.0"
8
+ s.version = "0.6.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["jbe"]
data/lib/laydown.rb CHANGED
@@ -19,12 +19,12 @@ module Laydown
19
19
  :js => [],
20
20
  :inline_js => [],
21
21
  :head => [],
22
- :body_class => nil,
22
+ :body_class => [],
23
23
  :body => :yield,
24
24
  :ga_code => :@ga_code
25
25
  }
26
26
 
27
- ARRAY_PROPS = [:keywords, :css, :js, :inline_js, :head]
27
+ ARRAY_PROPS = [:keywords, :css, :js, :inline_js, :head, :body_class]
28
28
 
29
29
  def self.compile(template={})
30
30
 
data/lib/template.rb CHANGED
@@ -11,7 +11,7 @@ _buf = [] ; _temple_pre_tags = /<pre|<textarea/ ; _buf << ("<!DOCTYPE html><html
11
11
  ; _buf << ("<meta content=\"#{Temple::Utils.escape_html((data[:description]))}\" name=\"description\">"\
12
12
  ""\
13
13
  "") ; end ; if data[:keywords].any? ;
14
- ; _buf << ("<meta content=\"#{Temple::Utils.escape_html((data[:keywords].join(', ')))}\" name=\"keywords\">"\
14
+ ; _buf << ("<meta content=\"#{Temple::Utils.escape_html((data[:keywords].flatten.join(', ')))}\" name=\"keywords\">"\
15
15
  ""\
16
16
  "") ; end ; data[:css].flatten.each do |url| ;
17
17
  ; unless url == '' ;
@@ -31,7 +31,7 @@ _buf = [] ; _temple_pre_tags = /<pre|<textarea/ ; _buf << ("<!DOCTYPE html><html
31
31
  ; data[:head].each do |item| ;
32
32
  ; _buf << (item) ;
33
33
  ;
34
- ; end ; end ; _buf << ("</head><body class=\"#{Temple::Utils.escape_html((data[:body_class]))}\">"\
34
+ ; end ; end ; _buf << ("</head><body class=\"#{Temple::Utils.escape_html((data[:body_class].flatten.join(' ')))}\">"\
35
35
  "#{data[:body]}"\
36
36
  ""\
37
37
  "") ; if data[:ga_code] ;
data/template.slim CHANGED
@@ -11,7 +11,7 @@ html
11
11
  meta name="description" content=data[:description]
12
12
 
13
13
  - if data[:keywords].any?
14
- meta name="keywords" content=data[:keywords].join(', ')
14
+ meta name="keywords" content=data[:keywords].flatten.join(', ')
15
15
 
16
16
  - data[:css].flatten.each do |url|
17
17
  - unless url == ''
@@ -31,7 +31,7 @@ html
31
31
  - data[:head].each do |item|
32
32
  == item
33
33
 
34
- body class=data[:body_class]
34
+ body class=data[:body_class].flatten.join(' ')
35
35
  == data[:body]
36
36
 
37
37
  - if data[:ga_code]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 6
8
- - 0
9
- version: 0.6.0
8
+ - 1
9
+ version: 0.6.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - jbe