vanilla 1.14.1 → 1.15
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.
- data/Rakefile +3 -2
- data/bin/vanilla +35 -6
- data/lib/vanilla/app.rb +6 -1
- data/lib/vanilla/console.rb +17 -6
- data/lib/vanilla.rb +1 -1
- data/pristine_app/Gemfile +3 -0
- data/pristine_app/Gemfile.lock +32 -0
- data/pristine_app/README +36 -0
- data/pristine_app/config.ru +26 -0
- data/pristine_app/public/vanilla.css +15 -0
- data/pristine_app/soups/base/layout.snip +18 -0
- data/pristine_app/soups/base/start.snip +19 -0
- data/pristine_app/soups/dynasnips/current_snip.rb +29 -0
- data/{lib/vanilla → pristine_app/soups}/dynasnips/debug.rb +5 -3
- data/{lib/vanilla → pristine_app/soups}/dynasnips/index.rb +2 -0
- data/{lib/vanilla → pristine_app/soups}/dynasnips/link_to.rb +2 -0
- data/pristine_app/soups/dynasnips/link_to_current_snip.rb +14 -0
- data/pristine_app/soups/dynasnips/page_title.rb +9 -0
- data/{lib/vanilla → pristine_app/soups}/dynasnips/pre.rb +6 -4
- data/{lib/vanilla → pristine_app/soups}/dynasnips/raw.rb +8 -5
- data/{lib/vanilla/dynasnips → pristine_app/soups/extras}/comments.rb +3 -1
- data/{lib/vanilla/dynasnips → pristine_app/soups/extras}/kind.rb +0 -0
- data/{lib/vanilla/dynasnips → pristine_app/soups/extras}/rand.rb +2 -0
- data/{lib/vanilla/dynasnips → pristine_app/soups/extras}/url_to.rb +0 -0
- data/{lib/vanilla/snips → pristine_app/soups}/tutorial/bad_dynasnip.snip +0 -0
- data/{lib/vanilla/snips → pristine_app/soups}/tutorial/hello_world.snip +0 -0
- data/{lib/vanilla/snips → pristine_app/soups}/tutorial/markdown_example.snip +0 -0
- data/{lib/vanilla/snips → pristine_app/soups}/tutorial/snip.snip +0 -0
- data/{lib/vanilla/snips → pristine_app/soups}/tutorial/soup.snip +1 -3
- data/{lib/vanilla/snips → pristine_app/soups}/tutorial/test.snip +0 -0
- data/{lib/vanilla/snips → pristine_app/soups}/tutorial/textile_example.snip +0 -0
- data/{lib/vanilla/snips → pristine_app/soups}/tutorial/tutorial-another-snip.snip +0 -0
- data/{lib/vanilla/snips → pristine_app/soups}/tutorial/tutorial-basic-snip-inclusion.snip +0 -0
- data/pristine_app/soups/tutorial/tutorial-dynasnips.snip.markdown +56 -0
- data/pristine_app/soups/tutorial/tutorial-layout.snip +56 -0
- data/pristine_app/soups/tutorial/tutorial-links.snip +4 -0
- data/pristine_app/soups/tutorial/tutorial-renderers.snip.markdown +77 -0
- data/{lib/vanilla/snips/tutorial/vanilla-rb-tutorial.snip → pristine_app/soups/tutorial/tutorial.snip.markdown} +17 -21
- data/{lib/vanilla/snips → pristine_app/soups}/tutorial/vanilla-rb.snip +0 -0
- data/{lib/vanilla/snips → pristine_app/soups}/tutorial/vanilla.snip +0 -0
- data/pristine_app/tmp/restart.txt +0 -0
- data/test/test_helper.rb +1 -1
- data/test/vanilla_app_test.rb +3 -3
- data/test/vanilla_presenting_test.rb +9 -2
- metadata +76 -73
- data/README_FOR_APP +0 -38
- data/config.example.yml +0 -7
- data/config.ru +0 -11
- data/lib/tasks/vanilla.rake +0 -75
- data/lib/vanilla/dynasnips/current_snip.rb +0 -32
- data/lib/vanilla/dynasnips/link_to_current_snip.rb +0 -16
- data/lib/vanilla/dynasnips/title.rb +0 -7
- data/lib/vanilla/snips/system/layout.snip +0 -19
- data/lib/vanilla/snips/system/start.snip +0 -25
- data/lib/vanilla/snips/system/system.snip +0 -17
- data/public/hatch.png +0 -0
@@ -1,32 +0,0 @@
|
|
1
|
-
require 'vanilla/dynasnip'
|
2
|
-
|
3
|
-
class CurrentSnip < Dynasnip
|
4
|
-
usage %|
|
5
|
-
The current_snip dyna normally returns the result of rendering the snip named by the
|
6
|
-
'snip' value in the parameters. This way, it can be used in templates to place the currently
|
7
|
-
requested snip, in its rendered form, within the page.
|
8
|
-
|
9
|
-
It can also be used to determine the name of the current snip in a consistent way:
|
10
|
-
|
11
|
-
{current_snip name}
|
12
|
-
|
13
|
-
will output the name of the current snip, or the name of the snip currently being edited.
|
14
|
-
|
|
15
|
-
|
16
|
-
def handle(*args)
|
17
|
-
if args[0] == 'name'
|
18
|
-
if app.request.snip_name == 'edit' # we're editing so don't use this name
|
19
|
-
app.request.params[:snip_to_edit]
|
20
|
-
else
|
21
|
-
app.request.snip_name
|
22
|
-
end
|
23
|
-
else
|
24
|
-
if app.request.snip
|
25
|
-
app.render(app.request.snip, app.request.part)
|
26
|
-
else
|
27
|
-
app.response.status = 404
|
28
|
-
"Couldn't find snip {link_to #{app.request.snip_name}}"
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
require 'vanilla/dynasnip'
|
2
|
-
|
3
|
-
class LinkToCurrentSnip < Dynasnip
|
4
|
-
usage %|
|
5
|
-
Renders a link to the current snip, or the snip currently being edited
|
6
|
-
(if we're currently editing)
|
7
|
-
|
|
8
|
-
|
9
|
-
def handle(*args)
|
10
|
-
if app.request.snip_name == 'edit' # we're editing so don't use this name
|
11
|
-
link_to app.request.params[:name]
|
12
|
-
else
|
13
|
-
link_to app.request.snip_name
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
2
|
-
<html lang="en">
|
3
|
-
<head>
|
4
|
-
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
5
|
-
<title>{title}</title>
|
6
|
-
<link rel="stylesheet" type="text/css" media="screen" href="<%= url_to("system", "css.css") %>" />
|
7
|
-
</head>
|
8
|
-
<body>
|
9
|
-
<div id="content">
|
10
|
-
<div id="controls">
|
11
|
-
<strong><a href="/">home</a></strong> ::
|
12
|
-
<strong>{link_to_current_snip}</strong>
|
13
|
-
</div>
|
14
|
-
{current_snip}
|
15
|
-
</div>
|
16
|
-
</body>
|
17
|
-
</html>
|
18
|
-
|
19
|
-
:render_as: Erb
|
@@ -1,25 +0,0 @@
|
|
1
|
-
Welcome to Vanilla.rb
|
2
|
-
=============
|
3
|
-
|
4
|
-
Vanilla.rb is a web-experiment (a _websperiment_?) about storing and reusing data on a website. It can also function as a [bliki](http://www.wikipedia.com/wiki/Bliki).
|
5
|
-
|
6
|
-
The fundamental building block is the 'snip', which is a malleable object that can store content and arbitrary metadata.
|
7
|
-
|
8
|
-
---
|
9
|
-
|
10
|
-
This is the {link_to start} snip, which is the default home page.
|
11
|
-
|
12
|
-
You might want to check out the {link_to vanilla-rb-tutorial} snip.
|
13
|
-
|
14
|
-
In fact - I'll include it here for you:
|
15
|
-
|
16
|
-
{vanilla-rb-tutorial}
|
17
|
-
|
18
|
-
---
|
19
|
-
|
20
|
-
That was the end of the tutorial snip. We're back in the start snip now. There's also the {link_to test} snip, that might be interesting.
|
21
|
-
|
22
|
-
Anyway, welcome.
|
23
|
-
|
24
|
-
|
25
|
-
:render_as: "Markdown"
|
data/public/hatch.png
DELETED
Binary file
|