webby 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +15 -0
- data/Manifest.txt +5 -1
- data/Rakefile +19 -7
- data/data/tasks/deploy.rake +3 -3
- data/data/tasks/growl.rake +1 -1
- data/data/tasks/heel.rake +2 -2
- data/data/tasks/setup.rb +0 -19
- data/data/tasks/validate.rake +19 -0
- data/examples/webby/Rakefile +3 -0
- data/examples/webby/content/css/site.css +7 -0
- data/examples/webby/content/index.txt +4 -3
- data/examples/webby/content/manual/index.txt +25 -17
- data/examples/webby/content/reference/index.txt +57 -0
- data/examples/webby/content/tips_and_tricks/index.txt +56 -14
- data/examples/webby/content/tutorial/index.txt +6 -5
- data/examples/webby/layouts/default.rhtml +2 -2
- data/examples/webby/tasks/deploy.rake +3 -3
- data/examples/webby/tasks/growl.rake +1 -1
- data/examples/webby/tasks/heel.rake +2 -2
- data/examples/webby/tasks/validate.rake +19 -0
- data/lib/webby/builder.rb +1 -23
- data/lib/webby/filters/outline.rb +2 -6
- data/lib/webby/filters/tidy.rb +1 -5
- data/lib/webby/helpers/coderay_helper.rb +6 -4
- data/lib/webby/helpers/graphviz_helper.rb +6 -15
- data/lib/webby/helpers/tex_img_helper.rb +31 -64
- data/lib/webby/helpers/ultraviolet_helper.rb +74 -0
- data/lib/webby/helpers/url_helper.rb +8 -5
- data/lib/webby/link_validator.rb +154 -0
- data/lib/webby/renderer.rb +51 -40
- data/lib/webby/resources/page.rb +2 -2
- data/lib/webby/stelan/paginator.rb +4 -3
- data/lib/webby/webby_task.rb +7 -7
- data/lib/webby.rb +38 -6
- metadata +7 -3
- data/examples/webby/content/download.txt +0 -14
@@ -77,16 +77,17 @@ class Paginator
|
|
77
77
|
|
78
78
|
include Enumerable
|
79
79
|
|
80
|
-
attr_reader :number, :pager
|
80
|
+
attr_reader :number, :pager, :url
|
81
81
|
|
82
82
|
def initialize(pager, number, select) #:nodoc:
|
83
83
|
@pager, @number = pager, number
|
84
84
|
@offset = (number - 1) * pager.per_page
|
85
85
|
@select = select
|
86
86
|
|
87
|
-
@pager.resource.number = number
|
87
|
+
@pager.resource.number = (number == 1 ? nil : number)
|
88
|
+
@url = @pager.resource.url
|
88
89
|
end
|
89
|
-
|
90
|
+
|
90
91
|
# Retrieve the items for this page
|
91
92
|
# * Caches
|
92
93
|
def items
|
data/lib/webby/webby_task.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# $Id: webby_task.rb
|
1
|
+
# $Id: webby_task.rb 189 2008-03-02 22:22:24Z tim_pease $
|
2
2
|
|
3
3
|
require 'rake'
|
4
4
|
require 'rake/tasklib'
|
@@ -52,22 +52,22 @@ class WebbyTask < TaskLib
|
|
52
52
|
::Webby.site.base = ENV['BASE'] if ENV.has_key?('BASE')
|
53
53
|
end
|
54
54
|
|
55
|
-
desc "
|
55
|
+
desc "Build the website"
|
56
56
|
task :build => :configure_basepath do |t|
|
57
57
|
::Webby::Builder.run
|
58
58
|
end
|
59
59
|
|
60
|
-
desc "
|
60
|
+
desc "Rebuild the website"
|
61
61
|
task :rebuild => :configure_basepath do |t|
|
62
62
|
::Webby::Builder.run :rebuild => true
|
63
63
|
end
|
64
64
|
|
65
|
-
desc "
|
65
|
+
desc "Continuously build the website"
|
66
66
|
task :autobuild => :configure_basepath do |t|
|
67
67
|
::Webby::AutoBuilder.run
|
68
68
|
end
|
69
69
|
|
70
|
-
desc "
|
70
|
+
desc "Delete the website"
|
71
71
|
task :clobber do |t|
|
72
72
|
rm_rf ::Webby.site.output_dir
|
73
73
|
mkdir ::Webby.site.output_dir
|
@@ -86,7 +86,7 @@ class WebbyTask < TaskLib
|
|
86
86
|
# if the file is a partial template
|
87
87
|
if name =~ %r/^_(.*)/
|
88
88
|
name = $1
|
89
|
-
desc "
|
89
|
+
desc "Create a new #{name}"
|
90
90
|
task name do |t|
|
91
91
|
raise "Usage: rake #{t.name} path" unless ARGV.length == 2
|
92
92
|
|
@@ -104,7 +104,7 @@ class WebbyTask < TaskLib
|
|
104
104
|
|
105
105
|
# otherwise it's a normal file
|
106
106
|
else
|
107
|
-
desc "
|
107
|
+
desc "Create a new #{name}"
|
108
108
|
task name do |t|
|
109
109
|
raise "Usage: rake #{t.name} path" unless ARGV.length == 2
|
110
110
|
|
data/lib/webby.rb
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
# $Id: webby.rb
|
2
|
-
|
3
|
-
# TODO: add support for inlining background gradients (in the CSS)
|
1
|
+
# $Id: webby.rb 195 2008-03-09 05:33:35Z tim_pease $
|
4
2
|
|
5
3
|
# Equivalent to a header guard in C/C++
|
6
4
|
# Used to prevent the spec helper from being loaded more than once
|
@@ -19,11 +17,10 @@ Logging::Appender.stdout.layout = Logging::Layouts::Pattern.new(
|
|
19
17
|
:date_pattern => "%H:%M:%S" # date == HH:MM:SS
|
20
18
|
)
|
21
19
|
|
22
|
-
|
23
20
|
module Webby
|
24
21
|
|
25
22
|
# :stopdoc:
|
26
|
-
VERSION = '0.8.
|
23
|
+
VERSION = '0.8.1' # :nodoc:
|
27
24
|
LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
|
28
25
|
PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
|
29
26
|
# :startdoc:
|
@@ -55,7 +52,7 @@ module Webby
|
|
55
52
|
# Items for running the heel webserver
|
56
53
|
:heel_port => 4331,
|
57
54
|
|
58
|
-
# Items used to deploy the
|
55
|
+
# Items used to deploy the website
|
59
56
|
:host => 'user@hostname.tld',
|
60
57
|
:remote_dir => '/not/a/valid/dir',
|
61
58
|
:rsync_args => %w(-av --delete),
|
@@ -63,6 +60,41 @@ module Webby
|
|
63
60
|
# Options passed to the 'tidy' program when the tidy filter is used
|
64
61
|
:tidy_options => '-indent -wrap 80',
|
65
62
|
|
63
|
+
# List of valid URIs (these automatically pass validation)
|
64
|
+
:valid_uris => [],
|
65
|
+
|
66
|
+
# Options for coderay processing
|
67
|
+
:coderay => {
|
68
|
+
:lang => :ruby,
|
69
|
+
:line_numbers => nil,
|
70
|
+
:line_number_start => 1,
|
71
|
+
:bold_every => 10,
|
72
|
+
:tab_width => 8
|
73
|
+
},
|
74
|
+
|
75
|
+
# Options for graphviz processing
|
76
|
+
:graphviz => {
|
77
|
+
:path => nil,
|
78
|
+
:cmd => 'dot',
|
79
|
+
:type => 'png'
|
80
|
+
},
|
81
|
+
|
82
|
+
# Options for tex2img processing
|
83
|
+
:tex2img => {
|
84
|
+
:path => nil,
|
85
|
+
:type => 'png',
|
86
|
+
:bg => 'white',
|
87
|
+
:fg => 'black',
|
88
|
+
:resolution => '150x150'
|
89
|
+
},
|
90
|
+
|
91
|
+
# Options for ultraviolet syntax highlighting
|
92
|
+
:uv => {
|
93
|
+
:lang => 'ruby',
|
94
|
+
:line_numbers => false,
|
95
|
+
:theme => 'mac_classic'
|
96
|
+
},
|
97
|
+
|
66
98
|
# XPath identifiers used by the basepath filter
|
67
99
|
:xpaths => %w(
|
68
100
|
/html/head//base[@href]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Pease
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-03-08 23:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -115,6 +115,7 @@ files:
|
|
115
115
|
- data/tasks/growl.rake
|
116
116
|
- data/tasks/heel.rake
|
117
117
|
- data/tasks/setup.rb
|
118
|
+
- data/tasks/validate.rake
|
118
119
|
- data/templates/_partial.erb
|
119
120
|
- data/templates/atom_feed.erb
|
120
121
|
- data/templates/page.erb
|
@@ -123,9 +124,9 @@ files:
|
|
123
124
|
- examples/webby/content/css/blueprint/screen.css
|
124
125
|
- examples/webby/content/css/coderay.css
|
125
126
|
- examples/webby/content/css/site.css
|
126
|
-
- examples/webby/content/download.txt
|
127
127
|
- examples/webby/content/index.txt
|
128
128
|
- examples/webby/content/manual/index.txt
|
129
|
+
- examples/webby/content/reference/index.txt
|
129
130
|
- examples/webby/content/robots.txt
|
130
131
|
- examples/webby/content/script/jquery.corner.js
|
131
132
|
- examples/webby/content/script/jquery.js
|
@@ -137,6 +138,7 @@ files:
|
|
137
138
|
- examples/webby/tasks/growl.rake
|
138
139
|
- examples/webby/tasks/heel.rake
|
139
140
|
- examples/webby/tasks/setup.rb
|
141
|
+
- examples/webby/tasks/validate.rake
|
140
142
|
- examples/webby/templates/page.erb
|
141
143
|
- lib/webby.rb
|
142
144
|
- lib/webby/auto_builder.rb
|
@@ -155,7 +157,9 @@ files:
|
|
155
157
|
- lib/webby/helpers/graphviz_helper.rb
|
156
158
|
- lib/webby/helpers/tag_helper.rb
|
157
159
|
- lib/webby/helpers/tex_img_helper.rb
|
160
|
+
- lib/webby/helpers/ultraviolet_helper.rb
|
158
161
|
- lib/webby/helpers/url_helper.rb
|
162
|
+
- lib/webby/link_validator.rb
|
159
163
|
- lib/webby/main.rb
|
160
164
|
- lib/webby/renderer.rb
|
161
165
|
- lib/webby/resources.rb
|
@@ -1,14 +0,0 @@
|
|
1
|
-
---
|
2
|
-
title: Download
|
3
|
-
created_at: Wed Aug 22 08:36:50 -0600 2007
|
4
|
-
filter: textile
|
5
|
-
---
|
6
|
-
h2. Download
|
7
|
-
|
8
|
-
Webby is available as a ruby gem. You need to have "RubyGems":http://www.rubygems.org/ installed in order to use it.
|
9
|
-
|
10
|
-
<pre class="code">
|
11
|
-
sudo gem install webby
|
12
|
-
</pre>
|
13
|
-
|
14
|
-
* "Files":http://rubyforge.org/frs/?group_id=4283
|