webby 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. data/History.txt +7 -0
  2. data/Manifest.txt +30 -1
  3. data/Rakefile +6 -2
  4. data/bin/webby +1 -1
  5. data/data/Rakefile +6 -2
  6. data/data/content/{index.rhtml → index.txt} +0 -0
  7. data/data/tasks/create.rake +6 -1
  8. data/data/tasks/deploy.rake +22 -0
  9. data/data/tasks/heel.rake +26 -0
  10. data/data/tasks/setup.rb +27 -0
  11. data/lib/webby.rb +20 -12
  12. data/lib/webby/builder.rb +6 -19
  13. data/lib/webby/main.rb +85 -15
  14. data/lib/webby/pages_db.rb +24 -1
  15. data/lib/webby/renderer.rb +25 -3
  16. data/lib/webby/resource.rb +89 -13
  17. data/lib/webby/webby_task.rb +19 -41
  18. data/tasks/doc.rake +2 -19
  19. data/tasks/gem.rake +14 -41
  20. data/tasks/manifest.rake +1 -1
  21. data/tasks/rubyforge.rake +57 -0
  22. data/tasks/setup.rb +6 -5
  23. data/tasks/spec.rake +3 -3
  24. data/tasks/website.rake +38 -0
  25. data/website/Rakefile +13 -0
  26. data/website/content/css/blueprint/lib/buttons.css +112 -0
  27. data/website/content/css/blueprint/lib/compressed.css +127 -0
  28. data/website/content/css/blueprint/lib/grid.css +177 -0
  29. data/website/content/css/blueprint/lib/img/baseline-black.png +0 -0
  30. data/website/content/css/blueprint/lib/img/baseline.png +0 -0
  31. data/website/content/css/blueprint/lib/img/grid.png +0 -0
  32. data/website/content/css/blueprint/lib/img/icons/cross.png +0 -0
  33. data/website/content/css/blueprint/lib/img/icons/textfield_key.png +0 -0
  34. data/website/content/css/blueprint/lib/img/icons/tick.png +0 -0
  35. data/website/content/css/blueprint/lib/reset.css +37 -0
  36. data/website/content/css/blueprint/lib/typography.css +159 -0
  37. data/website/content/css/blueprint/print.css +75 -0
  38. data/website/content/css/blueprint/screen.css +34 -0
  39. data/website/content/css/site.css +22 -0
  40. data/website/content/download.txt +8 -0
  41. data/website/content/index.txt +28 -0
  42. data/website/content/tutorial.txt +130 -0
  43. data/website/layouts/default.rhtml +49 -0
  44. data/website/tasks/create.rake +11 -0
  45. data/website/tasks/deploy.rake +22 -0
  46. data/website/tasks/heel.rake +26 -0
  47. data/website/tasks/setup.rb +27 -0
  48. data/website/templates/page.erb +8 -0
  49. metadata +33 -14
@@ -0,0 +1,49 @@
1
+ ---
2
+ extension: html
3
+ filter: erb
4
+ ---
5
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
6
+ "DTD/xhtml1-strict.dtd">
7
+
8
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
9
+ <head>
10
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
11
+ <title>Webby :: <%= @page.title %></title>
12
+ <meta name="author" content="<%= @page.author %>" />
13
+
14
+ <!--- Blueprint CSS Framework -->
15
+ <link rel="stylesheet" href="css/blueprint/screen.css" type="text/css" media="screen, projection" />
16
+ <link rel="stylesheet" href="css/blueprint/print.css" type="text/css" media="print" />
17
+
18
+ <!-- Homepage CSS -->
19
+ <link rel="stylesheet" href="css/site.css" type="text/css" media="screen, projection" />
20
+ </head>
21
+ <body>
22
+
23
+ <div class="container">
24
+
25
+ <div class="column span-11 prepend-1 append-2 first last" id="header">
26
+ <h1>Webby &#9775; <%= @page.title %></h1>
27
+ <hr />
28
+ <ul id="navigation"
29
+ ><li><a href="index.html">Home</a>&#8766;</li
30
+ ><li><a href="download.html">Download</a>&#8766;</li
31
+ ><li><a href="tutorial.html">Tutorial</a>&#8766;</li
32
+ ><li><a href="manual.html">Manual</a>&#8766;</li
33
+ ><li><a href="tips_and_tricks.html">Tips &amp; Tricks</a></li
34
+ ></ul>
35
+ </div>
36
+
37
+ <div class="column span-11 prepend-1 append-2 first last">
38
+ <%= @content %>
39
+ </div>
40
+
41
+ <div class="column span-11 prepend-1 append-2 first last" id="footer">
42
+ <hr />
43
+ <p>This website was created with <a href="http://webby.rubyforge.org">Webby</a><br />
44
+ Webby is released under the MIT license</p>
45
+ </div>
46
+
47
+ </div>
48
+ </body>
49
+ </html>
@@ -0,0 +1,11 @@
1
+
2
+ Rake::WebbyTask.new do |webby|
3
+ webby.content_dir = SITE.content_dir
4
+ webby.output_dir = SITE.output_dir
5
+ webby.layout_dir = SITE.layout_dir
6
+ webby.template_dir = SITE.template_dir
7
+ webby.exclude = SITE.exclude
8
+ webby.page_defaults = SITE.page_defaults
9
+ end
10
+
11
+ # EOF
@@ -0,0 +1,22 @@
1
+
2
+ require 'rake/contrib/sshpublisher'
3
+
4
+ namespace :deploy do
5
+
6
+ desc 'deploy to the server using rsync'
7
+ task :rsync do
8
+ cmd = "rsync #{SITE.rsync_args.join(' ')} "
9
+ cmd << "#{SITE.output_dir}/ #{SITE.host}:#{SITE.remote_dir}"
10
+ sh cmd
11
+ end
12
+
13
+ desc 'deploy to the server using ssh'
14
+ task 'ssh' do
15
+ Rake::SshDirPublisher.new(
16
+ SITE.host, SITE.remote_dir, SITE.output_dir
17
+ ).upload
18
+ end
19
+
20
+ end # deploy
21
+
22
+ # EOF
@@ -0,0 +1,26 @@
1
+
2
+ if HAVE_HEEL
3
+
4
+ namespace :heel do
5
+
6
+ desc 'start the heel server to view website'
7
+ task :run do
8
+ sh "heel --root #{SITE.output_dir} --daemonize"
9
+ end
10
+
11
+ desc 'stop the heel server'
12
+ task :kill do
13
+ sh "heel --kill"
14
+ end
15
+
16
+ task :autobuild => :run do
17
+ at_exit {sh "heel --kill"}
18
+ end
19
+
20
+ end
21
+
22
+ task :autobuild => 'heel:autobuild'
23
+
24
+ end # HAVE_HEEL
25
+
26
+ # EOF
@@ -0,0 +1,27 @@
1
+
2
+ require 'ostruct'
3
+
4
+ SITE = OpenStruct.new
5
+
6
+ SITE.content_dir = 'content'
7
+ SITE.output_dir = 'output'
8
+ SITE.layout_dir = 'layouts'
9
+ SITE.template_dir = 'templates'
10
+ SITE.exclude = %w[tmp$ bak$ ~$ CVS \.svn]
11
+
12
+ SITE.page_defaults = {
13
+ 'extension' => 'html',
14
+ 'layout' => 'default'
15
+ }
16
+
17
+ SITE.host = 'user@hostname.tld'
18
+ SITE.remote_dir = '/not/a/valid/dir'
19
+ SITE.rsync_args = %w(-av --delete)
20
+
21
+ FileList['tasks/*.rake'].each {|task| import task}
22
+
23
+ %w(heel).each do |lib|
24
+ Object.instance_eval {const_set "HAVE_#{lib.upcase}", try_require(lib)}
25
+ end
26
+
27
+ # EOF
@@ -0,0 +1,8 @@
1
+ ---
2
+ title: New Page
3
+ created_at: <%= Time.now %>
4
+ filter: textile
5
+ ---
6
+ h2. Textile
7
+
8
+ You can read more about textile "here":http://whytheluckystiff.net/ruby/redcloth/
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: webby
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.0
7
- date: 2007-08-22 00:00:00 -06:00
6
+ version: 0.2.0
7
+ date: 2007-08-28 00:00:00 -06:00
8
8
  summary: static website creation and management
9
9
  require_paths:
10
10
  - lib
@@ -51,9 +51,12 @@ files:
51
51
  - data/content/css/blueprint/print.css
52
52
  - data/content/css/blueprint/screen.css
53
53
  - data/content/css/site.css
54
- - data/content/index.rhtml
54
+ - data/content/index.txt
55
55
  - data/layouts/default.rhtml
56
56
  - data/tasks/create.rake
57
+ - data/tasks/deploy.rake
58
+ - data/tasks/heel.rake
59
+ - data/tasks/setup.rb
57
60
  - data/templates/page.erb
58
61
  - lib/webby.rb
59
62
  - lib/webby/auto_builder.rb
@@ -71,8 +74,34 @@ files:
71
74
  - tasks/doc.rake
72
75
  - tasks/gem.rake
73
76
  - tasks/manifest.rake
77
+ - tasks/rubyforge.rake
74
78
  - tasks/setup.rb
75
79
  - tasks/spec.rake
80
+ - tasks/website.rake
81
+ - website/Rakefile
82
+ - website/content/css/blueprint/lib/buttons.css
83
+ - website/content/css/blueprint/lib/compressed.css
84
+ - website/content/css/blueprint/lib/grid.css
85
+ - website/content/css/blueprint/lib/img/baseline-black.png
86
+ - website/content/css/blueprint/lib/img/baseline.png
87
+ - website/content/css/blueprint/lib/img/grid.png
88
+ - website/content/css/blueprint/lib/img/icons/cross.png
89
+ - website/content/css/blueprint/lib/img/icons/textfield_key.png
90
+ - website/content/css/blueprint/lib/img/icons/tick.png
91
+ - website/content/css/blueprint/lib/reset.css
92
+ - website/content/css/blueprint/lib/typography.css
93
+ - website/content/css/blueprint/print.css
94
+ - website/content/css/blueprint/screen.css
95
+ - website/content/css/site.css
96
+ - website/content/download.txt
97
+ - website/content/index.txt
98
+ - website/content/tutorial.txt
99
+ - website/layouts/default.rhtml
100
+ - website/tasks/create.rake
101
+ - website/tasks/deploy.rake
102
+ - website/tasks/heel.rake
103
+ - website/tasks/setup.rb
104
+ - website/templates/page.erb
76
105
  test_files: []
77
106
 
78
107
  rdoc_options:
@@ -81,8 +110,7 @@ rdoc_options:
81
110
  extra_rdoc_files:
82
111
  - History.txt
83
112
  - README.txt
84
- - data/content/css/blueprint/License.txt
85
- - data/content/css/blueprint/Readme.txt
113
+ - bin/webby
86
114
  executables:
87
115
  - webby
88
116
  extensions: []
@@ -108,15 +136,6 @@ dependencies:
108
136
  - !ruby/object:Gem::Version
109
137
  version: 1.0.0
110
138
  version:
111
- - !ruby/object:Gem::Dependency
112
- name: rubyforge
113
- version_requirement:
114
- version_requirements: !ruby/object:Gem::Version::Requirement
115
- requirements:
116
- - - ">="
117
- - !ruby/object:Gem::Version
118
- version: 0.4.3
119
- version:
120
139
  - !ruby/object:Gem::Dependency
121
140
  name: rake
122
141
  version_requirement: