jekyll-assets 1.0.0 → 2.0.0.pre.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +10 -10
  3. data/LICENSE +16 -18
  4. data/README.md +94 -554
  5. data/Rakefile +2 -8
  6. data/lib/jekyll/assets.rb +18 -12
  7. data/lib/jekyll/assets/cached.rb +12 -0
  8. data/lib/jekyll/assets/configuration.rb +43 -87
  9. data/lib/jekyll/assets/context.rb +23 -0
  10. data/lib/jekyll/assets/env.rb +181 -0
  11. data/lib/jekyll/assets/extras/es6.rb +5 -0
  12. data/lib/jekyll/assets/extras/font-awesome.rb +1 -0
  13. data/lib/jekyll/assets/extras/helpers.rb +6 -0
  14. data/lib/jekyll/assets/extras/prefix.rb +5 -0
  15. data/lib/jekyll/assets/filters.rb +9 -11
  16. data/lib/jekyll/assets/helpers.rb +37 -0
  17. data/lib/jekyll/assets/hook.rb +45 -0
  18. data/lib/jekyll/assets/hooks/post_read.rb +3 -0
  19. data/lib/jekyll/assets/hooks/post_write.rb +3 -0
  20. data/lib/jekyll/assets/logger.rb +25 -0
  21. data/lib/jekyll/assets/patches/jekyll/cleaner.rb +11 -0
  22. data/lib/jekyll/assets/patches/jekyll/site.rb +5 -0
  23. data/lib/jekyll/assets/patches/sprockets/asset.rb +13 -0
  24. data/lib/jekyll/assets/tag.rb +136 -9
  25. data/lib/jekyll/assets/tag/parser.rb +129 -0
  26. data/lib/jekyll/assets/tag/proxied_asset.rb +84 -0
  27. data/lib/jekyll/assets/tag/proxies.rb +86 -0
  28. data/lib/jekyll/assets/tag/proxies/magick.rb +101 -0
  29. data/lib/jekyll/assets/version.rb +1 -1
  30. metadata +59 -149
  31. data/.gitignore +0 -27
  32. data/.rspec +0 -1
  33. data/.rubocop.yml +0 -43
  34. data/.rubocop_todo.yml +0 -10
  35. data/.travis.yml +0 -16
  36. data/.yardopts +0 -1
  37. data/Appraisals +0 -7
  38. data/Guardfile +0 -7
  39. data/HISTORY.md +0 -297
  40. data/gemfiles/jekyll_2.gemfile +0 -17
  41. data/gemfiles/jekyll_3.gemfile +0 -17
  42. data/jekyll-assets.gemspec +0 -34
  43. data/lib/jekyll-assets.rb +0 -2
  44. data/lib/jekyll/assets/asset_path.rb +0 -39
  45. data/lib/jekyll/assets/environment.rb +0 -62
  46. data/lib/jekyll/assets/patches.rb +0 -1
  47. data/lib/jekyll/assets/patches/asset_patch.rb +0 -102
  48. data/lib/jekyll/assets/patches/bundled_asset_patch.rb +0 -16
  49. data/lib/jekyll/assets/patches/context_patch.rb +0 -31
  50. data/lib/jekyll/assets/patches/index_patch.rb +0 -25
  51. data/lib/jekyll/assets/patches/processed_asset_patch.rb +0 -59
  52. data/lib/jekyll/assets/patches/site_patch.rb +0 -62
  53. data/lib/jekyll/assets/renderer.rb +0 -122
  54. data/spec/fixtures/.gitignore +0 -2
  55. data/spec/fixtures/.jekyll-metadata +0 -0
  56. data/spec/fixtures/_assets/alert.js +0 -1
  57. data/spec/fixtures/_assets/app.css.erb +0 -5
  58. data/spec/fixtures/_assets/app.js +0 -1
  59. data/spec/fixtures/_assets/app.min.css +0 -0
  60. data/spec/fixtures/_assets/app.min.js +0 -0
  61. data/spec/fixtures/_assets/fonts/vapor.eot +0 -0
  62. data/spec/fixtures/_assets/fonts/vapor.svg +0 -0
  63. data/spec/fixtures/_assets/fonts/vapor.ttf +0 -0
  64. data/spec/fixtures/_assets/fonts/vapor.woff +0 -0
  65. data/spec/fixtures/_assets/lib/relative.css.scss +0 -12
  66. data/spec/fixtures/_assets/noise.png +0 -0
  67. data/spec/fixtures/_assets/noize.png +0 -0
  68. data/spec/fixtures/_assets/should_be_blank.css.erb +0 -1
  69. data/spec/fixtures/_assets/should_fail.css.erb +0 -1
  70. data/spec/fixtures/_assets/vapor.css.scss +0 -13
  71. data/spec/fixtures/_assets/vapor.js +0 -2
  72. data/spec/fixtures/_assets/vendor/with_bootstrap.css.sass +0 -1
  73. data/spec/fixtures/_assets/vendor/with_bourbon.css.sass +0 -4
  74. data/spec/fixtures/_assets/vendor/with_compass.css.sass +0 -4
  75. data/spec/fixtures/_assets/vendor/with_neat.css.sass +0 -5
  76. data/spec/fixtures/_assets/wowscript.js +0 -0
  77. data/spec/fixtures/_assets/wowstyle.css +0 -0
  78. data/spec/fixtures/_config.yml +0 -2
  79. data/spec/fixtures/_layouts/default.html +0 -9
  80. data/spec/fixtures/_posts/2012-10-19-hello-world.md +0 -6
  81. data/spec/fixtures/_posts/2015-02-02-duplicates.md +0 -8
  82. data/spec/fixtures/index.html +0 -0
  83. data/spec/lib/jekyll/assets/configuration_spec.rb +0 -172
  84. data/spec/lib/jekyll/assets/environment_spec.rb +0 -18
  85. data/spec/lib/jekyll/assets/filters_spec.rb +0 -112
  86. data/spec/lib/jekyll/assets/patches/site_patch_spec.rb +0 -176
  87. data/spec/lib/jekyll/assets/renderer_spec.rb +0 -286
  88. data/spec/lib/jekyll/assets/tag_spec.rb +0 -139
  89. data/spec/spec_helper.rb +0 -58
  90. data/spec/support/fixtures_helpers.rb +0 -7
data/.gitignore DELETED
@@ -1,27 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
18
- tags
19
- .sass-cache
20
- .ruby-version
21
-
22
- # Vim
23
- *.swp
24
- *.swo
25
- gemfiles/jekyll_2.gemfile.lock
26
- gemfiles/jekyll_3.gemfile.lock
27
- /vendor
data/.rspec DELETED
@@ -1 +0,0 @@
1
- --color --format documentation
data/.rubocop.yml DELETED
@@ -1,43 +0,0 @@
1
- inherit_from: .rubocop_todo.yml
2
-
3
- ## Styles ######################################################################
4
-
5
- Style/AlignParameters:
6
- EnforcedStyle: with_fixed_indentation
7
-
8
- Style/BracesAroundHashParameters:
9
- Enabled: false
10
-
11
- Style/EmptyLineBetweenDefs:
12
- AllowAdjacentOneLineDefs: true
13
-
14
- Style/Encoding:
15
- EnforcedStyle: when_needed
16
-
17
- Style/HashSyntax:
18
- EnforcedStyle: hash_rockets
19
-
20
- Style/IndentHash:
21
- EnforcedStyle: consistent
22
-
23
- # New lambda syntax is as ugly to me as new syntax of Hash.
24
- Style/Lambda:
25
- Enabled: false
26
-
27
- # A bit useless restriction, that makes impossible aligning code like this:
28
- #
29
- # redis do |conn|
30
- # conn.hset :k1, now
31
- # conn.hincrby :k2, 123
32
- # end
33
- SingleSpaceBeforeFirstArg:
34
- Enabled: false
35
-
36
- Style/StringLiterals:
37
- EnforcedStyle: double_quotes
38
-
39
- ## Metrics #####################################################################
40
-
41
- Metrics/MethodLength:
42
- CountComments: false
43
- Max: 15
data/.rubocop_todo.yml DELETED
@@ -1,10 +0,0 @@
1
- # This configuration was generated by `rubocop --auto-gen-config`
2
- # on 2014-09-20 21:12:28 +0200 using RuboCop version 0.26.0.
3
- # The point is for the user to remove these configuration records
4
- # one by one as the offenses are removed from the code base.
5
- # Note that changes in the inspected code, or installation of new
6
- # versions of RuboCop, may require this file to be generated again.
7
-
8
- # Offense count: 17
9
- Style/Documentation:
10
- Enabled: false
data/.travis.yml DELETED
@@ -1,16 +0,0 @@
1
- language: ruby
2
-
3
- rvm:
4
- - 1.9.3
5
- - 2.0.0
6
- - 2.1.6
7
- - 2.2.2
8
-
9
- gemfile:
10
- - gemfiles/jekyll_2.gemfile
11
- - gemfiles/jekyll_3.gemfile
12
-
13
- matrix:
14
- exclude:
15
- - rvm: 1.9.3
16
- gemfile: gemfiles/jekyll_3.gemfile
data/.yardopts DELETED
@@ -1 +0,0 @@
1
- lib/**/*.rb - README.md HISTORY.md LICENSE
data/Appraisals DELETED
@@ -1,7 +0,0 @@
1
- appraise "jekyll-2" do
2
- gem "jekyll", "~>2.0"
3
- end
4
-
5
- appraise "jekyll-3" do
6
- gem "jekyll", "~>3.0.pre"
7
- end
data/Guardfile DELETED
@@ -1,7 +0,0 @@
1
- notification :off
2
-
3
- guard "rspec", :cmd => "bundle exec rspec" do
4
- watch(/^spec\/.+_spec\.rb$/)
5
- watch(/^lib\/(.+)\.rb$/) { |m| "spec/lib/#{m[1]}_spec.rb" }
6
- watch("spec/spec_helper.rb") { "spec" }
7
- end
data/HISTORY.md DELETED
@@ -1,297 +0,0 @@
1
- ### master (unreleased)
2
-
3
-
4
-
5
- ### 1.0.0-alpha1 (2015-03-14)
6
-
7
- * Restore support of `require "jekyll-assets"`. (@ixti)
8
-
9
-
10
- ### 1.0.0-alpha0 (2015-03-14)
11
-
12
- * Remove all built-in vendors. (@ixti)
13
- * Remove support of `require "jekyll-assets"`.
14
- Use `require "jekyll/assets"`instead. (@ixti)
15
- * Add environment init hooks (@zmbush)
16
-
17
-
18
- ### 0.14.0 (2015-03-09)
19
-
20
- * Add support for resizing image assets. See #130. (Thanks @zmbush)
21
- * Respect `_autoprefixer.yml` along with `autoprefixer.yml` configs.
22
- See #128. (Thanks @zmbush)
23
- * Fix issue with files being ignored when same content. See #112.
24
-
25
-
26
- ### 0.13.0 (2015-02-01)
27
-
28
- * Respect Jekyll config's `baseurl` when auto-guessing baseurl. See #125.
29
-
30
-
31
- ### 0.12.1 (2014-12-08)
32
-
33
- * Fix regression with image attributes when `autosize` is used. See #117.
34
- (Thanks @ingar)
35
-
36
-
37
- ### 0.12.0 (2014-12-07)
38
-
39
- * Add `[autosize]` for the `image` helper. See #114. (Thanks @devm33)
40
-
41
-
42
- ### 0.11.0 (2014-11-09)
43
-
44
- * Add Rails Assets support. See #109. (Thanks @ingar)
45
- * Sass precision Bootstrap. See #107. (Thanks @thbar)
46
-
47
-
48
- ### 0.10.1 (2014-10-13)
49
-
50
- * Fix regression in assets finder (#104), appeared after introducing tag
51
- attributes (#52). To specify asset path containing spaces, wrap it into
52
- single or doube qotes: `{% javascript_tag "my app.js" async %}`.
53
-
54
-
55
- ### 0.10.0 (2014-09-14)
56
-
57
- * Drop support of `bootstrap-sass < 3.2`, `font-awesome-sass < 4.2`
58
- and `jekyll < 2.0`.
59
- * Allow configure autoprefixer. See #95. (Thanks @silvenon)
60
- * Fix support for FontAwesome `v4.2`. See #99. (Thanks @janlindblom)
61
-
62
-
63
- ### 0.9.2 (2014-08-05)
64
-
65
- * Fix tags renderer with attributes. See #93. (Thanks @tomdiggle)
66
-
67
-
68
- ### 0.9.1 (2014-07-28)
69
-
70
- * Fix path normalization when filename contains `dot`.
71
- See #90. (Thanks @tomdiggle)
72
-
73
-
74
- ### 0.9.0 (2014-07-19)
75
-
76
- * Allow pass remote URIs to image/stylesheet/javascript tags/filters.
77
- See #52.
78
- * Allow pass extra tag attributes to image/stylesheet/javascript tags/filters.
79
- See #52.
80
-
81
-
82
- ### 0.8.1 (2014-07-04)
83
-
84
- * Fix support of `bootstrap-sass v3.2+`. See #85.
85
-
86
-
87
- ### 0.8.0 (2014-06-23)
88
-
89
- * Explicitly require `sass`.
90
- * Fix `asset_*` helpers in imported SASS files.
91
- See #83, #63. (Thanks @sentience)
92
-
93
-
94
- ### 0.7.9 (2014-05-25)
95
-
96
- * Add `font-awesome` support. See #76. (Thanks @adilsoncarvalho)
97
- * Add `autoprefixer-rails` support. See #68. (Thanks @nz)
98
-
99
-
100
- ### 0.7.8 (2014-05-08)
101
-
102
- * Support jekyll `~> 2.0`.
103
-
104
-
105
- ### 0.7.7 (2014-03-12)
106
-
107
- * Allow purge cache by bumping assest config version.
108
-
109
-
110
- ### 0.7.6 (2014-02-22)
111
-
112
- * Add `bootstrap-sass` support. See #75. (Thanks @adilsoncarvalho)
113
-
114
-
115
- ### 0.7.5 (2014-02-11)
116
-
117
- * Fix `asset_path` error against empty srting. See #72. (Thanks @yaegashi)
118
-
119
-
120
- ### 0.7.4 (2013-10-25)
121
-
122
- * Fix relative paths requires. See #59. (Thanks @wadetandy)
123
-
124
-
125
- ### 0.7.3 (2013-10-12)
126
-
127
- * Play nice with other plugins using `static_files`. See #45.
128
-
129
-
130
- ### 0.7.2 (2013-09-07)
131
-
132
- * Add `image` Liquid tag and filter.
133
-
134
-
135
- ### 0.7.1 (2013-08-17)
136
-
137
- * Minor bugfix of AssetPath and small code refactoring.
138
-
139
-
140
- ### 0.7.0 (2013-08-11)
141
-
142
- * Adds `debug` mode that outputs multiple scripts/styles instead of bundling
143
- them. See #40.
144
-
145
-
146
- ### 0.6.1 (2013-07-22)
147
-
148
- * Fix regression with `asset_path`. See #38.
149
-
150
-
151
- ### 0.6.0 (2013-07-14)
152
-
153
- * Remove `type` attributes from tags genereated by `javascript` and
154
- `stylesheet` helpers. See #37.
155
- * Fix issue with nested assets not being regenerated when cache enabled.
156
- See #35.
157
-
158
-
159
- ### 0.5.4 (2103-07-07)
160
-
161
- * Rename configuration options `compress.js` and `compress.css` into
162
- `js_compressor` and `css_compressor` respectively.
163
- * Rename configureation option `cache_assets` into `cache`.
164
- * Allow specify custom compilation cache path.
165
- * Invalidate cache upon config changes.
166
-
167
-
168
- ### 0.5.3 (2013-05-25)
169
-
170
- * Assets cache disable by default, in order to avoid "unpredictable" behavior.
171
-
172
-
173
- ### 0.5.2 (2013-05-25)
174
-
175
- * Use Sprocket assets cache for compilation speed improvement. See #32.
176
- (Thanks @beanieboi).
177
- * Minor fix in gemspec.
178
-
179
-
180
- ### 0.5.1 (2013-05-13)
181
-
182
- * Re-use underlying asset file to avoid "recompilation" of fresh assets.
183
-
184
-
185
- ### 0.5.0 (2013-05-10)
186
-
187
- * Fix mocks to pass tests on jekyll 1.x
188
- * Update jekyll dependency `~> 1.0`
189
-
190
-
191
- ### 0.4.3 (2014-12-21)
192
-
193
- * Fix configuration reader. See #119.
194
-
195
-
196
- ### 0.4.2 (2013-05-08)
197
-
198
- * Require jekyll < 1.0.0. This is a the last release with support of 0.x branch
199
- of jekyll.
200
-
201
-
202
- ### 0.4.1 (2013-05-08)
203
-
204
- * Drop forgotten liquid processor require.
205
-
206
-
207
- ### 0.4.0 (2013-05-08)
208
-
209
- * Drop Liquid pre-processing. See #25.
210
-
211
-
212
- ### 0.3.8 (2013-04-29)
213
-
214
- * Play nice with query strings and anchors in pathnames of requested assets.
215
- See #20.
216
-
217
-
218
- ### 0.3.7 (2013-04-29)
219
-
220
- * Refactor AssetFile to avoid stale assets caching. See #23.
221
-
222
-
223
- ### 0.3.6 (2013-04-28)
224
-
225
- * Ruby 2.0.0 support. See #16.
226
-
227
-
228
- ### 0.3.5 (2013-03-03)
229
-
230
- * Add built-in neat support as `require "jekyll-assets/neat"`. See #18.
231
- (Thanks @awmichel)
232
- * Automagically produce GZipped assets. See #17. (Thanks @beanieboi)
233
-
234
-
235
- ### 0.3.4 (2013-02-18)
236
-
237
- * Fix assets regeneration (with --auto) issue. See #13.
238
-
239
-
240
- ### 0.3.3 (2013-02-16)
241
-
242
- * Respect cachebust setting on assets output filenames. (Thanks @softcrumbs)
243
-
244
-
245
- ### 0.3.2 (2013-02-10)
246
-
247
- * Allow choose cachebusting strategy (hard/soft/none). See #11.
248
-
249
-
250
- ### 0.3.1 (2013-02-02)
251
-
252
- * Preprocess CSS/JS assets with Liquid processor.
253
-
254
-
255
- ### 0.3.0 (2013-01-08)
256
-
257
- * Add complimentary filters (same names as tags).
258
-
259
-
260
- ### 0.2.3 (2013-01-07)
261
-
262
- * Add built-in bourbon support as: `require "jekyll-assets/bourbon"`.
263
-
264
-
265
- ### 0.2.2 (2013-01-07)
266
-
267
- * Add built-in compass support as: `require "jekyll-assets/compass"`.
268
-
269
-
270
- ### 0.2.1 (2012-12-31)
271
-
272
- * Expose `Jekyll::Site` instance into assets as `site`.
273
- * Improve assets comparison (when required with different logical names).
274
-
275
-
276
- ### 0.2.0 (2012-12-28)
277
-
278
- * Remove logging.
279
- * Fix `asset_path` helper within assets.
280
- * Remove `bundles` configuration option.
281
- All require assets are auto-bundled now.
282
-
283
-
284
- ### 0.1.1 (2012-12-21)
285
-
286
- * Add `baseurl` configuration option.
287
-
288
-
289
- ### 0.1.1 (2012-10-23)
290
-
291
- * Small bug fixes and improvements.
292
- * Add `{% asset <logical_path> %}` Liquid tag.
293
-
294
-
295
- ### 0.1.0 (2012-10-22)
296
-
297
- * First public release.
@@ -1,17 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "jekyll", "~>2.0"
6
-
7
- group :development do
8
- gem "rubocop", "~>0.29.1"
9
- gem "rake"
10
- gem "rspec"
11
- gem "appraisal"
12
- gem "guard-rspec"
13
- gem "coveralls", :require => false
14
- gem "simplecov", :require => false
15
- end
16
-
17
- gemspec :path => "../"
@@ -1,17 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "jekyll", "~>3.0.pre"
6
-
7
- group :development do
8
- gem "rubocop", "~>0.29.1"
9
- gem "rake"
10
- gem "rspec"
11
- gem "appraisal"
12
- gem "guard-rspec"
13
- gem "coveralls", :require => false
14
- gem "simplecov", :require => false
15
- end
16
-
17
- gemspec :path => "../"