jekyll_ext 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/bin/ejekyll +21 -3
  2. metadata +4 -4
data/bin/ejekyll CHANGED
@@ -7,7 +7,22 @@ require 'jekyll'
7
7
 
8
8
  require File.join(File.dirname(__FILE__), '..', 'lib', 'aop.rb')
9
9
 
10
+ module Kernel
11
+ # From http://mentalized.net/journal/2010/04/02/suppress_warnings_from_ruby/
12
+ def suppress_warnings
13
+ original_verbosity = $VERBOSE
14
+ $VERBOSE = nil
15
+ result = yield
16
+ $VERBOSE = original_verbosity
17
+ return result
18
+ end
19
+ end
20
+
10
21
  module Jekyll
22
+ # For jekyll versions above 0.6.2 (inclusive)
23
+ if const_defined? :VERSION
24
+ suppress_warnings { VERSION = VERSION + " (Extended)" }
25
+ end
11
26
 
12
27
  class << self
13
28
  alias_method :configuration_without_extensions, :configuration
@@ -21,9 +36,12 @@ module Jekyll
21
36
  end
22
37
  alias_method :configuration, :configuration_with_extensions
23
38
 
24
- alias_method :original_version, :version
25
- def version
26
- original_version + " (Extended)"
39
+ # For jekyll versions below 0.6.2 (exclusive)
40
+ if method_defined? :version
41
+ alias_method :original_version, :version
42
+ def version
43
+ original_version + " (Extended)"
44
+ end
27
45
  end
28
46
 
29
47
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll_ext
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Raoul Felix
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-06-21 00:00:00 +01:00
18
+ date: 2010-07-02 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency