dimples 1.7.2 → 1.8

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: fee7665106720cf4e356eb71b122fb31f08c6f56
4
- data.tar.gz: ddeaa8ba0edce69e086331ddaac3121728848b6a
3
+ metadata.gz: 896e53a1c3f71e3adc14108af56ee5f74032b120
4
+ data.tar.gz: e452c4803536be878aacb411964a21f4fed2aa42
5
5
  SHA512:
6
- metadata.gz: 11bc7d9d771ed309e69747691e851f308ce1f1a14f6f01669ac3e7340a60b205df2c9d8afdbecd15c27ff421dcd4606cb86a4267f9608666fbdb9b43c31bc315
7
- data.tar.gz: 42c8d59c730ed45a7bf12e936a82c02b45c8d8cc21e0363acbab1bd39d465e806a993e88d4f5fcda093a84d11ed5065b9be2d764f6ae816779f1e28a7cf749ae
6
+ metadata.gz: bbf5cfed0406718d7a15e17d6c5682662f50b6644433ff57358ad4e6b1c787ed32830ed387bbf8db88937f08435d5a76f601a13c32183d38af69fb1ac2f859f7
7
+ data.tar.gz: ee1fd0b316f3052e6705aad14846db9a7fa335582db7a259da2b2d5e6025b3456480d0f4f0862b38f4635d435ebd65dbcd8d86a9f575ae723554202664a9fb40
@@ -28,7 +28,6 @@ module Dimples
28
28
  @post_class = Dimples::Post
29
29
 
30
30
  @config = Dimples::Configuration.new(config)
31
- @generation_options = default_generation_options
32
31
 
33
32
  @source_paths[:root] = File.expand_path(@config['source_path'])
34
33
  @output_paths[:site] = File.expand_path(@config['destination_path'])
@@ -43,20 +42,18 @@ module Dimples
43
42
  end
44
43
  end
45
44
 
46
- def generate(options = {})
47
- @generation_options.merge!(options)
45
+ def generate
48
46
 
49
47
  prepare_site
50
48
  scan_files
51
49
  generate_files
52
50
  copy_assets
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}"
51
+ rescue Errors::RenderingError => e
52
+ puts "Error: Failed to render #{e.file}: #{e.message}"
53
+ rescue Errors::PublishingError => e
54
+ puts "Error: Failed to publish #{e.file}: #{e.message}"
55
+ rescue => e
56
+ puts "Error: #{e.backtrace}"
60
57
  end
61
58
 
62
59
  def prepare_site
@@ -94,10 +91,10 @@ module Dimples
94
91
  def scan_posts
95
92
  Dir.glob(File.join(@source_paths[:posts], '*.*')).reverse_each do |path|
96
93
  post = @post_class.new(self, path)
97
- next if !@generation_options[:include_drafts] && post.draft
98
-
99
94
  prepare_post(post)
100
95
 
96
+ next if post.draft
97
+
101
98
  post.categories.each do |slug|
102
99
  (@categories[slug] ||= []) << post
103
100
  end
@@ -310,13 +307,5 @@ module Dimples
310
307
 
311
308
  pagination
312
309
  end
313
-
314
- private
315
-
316
- def default_generation_options
317
- {
318
- include_drafts: false
319
- }
320
- end
321
310
  end
322
311
  end
@@ -1,3 +1,3 @@
1
1
  module Dimples
2
- VERSION = '1.7.2'.freeze
2
+ VERSION = '1.8'.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.2
4
+ version: '1.8'
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-07-03 00:00:00.000000000 Z
11
+ date: 2016-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tilt