junebug 0.0.15 → 0.0.16

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ v0.0.16 2006-11-19
2
+
3
+ * Style tweaks
4
+ * Login/logout redirects you back to the page you were on
5
+
1
6
  v0.0.15 2006-11-17
2
7
 
3
8
  * Loosen up mongrel requirements for windows users -- thanks deejay
@@ -5,6 +10,7 @@ v0.0.15 2006-11-17
5
10
  * Added css for wrapping pre text
6
11
  * Changed wikiword syntax to [[link]]
7
12
  * Unit testing improvements
13
+ * Command line help
8
14
 
9
15
  v0.0.14 2006-11-14
10
16
 
data/Rakefile CHANGED
@@ -13,7 +13,7 @@ Gem.manage_gems
13
13
 
14
14
  gem_spec = Gem::Specification.new do |s|
15
15
  s.name = 'junebug'
16
- s.version = '0.0.15'
16
+ s.version = Junebug::VERSION
17
17
  s.summary = "Junebug is a minimalist ruby wiki."
18
18
  s.description = "Junebug is a minimalist ruby wiki running on Camping."
19
19
  s.author = "Tim Myrtle"
@@ -29,7 +29,7 @@ gem_spec = Gem::Specification.new do |s|
29
29
  s.add_dependency('mongrel', '>=0.3.13.3')
30
30
  s.add_dependency('camping', '>=1.5')
31
31
  s.add_dependency('RedCloth', '>=3.0.4')
32
- s.add_dependency('daemons')
32
+ s.add_dependency('daemons', '>=1.0.3')
33
33
  s.add_dependency('sqlite3-ruby', '>=1.1.0.1')
34
34
  s.add_dependency('activerecord', '>=1.14.4')
35
35
  end
@@ -1,12 +1,12 @@
1
1
  /* Baseline Junebug style */
2
2
 
3
3
  a:link, a:visited {
4
- text-decoration: none;
5
- color: #00f;
4
+ /* text-decoration: none;*/
5
+ color: #0000cc;
6
6
  }
7
7
  a:hover {
8
- text-decoration: underline;
9
- color: #00f;
8
+ /* text-decoration: underline;*/
9
+ color: #0000cc;
10
10
  }
11
11
 
12
12
  form { display: inline; }
@@ -55,8 +55,8 @@ body {
55
55
  }
56
56
 
57
57
  #hd {
58
- border-top: 6px solid #4682b4;
59
- background-color: #191970;
58
+ /* border-top: 6px solid #809fff;*/
59
+ background-color: #6677aa;
60
60
  padding: 8px 25px;
61
61
  color: #ffffff;
62
62
  }
@@ -68,6 +68,10 @@ body {
68
68
  #hd h1 a {
69
69
  color: #ffffff;
70
70
  }
71
+ #hd h1 a:link, #hd h1 a:visited {
72
+ text-decoration: none;
73
+ }
74
+
71
75
 
72
76
  #hd h1 {
73
77
  font-size: 167%;
@@ -151,9 +155,15 @@ body {
151
155
  min-height: 300px;
152
156
  }
153
157
 
154
- .content h2, .content h3, .content h4 {
158
+ .content h2, .content h3, .content h4, .content h5 {
155
159
  /* color: #04766f;*/
156
- color: #548b54;
160
+ font-weight: normal;
161
+ color: #447744;
162
+ border-bottom: 2px dotted #bbb;
163
+ margin-left: -5px;
164
+ margin-top: 20px;
165
+ margin-bottom: 10px;
166
+ padding: 1px 5px;
157
167
  }
158
168
 
159
169
  .content h1 {
@@ -162,26 +172,32 @@ body {
162
172
  }
163
173
 
164
174
  .content h2 {
165
- font-size: 129%;
175
+ font-size: 140%;
166
176
  border-bottom: 2px dotted #bbb;
167
- margin-top: 25px;
168
- margin-bottom: 10px;
169
- /* background-color: #d6fbf4;*/
177
+ /* margin-top: 25px;*/
178
+ /* margin-bottom: 10px;*/
179
+ background-color: #edf9ef;
170
180
  }
171
181
 
172
182
  .content h3 {
173
183
  font-size: 129%;
174
- margin-top: 25px;
175
- margin-bottom: 10px;
176
- /* border-bottom: 1px dotted #bbb;*/
184
+ /* margin-top: 25px;*/
185
+ /* margin-bottom: 10px;*/
177
186
  }
178
187
 
179
188
  .content h4 {
180
189
  font-size: 107%;
181
- margin-top: 15px;
182
- margin-bottom: 10px;
190
+ /* margin-top: 15px;*/
191
+ /* margin-bottom: 10px;*/
183
192
  }
184
193
 
194
+ .content h5 {
195
+ font-size: 100%;
196
+ /* margin-top: 15px;*/
197
+ /* margin-bottom: 10px;*/
198
+ }
199
+
200
+
185
201
  .content ul {
186
202
  list-style-type: square;
187
203
  margin: 10px 0px 10px 15px;
@@ -197,8 +213,8 @@ body {
197
213
  }
198
214
 
199
215
  .content p {
200
- line-height: 130%;
201
- margin: 10px 0px;
216
+ line-height: 145%;
217
+ margin: 15px 0px;
202
218
  }
203
219
 
204
220
  .content em {
@@ -207,8 +223,8 @@ body {
207
223
 
208
224
  .content strong {
209
225
  font-weight: bold;
210
- background-color: #ffffcc;
211
- padding: 3px;
226
+ /* background-color: #ffffcc;
227
+ padding: 3px;*/
212
228
  }
213
229
 
214
230
  .content label {
@@ -217,7 +233,7 @@ body {
217
233
 
218
234
  .content code {
219
235
  /* font-family:"Bitstream Vera Sans Mono", "Monaco", "Courier", monospace;*/
220
- background: #eee;
236
+ background: #f4f4f4;
221
237
  padding: 2px;
222
238
  }
223
239
 
@@ -228,7 +244,7 @@ body {
228
244
  .content pre {
229
245
  /* font-family:"Bitstream Vera Sans Mono", "Monaco", "Courier", monospace;*/
230
246
  display: block;
231
- background: #eee;
247
+ background: #f4f4f4;
232
248
  border: 1px solid #ddd;
233
249
  padding: 8px 20px;
234
250
  }
@@ -21,7 +21,7 @@
21
21
 
22
22
  Next, in your wiki directory, run the command:
23
23
 
24
- ./wiki restart
24
+ ruby wiki restart
25
25
 
26
26
  The next time you click on the 'Home' link in the nav bar, you will be taken to your new start page. If the page doesn't already exist, you will first be asked to login, and then you will be presented with an edit form to create the page.
27
27
 
@@ -52,19 +52,23 @@
52
52
 
53
53
  h1. Header 1
54
54
 
55
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
55
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
56
56
 
57
57
  h2. Header 2
58
58
 
59
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
59
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
60
60
 
61
61
  h3. Header 3
62
62
 
63
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
63
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
64
64
 
65
65
  h4. Header 4
66
66
 
67
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
67
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
68
+
69
+ h5. Header 5
70
+
71
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
68
72
 
69
73
  h2. Structural emphasis
70
74
 
@@ -18,7 +18,7 @@ require 'fileutils'
18
18
  module Junebug
19
19
  include Camping::Session
20
20
 
21
- VERSION='0.0.15'
21
+ VERSION='0.0.16'
22
22
 
23
23
  def self.create
24
24
  Junebug::Models.create_schema :assume => (Junebug::Models::Page.table_exists? ? 1.0 : 0.0)
@@ -137,27 +137,31 @@ module Junebug::Controllers
137
137
  class Login
138
138
  def get
139
139
  @page_title = "Login/Create Account"
140
+ @return_to = input.return_to
140
141
  render :login
141
142
  end
142
143
 
143
144
  def post
144
145
  @page_title = "Login/Create Account"
145
146
  @user = User.find :first, :conditions => ['username = ? AND password = ?', input.username, input.password]
147
+ @return_to = input.return_to
146
148
  if @user
147
149
  if @user.password == input.password
148
150
  @state.user = @user
149
- redirect(Junebug.startpage); return
151
+ input.return_to.blank? ? redirect(Junebug.startpage) : redirect(input.return_to)
152
+ return
150
153
  else
151
154
  @notice = 'Authentication failed'
152
155
  end
153
156
  else
154
- @user = User.create :username=>input.username, :password=>input.password
155
- if @user.errors.empty?
156
- @state.user = @user
157
- redirect(Junebug.startpage); return
158
- else
159
- @notice = @user.errors.full_messages[0]
160
- end
157
+ @user = User.create :username=>input.username, :password=>input.password
158
+ if @user.errors.empty?
159
+ @state.user = @user
160
+ redirect(Junebug.startpage)
161
+ return
162
+ else
163
+ @notice = @user.errors.full_messages[0]
164
+ end
161
165
  end
162
166
  render :login
163
167
  end
@@ -166,7 +170,7 @@ module Junebug::Controllers
166
170
  class Logout
167
171
  def get
168
172
  @state.user = nil
169
- redirect(Junebug.startpage)
173
+ input.return_to.blank? ? redirect(Junebug.startpage) : redirect(input.return_to)
170
174
  end
171
175
  end
172
176
  end
@@ -49,8 +49,8 @@ module Junebug::Views
49
49
  }
50
50
  if is_admin?
51
51
  div.admin {
52
- _button 'delete', R(Delete, @page.title), {:onclick=>'return confirm("Sure you want to delete?")'} if @version.version == @page.version
53
- _button 'revert to', R(Revert, @page.title, @version.version), {:onclick=>'return confirm("Sure you want to revert?")'} if @version.version != @page.version
52
+ _button 'delete', R(Delete, @page.title), {:onclick=>"return confirm('Sure you want to delete?')"} if @version.version == @page.version
53
+ _button 'revert to', R(Revert, @page.title, @version.version), {:onclick=>"return confirm('Sure you want to revert?')"} if @version.version != @page.version
54
54
  }
55
55
  end
56
56
  end
@@ -191,6 +191,8 @@ module Junebug::Views
191
191
 
192
192
  label 'Password', :for => 'password'; br
193
193
  input :name => 'password', :type => 'password'; br
194
+
195
+ input :name => 'return_to', :type => 'hidden', :value=>@return_to
194
196
 
195
197
  input :type => 'submit', :name => 'login', :value => 'Login'
196
198
  end
@@ -222,7 +224,7 @@ module Junebug::Views
222
224
  def _header type, page_title
223
225
  div :id=>'hd' do
224
226
  span :id=>'userlinks', :style=>'float: right;' do
225
- logged_in? ? (text "Welcome, #{@state.user.username} - " ; a('sign out', :href=>R(Logout))) : a('sign in', :href=>R(Login))
227
+ logged_in? ? (text "Welcome, #{@state.user.username} - " ; a('sign out', :href=>"#{R(Logout)}?return_to=#{@env['REQUEST_URI']}")) : a('sign in', :href=> "#{R(Login)}?return_to=#{@env['REQUEST_URI']}")
226
228
  end
227
229
  if type == :static
228
230
  h1 page_title
@@ -260,7 +262,7 @@ module Junebug::Views
260
262
  span :style=>'float: right;' do
261
263
  text 'Powered by '
262
264
  a 'JunebugWiki', :href => 'http://www.junebugwiki.com/'
263
- text ' '
265
+ text " <small>v#{Junebug::VERSION}</small> "
264
266
  a :href => Junebug.config['feed'] do
265
267
  img :src => '/static/images/feed-icon-14x14.png'
266
268
  end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: junebug
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.15
7
- date: 2006-11-17 00:00:00 -08:00
6
+ version: 0.0.16
7
+ date: 2006-11-19 00:00:00 -08:00
8
8
  summary: Junebug is a minimalist ruby wiki.
9
9
  require_paths:
10
10
  - lib
@@ -120,9 +120,9 @@ dependencies:
120
120
  version_requirement:
121
121
  version_requirements: !ruby/object:Gem::Version::Requirement
122
122
  requirements:
123
- - - ">"
123
+ - - ">="
124
124
  - !ruby/object:Gem::Version
125
- version: 0.0.0
125
+ version: 1.0.3
126
126
  version:
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: sqlite3-ruby