junebug-wiki 0.0.34 → 0.0.35

Sign up to get free protection for your applications and to get access to all the features.
@@ -46,6 +46,9 @@ ins {
46
46
 
47
47
 
48
48
  /* PAGE STRUCTURE */
49
+ html {
50
+ background:#d7d7d7;
51
+ }
49
52
  body {
50
53
  background:#d7d7d7;
51
54
  text-align: center;
@@ -185,6 +188,7 @@ body {
185
188
 
186
189
  .content h1 {
187
190
  font-size: 182%;
191
+ margin-top: 0;
188
192
  margin-bottom: 10px;
189
193
  border-bottom: 2px dotted #bbb;
190
194
  }
@@ -255,6 +259,16 @@ body {
255
259
  padding: 2px;
256
260
  }
257
261
 
262
+ .content code.eqn {
263
+ display: block;
264
+ text-align: center;
265
+ background: #f4f4f4;
266
+ border: 1px solid #ddd;
267
+ padding: 8px 20px;
268
+ margin: 15px 0px;
269
+ overflow: auto;
270
+ }
271
+
258
272
  .content code.clean {
259
273
  /* font-family:"Bitstream Vera Sans Mono", "Monaco", "Courier", monospace;*/
260
274
  background: #ffffff;
@@ -205,7 +205,7 @@ module Junebug::Controllers
205
205
  end
206
206
  end
207
207
 
208
- class Static < R '(/images/.+)', '(/style/.+)'
208
+ class Static < R '(/images/.+)', '(/style/.+)', '(/javascripts/.+)'
209
209
  MIME_TYPES = {'.css' => 'text/css', '.js' => 'text/javascript', '.jpg' => 'image/jpeg'}
210
210
  #PATH = __FILE__[/(.*)\//, 1]
211
211
  PATH = ENV['JUNEBUG_ROOT'] || File.expand_path('.')
@@ -395,6 +395,13 @@ class RedCloth < String
395
395
  text.gsub!( /^ *(\\?)==([^=]+.*?)\1==/m ) do |m|
396
396
  $1.empty? ? "<notextile>#{$2}</notextile>" : "==#{$2}=="
397
397
  end
398
+ text.gsub!( /^ +(`[^`]+`)/ ) do |m|
399
+ "<code class=\"eqn\">#{$1}</code>"
400
+ end
401
+ text.gsub!( /(`[^`]+`)/ ) do |m|
402
+ "<notextile>#{$1}</notextile>"
403
+ end
404
+
398
405
  end
399
406
 
400
407
  def glyphs_textile( text, level = 0 )
@@ -1,5 +1,3 @@
1
- require 'fileutils'
2
-
3
1
  require 'junebug'
4
2
  require 'junebug/models'
5
3
 
@@ -2,7 +2,7 @@ module Junebug #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- TINY = 34
5
+ TINY = 35
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -9,9 +9,10 @@ module Junebug::Views
9
9
  html {
10
10
  head {
11
11
  title @page_title ? @page_title : @page.title
12
- link :href=>'/style/yui/reset.css', :type=>'text/css', :rel=>'stylesheet'
13
- link :href=>'/style/yui/fonts.css', :type=>'text/css', :rel=>'stylesheet'
14
- link :href=>'/style/base.css', :type=>'text/css', :rel=>'stylesheet'
12
+ link :href=>'http://yui.yahooapis.com/2.4.0/build/reset-fonts-grids/reset-fonts-grids.css', :type=>'text/css', :rel=>'stylesheet'
13
+ link :href=>'http://yui.yahooapis.com/2.4.0/build/base/base-min.css', :type=>'text/css', :rel=>'stylesheet'
14
+ link :href=>'/style/base.css', :type=>'text/css', :rel=>'stylesheet'
15
+ script :type=>'text/javascript', :src=>'/javascripts/ASCIIMathML.js'
15
16
  link :href=>Junebug.config['feedurl'], :rel => "alternate", :title => "Recently Updated Pages", :type => "application/atom+xml"
16
17
  }
17
18
  body {
@@ -0,0 +1,34 @@
1
+ page_1:
2
+ updated_at: 2006-11-23 09:39:25 -08:00
3
+ readonly: true
4
+ body: |
5
+ To complete setup of you new wiki, here are a few things you should do:
6
+
7
+
8
+ h3. 1. Login to your account
9
+
10
+ When you created this wiki, the username and password you submitted were used to set up an account for you. Now click the 'sign in' link at the upper right and sign in.
11
+
12
+ Once you sign in you will see your username in the upper right corner.
13
+
14
+
15
+ h3. 2. Set the start page
16
+
17
+ This page will always be the default start page for a new wiki. Probably not what you want, right? Fortunately, it is easy to change. Open the config.yml file (in your wiki directory) with any texteditor, and change the startpage field to the page you want.
18
+
19
+ Next, in your wiki directory, run the command:
20
+
21
+ ruby wiki restart
22
+
23
+ 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.
24
+
25
+
26
+ h3. 3. Create some pages!
27
+
28
+ If you have any trouble, or need some help getting started, click on the 'Help' link in the nav bar. The documentation is pretty sparse right now, but I'm working on it!
29
+
30
+ id: 1
31
+ page_id: 1
32
+ version: 1
33
+ user_id: 1
34
+ created_at: 2006-10-29 16:19:34 -08:00
@@ -1,5 +1,34 @@
1
1
  page_1:
2
+ updated_at: 2006-11-23 09:39:25 -08:00
3
+ title: Welcome to Junebug
4
+ readonly: true
5
+ body: |
6
+ To complete setup of you new wiki, here are a few things you should do:
7
+
8
+
9
+ h3. 1. Login to your account
10
+
11
+ When you created this wiki, the username and password you submitted were used to set up an account for you. Now click the 'sign in' link at the upper right and sign in.
12
+
13
+ Once you sign in you will see your username in the upper right corner.
14
+
15
+
16
+ h3. 2. Set the start page
17
+
18
+ This page will always be the default start page for a new wiki. Probably not what you want, right? Fortunately, it is easy to change. Open the config.yml file (in your wiki directory) with any texteditor, and change the startpage field to the page you want.
19
+
20
+ Next, in your wiki directory, run the command:
21
+
22
+ ruby wiki restart
23
+
24
+ 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.
25
+
26
+
27
+ h3. 3. Create some pages!
28
+
29
+ If you have any trouble, or need some help getting started, click on the 'Help' link in the nav bar. The documentation is pretty sparse right now, but I'm working on it!
30
+
2
31
  id: 1
32
+ version: 1
3
33
  user_id: 1
4
- title: TestTitle1
5
- body: The quick fox jumped over the lazy dog.
34
+ created_at: 2006-10-29 16:19:34 -08:00
@@ -7,7 +7,8 @@ include Junebug::Models
7
7
 
8
8
  class TestJunebug < Camping::FunctionalTest
9
9
 
10
- #fixtures :junebug_users
10
+ fixtures :junebug_users, :junebug_pages, :junebug_page_versions
11
+
11
12
  def setup
12
13
  super
13
14
  end
@@ -38,7 +39,7 @@ class TestJunebug < Camping::FunctionalTest
38
39
  def test_login_basic
39
40
  get '/Welcome_to_Junebug/edit'
40
41
  assert_response :redirect
41
- assert_redirected_to '/login'
42
+ assert_redirected_to '/login?return_to=%2FWelcome_to_Junebug%2Fedit'
42
43
 
43
44
  post '/login', :username => 'admin', :password => 'password'
44
45
  assert_response :redirect
@@ -53,26 +54,25 @@ class TestJunebug < Camping::FunctionalTest
53
54
 
54
55
  get '/Welcome_to_Junebug/edit'
55
56
  assert_response :redirect
56
- assert_redirected_to '/login'
57
+ assert_redirected_to '/login?return_to=%2FWelcome_to_Junebug%2Fedit'
57
58
  end
58
59
 
59
60
  def test_return_to
60
- # gets don't seem to pass query params correctly in testing mode, so i've removed them
61
61
  post '/login', :username => 'admin', :password => 'password'
62
62
  assert_response :redirect
63
63
  assert_redirected_to '/Welcome_to_Junebug'
64
64
 
65
- # get '/logout'
66
- # assert_response :redirect
67
- # assert_redirected_to '/Welcome_to_Junebug'
65
+ get '/logout'
66
+ assert_response :redirect
67
+ assert_redirected_to '/Welcome_to_Junebug'
68
68
 
69
69
  post '/login', :username => 'admin', :password => 'password', :return_to => "/TestPage7"
70
70
  assert_response :redirect
71
71
  assert_redirected_to '/TestPage7'
72
72
 
73
- # get '/logout', :return_to => '/TestPage7'
74
- # assert_response :redirect
75
- # assert_redirected_to '/TestPage7'
73
+ get '/logout', :return_to => '/TestPage7'
74
+ assert_response :redirect
75
+ assert_redirected_to '/TestPage7'
76
76
  end
77
77
 
78
78
 
@@ -80,11 +80,11 @@ class TestJunebug < Camping::FunctionalTest
80
80
  # existing pages
81
81
  get '/Welcome_to_Junebug/edit'
82
82
  assert_response :redirect
83
- assert_redirected_to '/login'
83
+ assert_redirected_to '/login?return_to=%2FWelcome_to_Junebug%2Fedit'
84
84
 
85
85
  get '/Welcome_to_Junebug/1/edit'
86
86
  assert_response :redirect
87
- assert_redirected_to '/login'
87
+ assert_redirected_to '/login?return_to=%2FWelcome_to_Junebug%2Fedit'
88
88
 
89
89
  get '/Welcome_to_Junebug/delete'
90
90
  assert_response :redirect
@@ -97,11 +97,11 @@ class TestJunebug < Camping::FunctionalTest
97
97
  # page creation
98
98
  get '/NonexistentPage/edit'
99
99
  assert_response :redirect
100
- assert_redirected_to '/login'
100
+ assert_redirected_to '/login?return_to=%2FNonexistentPage%2Fedit'
101
101
 
102
102
  get '/NonexistentPage/1/edit'
103
103
  assert_response :redirect
104
- assert_redirected_to '/login'
104
+ assert_redirected_to '/login?return_to=%2FNonexistentPage%2Fedit'
105
105
 
106
106
  get '/NonexistentPage/delete'
107
107
  assert_response :redirect
@@ -115,7 +115,7 @@ class TestJunebug < Camping::FunctionalTest
115
115
  def test_page_editing
116
116
  get '/TestPage1'
117
117
  assert_response :redirect
118
- assert_redirected_to '/login'
118
+ assert_redirected_to '/login?return_to=%2FTestPage1'
119
119
 
120
120
  post '/login', :username => 'admin', :password => 'password'
121
121
  assert_response :redirect
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: junebug-wiki
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.34
7
- date: 2007-08-26 00:00:00 -07:00
6
+ version: 0.0.35
7
+ date: 2007-12-08 00:00:00 -08:00
8
8
  summary: Junebug is a minimalist ruby wiki running on Camping.
9
9
  require_paths:
10
10
  - lib
@@ -40,9 +40,8 @@ files:
40
40
  - deploy/console
41
41
  - deploy/public/images/feed-icon-14x14.png
42
42
  - deploy/public/images/draft.png
43
+ - deploy/public/javascripts/ASCIIMathML.js
43
44
  - deploy/public/style/base.css
44
- - deploy/public/style/yui/fonts.css
45
- - deploy/public/style/yui/reset.css
46
45
  - deploy/wiki
47
46
  - dump/junebug_pages.yml
48
47
  - lib/junebug.rb
@@ -1,34 +0,0 @@
1
- /*
2
- Copyright (c) 2006, Yahoo! Inc. All rights reserved.
3
- Code licensed under the BSD License:
4
- http://developer.yahoo.net/yui/license.txt
5
- version: 0.11.3
6
- */
7
-
8
- /**
9
- * 84.5% for !IE, keywords for IE
10
- * Percents could work for IE, but for backCompat purposes, we are using
11
- keywords.
12
- * x-small is for IE < 6 and IE6 quirks mode.
13
- *
14
- */
15
- body {font:13px arial,helvetica,clean,sans-serif;*font-size:small;*font:x-
16
- small;}
17
- table {font-size:inherit;font:100%;}
18
-
19
- /**
20
- * 99% for safari; 100% is too large
21
- */
22
- select, input, textarea {font:99% arial,helvetica,clean,sans-serif;}
23
-
24
- /**
25
- * Bump up !IE to get to 13px equivalent
26
- */
27
- /*pre, code {font:115% monospace;*font-size:100%;}*/
28
-
29
- /**
30
- * Default line-height based on font-size rather than "computed-value"
31
- * see: http://www.w3.org/TR/CSS21/visudet.html#line-height
32
- */
33
- body * {line-height:1.22em;}
34
-
@@ -1,14 +0,0 @@
1
- /*
2
- Copyright (c) 2006, Yahoo! Inc. All rights reserved.
3
- Code licensed under the BSD License:
4
- http://developer.yahoo.net/yui/license.txt
5
- version: 0.11.3
6
- */
7
- body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}
8
- table{border-collapse:collapse;border-spacing:0;}
9
- fieldset,img{border:0;}
10
- address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}
11
- ol,ul {list-style:none;}
12
- caption,th {text-align:left;}
13
- h1,h2,h3,h4,h5,h6{font-size:100%;}
14
- q:before,q:after{content:'';}