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 +4 -4
- data/bin/blog-generator.rb +4 -2
- data/lib/blog-generator/post_list.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89705604d51c635f63af6e51d88d5a00c6fb8783
|
4
|
+
data.tar.gz: dc573368e8082a64b9d08ad40f0c77a3ab8570c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90eeffbf7ed4edf565b69e314b1c9b7eaa51729175578a99670432f305e4ef490404cd9d9484f65083cd0f6cc9c07ff0a3a51710b65fca2ace576eda204ced7f
|
7
|
+
data.tar.gz: bf08cc6f45b266358f4d4c4dd432659715e8f3c07ae353377abd8ae8782f0dc0c8854704be856ccab01df698b7ddd4460b3969ad0dbb9bd42dd25a32682ab6c6
|
data/bin/blog-generator.rb
CHANGED
@@ -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
|
-
|
51
|
-
|
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.
|
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-
|
11
|
+
date: 2017-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|