jekyll 1.0.0.beta4 → 1.0.0.rc1

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.

@@ -5,7 +5,7 @@ class TestGeneratedSite < Test::Unit::TestCase
5
5
  setup do
6
6
  clear_dest
7
7
  stub(Jekyll).configuration do
8
- Jekyll::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir})
8
+ Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir})
9
9
  end
10
10
 
11
11
  @site = Site.new(Jekyll.configuration)
@@ -14,7 +14,7 @@ class TestGeneratedSite < Test::Unit::TestCase
14
14
  end
15
15
 
16
16
  should "ensure post count is as expected" do
17
- assert_equal 31, @site.posts.size
17
+ assert_equal 32, @site.posts.size
18
18
  end
19
19
 
20
20
  should "insert site.posts into the index" do
@@ -46,7 +46,7 @@ class TestGeneratedSite < Test::Unit::TestCase
46
46
  setup do
47
47
  clear_dest
48
48
  stub(Jekyll).configuration do
49
- Jekyll::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir, 'limit_posts' => 5})
49
+ Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir, 'limit_posts' => 5})
50
50
  end
51
51
 
52
52
  @site = Site.new(Jekyll.configuration)
@@ -62,7 +62,7 @@ class TestGeneratedSite < Test::Unit::TestCase
62
62
  assert_raise ArgumentError do
63
63
  clear_dest
64
64
  stub(Jekyll).configuration do
65
- Jekyll::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir, 'limit_posts' => 0})
65
+ Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir, 'limit_posts' => 0})
66
66
  end
67
67
 
68
68
  @site = Site.new(Jekyll.configuration)
@@ -15,7 +15,7 @@ class TestPage < Test::Unit::TestCase
15
15
  context "A Page" do
16
16
  setup do
17
17
  clear_dest
18
- stub(Jekyll).configuration { Jekyll::DEFAULTS }
18
+ stub(Jekyll).configuration { Jekyll::Configuration::DEFAULTS }
19
19
  @site = Site.new(Jekyll.configuration)
20
20
  end
21
21
 
@@ -102,16 +102,6 @@ class TestPage < Test::Unit::TestCase
102
102
  assert_equal "/about/", @page.dir
103
103
  end
104
104
  end
105
-
106
- context "with unspecified layout" do
107
- setup do
108
- @page = setup_page('contacts.html')
109
- end
110
-
111
- should "default to 'post' layout" do
112
- assert_equal "page", @page.data["layout"]
113
- end
114
- end
115
105
 
116
106
  context "with specified layout of nil" do
117
107
  setup do
@@ -14,7 +14,7 @@ class TestPager < Test::Unit::TestCase
14
14
  context "pagination disabled" do
15
15
  setup do
16
16
  stub(Jekyll).configuration do
17
- Jekyll::DEFAULTS.merge({
17
+ Jekyll::Configuration::DEFAULTS.merge({
18
18
  'source' => source_dir,
19
19
  'destination' => dest_dir
20
20
  })
@@ -31,7 +31,7 @@ class TestPager < Test::Unit::TestCase
31
31
  context "pagination enabled for 2" do
32
32
  setup do
33
33
  stub(Jekyll).configuration do
34
- Jekyll::DEFAULTS.merge({
34
+ Jekyll::Configuration::DEFAULTS.merge({
35
35
  'source' => source_dir,
36
36
  'destination' => dest_dir,
37
37
  'paginate' => 2
@@ -13,7 +13,7 @@ class TestPost < Test::Unit::TestCase
13
13
  context "A Post" do
14
14
  setup do
15
15
  clear_dest
16
- stub(Jekyll).configuration { Jekyll::DEFAULTS }
16
+ stub(Jekyll).configuration { Jekyll::Configuration::DEFAULTS }
17
17
  @site = Site.new(Jekyll.configuration)
18
18
  end
19
19
 
@@ -95,7 +95,7 @@ class TestPost < Test::Unit::TestCase
95
95
  should "consume the embedded dashes" do
96
96
  @post.read_yaml(@source, @real_file)
97
97
 
98
- assert_equal({"title" => "Foo --- Bar", "layout" => "post"}, @post.data)
98
+ assert_equal({"title" => "Foo --- Bar"}, @post.data)
99
99
  assert_equal "Triple the fun!", @post.content
100
100
  end
101
101
  end
@@ -139,18 +139,6 @@ class TestPost < Test::Unit::TestCase
139
139
  assert_equal "/2013/2008/09/09/foo-bar.html", @post.url
140
140
  end
141
141
  end
142
-
143
- context "with unspecified layout" do
144
- setup do
145
- file = '2013-01-12-no-layout.textile'
146
- @post = setup_post(file)
147
- @post.process(file)
148
- end
149
-
150
- should "default to 'post' layout" do
151
- assert_equal "post", @post.data["layout"]
152
- end
153
- end
154
142
 
155
143
  context "with specified layout of nil" do
156
144
  setup do
@@ -320,13 +308,31 @@ class TestPost < Test::Unit::TestCase
320
308
  assert !@post.excerpt.include?("---"), "does not contains separator"
321
309
  end
322
310
  end
311
+
312
+ context "with custom excerpt" do
313
+ setup do
314
+ file = "2013-04-11-custom-excerpt.markdown"
315
+ @post = setup_post(file)
316
+ do_render(@post)
317
+ end
318
+
319
+ should "use custom excerpt" do
320
+ assert_equal("I can set a custom excerpt", @post.excerpt)
321
+ end
322
+
323
+ should "expose custom excerpt to liquid" do
324
+ assert @post.content.include?("I can use the excerpt: <quote>I can set a custom excerpt</quote>"), "Exposes incorrect excerpt to liquid."
325
+ end
326
+
327
+ end
328
+
323
329
  end
324
330
  end
325
331
 
326
332
  context "when in a site" do
327
333
  setup do
328
334
  clear_dest
329
- stub(Jekyll).configuration { Jekyll::DEFAULTS }
335
+ stub(Jekyll).configuration { Jekyll::Configuration::DEFAULTS }
330
336
  @site = Site.new(Jekyll.configuration)
331
337
  @site.posts = [setup_post('2008-02-02-published.textile'),
332
338
  setup_post('2009-01-27-categories.textile')]
@@ -519,7 +525,7 @@ class TestPost < Test::Unit::TestCase
519
525
 
520
526
  context "converter file extension settings" do
521
527
  setup do
522
- stub(Jekyll).configuration { Jekyll::DEFAULTS }
528
+ stub(Jekyll).configuration { Jekyll::Configuration::DEFAULTS }
523
529
  @site = Site.new(Jekyll.configuration)
524
530
  end
525
531
 
@@ -3,49 +3,49 @@ require 'helper'
3
3
  class TestSite < Test::Unit::TestCase
4
4
  context "configuring sites" do
5
5
  should "have an array for plugins by default" do
6
- site = Site.new(Jekyll::DEFAULTS)
6
+ site = Site.new(Jekyll::Configuration::DEFAULTS)
7
7
  assert_equal [File.join(Dir.pwd, '_plugins')], site.plugins
8
8
  end
9
9
 
10
10
  should "look for plugins under the site directory by default" do
11
- site = Site.new(Jekyll::DEFAULTS.merge({'source' => File.expand_path(source_dir)}))
11
+ site = Site.new(Jekyll::Configuration::DEFAULTS.merge({'source' => File.expand_path(source_dir)}))
12
12
  assert_equal [File.join(source_dir, '_plugins')], site.plugins
13
13
  end
14
14
 
15
15
  should "have an array for plugins if passed as a string" do
16
- site = Site.new(Jekyll::DEFAULTS.merge({'plugins' => '/tmp/plugins'}))
16
+ site = Site.new(Jekyll::Configuration::DEFAULTS.merge({'plugins' => '/tmp/plugins'}))
17
17
  assert_equal ['/tmp/plugins'], site.plugins
18
18
  end
19
19
 
20
20
  should "have an array for plugins if passed as an array" do
21
- site = Site.new(Jekyll::DEFAULTS.merge({'plugins' => ['/tmp/plugins', '/tmp/otherplugins']}))
21
+ site = Site.new(Jekyll::Configuration::DEFAULTS.merge({'plugins' => ['/tmp/plugins', '/tmp/otherplugins']}))
22
22
  assert_equal ['/tmp/plugins', '/tmp/otherplugins'], site.plugins
23
23
  end
24
24
 
25
25
  should "have an empty array for plugins if nothing is passed" do
26
- site = Site.new(Jekyll::DEFAULTS.merge({'plugins' => []}))
26
+ site = Site.new(Jekyll::Configuration::DEFAULTS.merge({'plugins' => []}))
27
27
  assert_equal [], site.plugins
28
28
  end
29
29
 
30
30
  should "have an empty array for plugins if nil is passed" do
31
- site = Site.new(Jekyll::DEFAULTS.merge({'plugins' => nil}))
31
+ site = Site.new(Jekyll::Configuration::DEFAULTS.merge({'plugins' => nil}))
32
32
  assert_equal [], site.plugins
33
33
  end
34
34
 
35
35
  should "expose default baseurl" do
36
- site = Site.new(Jekyll::DEFAULTS)
37
- assert_equal Jekyll::DEFAULTS['baseurl'], site.baseurl
36
+ site = Site.new(Jekyll::Configuration::DEFAULTS)
37
+ assert_equal Jekyll::Configuration::DEFAULTS['baseurl'], site.baseurl
38
38
  end
39
39
 
40
40
  should "expose baseurl passed in from config" do
41
- site = Site.new(Jekyll::DEFAULTS.merge({'baseurl' => '/blog'}))
41
+ site = Site.new(Jekyll::Configuration::DEFAULTS.merge({'baseurl' => '/blog'}))
42
42
  assert_equal '/blog', site.baseurl
43
43
  end
44
44
  end
45
45
  context "creating sites" do
46
46
  setup do
47
47
  stub(Jekyll).configuration do
48
- Jekyll::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir})
48
+ Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir})
49
49
  end
50
50
  @site = Site.new(Jekyll.configuration)
51
51
  end
@@ -205,7 +205,7 @@ class TestSite < Test::Unit::TestCase
205
205
 
206
206
  should "filter symlink entries when safe mode enabled" do
207
207
  stub(Jekyll).configuration do
208
- Jekyll::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir, 'safe' => true})
208
+ Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir, 'safe' => true})
209
209
  end
210
210
  site = Site.new(Jekyll.configuration)
211
211
  stub(File).symlink?('symlink.js') {true}
@@ -221,7 +221,7 @@ class TestSite < Test::Unit::TestCase
221
221
 
222
222
  should "not include symlinks in safe mode" do
223
223
  stub(Jekyll).configuration do
224
- Jekyll::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir, 'safe' => true})
224
+ Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir, 'safe' => true})
225
225
  end
226
226
  site = Site.new(Jekyll.configuration)
227
227
 
@@ -232,7 +232,7 @@ class TestSite < Test::Unit::TestCase
232
232
 
233
233
  should "include symlinks in unsafe mode" do
234
234
  stub(Jekyll).configuration do
235
- Jekyll::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir, 'safe' => false})
235
+ Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir, 'safe' => false})
236
236
  end
237
237
  site = Site.new(Jekyll.configuration)
238
238
 
@@ -244,7 +244,7 @@ class TestSite < Test::Unit::TestCase
244
244
  context 'error handling' do
245
245
  should "raise if destination is included in source" do
246
246
  stub(Jekyll).configuration do
247
- Jekyll::DEFAULTS.merge({'source' => source_dir, 'destination' => source_dir})
247
+ Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => source_dir})
248
248
  end
249
249
 
250
250
  assert_raise Jekyll::FatalException do
@@ -254,7 +254,7 @@ class TestSite < Test::Unit::TestCase
254
254
 
255
255
  should "raise if destination is source" do
256
256
  stub(Jekyll).configuration do
257
- Jekyll::DEFAULTS.merge({'source' => source_dir, 'destination' => File.join(source_dir, "..")})
257
+ Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => File.join(source_dir, "..")})
258
258
  end
259
259
 
260
260
  assert_raise Jekyll::FatalException do
@@ -303,7 +303,7 @@ class TestSite < Test::Unit::TestCase
303
303
  end
304
304
 
305
305
  should 'remove orphaned files in destination - keep_files .svn' do
306
- config = Jekyll::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir, 'keep_files' => ['.svn']})
306
+ config = Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir, 'keep_files' => ['.svn']})
307
307
  @site = Site.new(config)
308
308
  @site.process
309
309
  assert !File.exist?(dest_dir('.htpasswd'))
@@ -6,7 +6,7 @@ class TestTags < Test::Unit::TestCase
6
6
 
7
7
  def create_post(content, override = {}, converter_class = Jekyll::Converters::Markdown)
8
8
  stub(Jekyll).configuration do
9
- Jekyll::DEFAULTS.deep_merge({'pygments' => true}).deep_merge(override)
9
+ Jekyll::Configuration::DEFAULTS.deep_merge({'pygments' => true}).deep_merge(override)
10
10
  end
11
11
  site = Site.new(Jekyll.configuration)
12
12
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta4
4
+ version: 1.0.0.rc1
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-09 00:00:00.000000000 Z
12
+ date: 2013-04-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: liquid
@@ -139,6 +139,22 @@ dependencies:
139
139
  - - ~>
140
140
  - !ruby/object:Gem::Version
141
141
  version: 0.7.0
142
+ - !ruby/object:Gem::Dependency
143
+ name: colorator
144
+ requirement: !ruby/object:Gem::Requirement
145
+ none: false
146
+ requirements:
147
+ - - ~>
148
+ - !ruby/object:Gem::Version
149
+ version: '0.1'
150
+ type: :runtime
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ~>
156
+ - !ruby/object:Gem::Version
157
+ version: '0.1'
142
158
  - !ruby/object:Gem::Dependency
143
159
  name: rake
144
160
  requirement: !ruby/object:Gem::Requirement
@@ -371,18 +387,25 @@ files:
371
387
  - lib/jekyll/commands/build.rb
372
388
  - lib/jekyll/commands/new.rb
373
389
  - lib/jekyll/commands/serve.rb
390
+ - lib/jekyll/configuration.rb
374
391
  - lib/jekyll/converter.rb
375
392
  - lib/jekyll/converters/identity.rb
376
393
  - lib/jekyll/converters/markdown.rb
394
+ - lib/jekyll/converters/markdown/kramdown_parser.rb
395
+ - lib/jekyll/converters/markdown/maruku_parser.rb
396
+ - lib/jekyll/converters/markdown/rdiscount_parser.rb
397
+ - lib/jekyll/converters/markdown/redcarpet_parser.rb
377
398
  - lib/jekyll/converters/textile.rb
378
399
  - lib/jekyll/convertible.rb
379
400
  - lib/jekyll/core_ext.rb
401
+ - lib/jekyll/deprecator.rb
380
402
  - lib/jekyll/draft.rb
381
403
  - lib/jekyll/errors.rb
382
404
  - lib/jekyll/filters.rb
383
405
  - lib/jekyll/generator.rb
384
406
  - lib/jekyll/generators/pagination.rb
385
407
  - lib/jekyll/layout.rb
408
+ - lib/jekyll/logger.rb
386
409
  - lib/jekyll/mime.types
387
410
  - lib/jekyll/page.rb
388
411
  - lib/jekyll/plugin.rb
@@ -492,6 +515,7 @@ files:
492
515
  - test/source/_posts/2013-01-12-nil-layout.textile
493
516
  - test/source/_posts/2013-01-12-no-layout.textile
494
517
  - test/source/_posts/2013-03-19-not-a-post.markdown/.gitkeep
518
+ - test/source/_posts/2013-04-11-custom-excerpt.markdown
495
519
  - test/source/about.html
496
520
  - test/source/category/_posts/2008-9-23-categories.textile
497
521
  - test/source/contacts.html
@@ -536,6 +560,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
536
560
  - - ! '>='
537
561
  - !ruby/object:Gem::Version
538
562
  version: '0'
563
+ segments:
564
+ - 0
565
+ hash: -61414058465599084
539
566
  required_rubygems_version: !ruby/object:Gem::Requirement
540
567
  none: false
541
568
  requirements: