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.
- checksums.yaml +4 -4
- data/.clash.yml +159 -0
- data/.travis.yml +1 -1
- data/CHANGELOG.md +5 -0
- data/README.md +11 -144
- data/assets/docs/index.md +187 -0
- data/bin/octopress +0 -2
- data/lib/octopress.rb +10 -6
- data/lib/octopress/commands/isolate.rb +31 -0
- data/lib/octopress/commands/new.rb +2 -1
- data/lib/octopress/isolate.rb +108 -0
- data/lib/octopress/scaffold.rb +2 -1
- data/lib/octopress/version.rb +1 -1
- data/octopress.gemspec +2 -1
- data/test/Gemfile +1 -2
- data/test/_config.yml +3 -0
- data/test/{expected → _expected/blank}/_config.yml +0 -0
- data/test/{expected → _expected/blank}/_octopress.yml +0 -0
- data/test/{expected → _expected/blank}/_templates/draft +0 -0
- data/test/{expected → _expected/blank}/_templates/page +0 -0
- data/test/{expected → _expected/blank}/_templates/post +0 -0
- data/test/{expected/_site → _expected/blank}/index.html +0 -0
- data/test/_expected/integrate/_posts/2011-11-11-a-random-post.markdown +6 -0
- data/test/_expected/integrate/_posts/2012-11-11-another-random-post.markdown +6 -0
- data/test/_expected/integrate/_posts/2013-11-11-this-post-is-happy.markdown +6 -0
- data/test/_expected/isolate-path/_posts/2011-11-11-a-random-post.markdown +6 -0
- data/test/_expected/isolate-path/_posts/_exile/2012-11-11-another-random-post.markdown +6 -0
- data/test/_expected/isolate-path/_posts/_exile/2013-11-11-this-post-is-happy.markdown +6 -0
- data/test/_expected/isolate-search/_posts/2011-11-11-a-random-post.markdown +6 -0
- data/test/_expected/isolate-search/_posts/2012-11-11-another-random-post.markdown +6 -0
- data/test/_expected/isolate-search/_posts/_exile/2013-11-11-this-post-is-happy.markdown +6 -0
- data/test/_expected/isolate/_posts/2013-11-11-this-post-is-happy.markdown +6 -0
- data/test/_expected/isolate/_posts/_exile/2011-11-11-a-random-post.markdown +6 -0
- data/test/_expected/isolate/_posts/_exile/2012-11-11-another-random-post.markdown +6 -0
- data/test/{expected/_posts/2014-03-11-idea.markdown → _expected/new-draft-slug/_drafts/idea.markdown} +0 -1
- data/test/{expected/_drafts/stupid-idea.markdown → _expected/new-draft/_drafts/some-cool-idea.markdown} +1 -1
- data/test/{expected/date-page.html → _expected/new-page-date/pages/awesome-page.html} +1 -1
- data/test/{expected/awesome-page.html → _expected/new-page-extension/pages/awesome-page.md} +0 -0
- data/test/_expected/new-page-index/pages/index.html +5 -0
- data/test/{expected/custom-template-page.html → _expected/new-page-template/pages/awesome-page.html} +1 -1
- data/test/_expected/new-page/pages/awesome-page.html +5 -0
- data/test/{expected → _expected/new-post-dir}/_posts/stuff/2014-02-11-some-stuff.markdown +0 -0
- data/test/{expected → _expected/new-post-slug}/_posts/2014-03-13-awesome.markdown +0 -0
- data/test/{expected → _expected/new-post}/_posts/2014-03-12-awesome-stuff.markdown +0 -0
- data/test/_expected/publish-draft-date/_posts/2014-03-11-some-cool-idea.markdown +6 -0
- data/test/_expected/publish-draft-dir/_posts/ideas/2014-03-10-some-cool-idea.markdown +6 -0
- data/test/_expected/publish-draft/_posts/2014-03-10-some-cool-idea.markdown +6 -0
- data/test/_layouts/page.html +1 -0
- data/test/_layouts/post.html +1 -0
- data/test/_octopress.yml +11 -0
- data/test/{expected/_templates/other_page → _templates/draft} +0 -1
- data/test/_templates/page +4 -0
- data/test/{expected/_templates/date_page → _templates/post} +0 -0
- metadata +100 -81
- data/lib/octopress/commands/build.rb +0 -19
- data/lib/octopress/commands/doctor.rb +0 -20
- data/lib/octopress/commands/serve.rb +0 -30
- data/test/expected/_layouts/page.html +0 -1
- data/test/expected/_layouts/post.html +0 -1
- data/test/expected/_posts/2014-02-10-another-idea.markdown +0 -6
- data/test/expected/_posts/ideas/2014-02-13-yet-another-idea.markdown +0 -6
- data/test/expected/_site/2014/02/10/another-idea.html +0 -2
- data/test/expected/_site/2014/02/11/some-stuff.html +0 -2
- data/test/expected/_site/2014/02/13/yet-another-idea.html +0 -2
- data/test/expected/_site/2014/03/11/idea.html +0 -2
- data/test/expected/_site/2014/03/12/awesome-stuff.html +0 -2
- data/test/expected/_site/2014/03/13/awesome.html +0 -2
- data/test/expected/_site/awesome-page.html +0 -1
- data/test/expected/_site/cool-page.html +0 -1
- data/test/expected/_site/custom-template-page.html +0 -1
- data/test/expected/_site/date-page.html +0 -1
- data/test/expected/_site/okay-page/index.html +0 -1
- data/test/expected/cool-page.html +0 -5
- data/test/expected/index.html +0 -0
- data/test/expected/okay-page/index.html +0 -5
- data/test/test.rb +0 -162
- 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>
|
data/test/_octopress.yml
ADDED
File without changes
|
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.
|
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-
|
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:
|
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:
|
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/
|
181
|
-
- test/
|
182
|
-
- test/
|
183
|
-
- test/
|
184
|
-
- test/
|
185
|
-
- test/
|
186
|
-
- test/
|
187
|
-
- test/
|
188
|
-
- test/
|
189
|
-
- test/
|
190
|
-
- test/
|
191
|
-
- test/
|
192
|
-
- test/
|
193
|
-
- test/
|
194
|
-
- test/
|
195
|
-
- test/
|
196
|
-
- test/
|
197
|
-
- test/
|
198
|
-
- test/
|
199
|
-
- test/
|
200
|
-
- test/
|
201
|
-
- test/
|
202
|
-
- test/
|
203
|
-
- test/
|
204
|
-
- test/
|
205
|
-
- test/
|
206
|
-
- test/
|
207
|
-
- test/
|
208
|
-
- test/
|
209
|
-
- test/
|
210
|
-
- test/
|
211
|
-
- test/
|
212
|
-
- test/
|
213
|
-
- test/
|
214
|
-
- test/
|
215
|
-
- test/
|
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/
|
244
|
-
- test/
|
245
|
-
- test/
|
246
|
-
- test/
|
247
|
-
- test/
|
248
|
-
- test/
|
249
|
-
- test/
|
250
|
-
- test/
|
251
|
-
- test/
|
252
|
-
- test/
|
253
|
-
- test/
|
254
|
-
- test/
|
255
|
-
- test/
|
256
|
-
- test/
|
257
|
-
- test/
|
258
|
-
- test/
|
259
|
-
- test/
|
260
|
-
- test/
|
261
|
-
- test/
|
262
|
-
- test/
|
263
|
-
- test/
|
264
|
-
- test/
|
265
|
-
- test/
|
266
|
-
- test/
|
267
|
-
- test/
|
268
|
-
- test/
|
269
|
-
- test/
|
270
|
-
- test/
|
271
|
-
- test/
|
272
|
-
- test/
|
273
|
-
- test/
|
274
|
-
- test/
|
275
|
-
- test/
|
276
|
-
- test/
|
277
|
-
- test/
|
278
|
-
- test/
|
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 +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>
|
data/test/expected/index.html
DELETED
File without changes
|
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
|