octopress 3.0.0.rc.15 → 3.0.0.rc.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/.clash.yml +159 -0
  3. data/.travis.yml +1 -1
  4. data/CHANGELOG.md +5 -0
  5. data/README.md +11 -144
  6. data/assets/docs/index.md +187 -0
  7. data/bin/octopress +0 -2
  8. data/lib/octopress.rb +10 -6
  9. data/lib/octopress/commands/isolate.rb +31 -0
  10. data/lib/octopress/commands/new.rb +2 -1
  11. data/lib/octopress/isolate.rb +108 -0
  12. data/lib/octopress/scaffold.rb +2 -1
  13. data/lib/octopress/version.rb +1 -1
  14. data/octopress.gemspec +2 -1
  15. data/test/Gemfile +1 -2
  16. data/test/_config.yml +3 -0
  17. data/test/{expected → _expected/blank}/_config.yml +0 -0
  18. data/test/{expected → _expected/blank}/_octopress.yml +0 -0
  19. data/test/{expected → _expected/blank}/_templates/draft +0 -0
  20. data/test/{expected → _expected/blank}/_templates/page +0 -0
  21. data/test/{expected → _expected/blank}/_templates/post +0 -0
  22. data/test/{expected/_site → _expected/blank}/index.html +0 -0
  23. data/test/_expected/integrate/_posts/2011-11-11-a-random-post.markdown +6 -0
  24. data/test/_expected/integrate/_posts/2012-11-11-another-random-post.markdown +6 -0
  25. data/test/_expected/integrate/_posts/2013-11-11-this-post-is-happy.markdown +6 -0
  26. data/test/_expected/isolate-path/_posts/2011-11-11-a-random-post.markdown +6 -0
  27. data/test/_expected/isolate-path/_posts/_exile/2012-11-11-another-random-post.markdown +6 -0
  28. data/test/_expected/isolate-path/_posts/_exile/2013-11-11-this-post-is-happy.markdown +6 -0
  29. data/test/_expected/isolate-search/_posts/2011-11-11-a-random-post.markdown +6 -0
  30. data/test/_expected/isolate-search/_posts/2012-11-11-another-random-post.markdown +6 -0
  31. data/test/_expected/isolate-search/_posts/_exile/2013-11-11-this-post-is-happy.markdown +6 -0
  32. data/test/_expected/isolate/_posts/2013-11-11-this-post-is-happy.markdown +6 -0
  33. data/test/_expected/isolate/_posts/_exile/2011-11-11-a-random-post.markdown +6 -0
  34. data/test/_expected/isolate/_posts/_exile/2012-11-11-another-random-post.markdown +6 -0
  35. data/test/{expected/_posts/2014-03-11-idea.markdown → _expected/new-draft-slug/_drafts/idea.markdown} +0 -1
  36. data/test/{expected/_drafts/stupid-idea.markdown → _expected/new-draft/_drafts/some-cool-idea.markdown} +1 -1
  37. data/test/{expected/date-page.html → _expected/new-page-date/pages/awesome-page.html} +1 -1
  38. data/test/{expected/awesome-page.html → _expected/new-page-extension/pages/awesome-page.md} +0 -0
  39. data/test/_expected/new-page-index/pages/index.html +5 -0
  40. data/test/{expected/custom-template-page.html → _expected/new-page-template/pages/awesome-page.html} +1 -1
  41. data/test/_expected/new-page/pages/awesome-page.html +5 -0
  42. data/test/{expected → _expected/new-post-dir}/_posts/stuff/2014-02-11-some-stuff.markdown +0 -0
  43. data/test/{expected → _expected/new-post-slug}/_posts/2014-03-13-awesome.markdown +0 -0
  44. data/test/{expected → _expected/new-post}/_posts/2014-03-12-awesome-stuff.markdown +0 -0
  45. data/test/_expected/publish-draft-date/_posts/2014-03-11-some-cool-idea.markdown +6 -0
  46. data/test/_expected/publish-draft-dir/_posts/ideas/2014-03-10-some-cool-idea.markdown +6 -0
  47. data/test/_expected/publish-draft/_posts/2014-03-10-some-cool-idea.markdown +6 -0
  48. data/test/_layouts/page.html +1 -0
  49. data/test/_layouts/post.html +1 -0
  50. data/test/_octopress.yml +11 -0
  51. data/test/{expected/_templates/other_page → _templates/draft} +0 -1
  52. data/test/_templates/page +4 -0
  53. data/test/{expected/_templates/date_page → _templates/post} +0 -0
  54. metadata +100 -81
  55. data/lib/octopress/commands/build.rb +0 -19
  56. data/lib/octopress/commands/doctor.rb +0 -20
  57. data/lib/octopress/commands/serve.rb +0 -30
  58. data/test/expected/_layouts/page.html +0 -1
  59. data/test/expected/_layouts/post.html +0 -1
  60. data/test/expected/_posts/2014-02-10-another-idea.markdown +0 -6
  61. data/test/expected/_posts/ideas/2014-02-13-yet-another-idea.markdown +0 -6
  62. data/test/expected/_site/2014/02/10/another-idea.html +0 -2
  63. data/test/expected/_site/2014/02/11/some-stuff.html +0 -2
  64. data/test/expected/_site/2014/02/13/yet-another-idea.html +0 -2
  65. data/test/expected/_site/2014/03/11/idea.html +0 -2
  66. data/test/expected/_site/2014/03/12/awesome-stuff.html +0 -2
  67. data/test/expected/_site/2014/03/13/awesome.html +0 -2
  68. data/test/expected/_site/awesome-page.html +0 -1
  69. data/test/expected/_site/cool-page.html +0 -1
  70. data/test/expected/_site/custom-template-page.html +0 -1
  71. data/test/expected/_site/date-page.html +0 -1
  72. data/test/expected/_site/okay-page/index.html +0 -1
  73. data/test/expected/cool-page.html +0 -5
  74. data/test/expected/index.html +0 -0
  75. data/test/expected/okay-page/index.html +0 -5
  76. data/test/test.rb +0 -162
  77. data/test/test_suite.rb +0 -161
@@ -0,0 +1 @@
1
+ <div class=page>{{ page.title }}{{ content }}</div>
@@ -0,0 +1 @@
1
+ <div class=post>{{ page.title }}{{ content }}</div>
@@ -0,0 +1,11 @@
1
+ # Default extension for new posts and pages
2
+ post_ext: markdown
3
+ page_ext: html
4
+
5
+ # Default templates for posts and pages
6
+ # Found in _templates/
7
+ post_layout: post
8
+ page_layout: page
9
+
10
+ # Format titles with titlecase?
11
+ titlecase: true
@@ -1,5 +1,4 @@
1
1
  ---
2
2
  layout: {{ layout }}
3
3
  title: {{ title }}
4
- kittens: true
5
4
  ---
@@ -0,0 +1,4 @@
1
+ ---
2
+ layout: {{ layout }}
3
+ title: {{ title }}
4
+ ---
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.rc.15
4
+ version: 3.0.0.rc.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-09-24 00:00:00.000000000 Z
12
+ date: 2014-11-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mercenary
@@ -85,16 +85,16 @@ dependencies:
85
85
  name: octopress-ink
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - ">="
88
+ - - "~>"
89
89
  - !ruby/object:Gem::Version
90
- version: '0'
90
+ version: 1.0.0.rc
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - ">="
95
+ - - "~>"
96
96
  - !ruby/object:Gem::Version
97
- version: '0'
97
+ version: 1.0.0.rc
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: bundler
100
100
  requirement: !ruby/object:Gem::Requirement
@@ -123,6 +123,20 @@ dependencies:
123
123
  - - ">="
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: clash
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
126
140
  - !ruby/object:Gem::Dependency
127
141
  name: pry-byebug
128
142
  requirement: !ruby/object:Gem::Requirement
@@ -147,6 +161,7 @@ executables:
147
161
  extensions: []
148
162
  extra_rdoc_files: []
149
163
  files:
164
+ - ".clash.yml"
150
165
  - ".gitignore"
151
166
  - ".travis.yml"
152
167
  - CHANGELOG.md
@@ -154,18 +169,18 @@ files:
154
169
  - LICENSE
155
170
  - README.md
156
171
  - Rakefile
172
+ - assets/docs/index.md
157
173
  - bin/octopress
158
174
  - lib/octopress.rb
159
175
  - lib/octopress/command.rb
160
- - lib/octopress/commands/build.rb
161
- - lib/octopress/commands/doctor.rb
162
176
  - lib/octopress/commands/helpers.rb
163
177
  - lib/octopress/commands/init.rb
178
+ - lib/octopress/commands/isolate.rb
164
179
  - lib/octopress/commands/new.rb
165
180
  - lib/octopress/commands/publish.rb
166
- - lib/octopress/commands/serve.rb
167
181
  - lib/octopress/configuration.rb
168
182
  - lib/octopress/draft.rb
183
+ - lib/octopress/isolate.rb
169
184
  - lib/octopress/page.rb
170
185
  - lib/octopress/post.rb
171
186
  - lib/octopress/scaffold.rb
@@ -177,42 +192,44 @@ files:
177
192
  - scaffold/_templates/page
178
193
  - scaffold/_templates/post
179
194
  - test/Gemfile
180
- - test/expected/_config.yml
181
- - test/expected/_drafts/stupid-idea.markdown
182
- - test/expected/_layouts/page.html
183
- - test/expected/_layouts/post.html
184
- - test/expected/_octopress.yml
185
- - test/expected/_posts/2014-02-10-another-idea.markdown
186
- - test/expected/_posts/2014-03-11-idea.markdown
187
- - test/expected/_posts/2014-03-12-awesome-stuff.markdown
188
- - test/expected/_posts/2014-03-13-awesome.markdown
189
- - test/expected/_posts/ideas/2014-02-13-yet-another-idea.markdown
190
- - test/expected/_posts/stuff/2014-02-11-some-stuff.markdown
191
- - test/expected/_site/2014/02/10/another-idea.html
192
- - test/expected/_site/2014/02/11/some-stuff.html
193
- - test/expected/_site/2014/02/13/yet-another-idea.html
194
- - test/expected/_site/2014/03/11/idea.html
195
- - test/expected/_site/2014/03/12/awesome-stuff.html
196
- - test/expected/_site/2014/03/13/awesome.html
197
- - test/expected/_site/awesome-page.html
198
- - test/expected/_site/cool-page.html
199
- - test/expected/_site/custom-template-page.html
200
- - test/expected/_site/date-page.html
201
- - test/expected/_site/index.html
202
- - test/expected/_site/okay-page/index.html
203
- - test/expected/_templates/date_page
204
- - test/expected/_templates/draft
205
- - test/expected/_templates/other_page
206
- - test/expected/_templates/page
207
- - test/expected/_templates/post
208
- - test/expected/awesome-page.html
209
- - test/expected/cool-page.html
210
- - test/expected/custom-template-page.html
211
- - test/expected/date-page.html
212
- - test/expected/index.html
213
- - test/expected/okay-page/index.html
214
- - test/test.rb
215
- - test/test_suite.rb
195
+ - test/_config.yml
196
+ - test/_expected/blank/_config.yml
197
+ - test/_expected/blank/_octopress.yml
198
+ - test/_expected/blank/_templates/draft
199
+ - test/_expected/blank/_templates/page
200
+ - test/_expected/blank/_templates/post
201
+ - test/_expected/blank/index.html
202
+ - test/_expected/integrate/_posts/2011-11-11-a-random-post.markdown
203
+ - test/_expected/integrate/_posts/2012-11-11-another-random-post.markdown
204
+ - test/_expected/integrate/_posts/2013-11-11-this-post-is-happy.markdown
205
+ - test/_expected/isolate-path/_posts/2011-11-11-a-random-post.markdown
206
+ - test/_expected/isolate-path/_posts/_exile/2012-11-11-another-random-post.markdown
207
+ - test/_expected/isolate-path/_posts/_exile/2013-11-11-this-post-is-happy.markdown
208
+ - test/_expected/isolate-search/_posts/2011-11-11-a-random-post.markdown
209
+ - test/_expected/isolate-search/_posts/2012-11-11-another-random-post.markdown
210
+ - test/_expected/isolate-search/_posts/_exile/2013-11-11-this-post-is-happy.markdown
211
+ - test/_expected/isolate/_posts/2013-11-11-this-post-is-happy.markdown
212
+ - test/_expected/isolate/_posts/_exile/2011-11-11-a-random-post.markdown
213
+ - test/_expected/isolate/_posts/_exile/2012-11-11-another-random-post.markdown
214
+ - test/_expected/new-draft-slug/_drafts/idea.markdown
215
+ - test/_expected/new-draft/_drafts/some-cool-idea.markdown
216
+ - test/_expected/new-page-date/pages/awesome-page.html
217
+ - test/_expected/new-page-extension/pages/awesome-page.md
218
+ - test/_expected/new-page-index/pages/index.html
219
+ - test/_expected/new-page-template/pages/awesome-page.html
220
+ - test/_expected/new-page/pages/awesome-page.html
221
+ - test/_expected/new-post-dir/_posts/stuff/2014-02-11-some-stuff.markdown
222
+ - test/_expected/new-post-slug/_posts/2014-03-13-awesome.markdown
223
+ - test/_expected/new-post/_posts/2014-03-12-awesome-stuff.markdown
224
+ - test/_expected/publish-draft-date/_posts/2014-03-11-some-cool-idea.markdown
225
+ - test/_expected/publish-draft-dir/_posts/ideas/2014-03-10-some-cool-idea.markdown
226
+ - test/_expected/publish-draft/_posts/2014-03-10-some-cool-idea.markdown
227
+ - test/_layouts/page.html
228
+ - test/_layouts/post.html
229
+ - test/_octopress.yml
230
+ - test/_templates/draft
231
+ - test/_templates/page
232
+ - test/_templates/post
216
233
  homepage: http://octopress.org
217
234
  licenses:
218
235
  - MIT
@@ -240,39 +257,41 @@ summary: Octopress is an obsessively designed framework for Jekyll blogging. It
240
257
  easy to configure and easy to deploy. Sweet huh?
241
258
  test_files:
242
259
  - test/Gemfile
243
- - test/expected/_config.yml
244
- - test/expected/_drafts/stupid-idea.markdown
245
- - test/expected/_layouts/page.html
246
- - test/expected/_layouts/post.html
247
- - test/expected/_octopress.yml
248
- - test/expected/_posts/2014-02-10-another-idea.markdown
249
- - test/expected/_posts/2014-03-11-idea.markdown
250
- - test/expected/_posts/2014-03-12-awesome-stuff.markdown
251
- - test/expected/_posts/2014-03-13-awesome.markdown
252
- - test/expected/_posts/ideas/2014-02-13-yet-another-idea.markdown
253
- - test/expected/_posts/stuff/2014-02-11-some-stuff.markdown
254
- - test/expected/_site/2014/02/10/another-idea.html
255
- - test/expected/_site/2014/02/11/some-stuff.html
256
- - test/expected/_site/2014/02/13/yet-another-idea.html
257
- - test/expected/_site/2014/03/11/idea.html
258
- - test/expected/_site/2014/03/12/awesome-stuff.html
259
- - test/expected/_site/2014/03/13/awesome.html
260
- - test/expected/_site/awesome-page.html
261
- - test/expected/_site/cool-page.html
262
- - test/expected/_site/custom-template-page.html
263
- - test/expected/_site/date-page.html
264
- - test/expected/_site/index.html
265
- - test/expected/_site/okay-page/index.html
266
- - test/expected/_templates/date_page
267
- - test/expected/_templates/draft
268
- - test/expected/_templates/other_page
269
- - test/expected/_templates/page
270
- - test/expected/_templates/post
271
- - test/expected/awesome-page.html
272
- - test/expected/cool-page.html
273
- - test/expected/custom-template-page.html
274
- - test/expected/date-page.html
275
- - test/expected/index.html
276
- - test/expected/okay-page/index.html
277
- - test/test.rb
278
- - test/test_suite.rb
260
+ - test/_config.yml
261
+ - test/_expected/blank/_config.yml
262
+ - test/_expected/blank/_octopress.yml
263
+ - test/_expected/blank/_templates/draft
264
+ - test/_expected/blank/_templates/page
265
+ - test/_expected/blank/_templates/post
266
+ - test/_expected/blank/index.html
267
+ - test/_expected/integrate/_posts/2011-11-11-a-random-post.markdown
268
+ - test/_expected/integrate/_posts/2012-11-11-another-random-post.markdown
269
+ - test/_expected/integrate/_posts/2013-11-11-this-post-is-happy.markdown
270
+ - test/_expected/isolate-path/_posts/2011-11-11-a-random-post.markdown
271
+ - test/_expected/isolate-path/_posts/_exile/2012-11-11-another-random-post.markdown
272
+ - test/_expected/isolate-path/_posts/_exile/2013-11-11-this-post-is-happy.markdown
273
+ - test/_expected/isolate-search/_posts/2011-11-11-a-random-post.markdown
274
+ - test/_expected/isolate-search/_posts/2012-11-11-another-random-post.markdown
275
+ - test/_expected/isolate-search/_posts/_exile/2013-11-11-this-post-is-happy.markdown
276
+ - test/_expected/isolate/_posts/2013-11-11-this-post-is-happy.markdown
277
+ - test/_expected/isolate/_posts/_exile/2011-11-11-a-random-post.markdown
278
+ - test/_expected/isolate/_posts/_exile/2012-11-11-another-random-post.markdown
279
+ - test/_expected/new-draft-slug/_drafts/idea.markdown
280
+ - test/_expected/new-draft/_drafts/some-cool-idea.markdown
281
+ - test/_expected/new-page-date/pages/awesome-page.html
282
+ - test/_expected/new-page-extension/pages/awesome-page.md
283
+ - test/_expected/new-page-index/pages/index.html
284
+ - test/_expected/new-page-template/pages/awesome-page.html
285
+ - test/_expected/new-page/pages/awesome-page.html
286
+ - test/_expected/new-post-dir/_posts/stuff/2014-02-11-some-stuff.markdown
287
+ - test/_expected/new-post-slug/_posts/2014-03-13-awesome.markdown
288
+ - test/_expected/new-post/_posts/2014-03-12-awesome-stuff.markdown
289
+ - test/_expected/publish-draft-date/_posts/2014-03-11-some-cool-idea.markdown
290
+ - test/_expected/publish-draft-dir/_posts/ideas/2014-03-10-some-cool-idea.markdown
291
+ - test/_expected/publish-draft/_posts/2014-03-10-some-cool-idea.markdown
292
+ - test/_layouts/page.html
293
+ - test/_layouts/post.html
294
+ - test/_octopress.yml
295
+ - test/_templates/draft
296
+ - test/_templates/page
297
+ - test/_templates/post
@@ -1,19 +0,0 @@
1
- module Octopress
2
- class Build < Command
3
- def self.init_with_program(p)
4
- p.command(:build) do |c|
5
- c.syntax 'build [options]'
6
- c.description 'Build your site'
7
- CommandHelpers.add_build_options(c)
8
-
9
- c.action do |args, options|
10
- Octopress.config(options)
11
- options = CommandHelpers.normalize_options(options)
12
- options = ::Jekyll.configuration(options)
13
- ::Jekyll::Commands::Build.process(options)
14
- end
15
- end
16
- end
17
- end
18
- end
19
-
@@ -1,20 +0,0 @@
1
- module Octopress
2
- class Doctor < Command
3
- def self.init_with_program(p)
4
- p.command(:doctor) do |c|
5
- c.alias(:hyde)
6
-
7
- c.syntax 'doctor'
8
- c.description 'Search site and print specific deprecation warnings'
9
- CommandHelpers.add_common_options c
10
-
11
- c.action do |args, options|
12
- options = CommandHelpers.normalize_options(options)
13
- options = Jekyll.configuration(options)
14
- Jekyll::Commands::Doctor.process(options)
15
- end
16
- end
17
- end
18
- end
19
- end
20
-
@@ -1,30 +0,0 @@
1
- module Octopress
2
- class Serve < Command
3
- def self.init_with_program(p)
4
- p.command(:serve) do |c|
5
- c.alias(:server)
6
-
7
- c.syntax 'serve [options]'
8
- c.description 'Serve your site locally'
9
-
10
- CommandHelpers.add_build_options(c)
11
-
12
- c.option 'detach', '-B', '--detach', 'Run the server in the background (detach)'
13
- c.option 'port', '-P', '--port PORT', 'Port to listen on'
14
- c.option 'host', '-H', '--host HOST', 'Host to bind to'
15
- c.option 'baseurl', '--baseurl URL', 'Base URL'
16
-
17
- c.action do |args, options|
18
- Octopress.config(options)
19
- options["serving"] ||= true
20
-
21
- options = CommandHelpers.normalize_options(options)
22
- options = Jekyll.configuration(options)
23
- Jekyll::Commands::Build.process(options)
24
- Jekyll::Commands::Serve.process(options)
25
- end
26
- end
27
- end
28
- end
29
- end
30
-
@@ -1 +0,0 @@
1
- <div class='page'>{{ page.title }}{{ content }}</div>
@@ -1 +0,0 @@
1
- <div class='post'>{{ page.title }}{{ content }}</div>
@@ -1,6 +0,0 @@
1
- ---
2
- layout: post
3
- title: "Another Idea"
4
- date: 2014-02-10T15:20:00Z
5
- ---
6
-
@@ -1,6 +0,0 @@
1
- ---
2
- layout: post
3
- title: "Yet Another Idea"
4
- date: 2014-02-13T15:20:00Z
5
- ---
6
-
@@ -1,2 +0,0 @@
1
- <div class='post'>Another Idea
2
- </div>
@@ -1,2 +0,0 @@
1
- <div class='post'>Some Stuff
2
- </div>
@@ -1,2 +0,0 @@
1
- <div class='post'>Yet Another Idea
2
- </div>
@@ -1,2 +0,0 @@
1
- <div class='post'>Some Great Idea for a Post
2
- </div>
@@ -1,2 +0,0 @@
1
- <div class='post'>Awesome Stuff
2
- </div>
@@ -1,2 +0,0 @@
1
- <div class='post'>Super Awesome Stuff
2
- </div>
@@ -1 +0,0 @@
1
- <div class='page'>Awesome Page</div>
@@ -1 +0,0 @@
1
- <div class='page'>Some Cool Page</div>
@@ -1 +0,0 @@
1
- <div class='page'>Some Date Page</div>
@@ -1 +0,0 @@
1
- <div class='page'>Some Date Page</div>
@@ -1 +0,0 @@
1
- <div class='page'>This Page Is Meh</div>
@@ -1,5 +0,0 @@
1
- ---
2
- layout: page
3
- title: "Some Cool Page"
4
- ---
5
-
File without changes
@@ -1,5 +0,0 @@
1
- ---
2
- layout: page
3
- title: "This Page Is Meh"
4
- ---
5
-
data/test/test.rb DELETED
@@ -1,162 +0,0 @@
1
- require './test_suite'
2
-
3
- @failures = []
4
-
5
- `rm -rf test-site; mkdir test-site`
6
-
7
- FileUtils.cd('test-site') do |dir|
8
-
9
- # Create a blank site
10
- #
11
- test_cmd({
12
- desc: 'Create a blank site',
13
- cmd: [
14
- 'octopress new . --blank',
15
- 'echo "<div class=\'post\'>{{ page.title }}{{ content }}</div>" > _layouts/post.html',
16
- 'echo "<div class=\'page\'>{{ page.title }}{{ content }}</div>" > _layouts/page.html',
17
- 'echo "timezone: GMT" > _config.yml'
18
- ],
19
- expect: "New jekyll site installed in ."
20
- })
21
-
22
- # Init Octopress scaffolding
23
- #
24
- test_cmd({
25
- desc: 'Init Octopress scaffolding',
26
- cmd: 'octopress init .',
27
- expect: "Octopress scaffold added to ."
28
- })
29
-
30
- # Add a new post
31
- #
32
- test_cmd({
33
- desc: 'Add a new post',
34
- cmd: 'octopress new post "Awesome stuff" --date "2014-03-12 05:10 -0000"',
35
- expect: '_posts/2014-03-12-awesome-stuff.markdown',
36
- })
37
-
38
- # Add another new post with a slug
39
- #
40
- test_cmd({
41
- desc: 'Add another new post with a slug',
42
- cmd: 'octopress new post "Super Awesome stuff" --slug awesome --date "2014-03-13 15:20 -0000"',
43
- expect: '_posts/2014-03-13-awesome.markdown',
44
- })
45
-
46
- # Add a new post in a subdirectory
47
- #
48
- test_cmd({
49
- desc: 'Add a new post',
50
- cmd: 'octopress new post "Some stuff" --dir stuff --date "2014-02-11 05:10 -0000"',
51
- expect: '_posts/stuff/2014-02-11-some-stuff.markdown',
52
- })
53
-
54
- # Add a draft
55
- #
56
- test_cmd({
57
- desc: 'Add a draft',
58
- cmd: 'octopress new draft "Stupid idea" --date "2014-03-10 15:20 -0000"',
59
- expect: '_drafts/stupid-idea.markdown',
60
- })
61
-
62
- # Add another draft
63
- #
64
- test_cmd({
65
- desc: 'Add another draft',
66
- cmd: 'octopress new draft "Another idea" --date "2014-02-10 15:20 -0000"',
67
- expect: '_drafts/another-idea.markdown',
68
- })
69
-
70
- # Add a draft with a slug
71
- #
72
- test_cmd({
73
- desc: 'Add a draft with a slug',
74
- cmd: 'octopress new draft "Some great idea for a post" --slug idea',
75
- expect: '_drafts/idea.markdown',
76
- })
77
-
78
- # Add yet another draft
79
- #
80
- test_cmd({
81
- desc: 'Add yet another draft',
82
- cmd: 'octopress new draft "yet another idea" --date "2014-02-13 15:20 -0000"',
83
- expect: '_drafts/yet-another-idea.markdown',
84
- })
85
-
86
- # Publish a draft
87
- #
88
- test_cmd({
89
- desc: 'Publish a draft',
90
- cmd: 'octopress publish _drafts/another-idea.markdown',
91
- expect: '_posts/2014-02-10-another-idea.markdown',
92
- })
93
-
94
- # Publish a draft with a date
95
- #
96
- test_cmd({
97
- desc: 'Publish a draft with a date',
98
- cmd: 'octopress publish _drafts/idea.markdown --date "2014-03-11 20:20 -0000"',
99
- expect: '_posts/2014-03-11-idea.markdown',
100
- })
101
-
102
- # Publish a draft in a dir
103
- #
104
- test_cmd({
105
- desc: 'Publish a draft in a dir',
106
- cmd: 'octopress publish _drafts/yet-another-idea.markdown --dir ideas',
107
- expect: '_posts/ideas/2014-02-13-yet-another-idea.markdown',
108
- })
109
-
110
- # Add a page
111
- #
112
- test_cmd({
113
- desc: 'Add a page',
114
- cmd: 'octopress new page awesome-page --title "Awesome Page"',
115
- expect: 'awesome-page.html',
116
- })
117
-
118
- # Add a page with an extension
119
- #
120
- test_cmd({
121
- desc: 'Add a page with an extension',
122
- cmd: 'octopress new page cool-page.html --title "some cool page"',
123
- expect: 'cool-page.html',
124
- })
125
-
126
- # Add a page with a directory
127
- #
128
- test_cmd({
129
- desc: 'Add a page with a directory',
130
- cmd: 'octopress new page okay-page/ --title "This page is meh"',
131
- expect: 'okay-page/index.html',
132
- })
133
-
134
- # Add a page with a date
135
- #
136
- test_cmd({
137
- desc: 'Add a page with a custom template',
138
- cmd: [
139
- 'echo "---\nlayout: {{ layout }}\ntitle: {{ title }}\nkittens: true\n---" > _templates/other_page',
140
- 'octopress new page custom-template-page.html --title "some date page" --template other_page'
141
- ],
142
- expect: 'custom-template-page.html',
143
- })
144
-
145
- # Add a page with a date
146
- #
147
- test_cmd({
148
- desc: 'Add a page with a date',
149
- cmd: [
150
- 'echo "---\nlayout: {{ layout }}\ntitle: {{ title }}\ndate: {{ date }}\n---" > _templates/date_page',
151
- 'octopress new page date-page.html --title "some date page" --date "2011-11-11 11:11 -0000" --template date_page'
152
- ],
153
- expect: 'date-page.html',
154
- })
155
- end
156
-
157
- # Build the site
158
- #
159
- system "cd test-site; octopress build; cd -"
160
- test_dirs('Compare directories', 'expected', 'test-site')
161
-
162
- print_results