blog-generator 0.0.5 → 0.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: ed3c23b9ad0f82dde254a9d03d078a9531485b59
4
- data.tar.gz: b826167d4a93e7e559c98a493680572fb85f76e8
3
+ metadata.gz: 89705604d51c635f63af6e51d88d5a00c6fb8783
4
+ data.tar.gz: dc573368e8082a64b9d08ad40f0c77a3ab8570c5
5
5
  SHA512:
6
- metadata.gz: b1f7b6d0caf385190f2d95bd8c680486cffff05a99f8e6cdf3de66f5b9e91466583908ff7a473cc0c39855158a81f3816cf32638f0d1a70dc53c12d07220fe53
7
- data.tar.gz: 4298605c3a49269f119d3f3ccecea54e38e74a2970f429087f94628d3ae75ac0d35ddd660dcfa4bec4197a0fda9f8eb191a8a74a2e9affad8cef738f9f9ca5ff
6
+ metadata.gz: 90eeffbf7ed4edf565b69e314b1c9b7eaa51729175578a99670432f305e4ef490404cd9d9484f65083cd0f6cc9c07ff0a3a51710b65fca2ace576eda204ced7f
7
+ data.tar.gz: bf08cc6f45b266358f4d4c4dd432659715e8f3c07ae353377abd8ae8782f0dc0c8854704be856ccab01df698b7ddd4460b3969ad0dbb9bd42dd25a32682ab6c6
@@ -47,8 +47,10 @@ Dir.chdir(OUTPUT_BASE_PATH) do
47
47
  file 'metadata.json', JSON.pretty_generate(site.instance_variable_get(:@table))
48
48
 
49
49
  # GET /posts.atom
50
- feed = BlogGenerator::Feed.new(site, generator.posts, 'posts.atom')
51
- file 'posts.atom', feed.render
50
+ if generator.posts.any?
51
+ feed = BlogGenerator::Feed.new(site, generator.posts, 'posts.atom')
52
+ file 'posts.atom', feed.render
53
+ end
52
54
 
53
55
  # GET /api/posts.json
54
56
  # This calls PostList#to_json
@@ -10,7 +10,7 @@ module BlogGenerator
10
10
  @site, @posts = site, posts
11
11
  end
12
12
 
13
- def_delegators :@posts, :reduce, :each, :sort, :first, :last, :[]
13
+ def_delegators :@posts, :reduce, :each, :sort, :first, :last, :[], :empty?, :any?
14
14
 
15
15
  def as_json
16
16
  self.posts.map do |post|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blog-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - James C Russell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-16 00:00:00.000000000 Z
11
+ date: 2017-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri