jekyll 1.2.1 → 1.3.0.rc

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of jekyll might be problematic. Click here for more details.

Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/History.markdown +58 -0
  3. data/README.markdown +2 -1
  4. data/Rakefile +8 -1
  5. data/bin/jekyll +14 -17
  6. data/features/create_sites.feature +11 -0
  7. data/features/data.feature +65 -0
  8. data/features/include_tag.feature +13 -0
  9. data/features/site_configuration.feature +29 -0
  10. data/features/step_definitions/jekyll_steps.rb +27 -12
  11. data/features/support/env.rb +36 -0
  12. data/jekyll.gemspec +22 -10
  13. data/lib/jekyll.rb +2 -1
  14. data/lib/jekyll/cleaner.rb +8 -8
  15. data/lib/jekyll/commands/build.rb +14 -8
  16. data/lib/jekyll/commands/serve.rb +2 -0
  17. data/lib/jekyll/configuration.rb +5 -1
  18. data/lib/jekyll/converters/markdown/kramdown_parser.rb +1 -1
  19. data/lib/jekyll/convertible.rb +17 -6
  20. data/lib/jekyll/core_ext.rb +15 -0
  21. data/lib/jekyll/filters.rb +10 -0
  22. data/lib/jekyll/post.rb +2 -2
  23. data/lib/jekyll/site.rb +68 -19
  24. data/lib/jekyll/tags/gist.rb +9 -1
  25. data/lib/jekyll/tags/highlight.rb +1 -1
  26. data/lib/jekyll/tags/include.rb +72 -28
  27. data/lib/jekyll/tags/post_url.rb +4 -2
  28. data/lib/site_template/css/main.css +15 -15
  29. data/site/_includes/docs_contents.html +1 -1
  30. data/site/_includes/docs_contents_mobile.html +1 -1
  31. data/site/_posts/2013-10-28-jekyll-1-3-0-rc1-released.markdown +19 -0
  32. data/site/docs/configuration.md +18 -0
  33. data/site/docs/datafiles.md +63 -0
  34. data/site/docs/installation.md +10 -0
  35. data/site/docs/migrations.md +12 -3
  36. data/site/docs/pagination.md +16 -37
  37. data/site/docs/plugins.md +66 -6
  38. data/site/docs/structure.md +17 -0
  39. data/site/docs/templates.md +31 -7
  40. data/site/docs/upgrading.md +3 -3
  41. data/site/docs/usage.md +1 -1
  42. data/site/docs/variables.md +2 -2
  43. data/test/helper.rb +4 -1
  44. data/test/source/_data/languages.yml +2 -0
  45. data/test/source/_data/members.yaml +7 -0
  46. data/test/source/_data/products.yml +4 -0
  47. data/test/source/_layouts/post/simple.html +1 -0
  48. data/test/source/products.yml +4 -0
  49. data/test/test_convertible.rb +1 -1
  50. data/test/test_filters.rb +11 -0
  51. data/test/test_kramdown.rb +32 -5
  52. data/test/test_site.rb +58 -1
  53. data/test/test_tags.rb +21 -23
  54. metadata +71 -27
@@ -156,7 +156,7 @@ class TestSite < Test::Unit::TestCase
156
156
 
157
157
  should "read layouts" do
158
158
  @site.read_layouts
159
- assert_equal ["default", "simple"].sort, @site.layouts.keys.sort
159
+ assert_equal ["default", "simple", "post/simple"].sort, @site.layouts.keys.sort
160
160
  end
161
161
 
162
162
  should "read posts" do
@@ -335,5 +335,62 @@ class TestSite < Test::Unit::TestCase
335
335
  end
336
336
  end
337
337
 
338
+ context 'data directory' do
339
+ should 'auto load yaml files' do
340
+ site = Site.new(Jekyll.configuration)
341
+ site.process
342
+
343
+ file_content = YAML.safe_load_file(File.join(source_dir, '_data', 'members.yaml'))
344
+
345
+ assert_equal site.data['members'], file_content
346
+ assert_equal site.site_payload['site']['data']['members'], file_content
347
+ end
348
+
349
+ should 'auto load yml files' do
350
+ site = Site.new(Jekyll.configuration)
351
+ site.process
352
+
353
+ file_content = YAML.safe_load_file(File.join(source_dir, '_data', 'languages.yml'))
354
+
355
+ assert_equal site.data['languages'], file_content
356
+ assert_equal site.site_payload['site']['data']['languages'], file_content
357
+ end
358
+
359
+ should "load symlink files in unsafe mode" do
360
+ site = Site.new(Jekyll.configuration.merge({'safe' => false}))
361
+ site.process
362
+
363
+ file_content = YAML.safe_load_file(File.join(source_dir, '_data', 'products.yml'))
364
+
365
+ assert_equal site.data['products'], file_content
366
+ assert_equal site.site_payload['site']['data']['products'], file_content
367
+ end
368
+
369
+ should "not load symlink files in safe mode" do
370
+ site = Site.new(Jekyll.configuration.merge({'safe' => true}))
371
+ site.process
372
+
373
+ assert_nil site.data['products']
374
+ assert_nil site.site_payload['site']['data']['products']
375
+ end
376
+
377
+ should "load symlink directory in unsafe mode" do
378
+ site = Site.new(Jekyll.configuration.merge({'safe' => false, 'data_source' => File.join('symlink-test', '_data')}))
379
+ site.process
380
+
381
+ assert_not_nil site.data['products']
382
+ assert_not_nil site.data['languages']
383
+ assert_not_nil site.data['members']
384
+ end
385
+
386
+ should "not load symlink directory in safe mode" do
387
+ site = Site.new(Jekyll.configuration.merge({'safe' => true, 'data_source' => File.join('symlink-test', '_data')}))
388
+ site.process
389
+
390
+ assert_nil site.data['products']
391
+ assert_nil site.data['languages']
392
+ assert_nil site.data['members']
393
+ end
394
+ end
338
395
  end
339
396
  end
@@ -19,7 +19,7 @@ class TestTags < Test::Unit::TestCase
19
19
  payload = { "pygments_prefix" => @converter.pygments_prefix,
20
20
  "pygments_suffix" => @converter.pygments_suffix }
21
21
 
22
- @result = Liquid::Template.parse(content).render(payload, info)
22
+ @result = Liquid::Template.parse(content).render!(payload, info)
23
23
  @result = @converter.convert(@result)
24
24
  end
25
25
 
@@ -69,6 +69,9 @@ CONTENT
69
69
 
70
70
  tag = Jekyll::Tags::HighlightBlock.new('highlight', 'ruby linenos=table cssclass=hl', ["test", "{% endhighlight %}", "\n"])
71
71
  assert_equal({ 'cssclass' => 'hl', 'linenos' => 'table' }, tag.instance_variable_get(:@options))
72
+
73
+ tag = Jekyll::Tags::HighlightBlock.new('highlight', 'Ruby ', ["test", "{% endhighlight %}", "\n"])
74
+ assert_equal "ruby", tag.instance_variable_get(:@lang), "lexers should be case insensitive"
72
75
  end
73
76
  end
74
77
 
@@ -273,22 +276,19 @@ CONTENT
273
276
  end
274
277
  end
275
278
 
276
- context "when invalid" do
277
- setup do
278
- @gist = "mattr-24081a1d93d2898ecf0f"
279
- @filename = "myfile.ext"
280
- content = <<CONTENT
279
+ should "raise ArgumentError when invalid" do
280
+ @gist = "mattr-24081a1d93d2898ecf0f"
281
+ @filename = "myfile.ext"
282
+ content = <<CONTENT
281
283
  ---
282
284
  title: My Cool Gist
283
285
  ---
284
286
 
285
287
  {% gist #{@gist} #{@filename} %}
286
288
  CONTENT
287
- create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
288
- end
289
289
 
290
- should "write script tag with specific file in gist" do
291
- assert_match "Error parsing gist id", @result
290
+ assert_raise ArgumentError do
291
+ create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
292
292
  end
293
293
  end
294
294
  end
@@ -313,7 +313,7 @@ CONTENT
313
313
  end
314
314
 
315
315
  context "with blank gist id" do
316
- setup do
316
+ should "raise ArgumentError" do
317
317
  content = <<CONTENT
318
318
  ---
319
319
  title: My Cool Gist
@@ -321,16 +321,15 @@ title: My Cool Gist
321
321
 
322
322
  {% gist %}
323
323
  CONTENT
324
- create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
325
- end
326
324
 
327
- should "output error message" do
328
- assert_match "Error parsing gist id", @result
325
+ assert_raise ArgumentError do
326
+ create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
327
+ end
329
328
  end
330
329
  end
331
330
 
332
331
  context "with invalid gist id" do
333
- setup do
332
+ should "raise ArgumentError" do
334
333
  invalid_gist = 'invalid'
335
334
  content = <<CONTENT
336
335
  ---
@@ -339,11 +338,10 @@ title: My Cool Gist
339
338
 
340
339
  {% gist #{invalid_gist} %}
341
340
  CONTENT
342
- create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
343
- end
344
341
 
345
- should "output error message" do
346
- assert_match "Error parsing gist id", @result
342
+ assert_raise ArgumentError do
343
+ create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
344
+ end
347
345
  end
348
346
  end
349
347
  end
@@ -373,7 +371,7 @@ CONTENT
373
371
  end
374
372
 
375
373
  context "with invalid parameter syntax" do
376
- should "throw a SyntaxError" do
374
+ should "throw a ArgumentError" do
377
375
  content = <<CONTENT
378
376
  ---
379
377
  title: Invalid parameter syntax
@@ -381,7 +379,7 @@ title: Invalid parameter syntax
381
379
 
382
380
  {% include params.html param s="value" %}
383
381
  CONTENT
384
- assert_raise SyntaxError, 'Did not raise exception on invalid "include" syntax' do
382
+ assert_raise ArgumentError, 'Did not raise exception on invalid "include" syntax' do
385
383
  create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
386
384
  end
387
385
 
@@ -392,7 +390,7 @@ title: Invalid parameter syntax
392
390
 
393
391
  {% include params.html params="value %}
394
392
  CONTENT
395
- assert_raise SyntaxError, 'Did not raise exception on invalid "include" syntax' do
393
+ assert_raise ArgumentError, 'Did not raise exception on invalid "include" syntax' do
396
394
  create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
397
395
  end
398
396
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.3.0.rc
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Preston-Werner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-14 00:00:00.000000000 Z
11
+ date: 2013-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: liquid
@@ -39,33 +39,33 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.3'
41
41
  - !ruby/object:Gem::Dependency
42
- name: directory_watcher
42
+ name: listen
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ~>
46
46
  - !ruby/object:Gem::Version
47
- version: 1.4.1
47
+ version: '1.3'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ~>
53
53
  - !ruby/object:Gem::Version
54
- version: 1.4.1
54
+ version: '1.3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: maruku
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: '0.5'
61
+ version: 0.6.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ~>
67
67
  - !ruby/object:Gem::Version
68
- version: '0.5'
68
+ version: 0.6.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: pygments.rb
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - ~>
102
102
  - !ruby/object:Gem::Version
103
- version: 0.7.0
103
+ version: 0.9.7
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: 0.7.0
110
+ version: 0.9.7
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: colorator
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - ~>
144
144
  - !ruby/object:Gem::Version
145
- version: 10.0.3
145
+ version: '10.1'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - ~>
151
151
  - !ruby/object:Gem::Version
152
- version: 10.0.3
152
+ version: '10.1'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: rdoc
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -198,34 +198,28 @@ dependencies:
198
198
  requirements:
199
199
  - - ~>
200
200
  - !ruby/object:Gem::Version
201
- version: 1.0.0
201
+ version: '1.1'
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - ~>
207
207
  - !ruby/object:Gem::Version
208
- version: 1.0.0
208
+ version: '1.1'
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: cucumber
211
211
  requirement: !ruby/object:Gem::Requirement
212
212
  requirements:
213
213
  - - ~>
214
214
  - !ruby/object:Gem::Version
215
- version: 1.2.1
216
- - - '!='
217
- - !ruby/object:Gem::Version
218
- version: 1.2.4
215
+ version: '1.3'
219
216
  type: :development
220
217
  prerelease: false
221
218
  version_requirements: !ruby/object:Gem::Requirement
222
219
  requirements:
223
220
  - - ~>
224
221
  - !ruby/object:Gem::Version
225
- version: 1.2.1
226
- - - '!='
227
- - !ruby/object:Gem::Version
228
- version: 1.2.4
222
+ version: '1.3'
229
223
  - !ruby/object:Gem::Dependency
230
224
  name: RedCloth
231
225
  requirement: !ruby/object:Gem::Requirement
@@ -246,14 +240,14 @@ dependencies:
246
240
  requirements:
247
241
  - - ~>
248
242
  - !ruby/object:Gem::Version
249
- version: 1.0.2
243
+ version: '1.2'
250
244
  type: :development
251
245
  prerelease: false
252
246
  version_requirements: !ruby/object:Gem::Requirement
253
247
  requirements:
254
248
  - - ~>
255
249
  - !ruby/object:Gem::Version
256
- version: 1.0.2
250
+ version: '1.2'
257
251
  - !ruby/object:Gem::Dependency
258
252
  name: rdiscount
259
253
  requirement: !ruby/object:Gem::Requirement
@@ -274,14 +268,14 @@ dependencies:
274
268
  requirements:
275
269
  - - ~>
276
270
  - !ruby/object:Gem::Version
277
- version: 2.1.2
271
+ version: '2.3'
278
272
  type: :development
279
273
  prerelease: false
280
274
  version_requirements: !ruby/object:Gem::Requirement
281
275
  requirements:
282
276
  - - ~>
283
277
  - !ruby/object:Gem::Version
284
- version: 2.1.2
278
+ version: '2.3'
285
279
  - !ruby/object:Gem::Dependency
286
280
  name: simplecov
287
281
  requirement: !ruby/object:Gem::Requirement
@@ -310,6 +304,34 @@ dependencies:
310
304
  - - ~>
311
305
  - !ruby/object:Gem::Version
312
306
  version: 1.0.1
307
+ - !ruby/object:Gem::Dependency
308
+ name: coveralls
309
+ requirement: !ruby/object:Gem::Requirement
310
+ requirements:
311
+ - - ~>
312
+ - !ruby/object:Gem::Version
313
+ version: 0.7.0
314
+ type: :development
315
+ prerelease: false
316
+ version_requirements: !ruby/object:Gem::Requirement
317
+ requirements:
318
+ - - ~>
319
+ - !ruby/object:Gem::Version
320
+ version: 0.7.0
321
+ - !ruby/object:Gem::Dependency
322
+ name: mime-types
323
+ requirement: !ruby/object:Gem::Requirement
324
+ requirements:
325
+ - - ~>
326
+ - !ruby/object:Gem::Version
327
+ version: '1.5'
328
+ type: :development
329
+ prerelease: false
330
+ version_requirements: !ruby/object:Gem::Requirement
331
+ requirements:
332
+ - - ~>
333
+ - !ruby/object:Gem::Version
334
+ version: '1.5'
313
335
  - !ruby/object:Gem::Dependency
314
336
  name: activesupport
315
337
  requirement: !ruby/object:Gem::Requirement
@@ -324,6 +346,20 @@ dependencies:
324
346
  - - ~>
325
347
  - !ruby/object:Gem::Version
326
348
  version: 3.2.13
349
+ - !ruby/object:Gem::Dependency
350
+ name: jekyll_test_plugin
351
+ requirement: !ruby/object:Gem::Requirement
352
+ requirements:
353
+ - - '>='
354
+ - !ruby/object:Gem::Version
355
+ version: '0'
356
+ type: :development
357
+ prerelease: false
358
+ version_requirements: !ruby/object:Gem::Requirement
359
+ requirements:
360
+ - - '>='
361
+ - !ruby/object:Gem::Version
362
+ version: '0'
327
363
  description: Jekyll is a simple, blog aware, static site generator.
328
364
  email: tom@mojombo.com
329
365
  executables:
@@ -342,6 +378,7 @@ files:
342
378
  - bin/jekyll
343
379
  - cucumber.yml
344
380
  - features/create_sites.feature
381
+ - features/data.feature
345
382
  - features/drafts.feature
346
383
  - features/embed_filters.feature
347
384
  - features/include_tag.feature
@@ -434,12 +471,14 @@ files:
434
471
  - site/_posts/2013-07-25-jekyll-1-1-2-released.markdown
435
472
  - site/_posts/2013-09-06-jekyll-1-2-0-released.markdown
436
473
  - site/_posts/2013-09-14-jekyll-1-2-1-released.markdown
474
+ - site/_posts/2013-10-28-jekyll-1-3-0-rc1-released.markdown
437
475
  - site/css/gridism.css
438
476
  - site/css/normalize.css
439
477
  - site/css/pygments.css
440
478
  - site/css/style.css
441
479
  - site/docs/configuration.md
442
480
  - site/docs/contributing.md
481
+ - site/docs/datafiles.md
443
482
  - site/docs/deployment-methods.md
444
483
  - site/docs/drafts.md
445
484
  - site/docs/extras.md
@@ -486,9 +525,13 @@ files:
486
525
  - test/helper.rb
487
526
  - test/source/+/foo.md
488
527
  - test/source/.htaccess
528
+ - test/source/_data/languages.yml
529
+ - test/source/_data/members.yaml
530
+ - test/source/_data/products.yml
489
531
  - test/source/_includes/params.html
490
532
  - test/source/_includes/sig.markdown
491
533
  - test/source/_layouts/default.html
534
+ - test/source/_layouts/post/simple.html
492
535
  - test/source/_layouts/simple.html
493
536
  - test/source/_plugins/dummy.rb
494
537
  - test/source/_posts/2008-02-02-not-published.textile
@@ -534,6 +577,7 @@ files:
534
577
  - test/source/deal.with.dots.html
535
578
  - test/source/foo/_posts/bar/2008-12-12-topical-post.textile
536
579
  - test/source/index.html
580
+ - test/source/products.yml
537
581
  - test/source/sitemap.xml
538
582
  - test/source/symlink-test/symlinked-file
539
583
  - test/source/win/_posts/2009-05-24-yaml-linebreak.markdown
@@ -574,9 +618,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
574
618
  version: '0'
575
619
  required_rubygems_version: !ruby/object:Gem::Requirement
576
620
  requirements:
577
- - - '>='
621
+ - - '>'
578
622
  - !ruby/object:Gem::Version
579
- version: '0'
623
+ version: 1.3.1
580
624
  requirements: []
581
625
  rubyforge_project: jekyll
582
626
  rubygems_version: 2.0.3