octopress-ink 1.0.0.rc.7 → 1.0.0.rc.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: 65b8ffe436f7d3a98b496df4a39c4a5889072e87
4
- data.tar.gz: d580ceb6faed7b3aced9533e5422c535ad92b38c
3
+ metadata.gz: c997aba1d3233f14592d404a8b92d7f49d9db20e
4
+ data.tar.gz: 522dd2e071da30e701937f7ccf4491c068549527
5
5
  SHA512:
6
- metadata.gz: aa75320842ce5f449688d831e2e6902783c86b98d30917c37ca04e7680744efebea102e2d5ee37a5160db096a73c8038f81498a4f38def2ae72ebe4dc2225a7f
7
- data.tar.gz: 59292e1a588bdad1bf9e9cbb77576e21d4a0c045e2fadcda7ce92d34025376b3de86297f9a39994cc6e3a9d50800f5867b269c40eb4158e12a319aff47757df7
6
+ metadata.gz: 8a9f9c4239bc8b4ec17a68b03d4221c8c0aa5875b55494019cc76ead766b6b268641fa0780bb70077c7f64267fe71add6c415314305696694f96628e5d96924c
7
+ data.tar.gz: 9501d02bbbdffa98dfdd6d933cab9ecfc1becf209659b282c945c3794d70936b1856f1bdf5e2dfdff2f01d48b85866530e7e51e4a6e795383a0c03cac90af5f4
data/CHANGELOG.md CHANGED
@@ -2,12 +2,17 @@
2
2
 
3
3
  ## Current released version
4
4
 
5
- ### 1.0.0 RC7 - 2014-06-08
5
+ ### 1.0.0 RC8 - 2014-06-09
6
6
 
7
- - New: Added `excerpted` post var, true if post.excerpt is shorted than post.content.
7
+ - Improved the way Ink manages the payload
8
+ - Added `linkposts` and `articles` methods to Ink
8
9
 
9
10
  ## Past versions
10
11
 
12
+ ### 1.0.0 RC7 - 2014-06-08
13
+
14
+ - New: Added `excerpted` post var, true if post.excerpt is shorted than post.content.
15
+
11
16
  ### 1.0.0 RC6 - 2014-06-07
12
17
 
13
18
  - Fixed: Gemspec scaffold does not include Ink's pre-release version numbers.
@@ -1,5 +1,5 @@
1
1
  module Octopress
2
2
  module Ink
3
- VERSION = "1.0.0.rc.7"
3
+ VERSION = "1.0.0.rc.8"
4
4
  end
5
5
  end
data/lib/octopress-ink.rb CHANGED
@@ -76,27 +76,42 @@ module Octopress
76
76
  @site = site
77
77
  end
78
78
 
79
- def self.payload(payload={})
80
- config = Octopress::Ink::Plugins.config
81
- payload['plugins'] = config['plugins']
82
- payload['theme'] = config['theme']
83
- payload['octopress'] = {}
84
- payload['octopress']['version'] = Octopress::Ink.version
85
- if Octopress::Ink.config['docs_mode']
86
- payload['doc_pages'] = Octopress::Ink::Plugins.doc_pages
87
- end
88
-
89
- payload['site'] ||= {}
79
+ def self.payload(jekyll_payload={})
80
+ Jekyll::Utils.deep_merge_hashes(jekyll_payload, custom_payload)
81
+ end
90
82
 
91
- payload['site']['linkposts'] = site.posts.select do |p|
92
- p.data['linkpost']
93
- end
83
+ def self.custom_payload
84
+ unless @custom_payload
85
+ config = Plugins.config
86
+
87
+ payload = {
88
+ 'plugins' => config['plugins'],
89
+ 'theme' => config['theme'],
90
+ 'octopress' => {
91
+ 'version' => Octopress::Ink.version
92
+ },
93
+ 'site' => {
94
+ 'linkposts' => self.linkposts,
95
+ 'articles' => self.articles,
96
+ }
97
+ }
98
+
99
+ if Octopress::Ink.config['docs_mode']
100
+ payload['doc_pages'] = Octopress::Ink::Plugins.doc_pages
101
+ end
94
102
 
95
- payload['site']['articles'] = site.posts.reject do |p|
96
- p.data['linkpost']
103
+ @custom_payload = payload
97
104
  end
98
105
 
99
- payload
106
+ @custom_payload
107
+ end
108
+
109
+ def self.linkposts
110
+ @linkposts ||= site.posts.select {|p| p.data['linkpost']}
111
+ end
112
+
113
+ def self.articles
114
+ @articles ||= site.posts.reject {|p| p.data['linkpost']}
100
115
  end
101
116
 
102
117
  def self.init_site(options)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress-ink
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc.7
4
+ version: 1.0.0.rc.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-08 00:00:00.000000000 Z
11
+ date: 2014-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll