octopress-filters 1.1.0 → 1.1.1

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: 01bc72327b02e3212f41ef3a045e85cc6c57311c
4
- data.tar.gz: 7aea28624451226fab505cb081908e682aff8e9f
3
+ metadata.gz: ec9164eb8166ade20ec21dbb586be19cb330aa1d
4
+ data.tar.gz: 8c5e4dba0b3943630e83c6c9da8eef78191f7fb6
5
5
  SHA512:
6
- metadata.gz: bbf8bd4f1fab1c633fbe03742b3f9a682e49eb42913b7a71f246d6aefb984aa3d365a3e85d1fa5301ab38d2d45338e3ca572492a72dd33c140b875396edc62df
7
- data.tar.gz: a29c5f96babd2df342ca6f54a766d415c0985a64349c6db0f0baf10c47806d9e0a8f5b5e15d619fbd0e9659fed835e420e68379300e0bbf60f11673f287e4546
6
+ metadata.gz: 4de54a8d284a13b643a2f9c9fb8aaa887f4433c19ba68863c484dce51116e0902d203c8faa4d90b9c834e5aefa54516f68828d399eb01af9f53f6957f9f30f57
7
+ data.tar.gz: 5182036f9eb6a03bc4ab2c8ad8e7b613256b2ad56ca87ce2a3370fe3e493725103010b4c8031703d54841d48c9577695c784580118481c34f409151f0fa71208
@@ -1,6 +1,10 @@
1
1
  # Changelog
2
2
 
3
- ### 1.1.0 2014-07-21
3
+ ### 1.1.1 - 2014-07-24
4
+
5
+ - Now using octopress-hooks for access to Jekyll site.
6
+
7
+ ### 1.1.0 - 2014-07-21
4
8
 
5
9
  - Added smart quotes filter.
6
10
  - Added canonical_url filter.
@@ -1,10 +1,10 @@
1
1
  require "octopress-filters/version"
2
2
 
3
- unless defined? Octopress::Ink
4
- require "octopress-filters/generator"
3
+ # Octopress Ink has its own hooks.
4
+ unless defined? Octopress.site
5
+ require "octopress-filters/hooks"
5
6
  end
6
7
 
7
- require "jekyll"
8
8
  require "rubypants-unicode"
9
9
  require "titlecase"
10
10
 
@@ -14,7 +14,7 @@ module Octopress
14
14
  # Returns the site's config root or '/' if the config isn't set
15
15
  #
16
16
  def root
17
- root_url = Ink.site.config['root']
17
+ root_url = Octopress.site.config['root']
18
18
  root_url.nil? ? '/' : File.join('/', root_url)
19
19
  end
20
20
 
@@ -69,7 +69,7 @@ module Octopress
69
69
  # e.g. /images/awesome.gif => http://example.com/images/awesome.gif
70
70
  #
71
71
  def full_urls(input)
72
- url = Ink.site.config['url']
72
+ url = Octopress.site.config['url']
73
73
  if url.nil?
74
74
  raise IOError.new "Could not expand urls: Please add your published url to your _config.yml, eg url: http://example.com/"
75
75
  else
@@ -85,7 +85,7 @@ module Octopress
85
85
  # e.g. /images/awesome.gif => http://example.com/images/awesome.gif
86
86
  #
87
87
  def full_url(input)
88
- url = Ink.site.config['url']
88
+ url = Octopress.site.config['url']
89
89
  if url.nil?
90
90
  raise IOError.new "Could not expand url in #{input}: Please add your site's published url to your _config.yml, eg url: http://example.com/"
91
91
  else
@@ -0,0 +1,18 @@
1
+ require 'octopress-hooks'
2
+
3
+ module Octopress
4
+ def self.site
5
+ @site
6
+ end
7
+
8
+ def self.site=(site)
9
+ @site = site
10
+ end
11
+
12
+ class SiteGrabber < Hooks::Site
13
+ def pre_render(site)
14
+ Octopress.site = site
15
+ end
16
+ end
17
+ end
18
+
@@ -1,7 +1,7 @@
1
1
  module Octopress
2
2
  module Tags
3
3
  module Filters
4
- VERSION = "1.1.0"
4
+ VERSION = "1.1.1"
5
5
  end
6
6
  end
7
7
  end
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.version = Octopress::Tags::Filters::VERSION
9
9
  spec.authors = ["Brandon Mathis"]
10
10
  spec.email = ["brandon@imathis.com"]
11
- spec.summary = %q{Return tag renders a variable with some nice features}
12
- spec.description = %q{Return tag renders a variable with some nice features}
11
+ spec.summary = %q{A set of handy liquid filters used by Octopress}
12
+ spec.description = %q{A set of handy liquid filters used by Octopress}
13
13
  spec.homepage = "https://github.com/octopress/filters"
14
14
  spec.license = "MIT"
15
15
 
@@ -21,6 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.add_runtime_dependency "jekyll"
22
22
  spec.add_runtime_dependency "rubypants-unicode"
23
23
  spec.add_runtime_dependency "titlecase"
24
+ spec.add_runtime_dependency "octopress-hooks", "~> 2.0"
24
25
 
25
26
  spec.add_development_dependency "bundler", "~> 1.6"
26
27
  spec.add_development_dependency "rake"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress-filters
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
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-07-21 00:00:00.000000000 Z
11
+ date: 2014-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: octopress-hooks
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '2.0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '2.0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: bundler
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -108,7 +122,7 @@ dependencies:
108
122
  - - "~>"
109
123
  - !ruby/object:Gem::Version
110
124
  version: '1.0'
111
- description: Return tag renders a variable with some nice features
125
+ description: A set of handy liquid filters used by Octopress
112
126
  email:
113
127
  - brandon@imathis.com
114
128
  executables: []
@@ -123,7 +137,7 @@ files:
123
137
  - README.md
124
138
  - Rakefile
125
139
  - lib/octopress-filters.rb
126
- - lib/octopress-filters/generator.rb
140
+ - lib/octopress-filters/hooks.rb
127
141
  - lib/octopress-filters/version.rb
128
142
  - octopress-filters.gemspec
129
143
  - test/.clash.yml
@@ -168,7 +182,7 @@ rubyforge_project:
168
182
  rubygems_version: 2.2.2
169
183
  signing_key:
170
184
  specification_version: 4
171
- summary: Return tag renders a variable with some nice features
185
+ summary: A set of handy liquid filters used by Octopress
172
186
  test_files:
173
187
  - test/.clash.yml
174
188
  - test/Gemfile
@@ -1,17 +0,0 @@
1
- module Octopress
2
- module Ink
3
- def self.site
4
- @site
5
- end
6
-
7
- def self.site=(site)
8
- @site = site
9
- end
10
-
11
- class SiteGrabber < Jekyll::Generator
12
- def generate(site)
13
- Octopress::Ink.site = site
14
- end
15
- end
16
- end
17
- end