dimples 1.7.1 → 1.7.2

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: 005ba579c9f57984364c6a1a16be1ba7d5da3225
4
- data.tar.gz: 46eb5a741462c4b9148926cc737e1340214ce9f4
3
+ metadata.gz: fee7665106720cf4e356eb71b122fb31f08c6f56
4
+ data.tar.gz: ddeaa8ba0edce69e086331ddaac3121728848b6a
5
5
  SHA512:
6
- metadata.gz: a62e3eade61a897926ffd222adff17f2488bbd7ac7209027c9501ff5a8eab1682a2dd4040d6c16d3719a026908dabd15e96bacf5d72fe073cdb3d7f94cc4e130
7
- data.tar.gz: 37440b46a3359a99046ade561b26f94b62e3780e195a7704f621c21635397a3b74fc8f62c68b36c44f58a3a643de510954f4d30f72691762af22682c6b183ac1
6
+ metadata.gz: 11bc7d9d771ed309e69747691e851f308ce1f1a14f6f01669ac3e7340a60b205df2c9d8afdbecd15c27ff421dcd4606cb86a4267f9608666fbdb9b43c31bc315
7
+ data.tar.gz: 42c8d59c730ed45a7bf12e936a82c02b45c8d8cc21e0363acbab1bd39d465e806a993e88d4f5fcda093a84d11ed5065b9be2d764f6ae816779f1e28a7cf749ae
data/lib/dimples/site.rb CHANGED
@@ -51,12 +51,12 @@ module Dimples
51
51
  generate_files
52
52
  copy_assets
53
53
 
54
- rescue Errors::RenderingError => e
55
- puts "Error: Failed to render #{e.file}: #{e.message}"
56
- rescue Errors::PublishingError => e
57
- puts "Error: Failed to publish #{e.file}: #{e.message}"
58
- rescue => e
59
- puts "Error: #{e.backtrace}"
54
+ # rescue Errors::RenderingError => e
55
+ # puts "Error: Failed to render #{e.file}: #{e.message}"
56
+ # rescue Errors::PublishingError => e
57
+ # puts "Error: Failed to publish #{e.file}: #{e.message}"
58
+ # rescue => e
59
+ # puts "Error: #{e.backtrace}"
60
60
  end
61
61
 
62
62
  def prepare_site
@@ -155,7 +155,7 @@ module Dimples
155
155
 
156
156
  def generate_posts
157
157
  @posts.each do |post|
158
- post.write(@output_paths[:posts])
158
+ generate_post(post)
159
159
  end
160
160
 
161
161
  if @config['generation']['paginated_posts']
@@ -166,23 +166,35 @@ module Dimples
166
166
  end
167
167
  end
168
168
 
169
+ def generate_post(post)
170
+ post.write(@output_paths[:posts])
171
+ end
172
+
169
173
  def generate_pages
170
174
  @pages.each do |page|
171
- page.write(@output_paths[:site])
175
+ generate_page(page)
172
176
  end
173
177
  end
174
178
 
179
+ def generate_page(page)
180
+ page.write(@output_paths[:site])
181
+ end
182
+
175
183
  def generate_categories
176
184
  @categories.each do |slug, posts|
177
- name = @config['category_names'][slug] || slug.capitalize
178
- paths = [@output_paths[:categories], slug]
179
- layout = @config['layouts']['category']
180
- context = { category: slug }
181
-
182
- paginate(posts: posts, title: name, paths: paths, layout: layout, context: context)
185
+ generate_category(slug, posts)
183
186
  end
184
187
  end
185
188
 
189
+ def generate_category(slug, posts)
190
+ name = @config['category_names'][slug] || slug.capitalize
191
+ paths = [@output_paths[:categories], slug]
192
+ layout = @config['layouts']['category']
193
+ context = { category: slug }
194
+
195
+ paginate(posts: posts, title: name, paths: paths, layout: layout, context: context)
196
+ end
197
+
186
198
  def generate_archives
187
199
  %w(year month day).each do |date_type|
188
200
  if @config['generation']["#{date_type}_archives"]
@@ -1,3 +1,3 @@
1
1
  module Dimples
2
- VERSION = '1.7.1'.freeze
2
+ VERSION = '1.7.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dimples
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 1.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Bogan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-07 00:00:00.000000000 Z
11
+ date: 2016-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tilt
@@ -114,7 +114,7 @@ files:
114
114
  - lib/dimples/writeable.rb
115
115
  homepage: http://github.com/waferbaby/dimples
116
116
  licenses:
117
- - LICENSE
117
+ - MIT
118
118
  metadata: {}
119
119
  post_install_message:
120
120
  rdoc_options: []