octopress-ink 1.0.0.alpha.24 → 1.0.0.alpha.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/octopress-ink/assets/asset.rb +19 -19
- data/lib/octopress-ink/assets/config.rb +6 -6
- data/lib/octopress-ink/assets/javascript.rb +1 -1
- data/lib/octopress-ink/assets/layout.rb +4 -4
- data/lib/octopress-ink/assets/root.rb +3 -3
- data/lib/octopress-ink/assets/sass.rb +13 -13
- data/lib/octopress-ink/assets/stylesheet.rb +1 -1
- data/lib/octopress-ink/filters.rb +115 -0
- data/lib/octopress-ink/generators/plugin_assets.rb +4 -2
- data/lib/octopress-ink/helpers/conditional.rb +1 -1
- data/lib/octopress-ink/helpers/content_for.rb +1 -1
- data/lib/octopress-ink/helpers/path.rb +2 -2
- data/lib/octopress-ink/helpers/titlecase.rb +36 -0
- data/lib/octopress-ink/helpers/var.rb +63 -3
- data/lib/octopress-ink/jekyll/hooks.rb +3 -0
- data/lib/octopress-ink/plugin.rb +15 -15
- data/lib/octopress-ink/plugins/stylesheets.rb +11 -9
- data/lib/octopress-ink/plugins.rb +78 -67
- data/lib/octopress-ink/tags/assign.rb +1 -1
- data/lib/octopress-ink/tags/include.rb +13 -3
- data/lib/octopress-ink/tags/javascript.rb +1 -5
- data/lib/octopress-ink/tags/line_comment.rb +7 -0
- data/lib/octopress-ink/tags/render.rb +12 -3
- data/lib/octopress-ink/tags/return.rb +1 -1
- data/lib/octopress-ink/tags/stylesheet.rb +1 -5
- data/lib/octopress-ink/tags/wrap.rb +3 -3
- data/lib/octopress-ink/tags/yield.rb +14 -3
- data/lib/octopress-ink/tags.rb +1 -0
- data/lib/octopress-ink/version.rb +1 -1
- data/lib/octopress-ink.rb +5 -0
- data/test/expected/test_tags/assign.html +1 -0
- data/test/expected/test_tags/content_for.html +4 -1
- data/test/expected/test_tags/include.html +4 -0
- data/test/expected/test_tags/render.html +4 -0
- data/test/expected/test_tags/wrap.html +7 -0
- data/test/site/test_tags/assign.html +1 -0
- data/test/site/test_tags/content_for.html +4 -1
- data/test/site/test_tags/include.html +4 -0
- data/test/site/test_tags/render.html +4 -0
- data/test/site/test_tags/wrap.html +7 -0
- data/test/source/test_tags/assign.html +1 -0
- data/test/source/test_tags/content_for.html +19 -4
- data/test/source/test_tags/include.html +4 -0
- data/test/source/test_tags/render.html +4 -0
- data/test/source/test_tags/return.html +1 -1
- data/test/source/test_tags/wrap.html +7 -0
- data/test/test.rb +2 -1
- metadata +5 -22
- data/test/expected/test_tags/footer.html +0 -3
- data/test/expected/test_tags/head.html +0 -4
- data/test/expected/test_tags/scripts.html +0 -4
- data/test/site/test_tags/footer.html +0 -3
- data/test/site/test_tags/head.html +0 -4
- data/test/site/test_tags/scripts.html +0 -4
- data/test/source/_layouts/content_for.html +0 -3
- data/test/source/test_tags/footer.html +0 -6
- data/test/source/test_tags/head.html +0 -10
- data/test/source/test_tags/scripts.html +0 -6
@@ -1,6 +1,21 @@
|
|
1
1
|
---
|
2
|
-
layout: content_for
|
3
2
|
---
|
4
|
-
{% content_for foo %}
|
5
|
-
|
6
|
-
{%
|
3
|
+
Testing content for → {% content_for foo %}Testing content for{% endcontent_for %}{% yield foo %}
|
4
|
+
|
5
|
+
Testing scripts → {% scripts %}
|
6
|
+
Testing
|
7
|
+
{% endscripts %}{% scripts %}
|
8
|
+
scripts
|
9
|
+
{% endscripts %}{% yield scripts | join_space %}
|
10
|
+
|
11
|
+
Testing head tag → {% head %}
|
12
|
+
Testing
|
13
|
+
{% endhead %}{% head %}
|
14
|
+
head tag
|
15
|
+
{% endhead %}{% yield head | join_space %}
|
16
|
+
|
17
|
+
Testing footer → {% footer %}
|
18
|
+
Testing
|
19
|
+
{% endfooter %}{% footer %}
|
20
|
+
footer
|
21
|
+
{% endfooter %}{% yield footer | join_space %}
|
@@ -9,6 +9,10 @@ Testing Include → {% include foo.html %}
|
|
9
9
|
## Local var passing
|
10
10
|
Testing Include var_test → {% include foo.html some_var="var_test" %}
|
11
11
|
|
12
|
+
## Filter testing
|
13
|
+
TESTING INCLUDE → {% include foo.html | upcase %}
|
14
|
+
'' → '{% include foo.html | upcase unless true %}'
|
15
|
+
|
12
16
|
## Conditional Include
|
13
17
|
'' → '{% include foo.html unless true %}'
|
14
18
|
'' → '{% include foo.html unless some_bool %}'
|
@@ -21,6 +21,10 @@ Testing Render → {% render file if some_bool %}
|
|
21
21
|
## Test Variables
|
22
22
|
kittens → {% render test_render/_var.html %}
|
23
23
|
|
24
|
+
## Test Filters
|
25
|
+
KITTENS → {% render test_render/_var.html | upcase %}
|
26
|
+
MITTENS → {% render test_render/_var.html | replace:"k","m" | upcase %}
|
27
|
+
|
24
28
|
## Ternary include
|
25
29
|
kittens → {% render (false ? file : file2) %}
|
26
30
|
Testing Render → {% render (some_bool ? file : file2) %}
|
@@ -26,5 +26,5 @@ yep → {% for person in page.people %}{% return 'yep' if person.name == 'Bill'
|
|
26
26
|
|
27
27
|
## Returns with filters
|
28
28
|
2013-07-21T18:59:00-05:00 → {% return post.date or page.date | datetime | date_to_xmlschema %}
|
29
|
-
2013-07-21T18:59:00-05:00 → {% return (
|
29
|
+
2013-07-21T18:59:00-05:00 → {% return (false ? post.date : page.date) | datetime | date_to_xmlschema %}
|
30
30
|
|
@@ -9,6 +9,10 @@ layout: nil
|
|
9
9
|
## Local var passing
|
10
10
|
[- Testing Include var_test -] → {% wrap foo.html some_var="var_test" %}[- {=yield} -]{% endwrap %}
|
11
11
|
|
12
|
+
## Filter testing
|
13
|
+
[- TESTING INCLUDE -] → {% wrap foo.html | upcase %}[- {=yield} -]{% endwrap %}
|
14
|
+
[- TESTING FILTERS -] → {% wrap foo.html | replace:"Include","Filters" | upcase | %}[- {=yield} -]{% endwrap %}
|
15
|
+
|
12
16
|
## Conditional wrap
|
13
17
|
'' → '{% wrap foo.html unless true %}[- {=yield} -]{% endwrap %}'
|
14
18
|
'' → '{% wrap foo.html unless some_bool %}[- {=yield} -]{% endwrap %}'
|
@@ -22,3 +26,6 @@ layout: nil
|
|
22
26
|
## Wrap render
|
23
27
|
[- Testing Render -] → {% wrap_render test_render/_f.html %}[- {=yield} -]{% endwrap_render %}
|
24
28
|
|
29
|
+
## Wrap yield
|
30
|
+
{% content_for test %}Testing wrap yield{% endcontent_for %}
|
31
|
+
[- Testing wrap yield -] → {% wrap_yield test %}[- {= yield } -]{% endwrap_yield %}
|
data/test/test.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'colorator'
|
2
|
+
ENV['OCTOPRESS_ENV'] = 'TEST'
|
2
3
|
|
3
4
|
@has_failed = false
|
4
5
|
@failures = {}
|
@@ -39,7 +40,7 @@ end
|
|
39
40
|
build
|
40
41
|
|
41
42
|
def test_tags(dir)
|
42
|
-
tags = %w{content_for
|
43
|
+
tags = %w{content_for include assign capture wrap render}
|
43
44
|
tags.each { |file| test("test_tags/#{file}.html", dir) }
|
44
45
|
end
|
45
46
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octopress-ink
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.alpha.
|
4
|
+
version: 1.0.0.alpha.25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Mathis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -106,11 +106,13 @@ files:
|
|
106
106
|
- lib/octopress-ink/assets/static_file.rb
|
107
107
|
- lib/octopress-ink/assets/static_file_content.rb
|
108
108
|
- lib/octopress-ink/assets/stylesheet.rb
|
109
|
+
- lib/octopress-ink/filters.rb
|
109
110
|
- lib/octopress-ink/generators/plugin_assets.rb
|
110
111
|
- lib/octopress-ink/helpers.rb
|
111
112
|
- lib/octopress-ink/helpers/conditional.rb
|
112
113
|
- lib/octopress-ink/helpers/content_for.rb
|
113
114
|
- lib/octopress-ink/helpers/path.rb
|
115
|
+
- lib/octopress-ink/helpers/titlecase.rb
|
114
116
|
- lib/octopress-ink/helpers/var.rb
|
115
117
|
- lib/octopress-ink/jekyll/hooks.rb
|
116
118
|
- lib/octopress-ink/plugin.rb
|
@@ -124,6 +126,7 @@ files:
|
|
124
126
|
- lib/octopress-ink/tags/head.rb
|
125
127
|
- lib/octopress-ink/tags/include.rb
|
126
128
|
- lib/octopress-ink/tags/javascript.rb
|
129
|
+
- lib/octopress-ink/tags/line_comment.rb
|
127
130
|
- lib/octopress-ink/tags/render.rb
|
128
131
|
- lib/octopress-ink/tags/return.rb
|
129
132
|
- lib/octopress-ink/tags/scripts.rb
|
@@ -159,11 +162,8 @@ files:
|
|
159
162
|
- test/expected/test_tags/assign.html
|
160
163
|
- test/expected/test_tags/capture.html
|
161
164
|
- test/expected/test_tags/content_for.html
|
162
|
-
- test/expected/test_tags/footer.html
|
163
|
-
- test/expected/test_tags/head.html
|
164
165
|
- test/expected/test_tags/include.html
|
165
166
|
- test/expected/test_tags/render.html
|
166
|
-
- test/expected/test_tags/scripts.html
|
167
167
|
- test/expected/test_tags/wrap.html
|
168
168
|
- test/sass_compact/stylesheets/all-e10f647557c9d610df6df40a458bc823.css
|
169
169
|
- test/sass_compact/stylesheets/print-0dc274efb4e3fba0ae71bd22eef6fb38.css
|
@@ -184,12 +184,9 @@ files:
|
|
184
184
|
- test/site/test_tags/assign.html
|
185
185
|
- test/site/test_tags/capture.html
|
186
186
|
- test/site/test_tags/content_for.html
|
187
|
-
- test/site/test_tags/footer.html
|
188
|
-
- test/site/test_tags/head.html
|
189
187
|
- test/site/test_tags/include.html
|
190
188
|
- test/site/test_tags/render.html
|
191
189
|
- test/site/test_tags/return.html
|
192
|
-
- test/site/test_tags/scripts.html
|
193
190
|
- test/site/test_tags/wrap.html
|
194
191
|
- test/source/.gitignore
|
195
192
|
- test/source/_custom/awesome-sauce/config.yml
|
@@ -199,7 +196,6 @@ files:
|
|
199
196
|
- test/source/_custom/theme/stylesheets/_colors.sass
|
200
197
|
- test/source/_custom/theme/stylesheets/theme-test.css
|
201
198
|
- test/source/_includes/foo.html
|
202
|
-
- test/source/_layouts/content_for.html
|
203
199
|
- test/source/_layouts/head.html
|
204
200
|
- test/source/_layouts/local.html
|
205
201
|
- test/source/_plugins/awesome-sauce/config.yml
|
@@ -241,12 +237,9 @@ files:
|
|
241
237
|
- test/source/test_tags/assign.html
|
242
238
|
- test/source/test_tags/capture.html
|
243
239
|
- test/source/test_tags/content_for.html
|
244
|
-
- test/source/test_tags/footer.html
|
245
|
-
- test/source/test_tags/head.html
|
246
240
|
- test/source/test_tags/include.html
|
247
241
|
- test/source/test_tags/render.html
|
248
242
|
- test/source/test_tags/return.html
|
249
|
-
- test/source/test_tags/scripts.html
|
250
243
|
- test/source/test_tags/wrap.html
|
251
244
|
- test/test.rb
|
252
245
|
homepage: https://github.com/octopress/ink
|
@@ -301,11 +294,8 @@ test_files:
|
|
301
294
|
- test/expected/test_tags/assign.html
|
302
295
|
- test/expected/test_tags/capture.html
|
303
296
|
- test/expected/test_tags/content_for.html
|
304
|
-
- test/expected/test_tags/footer.html
|
305
|
-
- test/expected/test_tags/head.html
|
306
297
|
- test/expected/test_tags/include.html
|
307
298
|
- test/expected/test_tags/render.html
|
308
|
-
- test/expected/test_tags/scripts.html
|
309
299
|
- test/expected/test_tags/wrap.html
|
310
300
|
- test/sass_compact/stylesheets/all-e10f647557c9d610df6df40a458bc823.css
|
311
301
|
- test/sass_compact/stylesheets/print-0dc274efb4e3fba0ae71bd22eef6fb38.css
|
@@ -326,12 +316,9 @@ test_files:
|
|
326
316
|
- test/site/test_tags/assign.html
|
327
317
|
- test/site/test_tags/capture.html
|
328
318
|
- test/site/test_tags/content_for.html
|
329
|
-
- test/site/test_tags/footer.html
|
330
|
-
- test/site/test_tags/head.html
|
331
319
|
- test/site/test_tags/include.html
|
332
320
|
- test/site/test_tags/render.html
|
333
321
|
- test/site/test_tags/return.html
|
334
|
-
- test/site/test_tags/scripts.html
|
335
322
|
- test/site/test_tags/wrap.html
|
336
323
|
- test/source/.gitignore
|
337
324
|
- test/source/_custom/awesome-sauce/config.yml
|
@@ -341,7 +328,6 @@ test_files:
|
|
341
328
|
- test/source/_custom/theme/stylesheets/_colors.sass
|
342
329
|
- test/source/_custom/theme/stylesheets/theme-test.css
|
343
330
|
- test/source/_includes/foo.html
|
344
|
-
- test/source/_layouts/content_for.html
|
345
331
|
- test/source/_layouts/head.html
|
346
332
|
- test/source/_layouts/local.html
|
347
333
|
- test/source/_plugins/awesome-sauce/config.yml
|
@@ -383,11 +369,8 @@ test_files:
|
|
383
369
|
- test/source/test_tags/assign.html
|
384
370
|
- test/source/test_tags/capture.html
|
385
371
|
- test/source/test_tags/content_for.html
|
386
|
-
- test/source/test_tags/footer.html
|
387
|
-
- test/source/test_tags/head.html
|
388
372
|
- test/source/test_tags/include.html
|
389
373
|
- test/source/test_tags/render.html
|
390
374
|
- test/source/test_tags/return.html
|
391
|
-
- test/source/test_tags/scripts.html
|
392
375
|
- test/source/test_tags/wrap.html
|
393
376
|
- test/test.rb
|