jekyll-assets 2.0.0.pre.beta4 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +79 -9
  3. data/lib/jekyll-assets.rb +4 -0
  4. data/lib/jekyll/assets.rb +14 -15
  5. data/lib/jekyll/assets/addons.rb +10 -0
  6. data/lib/jekyll/assets/addons/autoprefixer.rb +4 -0
  7. data/lib/jekyll/assets/addons/bootstrap.rb +4 -0
  8. data/lib/jekyll/assets/addons/compass.rb +4 -0
  9. data/lib/jekyll/assets/addons/font_awesome.rb +4 -0
  10. data/lib/jekyll/assets/addons/js_es6.rb +4 -0
  11. data/lib/jekyll/assets/addons/proxies/magick.rb +57 -27
  12. data/lib/jekyll/assets/cached.rb +4 -0
  13. data/lib/jekyll/assets/config.rb +7 -3
  14. data/lib/jekyll/assets/env.rb +68 -107
  15. data/lib/jekyll/assets/hook.rb +19 -12
  16. data/lib/jekyll/assets/hooks.rb +19 -0
  17. data/lib/jekyll/assets/hooks/cache.rb +4 -0
  18. data/lib/jekyll/assets/hooks/compression.rb +4 -0
  19. data/lib/jekyll/assets/hooks/configuration.rb +4 -0
  20. data/lib/jekyll/assets/hooks/context_patches.rb +5 -0
  21. data/lib/jekyll/assets/hooks/disable_erb.rb +4 -0
  22. data/lib/jekyll/assets/hooks/helpers.rb +4 -0
  23. data/lib/jekyll/assets/hooks/jekyll/asset_drops.rb +7 -0
  24. data/lib/jekyll/assets/hooks/jekyll/ignore.rb +9 -0
  25. data/lib/jekyll/{hooks → assets/hooks/jekyll}/initialize.rb +4 -0
  26. data/lib/jekyll/{hooks → assets/hooks/jekyll}/write_assets.rb +4 -0
  27. data/lib/jekyll/assets/hooks/logger.rb +4 -0
  28. data/lib/jekyll/assets/hooks/sources.rb +5 -1
  29. data/lib/jekyll/assets/hooks/sprockets.rb +4 -0
  30. data/lib/jekyll/assets/hooks/version.rb +5 -1
  31. data/lib/jekyll/assets/liquid.rb +13 -0
  32. data/lib/jekyll/assets/liquid/drop.rb +59 -0
  33. data/lib/jekyll/assets/liquid/filters.rb +16 -1
  34. data/lib/jekyll/assets/liquid/tag.rb +61 -37
  35. data/lib/jekyll/assets/liquid/tag/defaults.rb +18 -0
  36. data/lib/jekyll/assets/liquid/tag/defaults/image.rb +51 -0
  37. data/lib/jekyll/assets/liquid/tag/parser.rb +56 -28
  38. data/lib/jekyll/assets/liquid/tag/proxied_asset.rb +14 -12
  39. data/lib/jekyll/assets/liquid/tag/proxies.rb +28 -24
  40. data/lib/jekyll/assets/logger.rb +13 -13
  41. data/lib/jekyll/assets/patches.rb +8 -0
  42. data/lib/jekyll/assets/patches/jekyll/cleaner.rb +4 -0
  43. data/lib/jekyll/assets/patches/jekyll/site.rb +4 -0
  44. data/lib/jekyll/assets/patches/kernel.rb +8 -0
  45. data/lib/jekyll/assets/patches/sprockets/asset.rb +6 -2
  46. data/lib/jekyll/assets/version.rb +5 -1
  47. metadata +33 -11
  48. data/lib/jekyll/assets/patches/hash.rb +0 -5
@@ -1,3 +1,7 @@
1
+ # Frozen-string-literal: true
2
+ # Copyright: 2012-2015 - MIT License
3
+ # Encoding: utf-8
4
+
1
5
  module Jekyll
2
6
  module Assets
3
7
  class Logger
@@ -6,39 +10,35 @@ module Jekyll
6
10
  @_log ||= Jekyll.logger
7
11
  end
8
12
 
9
- # -----------------------------------------------------------------------
10
13
  # Log Level: 1
11
- # -----------------------------------------------------------------------
12
14
 
13
15
  def warn(msg = nil, &block)
14
- log.warn(Prefix, (block_given?? block.call : msg))
16
+ msg = (block_given?? block.call : msg)
17
+ log.warn(Prefix, msg)
15
18
  end
16
19
 
17
- # -----------------------------------------------------------------------
18
20
  # Log Level: 1
19
- # -----------------------------------------------------------------------
20
21
 
21
22
  def error(msg = nil, &block)
22
- log.error(Prefix, (block_given?? block.call : msg))
23
+ msg = (block_given?? block.call : msg)
24
+ log.error(Prefix, msg)
23
25
  end
24
26
 
25
- # -----------------------------------------------------------------------
26
27
  # Log Level: 2
27
- # -----------------------------------------------------------------------
28
28
 
29
29
  def info(msg = nil, &block)
30
- log.info(Prefix, (block_given?? block.call : msg))
30
+ msg = (block_given?? block.call : msg)
31
+ log.info(Prefix, msg)
31
32
  end
32
33
 
33
- # -----------------------------------------------------------------------
34
34
  # Log Level: 3
35
- # -----------------------------------------------------------------------
36
35
 
37
36
  def debug(msg = nil, &block)
38
- log.debug(Prefix, (block_given?? block.call : msg))
37
+ msg = (block_given?? block.call : msg)
38
+ log.debug(Prefix, msg)
39
39
  end
40
40
 
41
- # -----------------------------------------------------------------------
41
+ #
42
42
 
43
43
  def log_level=(*a)
44
44
  raise RuntimeError, "Please set log levels on Jekyll.logger"
@@ -0,0 +1,8 @@
1
+ # Frozen-string-literal: true
2
+ # Copyright: 2012-2015 - MIT License
3
+ # Encoding: utf-8
4
+
5
+ require_relative "patches/jekyll/cleaner"
6
+ require_relative "patches/sprockets/asset"
7
+ require_relative "patches/jekyll/site"
8
+ require_relative "patches/kernel"
@@ -1,3 +1,7 @@
1
+ # Frozen-string-literal: true
2
+ # Copyright: 2012-2015 - MIT License
3
+ # Encoding: utf-8
4
+
1
5
  module Jekyll
2
6
  class Cleaner
3
7
  # TODO: jekyll/jekyll@upstream: This method should really have a hook ya.
@@ -1,3 +1,7 @@
1
+ # Frozen-string-literal: true
2
+ # Copyright: 2012-2015 - MIT License
3
+ # Encoding: utf-8
4
+
1
5
  module Jekyll
2
6
  class Site
3
7
  attr_accessor :sprockets
@@ -1,3 +1,7 @@
1
+ # Frozen-string-literal: true
2
+ # Copyright: 2012-2015 - MIT License
3
+ # Encoding: utf-8
4
+
1
5
  module Kernel
2
6
  def has_javascript?
3
7
  require "execjs"
@@ -9,6 +13,8 @@ module Kernel
9
13
  " Skipping loading of library.")
10
14
  end
11
15
 
16
+ #
17
+
12
18
  def try_require(file)
13
19
  require file
14
20
  if block_given?
@@ -18,6 +24,8 @@ module Kernel
18
24
  return nil
19
25
  end
20
26
 
27
+ #
28
+
21
29
  def try_require_if_javascript(file)
22
30
  ["execjs", file].map(&method(:require))
23
31
  if block_given?
@@ -1,10 +1,14 @@
1
+ # Frozen-string-literal: true
2
+ # Copyright: 2012-2015 - MIT License
3
+ # Encoding: utf-8
4
+
1
5
  module Sprockets
2
6
  class Asset
3
7
  def liquid_tags
4
- metadata.fetch_or_store(:liquid_tags, Set.new)
8
+ metadata[:liquid_tags] ||= Set.new
5
9
  end
6
10
 
7
- # -------------------------------------------------------------------------
11
+ #
8
12
 
9
13
  def data_uri
10
14
  "data:#{content_type};base64,#{Rack::Utils.escape(Base64.encode64(to_s))}"
@@ -1,5 +1,9 @@
1
+ # Frozen-string-literal: true
2
+ # Copyright: 2012-2015 - MIT License
3
+ # Encoding: utf-8
4
+
1
5
  module Jekyll
2
6
  module Assets
3
- VERSION="2.0.0.pre.beta4"
7
+ VERSION="2.0.0"
4
8
  end
5
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre.beta4
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordon Bedwell
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-10-29 00:00:00.000000000 Z
13
+ date: 2015-11-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: sprockets
@@ -40,20 +40,34 @@ dependencies:
40
40
  - - "~>"
41
41
  - !ruby/object:Gem::Version
42
42
  version: '1.2'
43
+ - !ruby/object:Gem::Dependency
44
+ name: fastimage
45
+ requirement: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '1.8'
50
+ type: :runtime
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - "~>"
55
+ - !ruby/object:Gem::Version
56
+ version: '1.8'
43
57
  - !ruby/object:Gem::Dependency
44
58
  name: jekyll
45
59
  requirement: !ruby/object:Gem::Requirement
46
60
  requirements:
47
61
  - - "~>"
48
62
  - !ruby/object:Gem::Version
49
- version: 3.0.0
63
+ version: '3.0'
50
64
  type: :runtime
51
65
  prerelease: false
52
66
  version_requirements: !ruby/object:Gem::Requirement
53
67
  requirements:
54
68
  - - "~>"
55
69
  - !ruby/object:Gem::Version
56
- version: 3.0.0
70
+ version: '3.0'
57
71
  - !ruby/object:Gem::Dependency
58
72
  name: nokogiri
59
73
  requirement: !ruby/object:Gem::Requirement
@@ -128,6 +142,7 @@ files:
128
142
  - Rakefile
129
143
  - lib/jekyll-assets.rb
130
144
  - lib/jekyll/assets.rb
145
+ - lib/jekyll/assets/addons.rb
131
146
  - lib/jekyll/assets/addons/autoprefixer.rb
132
147
  - lib/jekyll/assets/addons/bootstrap.rb
133
148
  - lib/jekyll/assets/addons/compass.rb
@@ -138,31 +153,38 @@ files:
138
153
  - lib/jekyll/assets/config.rb
139
154
  - lib/jekyll/assets/env.rb
140
155
  - lib/jekyll/assets/hook.rb
156
+ - lib/jekyll/assets/hooks.rb
141
157
  - lib/jekyll/assets/hooks/cache.rb
142
158
  - lib/jekyll/assets/hooks/compression.rb
143
159
  - lib/jekyll/assets/hooks/configuration.rb
144
160
  - lib/jekyll/assets/hooks/context_patches.rb
145
161
  - lib/jekyll/assets/hooks/disable_erb.rb
146
162
  - lib/jekyll/assets/hooks/helpers.rb
163
+ - lib/jekyll/assets/hooks/jekyll/asset_drops.rb
164
+ - lib/jekyll/assets/hooks/jekyll/ignore.rb
165
+ - lib/jekyll/assets/hooks/jekyll/initialize.rb
166
+ - lib/jekyll/assets/hooks/jekyll/write_assets.rb
147
167
  - lib/jekyll/assets/hooks/logger.rb
148
168
  - lib/jekyll/assets/hooks/sources.rb
149
169
  - lib/jekyll/assets/hooks/sprockets.rb
150
170
  - lib/jekyll/assets/hooks/version.rb
171
+ - lib/jekyll/assets/liquid.rb
172
+ - lib/jekyll/assets/liquid/drop.rb
151
173
  - lib/jekyll/assets/liquid/filters.rb
152
174
  - lib/jekyll/assets/liquid/tag.rb
175
+ - lib/jekyll/assets/liquid/tag/defaults.rb
176
+ - lib/jekyll/assets/liquid/tag/defaults/image.rb
153
177
  - lib/jekyll/assets/liquid/tag/parser.rb
154
178
  - lib/jekyll/assets/liquid/tag/proxied_asset.rb
155
179
  - lib/jekyll/assets/liquid/tag/proxies.rb
156
180
  - lib/jekyll/assets/logger.rb
157
- - lib/jekyll/assets/patches/hash.rb
181
+ - lib/jekyll/assets/patches.rb
158
182
  - lib/jekyll/assets/patches/jekyll/cleaner.rb
159
183
  - lib/jekyll/assets/patches/jekyll/site.rb
160
184
  - lib/jekyll/assets/patches/kernel.rb
161
185
  - lib/jekyll/assets/patches/sprockets/asset.rb
162
186
  - lib/jekyll/assets/version.rb
163
- - lib/jekyll/hooks/initialize.rb
164
- - lib/jekyll/hooks/write_assets.rb
165
- homepage: http://github.com/jekyll-assets/jekyll-assets/
187
+ homepage: http://github.com/jekyll/jekyll-assets/
166
188
  licenses:
167
189
  - MIT
168
190
  metadata: {}
@@ -177,12 +199,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
177
199
  version: '0'
178
200
  required_rubygems_version: !ruby/object:Gem::Requirement
179
201
  requirements:
180
- - - ">"
202
+ - - ">="
181
203
  - !ruby/object:Gem::Version
182
- version: 1.3.1
204
+ version: '0'
183
205
  requirements: []
184
206
  rubyforge_project:
185
- rubygems_version: 2.4.8
207
+ rubygems_version: 2.4.5.1
186
208
  signing_key:
187
209
  specification_version: 4
188
210
  summary: Assets for Jekyll
@@ -1,5 +0,0 @@
1
- class Hash
2
- def fetch_or_store(key, val)
3
- fetch(key, nil) || store(key, val)
4
- end
5
- end