jekyll 0.5.7 → 0.6.0

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 (48) hide show
  1. data/History.txt +88 -31
  2. data/LICENSE +21 -0
  3. data/README.textile +1 -9
  4. data/Rakefile +119 -51
  5. data/bin/jekyll +26 -2
  6. data/cucumber.yml +1 -0
  7. data/features/create_sites.feature +28 -10
  8. data/features/post_data.feature +7 -7
  9. data/features/site_configuration.feature +41 -1
  10. data/features/step_definitions/jekyll_steps.rb +13 -4
  11. data/jekyll.gemspec +125 -143
  12. data/lib/jekyll.rb +40 -20
  13. data/lib/jekyll/albino.rb +5 -7
  14. data/lib/jekyll/converter.rb +50 -0
  15. data/lib/jekyll/converters/identity.rb +22 -0
  16. data/lib/jekyll/converters/markdown.rb +77 -0
  17. data/lib/jekyll/converters/textile.rb +33 -0
  18. data/lib/jekyll/convertible.rb +18 -24
  19. data/lib/jekyll/errors.rb +6 -0
  20. data/lib/jekyll/generator.rb +7 -0
  21. data/lib/jekyll/generators/pagination.rb +87 -0
  22. data/lib/jekyll/{converters → migrators}/csv.rb +0 -0
  23. data/lib/jekyll/{converters → migrators}/mephisto.rb +0 -0
  24. data/lib/jekyll/{converters → migrators}/mt.rb +0 -0
  25. data/lib/jekyll/{converters → migrators}/textpattern.rb +0 -0
  26. data/lib/jekyll/{converters → migrators}/typo.rb +0 -0
  27. data/lib/jekyll/{converters → migrators}/wordpress.rb +1 -0
  28. data/lib/jekyll/page.rb +28 -11
  29. data/lib/jekyll/plugin.rb +76 -0
  30. data/lib/jekyll/post.rb +10 -8
  31. data/lib/jekyll/site.rb +40 -88
  32. data/lib/jekyll/static_file.rb +52 -4
  33. data/lib/jekyll/tags/highlight.rb +20 -9
  34. data/test/helper.rb +6 -0
  35. data/test/source/_posts/2010-01-09-date-override.textile +2 -0
  36. data/test/source/_posts/2010-01-09-time-override.textile +2 -0
  37. data/test/source/_posts/2010-01-09-timezone-override.textile +7 -0
  38. data/test/source/_posts/2010-01-16-override-data.textile +4 -0
  39. data/test/source/sitemap.xml +27 -18
  40. data/test/test_configuration.rb +1 -1
  41. data/test/test_generated_site.rb +1 -1
  42. data/test/test_post.rb +63 -12
  43. data/test/test_site.rb +69 -7
  44. data/test/test_tags.rb +6 -14
  45. metadata +156 -52
  46. data/.gitignore +0 -6
  47. data/VERSION.yml +0 -5
  48. data/lib/jekyll/pager.rb +0 -45
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.7
4
+ hash: 7
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 6
9
+ - 0
10
+ version: 0.6.0
5
11
  platform: ruby
6
12
  authors:
7
13
  - Tom Preston-Werner
@@ -9,69 +15,153 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2010-01-12 00:00:00 -08:00
18
+ date: 2010-06-22 00:00:00 -07:00
13
19
  default_executable: jekyll
14
20
  dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: RedCloth
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: 4.2.1
24
- version:
25
21
  - !ruby/object:Gem::Dependency
26
22
  name: liquid
27
- type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
30
26
  requirements:
31
27
  - - ">="
32
28
  - !ruby/object:Gem::Version
29
+ hash: 51
30
+ segments:
31
+ - 1
32
+ - 9
33
+ - 0
33
34
  version: 1.9.0
34
- version:
35
+ type: :runtime
36
+ version_requirements: *id001
35
37
  - !ruby/object:Gem::Dependency
36
38
  name: classifier
37
- type: :runtime
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
40
42
  requirements:
41
43
  - - ">="
42
44
  - !ruby/object:Gem::Version
45
+ hash: 25
46
+ segments:
47
+ - 1
48
+ - 3
49
+ - 1
43
50
  version: 1.3.1
44
- version:
51
+ type: :runtime
52
+ version_requirements: *id002
45
53
  - !ruby/object:Gem::Dependency
46
- name: maruku
54
+ name: directory_watcher
55
+ prerelease: false
56
+ requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ hash: 17
62
+ segments:
63
+ - 1
64
+ - 1
65
+ - 1
66
+ version: 1.1.1
47
67
  type: :runtime
48
- version_requirement:
49
- version_requirements: !ruby/object:Gem::Requirement
68
+ version_requirements: *id003
69
+ - !ruby/object:Gem::Dependency
70
+ name: maruku
71
+ prerelease: false
72
+ requirement: &id004 !ruby/object:Gem::Requirement
73
+ none: false
50
74
  requirements:
51
75
  - - ">="
52
76
  - !ruby/object:Gem::Version
77
+ hash: 25
78
+ segments:
79
+ - 0
80
+ - 5
81
+ - 9
53
82
  version: 0.5.9
54
- version:
55
- - !ruby/object:Gem::Dependency
56
- name: directory_watcher
57
83
  type: :runtime
58
- version_requirement:
59
- version_requirements: !ruby/object:Gem::Requirement
84
+ version_requirements: *id004
85
+ - !ruby/object:Gem::Dependency
86
+ name: redgreen
87
+ prerelease: false
88
+ requirement: &id005 !ruby/object:Gem::Requirement
89
+ none: false
60
90
  requirements:
61
91
  - - ">="
62
92
  - !ruby/object:Gem::Version
63
- version: 1.1.1
64
- version:
93
+ hash: 53
94
+ segments:
95
+ - 4
96
+ - 2
97
+ - 1
98
+ version: 4.2.1
99
+ type: :development
100
+ version_requirements: *id005
65
101
  - !ruby/object:Gem::Dependency
66
- name: open4
67
- type: :runtime
68
- version_requirement:
69
- version_requirements: !ruby/object:Gem::Requirement
102
+ name: shoulda
103
+ prerelease: false
104
+ requirement: &id006 !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ hash: 53
110
+ segments:
111
+ - 4
112
+ - 2
113
+ - 1
114
+ version: 4.2.1
115
+ type: :development
116
+ version_requirements: *id006
117
+ - !ruby/object:Gem::Dependency
118
+ name: rr
119
+ prerelease: false
120
+ requirement: &id007 !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ hash: 53
126
+ segments:
127
+ - 4
128
+ - 2
129
+ - 1
130
+ version: 4.2.1
131
+ type: :development
132
+ version_requirements: *id007
133
+ - !ruby/object:Gem::Dependency
134
+ name: cucumber
135
+ prerelease: false
136
+ requirement: &id008 !ruby/object:Gem::Requirement
137
+ none: false
70
138
  requirements:
71
139
  - - ">="
72
140
  - !ruby/object:Gem::Version
73
- version: 0.9.6
74
- version:
141
+ hash: 53
142
+ segments:
143
+ - 4
144
+ - 2
145
+ - 1
146
+ version: 4.2.1
147
+ type: :development
148
+ version_requirements: *id008
149
+ - !ruby/object:Gem::Dependency
150
+ name: RedCloth
151
+ prerelease: false
152
+ requirement: &id009 !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ">="
156
+ - !ruby/object:Gem::Version
157
+ hash: 53
158
+ segments:
159
+ - 4
160
+ - 2
161
+ - 1
162
+ version: 4.2.1
163
+ type: :development
164
+ version_requirements: *id009
75
165
  description: Jekyll is a simple, blog aware, static site generator.
76
166
  email: tom@mojombo.com
77
167
  executables:
@@ -80,13 +170,14 @@ extensions: []
80
170
 
81
171
  extra_rdoc_files:
82
172
  - README.textile
173
+ - LICENSE
83
174
  files:
84
- - .gitignore
85
175
  - History.txt
176
+ - LICENSE
86
177
  - README.textile
87
178
  - Rakefile
88
- - VERSION.yml
89
179
  - bin/jekyll
180
+ - cucumber.yml
90
181
  - features/create_sites.feature
91
182
  - features/embed_filters.feature
92
183
  - features/markdown.feature
@@ -100,18 +191,25 @@ files:
100
191
  - jekyll.gemspec
101
192
  - lib/jekyll.rb
102
193
  - lib/jekyll/albino.rb
103
- - lib/jekyll/converters/csv.rb
104
- - lib/jekyll/converters/mephisto.rb
105
- - lib/jekyll/converters/mt.rb
106
- - lib/jekyll/converters/textpattern.rb
107
- - lib/jekyll/converters/typo.rb
108
- - lib/jekyll/converters/wordpress.rb
194
+ - lib/jekyll/converter.rb
195
+ - lib/jekyll/converters/identity.rb
196
+ - lib/jekyll/converters/markdown.rb
197
+ - lib/jekyll/converters/textile.rb
109
198
  - lib/jekyll/convertible.rb
110
199
  - lib/jekyll/core_ext.rb
200
+ - lib/jekyll/errors.rb
111
201
  - lib/jekyll/filters.rb
202
+ - lib/jekyll/generator.rb
203
+ - lib/jekyll/generators/pagination.rb
112
204
  - lib/jekyll/layout.rb
205
+ - lib/jekyll/migrators/csv.rb
206
+ - lib/jekyll/migrators/mephisto.rb
207
+ - lib/jekyll/migrators/mt.rb
208
+ - lib/jekyll/migrators/textpattern.rb
209
+ - lib/jekyll/migrators/typo.rb
210
+ - lib/jekyll/migrators/wordpress.rb
113
211
  - lib/jekyll/page.rb
114
- - lib/jekyll/pager.rb
212
+ - lib/jekyll/plugin.rb
115
213
  - lib/jekyll/post.rb
116
214
  - lib/jekyll/site.rb
117
215
  - lib/jekyll/static_file.rb
@@ -142,6 +240,8 @@ files:
142
240
  - test/source/_posts/2010-01-08-triple-dash.markdown
143
241
  - test/source/_posts/2010-01-09-date-override.textile
144
242
  - test/source/_posts/2010-01-09-time-override.textile
243
+ - test/source/_posts/2010-01-09-timezone-override.textile
244
+ - test/source/_posts/2010-01-16-override-data.textile
145
245
  - test/source/about.html
146
246
  - test/source/category/_posts/2008-9-23-categories.textile
147
247
  - test/source/contacts.html
@@ -171,27 +271,31 @@ rdoc_options:
171
271
  require_paths:
172
272
  - lib
173
273
  required_ruby_version: !ruby/object:Gem::Requirement
274
+ none: false
174
275
  requirements:
175
276
  - - ">="
176
277
  - !ruby/object:Gem::Version
278
+ hash: 3
279
+ segments:
280
+ - 0
177
281
  version: "0"
178
- version:
179
282
  required_rubygems_version: !ruby/object:Gem::Requirement
283
+ none: false
180
284
  requirements:
181
285
  - - ">="
182
286
  - !ruby/object:Gem::Version
287
+ hash: 3
288
+ segments:
289
+ - 0
183
290
  version: "0"
184
- version:
185
291
  requirements: []
186
292
 
187
293
  rubyforge_project: jekyll
188
- rubygems_version: 1.3.5
294
+ rubygems_version: 1.3.7
189
295
  signing_key:
190
- specification_version: 3
191
- summary: Jekyll is a simple, blog aware, static site generator.
296
+ specification_version: 2
297
+ summary: A simple, blog aware, static site generator.
192
298
  test_files:
193
- - test/helper.rb
194
- - test/suite.rb
195
299
  - test/test_configuration.rb
196
300
  - test/test_core_ext.rb
197
301
  - test/test_filters.rb
data/.gitignore DELETED
@@ -1,6 +0,0 @@
1
- test/dest
2
- *.gem
3
- pkg/
4
- *.swp
5
- *~
6
- _site/
@@ -1,5 +0,0 @@
1
- ---
2
- :minor: 5
3
- :patch: 7
4
- :build:
5
- :major: 0
@@ -1,45 +0,0 @@
1
- module Jekyll
2
- class Pager
3
- attr_reader :page, :per_page, :posts, :total_posts, :total_pages, :previous_page, :next_page
4
-
5
- def self.calculate_pages(all_posts, per_page)
6
- num_pages = all_posts.size / per_page.to_i
7
- num_pages = num_pages + 1 if all_posts.size % per_page.to_i != 0
8
- num_pages
9
- end
10
-
11
- def self.pagination_enabled?(config, file)
12
- file == 'index.html' && !config['paginate'].nil?
13
- end
14
-
15
- def initialize(config, page, all_posts, num_pages = nil)
16
- @page = page
17
- @per_page = config['paginate'].to_i
18
- @total_pages = num_pages || Pager.calculate_pages(all_posts, @per_page)
19
-
20
- if @page > @total_pages
21
- raise RuntimeError, "page number can't be greater than total pages: #{@page} > #{@total_pages}"
22
- end
23
-
24
- init = (@page - 1) * @per_page
25
- offset = (init + @per_page - 1) >= all_posts.size ? all_posts.size : (init + @per_page - 1)
26
-
27
- @total_posts = all_posts.size
28
- @posts = all_posts[init..offset]
29
- @previous_page = @page != 1 ? @page - 1 : nil
30
- @next_page = @page != @total_pages ? @page + 1 : nil
31
- end
32
-
33
- def to_hash
34
- {
35
- 'page' => page,
36
- 'per_page' => per_page,
37
- 'posts' => posts,
38
- 'total_posts' => total_posts,
39
- 'total_pages' => total_pages,
40
- 'previous_page' => previous_page,
41
- 'next_page' => next_page
42
- }
43
- end
44
- end
45
- end