amiba 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/amiba/site.rb +18 -10
  2. metadata +4 -4
data/lib/amiba/site.rb CHANGED
@@ -140,6 +140,12 @@ module Amiba
140
140
  end
141
141
  end
142
142
 
143
+ def build_entries
144
+ Amiba::Source::Entry.all.each do |entry|
145
+ build_page entry
146
+ end
147
+ end
148
+
143
149
  def build_pages
144
150
  Dir.glob('pages/**/[^_]*').each do |page_file|
145
151
  next if File.directory? page_file
@@ -149,12 +155,6 @@ module Amiba
149
155
  end
150
156
  end
151
157
 
152
- def build_entries
153
- Amiba::Source::Entry.all.each do |entry|
154
- build_page entry
155
- end
156
- end
157
-
158
158
  def build_json
159
159
  Dir.glob('entries/*').each do |cat|
160
160
  c = File.basename cat
@@ -171,8 +171,12 @@ module Amiba
171
171
  def build_feeds
172
172
  Dir.glob('feeds/*.builder').each do |feed_file|
173
173
  feed = Amiba::Source::Feed.new(feed_file)
174
- create_file(feed.output_filename) do
175
- Tilt.new(feed.filename).render(Amiba::Scope.new(feed), :xml => Builder::XmlMarkup.new)
174
+ begin
175
+ create_file(feed.output_filename) do
176
+ Tilt.new(feed.filename).render(Amiba::Scope.new(feed), :xml => Builder::XmlMarkup.new)
177
+ end
178
+ rescue
179
+ puts "Unable to process #{feed.name}, skipping"
176
180
  end
177
181
  end
178
182
  end
@@ -189,8 +193,12 @@ module Amiba
189
193
  def build_page(page)
190
194
  layout = build_layout(page)
191
195
  create_file(page.staged_filename) do page.content end
192
- create_file(page.output_filename) do
193
- Tilt.new(layout.staged_filename).render(Amiba::Scope.new(page))
196
+ begin
197
+ create_file(page.output_filename) do
198
+ Tilt.new(layout.staged_filename).render(Amiba::Scope.new(page))
199
+ end
200
+ rescue
201
+ puts "Unable to process #{page.name}, skipping"
194
202
  end
195
203
  end
196
204
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amiba
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Steven Mohapi-Banks
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-19 00:00:00 +00:00
18
+ date: 2011-03-20 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency