siteleaf 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2d2365de26c869d52668266b96e1207f1f42a32b
4
- data.tar.gz: 4fbbfb33b1343ee235a990cdccb573748f885b6a
3
+ metadata.gz: f1f74b22241c0bbed850ac4a6bbfeff180b3ff6e
4
+ data.tar.gz: b1c3fbd743d203574c6a0417b06c7aa762b8c832
5
5
  SHA512:
6
- metadata.gz: 3ac3544dd25ea4164ac7f43793ec4e5f9d7a5954e104e10def862f382d175b8db88c3df62022d2c2fafb9af51653613a9d3fc011af37a714a5c9a7beacd79f3a
7
- data.tar.gz: d3d4df207acab9c1f044b608ada5fe5edb8fab57a2d197237e5b7723d1c14fba56c8c7af4d9090c9e59ccbd1a31a078b0f4fa6cc9eb7ea0ba64926ca04fe05eb
6
+ metadata.gz: 5dfeae6e9e4e418b6793b1a3025adb7a7c272e034392a1f3ec959d2daf238bb4b297c3056267cabbd8eae175087892f0a2ee71e6bd068a6d92f7f54db9fc5f6b
7
+ data.tar.gz: 0f4c18a7a3736bf3eb556b96c79d5abe20471827e02517b19f0caeb128ce18b6b4724e3bc453b3a2d74835fae080f6f45ff5105fd24fef960fccc41f3dcf9224
data/lib/siteleaf/page.rb CHANGED
@@ -49,12 +49,15 @@ module Siteleaf
49
49
  attrs['date'] = Time.parse(published_at).utc if published_at
50
50
  attrs['published'] = false if !published?
51
51
 
52
- meta.each{|m| attrs[m['key']] = m['value'].to_s == '' ? nil : m['value'].to_s.gsub("\r\n","\n")} unless meta.nil?
52
+ meta.each{|m| attrs[m['key'].to_s.downcase] = m['value'].to_s == '' ? nil : m['value'].to_s.gsub("\r\n","\n")} unless meta.nil?
53
53
 
54
54
  if defined?(taxonomy) && !taxonomy.nil?
55
- taxonomy.each do |t|
56
- attrs[t['key']] = t['values'].map{|v| v['value'] } unless t['values'].empty?
57
- end
55
+ taxonomy.each do |t|
56
+ next if t['values'].empty?
57
+ key = t['key']
58
+ key.downcase! if key =~ /^(tags|category|categories)$/i
59
+ attrs[key] = t['values'].map{|v| v['value'] }
60
+ end
58
61
  end
59
62
 
60
63
  attrs
data/lib/siteleaf/site.rb CHANGED
@@ -60,7 +60,7 @@ module Siteleaf
60
60
  attrs['timezone'] = timezone
61
61
  attrs['permalink'] = 'pretty'
62
62
 
63
- meta.each{|m| attrs[m['key']] = m['value'].to_s == '' ? nil : m['value'].to_s.gsub("\r\n","\n")} unless meta.nil?
63
+ meta.each{|m| attrs[m['key'].to_s.downcase] = m['value'].to_s == '' ? nil : m['value'].to_s.gsub("\r\n","\n")} unless meta.nil?
64
64
 
65
65
  # output uploads using v1 /assets path
66
66
  attrs['collections'] = {
@@ -1,3 +1,3 @@
1
1
  module Siteleaf
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  end
data/siteleaf.gemspec CHANGED
@@ -17,6 +17,7 @@ Gem::Specification.new do |gem|
17
17
 
18
18
  gem.add_dependency 'httparty', '>= 0.13.3'
19
19
  gem.add_dependency 'httmultiparty', '>= 0.3.13'
20
+ gem.add_dependency 'psych', '2.0.8'
20
21
  gem.add_dependency 'rack'
21
22
 
22
23
  gem.files = `git ls-files`.split($/)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: siteleaf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Siteleaf
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.3.13
41
+ - !ruby/object:Gem::Dependency
42
+ name: psych
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '='
46
+ - !ruby/object:Gem::Version
47
+ version: 2.0.8
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '='
53
+ - !ruby/object:Gem::Version
54
+ version: 2.0.8
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rack
43
57
  requirement: !ruby/object:Gem::Requirement