public
Description: Tutorial + Cookbook
Homepage: http://sinatra-book.gittr.com
Clone URL: git://github.com/cschneid/sinatra-book.git
Move the * * * between chapters into the build script, and out of the book 
files themselves
cschneid (author)
Sun Jun 22 11:40:57 -0700 2008
commit  077eec89fa7a112ea2983c5138736f7a9f30e275
tree    867a8d2658896ae4b2df2099bccd64a2c6c6571d
parent  0ceb277963fa2ac17ee6263d908d3541313f6e47
...
11
12
13
14
...
11
12
13
 
0
@@ -11,4 +11,3 @@ Use Sinatra's "set" option
0
 Application module / config area
0
 --------------------------------
0
 
0
-* * *
...
159
160
161
162
...
159
160
161
 
0
@@ -159,4 +159,3 @@ Fuzed and Amazon
0
 
0
 // TODO: What other deployment strategies are there?
0
 
0
-* * *
...
7
8
9
10
...
7
8
9
 
0
@@ -7,4 +7,3 @@ not\_found
0
 error
0
 -----
0
 
0
-* * *
...
4
5
6
7
...
4
5
6
 
0
@@ -4,4 +4,3 @@ Filters
0
 before do...
0
 ------------
0
 
0
-* * *
...
15
16
17
18
...
15
16
17
 
0
@@ -15,4 +15,3 @@ cookies
0
 authentication
0
 --------------
0
 
0
-* * *
...
3
4
5
6
...
3
4
5
 
0
@@ -3,4 +3,3 @@ Helpers
0
 
0
 // TODO: How do we repeat the partials thing (formatting issue, it belongs in two places)
0
 
0
-* * *
...
10
11
12
13
...
10
11
12
 
0
@@ -10,4 +10,3 @@ Sequel
0
 ActiveRecord
0
 ------------
0
 
0
-* * *
...
6
7
8
9
...
6
7
8
 
0
@@ -6,4 +6,3 @@ Rack Middleware
0
 
0
 // TODO: What useful rack middleware is out there? Is there any 3rd party stuff available outside of the builtin ones?
0
 
0
-* * *
...
15
16
17
18
...
15
16
17
 
0
@@ -15,4 +15,3 @@ user agent
0
 
0
 ### iPhone
0
 
0
-* * *
...
4
5
6
7
...
4
5
6
 
0
@@ -4,4 +4,3 @@ Table of Contents
0
 * This list will contain the toc, no matter what we write here
0
 {:toc}
0
 
0
-* * *
...
23
24
25
26
...
23
24
25
 
0
@@ -23,4 +23,3 @@ In File Views
0
 Partials
0
 --------
0
 
0
-* * *
...
66
67
68
69
 
70
71
72
...
74
75
76
77
 
78
79
80
81
 
82
83
84
...
66
67
68
 
69
70
71
72
...
74
75
76
 
77
78
79
80
 
81
82
83
84
0
@@ -66,7 +66,7 @@ class Book < Thor
0
   
0
   def complete_markdown
0
     # Collect all the markdown files in the correct order and squash them together into one big string
0
- s = ""
0
+ s = []
0
     File.new("book-order.txt").each_line do |line|
0
       line.strip!
0
       next if line =~ /^#/ # Skip comments
0
@@ -74,11 +74,11 @@ class Book < Thor
0
 
0
       File.open(File.join(BOOK_DIR, line)) do |f|
0
         # I have no idea if the double \n is needed, but seems safe
0
- s << f.read << "\n\n"
0
+ s << f.read
0
       end
0
     end
0
 
0
- return s
0
+ return s.join("\n\n* * *\n\n")
0
   end
0
 
0
 end

Comments

    No one has commented yet.