vanilla 1.9.10 → 1.9.11.1
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/README_FOR_APP +47 -0
- data/Rakefile +2 -2
- data/config.example.yml +0 -3
- data/lib/tasks/vanilla.rake +18 -42
- data/lib/vanilla/dynasnips/kind.rb +2 -2
- metadata +4 -3
data/README_FOR_APP
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
WELCOME IN VANILLA
|
2
|
+
VANILLA
|
3
|
+
VANILLA
|
4
|
+
VANILLA
|
5
|
+
What you've got:
|
6
|
+
|
7
|
+
config.ru - this is the rack configuration, which is used to start
|
8
|
+
the application by your webserver
|
9
|
+
config.yml - the configuration; by default it specifies the directory
|
10
|
+
which contains the soup, and a cookie secret
|
11
|
+
soup/ - the default soup directory, where your snips are stored
|
12
|
+
|
13
|
+
|
14
|
+
For an overview of vanilla, start your site and look at the tutorial:
|
15
|
+
|
16
|
+
$ rackup # then open http://localhost:9292/vanilla-rb-tutorial
|
17
|
+
|
18
|
+
|
19
|
+
By default, you won't be able to edit anything on the site, because
|
20
|
+
you can't log in. If you want to edit snips on the site, you'll need
|
21
|
+
to create a user.
|
22
|
+
|
23
|
+
$ rake vanilla:add_user
|
24
|
+
|
25
|
+
Your other option is to edit the soup directly; you can edit any file
|
26
|
+
in the soup directory using your favourite editor, and the changes
|
27
|
+
will be reflected automatically. The snip files are slightly modified
|
28
|
+
YAML files. Here's one describing Soup itself, in soup/soup.yml:
|
29
|
+
|
30
|
+
Soup is a data store supporting the {link_to snip}-space that {link_to vanilla-rb} expects.
|
31
|
+
|
32
|
+
It's hosted on github [here][github].
|
33
|
+
|
34
|
+
[github]: http://github.com/lazyatom/soup
|
35
|
+
--- # Soup attributes
|
36
|
+
:name: soup
|
37
|
+
:created_at: 2009-09-27 14:14:16.096231 +01:00
|
38
|
+
:updated_at: 2009-09-27 14:14:16.096232 +01:00
|
39
|
+
:render_as: Markdown
|
40
|
+
|
41
|
+
The 'content' of the snip is at the top of the file, followed by
|
42
|
+
|
43
|
+
--- # Soup attributes
|
44
|
+
|
45
|
+
which starts the rest of the snip attributes. Again, see the online
|
46
|
+
tutorial for information about what each attribute signifies.
|
47
|
+
|
data/Rakefile
CHANGED
@@ -25,7 +25,7 @@ if Object.const_defined?(:Gem)
|
|
25
25
|
|
26
26
|
# Change these as appropriate
|
27
27
|
s.name = "vanilla"
|
28
|
-
s.version = "1.9.
|
28
|
+
s.version = "1.9.11.1"
|
29
29
|
s.summary = "A bliki-type web content thing."
|
30
30
|
s.author = "James Adam"
|
31
31
|
s.email = "james@lazyatom.com.com"
|
@@ -36,7 +36,7 @@ if Object.const_defined?(:Gem)
|
|
36
36
|
s.rdoc_options = %w(--main README)
|
37
37
|
|
38
38
|
# Add any extra files to include in the gem
|
39
|
-
s.files = %w(config.example.yml config.ru Rakefile README) + Dir.glob("{spec,lib,bin,public}/**/*")
|
39
|
+
s.files = %w(config.example.yml config.ru Rakefile README README_FOR_APP) + Dir.glob("{spec,lib,bin,public}/**/*")
|
40
40
|
s.executables = ['vanilla']
|
41
41
|
s.require_paths = ["lib"]
|
42
42
|
|
data/config.example.yml
CHANGED
data/lib/tasks/vanilla.rake
CHANGED
@@ -14,13 +14,12 @@ namespace :vanilla do
|
|
14
14
|
|
15
15
|
task :load_snips do
|
16
16
|
app = Vanilla::App.new(ENV['VANILLA_CONFIG'])
|
17
|
+
print "Preparing soup... "
|
17
18
|
Dynasnip.all.each { |ds| app.soup << ds.snip_attributes }
|
18
|
-
|
19
19
|
Dir[File.join(File.dirname(__FILE__), '..', 'vanilla', 'snips', '*.rb')].each do |f|
|
20
20
|
load f
|
21
|
-
end
|
22
|
-
|
23
|
-
puts "The soup is simmering."
|
21
|
+
end
|
22
|
+
puts "the soup is simmering."
|
24
23
|
end
|
25
24
|
|
26
25
|
desc 'Resets the soup to contain the base snips only. Dangerous!'
|
@@ -88,6 +87,7 @@ namespace :vanilla do
|
|
88
87
|
|
89
88
|
desc 'Generate file containing secret for cookie-based session storage'
|
90
89
|
task :generate_secret do
|
90
|
+
print "Generating cookie secret... "
|
91
91
|
# Adapted from old rails secret generator.
|
92
92
|
require 'openssl'
|
93
93
|
if !File.exist?("/dev/urandom")
|
@@ -104,12 +104,14 @@ namespace :vanilla do
|
|
104
104
|
app = Vanilla::App.new(ENV['VANILLA_CONFIG'])
|
105
105
|
app.config[:secret] = secret
|
106
106
|
app.config.save!
|
107
|
-
puts "
|
107
|
+
puts "done; cookies are twice baked. BIS-CUIT!"
|
108
108
|
end
|
109
109
|
|
110
110
|
desc 'Prepare standard files to run Vanilla'
|
111
111
|
task :prepare_files do
|
112
112
|
cp File.expand_path(File.join(File.dirname(__FILE__), *%w[.. .. config.ru])), 'config.ru'
|
113
|
+
cp File.expand_path(File.join(File.dirname(__FILE__), *%w[.. .. config.example.yml])), 'config.yml'
|
114
|
+
cp File.expand_path(File.join(File.dirname(__FILE__), *%w[.. .. README_FOR_APP])), 'README'
|
113
115
|
cp_r File.expand_path(File.join(File.dirname(__FILE__), *%w[.. .. public])), 'public'
|
114
116
|
mkdir 'tmp'
|
115
117
|
File.open("Rakefile", "w") do |f|
|
@@ -127,47 +129,21 @@ EOF
|
|
127
129
|
desc 'Prepare a new vanilla.rb installation'
|
128
130
|
task :setup do
|
129
131
|
puts <<-EOM
|
132
|
+
____________________.c( Vanilla.rb )o._____________________
|
130
133
|
|
131
|
-
|
132
|
-
|
133
|
-
Congratulations! You have elected to try out the weirdest web thing ever.
|
134
|
-
Lets get started. Firstly, I'm going to cook you some soup:
|
135
|
-
|
136
|
-
|
137
|
-
EOM
|
138
|
-
Rake::Task['vanilla:load_snips'].invoke
|
139
|
-
|
140
|
-
puts <<-EOM
|
141
|
-
|
142
|
-
Now I'm going to generate your configuration. This will be stored either in
|
143
|
-
'config.yml' in the current directory, or in the path you provide via the
|
144
|
-
environment variable VANILLA_CONFIG.
|
145
|
-
|
146
|
-
Generating the secret for cookie-based session storage.
|
147
|
-
EOM
|
148
|
-
Rake::Task['vanilla:prepare_files'].invoke
|
149
|
-
Rake::Task['vanilla:generate_secret'].invoke
|
150
|
-
|
151
|
-
puts <<-EOM
|
152
|
-
|
153
|
-
|
154
|
-
Now that we've got our broth, you'll want to add a user, so you can edit stuff.
|
155
|
-
Lets do that now:
|
134
|
+
Congratulations! You have elected to try out the weirdest web
|
135
|
+
thing ever. Lets get started.
|
156
136
|
|
137
|
+
EOM
|
138
|
+
Rake::Task['vanilla:prepare_files'].invoke
|
139
|
+
Rake::Task['vanilla:generate_secret'].invoke
|
140
|
+
Rake::Task['vanilla:load_snips'].invoke
|
157
141
|
|
158
|
-
EOM
|
159
|
-
Rake::Task['vanilla:add_user'].invoke
|
160
|
-
puts <<-EOM
|
161
|
-
|
142
|
+
puts <<-EOM
|
162
143
|
|
163
|
-
|
164
|
-
a webserver that supports Rack. The easiest way to do this locally is via 'rackup':
|
165
|
-
|
166
|
-
$ rackup
|
167
|
-
|
168
|
-
Then go to http://localhost:9292
|
144
|
+
___________________.c( You Are Ready )o.___________________
|
169
145
|
|
170
|
-
|
146
|
+
#{File.readlines('README')[0,16].join}
|
171
147
|
EOM
|
172
148
|
end
|
173
|
-
end
|
149
|
+
end
|
@@ -29,7 +29,7 @@ class Kind < Dynasnip
|
|
29
29
|
e.title = snip.name
|
30
30
|
e.authors = [Atom::Person.new(:name => snip.author || domain)]
|
31
31
|
e.links << Atom::Link.new(:href => "http://#{domain}#{url_to(snip.name)}")
|
32
|
-
e.id = "tag:#{domain},#{(snip.created_at || Date.today.to_s).split[0]}:/#{snip.name}"
|
32
|
+
e.id = "tag:#{domain},#{(snip.created_at.to_s || Date.today.to_s).split[0]}:/#{snip.name}"
|
33
33
|
end
|
34
34
|
end
|
35
35
|
end
|
@@ -47,7 +47,7 @@ class Kind < Dynasnip
|
|
47
47
|
when :xml
|
48
48
|
Atom::Feed.new do |f|
|
49
49
|
f.title = feed_title
|
50
|
-
f.updated =
|
50
|
+
f.updated = snips[0].updated_at
|
51
51
|
f.id = "tag:#{domain},2008-06-01:kind/#{kind}"
|
52
52
|
f.entries = entries
|
53
53
|
end.to_xml
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vanilla
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Adam
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10-
|
12
|
+
date: 2009-10-16 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -95,6 +95,7 @@ files:
|
|
95
95
|
- config.ru
|
96
96
|
- Rakefile
|
97
97
|
- README
|
98
|
+
- README_FOR_APP
|
98
99
|
- spec/dynasnip_spec.rb
|
99
100
|
- spec/renderers/base_renderer_spec.rb
|
100
101
|
- spec/renderers/erb_renderer_spec.rb
|
@@ -177,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
177
178
|
requirements: []
|
178
179
|
|
179
180
|
rubyforge_project: vanilla
|
180
|
-
rubygems_version: 1.3.
|
181
|
+
rubygems_version: 1.3.5
|
181
182
|
signing_key:
|
182
183
|
specification_version: 3
|
183
184
|
summary: A bliki-type web content thing.
|