octopress-ink 1.1.1 → 1.1.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: 68a4980b51d2557f63a373d60ff0da59981d3dda
4
- data.tar.gz: 9127e9a61add546f886a4e15763e80d8b7418614
3
+ metadata.gz: 6a3b15b45d91c027ba553ed2389bd8f2eda786f5
4
+ data.tar.gz: e5ad4861c19163e4887bedee72e26936a3601623
5
5
  SHA512:
6
- metadata.gz: ca4edb8b3902338c45764f0a8947512577839e9388b48d8fd5bee095902135b9ac3e47336d1a54cc6d87c6225b1273dd3068048914b82e9eb26f2fbcf14bd32d
7
- data.tar.gz: 135205a60c04750005a264f4771562435eb42d0cfaf9c0524d4783a098bc5bfe715466346d190f3541d2bf7d7a143775354d141b6477751cc784218cac3e9e64
6
+ metadata.gz: 5ec39b805dbe73ebd301ae499e1e63e7a4f16b8a221779237263c363f0799d441569e8621f09af3297155702eb3d68d762cf42129d797c43e18b67c2716d9037
7
+ data.tar.gz: 43285a10de3685141b7fd2c5401d7f877716a538c47a126c31dd11bf9f40d4fe902ed4b43f5b9991fbe6ffb7e288daa98e5e0771f445de16506db117c25ba866
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ### 1.1.2 (2015-05-12)
4
+ - Use Jekyll Hooks if you got 'em.
5
+ - Now supporting Jekyll 2 & 3
6
+ - In Jekyll 3 Coffeescript is optional - Added a request to install the gem if a plugin uses it but it is not present.
7
+
3
8
  ### 1.1.1 (2015-05-11)
4
9
  - Minor: Gemspec dependency updates.
5
10
 
@@ -13,6 +13,11 @@ module Octopress
13
13
  end
14
14
 
15
15
  def content
16
+ begin
17
+ require 'jekyll-coffeescript'
18
+ rescue LoadError
19
+ raise "Add gem jekyll-coffeescript to Gemfile (or gemspec)."
20
+ end
16
21
  ::CoffeeScript.compile(super)
17
22
  end
18
23
 
@@ -1,31 +1,60 @@
1
1
  module Octopress
2
2
  module Ink
3
- class SiteHook < Hooks::Site
3
+ if defined?(Jekyll::Hooks)
4
4
 
5
- def reset(site)
5
+ Jekyll::Hooks.register :site, :after_reset do |site|
6
6
  Ink.watch_assets(site)
7
7
  if Plugins.registered
8
8
  Plugins.reset
9
9
  end
10
10
  end
11
11
 
12
- def post_read(site)
12
+ Jekyll::Hooks.register :site, :post_read do |site|
13
13
  Octopress.site = site
14
14
  Ink::Plugins.register
15
15
  Ink::Plugins.add_files
16
16
  end
17
17
 
18
- def merge_payload(payload, site)
19
- Ink.payload
18
+ Jekyll::Hooks.register :site, :pre_render do |site, payload|
19
+ Ink.payload.each do |key, val|
20
+ payload[key] = val
21
+ end
20
22
  end
21
23
 
22
- def post_write(site)
24
+ Jekyll::Hooks.register :site, :post_write do |site|
23
25
  Octopress::Ink::Plugins.static_files.each do |f|
24
26
  f.write(site.dest)
25
27
  end
26
28
 
27
29
  Octopress::Ink::Cache.clean
28
30
  end
31
+ else
32
+ class SiteHook < Hooks::Site
33
+ def reset(site)
34
+ Ink.watch_assets(site)
35
+ if Plugins.registered
36
+ Plugins.reset
37
+ end
38
+ end
39
+
40
+ def post_read(site)
41
+ Octopress.site = site
42
+ Ink::Plugins.register
43
+ Ink::Plugins.add_files
44
+ end
45
+
46
+ def merge_payload(payload, site)
47
+ Ink.payload
48
+ end
49
+
50
+ def post_write(site)
51
+ Octopress::Ink::Plugins.static_files.each do |f|
52
+ f.write(site.dest)
53
+ end
54
+
55
+ Octopress::Ink::Cache.clean
56
+ end
57
+ end
29
58
  end
30
59
  end
31
60
  end
@@ -1,5 +1,5 @@
1
1
  module Octopress
2
2
  module Ink
3
- VERSION = "1.1.1"
3
+ VERSION = "1.1.2"
4
4
  end
5
5
  end
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.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-11 00:00:00.000000000 Z
11
+ date: 2015-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -84,30 +84,30 @@ dependencies:
84
84
  name: octopress-date-format
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: '3.0'
89
+ version: '0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: '3.0'
96
+ version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: octopress-autoprefixer
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: '1.0'
103
+ version: '0'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
- version: '1.0'
110
+ version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: octopress
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -178,6 +178,20 @@ dependencies:
178
178
  - - ">="
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: jekyll-coffeescript
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
181
195
  - !ruby/object:Gem::Dependency
182
196
  name: bundler
183
197
  requirement: !ruby/object:Gem::Requirement