plato 0.2.2 → 0.2.3

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.
Files changed (5) hide show
  1. data/VERSION +1 -1
  2. data/bin/plato +1 -1
  3. data/lib/plato/site.rb +11 -9
  4. data/plato.gemspec +2 -2
  5. metadata +4 -4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
data/bin/plato CHANGED
@@ -40,6 +40,6 @@ unless opts['base_url']
40
40
  exit 1
41
41
  end
42
42
 
43
- puts "Generating site..."
43
+ puts "Compiling site..."
44
44
  Plato::Site.new(*opts.values_at('base_url', 'template', 'cache', 'root')).generate!
45
45
  puts "done!"
data/lib/plato/site.rb CHANGED
@@ -12,7 +12,7 @@ module Plato
12
12
  @template_path = detect_zip_path File.expand_path(template, @root)
13
13
 
14
14
  @config_path = File.join(@template_path, 'config.rb')
15
- @content_path = File.join(@root, "content")
15
+ @content_path = File.join(@root)
16
16
  @resources_path = File.join(@root, "resources")
17
17
  end
18
18
 
@@ -77,13 +77,17 @@ module Plato
77
77
 
78
78
  @content = config["content_categories"]
79
79
  categories = @content.values
80
- manifest = Manifest.new(content_path, :hash)
80
+ content_manifests = @content.keys.map do |c|
81
+ Manifest.new(File.join(content_path, c), :hash)
82
+ end
81
83
 
82
- manifest.each do |path, content_data|
83
- if category = categories.find {|c| c.match path }
84
- data = category.match(path).merge(content_data)
84
+ content_manifests.each do |manifest|
85
+ manifest.each do |path, content_data|
86
+ if category = categories.find {|c| c.match path }
87
+ data = category.match(path).merge(content_data)
85
88
 
86
- category.documents << Document.new(category, data)
89
+ category.documents << Document.new(category, data)
90
+ end
87
91
  end
88
92
  end
89
93
 
@@ -114,9 +118,7 @@ module Plato
114
118
 
115
119
  def rendered_templates
116
120
  templates.map(:string) do |path, template|
117
- if path =~ /\A_/
118
- nil
119
- else
121
+ if path !~ /\A_/
120
122
  { path => render(template, template.format, nil) }
121
123
  end
122
124
  end
data/plato.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{plato}
8
- s.version = "0.2.2"
8
+ s.version = "0.2.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Matt Freels"]
12
- s.date = %q{2010-10-09}
12
+ s.date = %q{2010-10-10}
13
13
  s.description = %q{use templates and content to generate static sites.}
14
14
  s.email = %q{matt@freels.name}
15
15
  s.executables = ["plato", "plato-prepare-repo"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plato
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 2
10
- version: 0.2.2
9
+ - 3
10
+ version: 0.2.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matt Freels
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-09 00:00:00 -07:00
18
+ date: 2010-10-10 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency