Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

stylee

  • Loading branch information...
commit 6e16c5e0ba6935043276a2ccbd4f3e93782a2c80 1 parent 074d6d3
Pat Nakajima authored

Showing 1 changed file with 270 additions and 266 deletions. Show diff stats Hide diff stats

  1. 536  index.html
536  index.html
@@ -22,13 +22,14 @@
22 22
 		h1 .small { font-size: 0.4em; }
23 23
 		h1 a { text-decoration: none }
24 24
 		h2 { font-size: 1.5em; color: #22133a; }
25  
-    h3 { text-align: center; color: #22133a; }
  25
+    h3 { color: #22133a; }
26 26
     a { color: #22133a; }
27 27
     .description { font-size: 1.2em; margin-bottom: 30px; margin-top: 30px; font-style: italic;}
28 28
     .download { float: right; }
29 29
 		pre { background: #000; color: #fff; padding: 15px;}
30 30
     hr { border: 0; width: 80%; border-bottom: 1px solid #aaa}
31 31
     .footer { text-align:center; padding-top:30px; font-style: italic; }
  32
+    pre { font-family: Monaco }
32 33
 	</style>
33 34
 	
34 35
 </head>
@@ -52,279 +53,282 @@
52 53
       DSL-ified RESTy apps with Sinatra.
53 54
     </div>
54 55
 
55  
-    <p><h1 id="sinatra8217s_hat">Sinatra&#8217;s Hat</h1>
56  
-
57  
-<p>Easy REST-ful apps with Sinatra.</p>
58  
-
59  
-<p>Using Sinatra&#8217;s Hat is centered around the <code>mount</code> method, which is
60  
-added to <code>Sinatra::Base</code>. It takes at bare minimum a model class. This
61  
-class will be mounted as a REST-ful resource, giving you all the CRUD
62  
-actions, as well as <code>new</code> and <code>edit</code> actions. Let&#8217;s look at some code:</p>
63  
-
64  
-<pre>
65  
-mount Article
66  
-</pre>
67  
-
68  
-<p>Now you&#8217;ve basically got the same functionality as you&#8217;ll get in Rails
69  
-by running <code>script/generate scaffold Article</code>. The views for your <code>Article</code>
70  
-will live in <code>views/articles</code>, and be named <code>index.erb</code>, <code>show.erb</code>, etc.</p>
71  
-
72  
-<p>You can look at my <a href="http://github.com/nakajima/hatter/tree/master">Hatter</a>
73  
-project, or the <code>examples/</code> directory in this one to see this in action.</p>
74  
-
75  
-<p>Go ahead, try it.</p>
76  
-
77  
-<h2 id="orm_agnostic_or_orm_atheist">ORM agnostic? Or ORM atheist?</h2>
78  
-
79  
-<p>By default, Sinatra&#8217;s Hat works with ActiveRecord. That means that going
80  
-to <code>/articles</code> will simply call <code>Article.all</code> to populate the <code>@articles</code>
81  
-instance variable. Going to <code>/articles/2</code> will call <code>Article.find_by_id(2)</code>
82  
-to populate the <code>@article</code> instance variable.</p>
83  
-
84  
-<p>We call <code>find_by_id</code> instead of <code>find</code> because the <code>record</code> option should
85  
-simply return <code>nil</code> when the record can&#8217;t be found.</p>
86  
-
87  
-<p>Not every class is an ActiveRecord though (especially if you&#8217;re not using
88  
-ActiveRecord). That&#8217;s why you can use the <code>finder</code> and <code>record</code> options.</p>
89  
-
90  
-<p>This example will show you how to use DataMapper with Sinatra&#8217;s Hat:</p>
91  
-
92  
-<pre>
93  
-mount Article do
94  
-  finder { |model, params| model.all }
95  
-  record { |model, params| model.first(:id => params[:id]) }
96  
-end
97  
-</pre>
98  
-
99  
-<p>As you can see, both <code>finder</code> and <code>record</code> take a block, which will get
100  
-passed the &#8220;model&#8221; and <code>params</code> for each request. The reason you should use
101  
-the &#8220;model&#8221; argument instead of referencing the class directly is that
102  
-when you start nesting mounted models, then Sinatra&#8217;s Hat will attempt to
103  
-pass the association proxy as the model argument instead of the class itself.</p>
104  
-
105  
-<p>&#8220;Nested mounted models?&#8221; you ask?</p>
106  
-
107  
-<h2 id="nested_mounted_models">Nested mounted models.</h2>
108  
-
109  
-<p>You don&#8217;t want to have to expose your entire application at the top level
110  
-of URL paths. That wouldn&#8217;t be very RESTful, and more importantly, it&#8217;d be
111  
-damn ugly. So Sinatra&#8217;s Hat allows you to nest resources:</p>
112  
-
113  
-<pre>
114  
-mount Article do
115  
-  mount Comment
116  
-end
117  
-</pre>
118  
-
119  
-<p>With this example, you&#8217;d get <code>/articles/1/comments</code>, <code>/articles/1/comments/1</code>
120  
-and all the rest of the actions you get for articles, just nested. As long
121  
-as your <code>Article</code> model supports a <code>comments</code> association proxy, then the <code>finder</code>
122  
-and <code>record</code> options for <code>Comment</code> will automatically scope their results by
123  
-the parent <code>Article</code>.</p>
124  
-
125  
-<h2 id="limiting_routes">Limiting routes</h2>
126  
-
127  
-<p>By default, Sinatra&#8217;s Hat creates seven routes for each mounted model (the
128  
-four ones for <acronym title="Create|Read|Update|Destroy">CRUD</acronym>
129  
-actions plus the routes for index, new and edit action), but you can reduce
130  
-the number of available routes with <code>only</code>:</p>
131  
-
132  
-<pre>
133  
-mount Article do
134  
-  only :index, :show
135  
-end
136  
-</pre>
137  
-
138  
-<p>Only the listed actions will return valid responses; requests for the
139  
-&#8220;missing&#8221; routes will produce 404 &#8220;Not Found&#8221; HTTP responses.</p>
140  
-
141  
-<h2 id="basic_auth">Basic Auth</h2>
142  
-
143  
-<p>To protect actions using basic authentication, you can use the <code>protect</code> method.</p>
144  
-
145  
-<pre>
146  
-mount Article do
147  
-  protect :create, :update, :destroy, :username => "foo", :password => "bar", :realm => "BLOGZ"
148  
-end
149  
-</pre>
150  
-
151  
-<p>The above snippet will protect your <acronym title="Create|Update|Destroy">CUD</acronym>
152  
-actions with basic auth, using the username &#8220;foo&#8221; and password &#8220;bar&#8221;. The realm
153  
-for the basic auth prompt will say &#8220;BLOGZ&#8221;.</p>
154  
-
155  
-<p>If you want to protect all of your actions, you cay say <code>protect :all</code>.</p>
156  
-
157  
-<h2 id="xml_json_yaml_and_whatever_else_you_want"><code>.xml</code>, <code>.json</code>, <code>.yaml</code>, and whatever else you want</h2>
158  
-
159  
-<p>If a request has a format extensions, then Sinatra&#8217;s Hat will first check
160  
-to see if it has a custom way of serializing that format. To specify a 
161  
-custom formatter, you can use the <code>formats</code> hash:</p>
162  
-
163  
-<pre>
164  
-mount Article do
165  
-  formats[:ruby] = { |data| data.inspect }
166  
-end
167  
-</pre>
168  
-
169  
-<p>With that custom formatter, a request to <code>/articles.ruby</code> will return
170  
-the equivalent of <code>Article.all.inspect</code>.</p>
171  
-
172  
-<h3 id="automatic_formatters">Automatic formatters</h3>
173  
-
174  
-<p>If you don&#8217;t specify a custom formatter, then Sinatra&#8217;s Hat will try to
175  
-call <code>to_#{format}</code> on the record object. That means that with most ORMs,
176  
-things like <code>to_xml</code>, <code>to_json</code>, and <code>to_yaml</code> will be supported right out
177  
-of the box.</p>
178  
-
179  
-<p>Requests for unknow formats will produce 406 &#8220;Not Acceptable&#8221; HTTP responses.</p>
180  
-
181  
-<h2 id="default_flows">Default Flows</h2>
182  
-
183  
-<p>Sinatra&#8217;s Hat has some default flows:</p>
184  
-
185  
-<h3 id="after_the_create_action">After the <code>create</code> action</h3>
186  
-
187  
-<p><strong>On Success</strong>: If a record is successfully created, Sinatra&#8217;s Hat will redirect to that
188  
-record&#8217;s show page.</p>
189  
-
190  
-<p><strong>On Failure</strong>: If a record cannot be saved, Sinatra&#8217;s Hat will render the <code>new</code> action.</p>
191  
-
192  
-<h3 id="after_the_update_action">After the <code>Update</code> action</h3>
193  
-
194  
-<p><strong>On Success</strong>: If a record is successfully updated, Sinatra&#8217;s Hat will redirect to that
195  
-record&#8217;s show page.</p>
196  
-
197  
-<p><strong>On Failure</strong>: If a record cannot be updated, Sinatra&#8217;s Hat will render the <code>edit</code> action.</p>
198  
-
199  
-<h2 id="custom_flows">Custom Flows</h2>
200  
-
201  
-<p>To specify custom flows for your actions, you can use the <code>after</code> method.</p>
202  
-
203  
-<p>Let&#8217;s say that after a user creates an Article, you want to render the
204  
-article&#8217;s edit action, and if it can&#8217;t be created, you want to redirect
205  
-back to the articles index.</p>
206  
-
207  
-<pre>
208  
-mount Article do
209  
-  after :create do |on|
210  
-    on.success { |record| render(:edit) }
211  
-    on.failure { |record| redirect(:index) }
212  
-  end
213  
-end
214  
-</pre>
215  
-
216  
-<p>Only <code>:create</code> and <code>:update</code> actions allow to handle success and failure
217  
-differently; for the other actions you can customize only the <code>success</code> result
218  
-and if something goes wrong (i.e., when a record cannot be found) they will
219  
-simply return a 404 &#8220;Not Found&#8221; HTTP response.</p>
220  
-
221  
-<h3 id="redirect_options"><code>redirect</code> options</h3>
222  
-
223  
-<p>When specifying a custom redirect, you can pass one of a few things:</p>
224  
-
225  
-<h4 id="a_string">A String</h4>
226  
-
227  
-<p>When you pass <code>redirect</code> a string, the redirect will go to that string.</p>
228  
-
229  
-<pre>
230  
-after :create do |on|
231  
-  on.success { |record| redirect("/articles/#{record.to_param}") }
232  
-end
233  
-</pre>
234  
-
235  
-<h4 id="a_record">A Record</h4>
236  
-
237  
-<p>When you pass <code>redirect</code> a record, the redirect will go to the show
238  
-action for that record.</p>
239  
-
240  
-<pre>
241  
-after :create do |on|
242  
-  on.success { |record| redirect(record) }
243  
-end
244  
-</pre>
245  
-
246  
-<h4 id="a_symbol">A symbol</h4>
247  
-
248  
-<p>If you pass <code>redirect</code> the name of an action as a symbol (like <code>:index</code>),
249  
-then the redirect will go to the correct path for that option:</p>
250  
-
251  
-<pre>
252  
-after :create do |on|
253  
-  on.success { redirect(:index) }
254  
-end
255  
-</pre>
256  
-
257  
-<p>When the action requires a record (like <code>:show</code>), then just pass the
258  
-record as a second argument:</p>
259  
-
260  
-<pre>
261  
-after :create do |on|
262  
-  on.success { |record| redirect(:show, record) }
263  
-end
264  
-</pre>
265  
-
266  
-<h3 id="responding_with_a_render">Responding with a <code>render</code></h3>
267  
-
268  
-<p>When you want your response to just render a template, just call <code>render</code>
269  
-with the name of the template:</p>
270  
-
271  
-<pre>
272  
-after :create do |on|
273  
-  on.failure { |record| render(:new) }
274  
-end
275  
-</pre>
276  
-
277  
-<h2 id="todo">Todo</h2>
278  
-
279  
-<ul>
280  
-<li>Make <code>last_modified</code> calls more efficient</li>
281  
-<li>Investigate other forms of caching</li>
282  
-</ul>
283  
-
284  
-<h2 id="other_info">Other Info</h2>
285  
-
286  
-<ul>
287  
-<li><a href="http://nakajima.lighthouseapp.com/projects/24609-sinatras-hat/overview">View the Lighthouse Project</a></li>
288  
-<li><a href="http://ci.patnakajima.com/sinatra-s-hat">View the CI build</a></li>
289  
-<li>Thanks a ton to the <a href="http://github.com/sinatra">Sinatra team</a> for such an
290  
-awesome framework.</li>
291  
-</ul>
292  
-
293  
-<p>(c) Copyright 2008-2009 Pat Nakajima. All Rights Reserved.</p>
294  
-
  56
+    <p><h1 id="sinatra8217s_hat">Sinatra&#8217;s Hat</h1>
  57
+
  58
+<p>Easy REST-ful apps with Sinatra.</p>
  59
+
  60
+<p>Using Sinatra&#8217;s Hat is centered around the <code>mount</code> method, which is
  61
+added to <code>Sinatra::Base</code>. It takes at bare minimum a model class. This
  62
+class will be mounted as a REST-ful resource, giving you all the CRUD
  63
+actions, as well as <code>new</code> and <code>edit</code> actions. Let&#8217;s look at some code:</p>
  64
+
  65
+<pre>
  66
+mount Article
  67
+</pre>
  68
+
  69
+<p>Now you&#8217;ve basically got the same functionality as you&#8217;ll get in Rails
  70
+by running <code>script/generate scaffold Article</code>. The views for your <code>Article</code>
  71
+will live in <code>views/articles</code>, and be named <code>index.erb</code>, <code>show.erb</code>, etc.</p>
  72
+
  73
+<p>You can look at my <a href="http://github.com/nakajima/hatter/tree/master">Hatter</a>
  74
+project, or the <code>examples/</code> directory in this one to see this in action.</p>
  75
+
  76
+<p>Go ahead, try it.</p>
  77
+
  78
+<h2 id="orm_agnostic_or_orm_atheist">ORM agnostic? Or ORM atheist?</h2>
  79
+
  80
+<p>By default, Sinatra&#8217;s Hat works with ActiveRecord. That means that going
  81
+to <code>/articles</code> will simply call <code>Article.all</code> to populate the <code>@articles</code>
  82
+instance variable. Going to <code>/articles/2</code> will call <code>Article.find_by_id(2)</code>
  83
+to populate the <code>@article</code> instance variable.</p>
  84
+
  85
+<p>We call <code>find_by_id</code> instead of <code>find</code> because the <code>record</code> option should
  86
+simply return <code>nil</code> when the record can&#8217;t be found.</p>
  87
+
  88
+<p>Not every class is an ActiveRecord though (especially if you&#8217;re not using
  89
+ActiveRecord). That&#8217;s why you can use the <code>finder</code> and <code>record</code> options.</p>
  90
+
  91
+<p>This example will show you how to use DataMapper with Sinatra&#8217;s Hat:</p>
  92
+
  93
+<pre>
  94
+mount Article do
  95
+  finder { |model, params| model.all }
  96
+  record { |model, params| model.first(:id => params[:id]) }
  97
+end
  98
+</pre>
  99
+
  100
+<p>As you can see, both <code>finder</code> and <code>record</code> take a block, which will get
  101
+passed the &#8220;model&#8221; and <code>params</code> for each request. The reason you should use
  102
+the &#8220;model&#8221; argument instead of referencing the class directly is that
  103
+when you start nesting mounted models, then Sinatra&#8217;s Hat will attempt to
  104
+pass the association proxy as the model argument instead of the class itself.</p>
  105
+
  106
+<p>&#8220;Nested mounted models?&#8221; you ask?</p>
  107
+
  108
+<h2 id="nested_mounted_models">Nested mounted models.</h2>
  109
+
  110
+<p>You don&#8217;t want to have to expose your entire application at the top level
  111
+of URL paths. That wouldn&#8217;t be very RESTful, and more importantly, it&#8217;d be
  112
+damn ugly. So Sinatra&#8217;s Hat allows you to nest resources:</p>
  113
+
  114
+<pre>
  115
+mount Article do
  116
+  mount Comment
  117
+end
  118
+</pre>
  119
+
  120
+<p>With this example, you&#8217;d get <code>/articles/1/comments</code>, <code>/articles/1/comments/1</code>
  121
+and all the rest of the actions you get for articles, just nested. As long
  122
+as your <code>Article</code> model supports a <code>comments</code> association proxy, then the <code>finder</code>
  123
+and <code>record</code> options for <code>Comment</code> will automatically scope their results by
  124
+the parent <code>Article</code>.</p>
  125
+
  126
+<h2 id="limiting_routes">Limiting routes</h2>
  127
+
  128
+<p>By default, Sinatra&#8217;s Hat creates seven routes for each mounted model (the
  129
+four ones for <acronym title="Create|Read|Update|Destroy">CRUD</acronym>
  130
+actions plus the routes for index, new and edit action), but you can reduce
  131
+the number of available routes with <code>only</code>:</p>
  132
+
  133
+<pre>
  134
+mount Article do
  135
+  only :index, :show
  136
+end
  137
+</pre>
  138
+
  139
+<p>Only the listed actions will return valid responses; requests for the
  140
+&#8220;missing&#8221; routes will produce 404 &#8220;Not Found&#8221; HTTP responses.</p>
  141
+
  142
+<h2 id="basic_auth">Basic Auth</h2>
  143
+
  144
+<p>To protect actions using basic authentication, you can use the <code>protect</code> method.</p>
  145
+
  146
+<pre>
  147
+mount Article do
  148
+  protect :create, :update, :destroy, :username => "foo", :password => "bar", :realm => "BLOGZ"
  149
+end
  150
+</pre>
  151
+
  152
+<p>The above snippet will protect your <acronym title="Create|Update|Destroy">CUD</acronym>
  153
+actions with basic auth, using the username &#8220;foo&#8221; and password &#8220;bar&#8221;. The realm
  154
+for the basic auth prompt will say &#8220;BLOGZ&#8221;.</p>
  155
+
  156
+<p>If you want to protect all of your actions, you cay say <code>protect :all</code>.</p>
  157
+
  158
+<h2 id="xml_json_yaml_and_whatever_else_you_want"><code>.xml</code>, <code>.json</code>, <code>.yaml</code>, and whatever else you want</h2>
  159
+
  160
+<p>If a request has a format extensions, then Sinatra&#8217;s Hat will first check
  161
+to see if it has a custom way of serializing that format. To specify a 
  162
+custom formatter, you can use the <code>formats</code> hash:</p>
  163
+
  164
+<pre>
  165
+mount Article do
  166
+  formats[:ruby] = { |data| data.inspect }
  167
+end
  168
+</pre>
  169
+
  170
+<p>With that custom formatter, a request to <code>/articles.ruby</code> will return
  171
+the equivalent of <code>Article.all.inspect</code>.</p>
  172
+
  173
+<h3 id="automatic_formatters">Automatic formatters</h3>
  174
+
  175
+<p>If you don&#8217;t specify a custom formatter, then Sinatra&#8217;s Hat will try to
  176
+call <code>to_#{format}</code> on the record object. That means that with most ORMs,
  177
+things like <code>to_xml</code>, <code>to_json</code>, and <code>to_yaml</code> will be supported right out
  178
+of the box.</p>
  179
+
  180
+<p>Requests for unknow formats will produce 406 &#8220;Not Acceptable&#8221; HTTP responses.</p>
  181
+
  182
+<h2 id="default_flows">Default Flows</h2>
  183
+
  184
+<p>Sinatra&#8217;s Hat has some default flows:</p>
  185
+
  186
+<h3 id="after_the_create_action">After the <code>create</code> action</h3>
  187
+
  188
+<p><strong>On Success</strong>: If a record is successfully created, Sinatra&#8217;s Hat will redirect to that
  189
+record&#8217;s show page.</p>
  190
+
  191
+<p><strong>On Failure</strong>: If a record cannot be saved, Sinatra&#8217;s Hat will render the <code>new</code> action.</p>
  192
+
  193
+<h3 id="after_the_update_action">After the <code>Update</code> action</h3>
  194
+
  195
+<p><strong>On Success</strong>: If a record is successfully updated, Sinatra&#8217;s Hat will redirect to that
  196
+record&#8217;s show page.</p>
  197
+
  198
+<p><strong>On Failure</strong>: If a record cannot be updated, Sinatra&#8217;s Hat will render the <code>edit</code> action.</p>
  199
+
  200
+<h2 id="custom_flows">Custom Flows</h2>
  201
+
  202
+<p>To specify custom flows for your actions, you can use the <code>after</code> method.</p>
  203
+
  204
+<p>Let&#8217;s say that after a user creates an Article, you want to render the
  205
+article&#8217;s edit action, and if it can&#8217;t be created, you want to redirect
  206
+back to the articles index.</p>
  207
+
  208
+<pre>
  209
+mount Article do
  210
+  after :create do |on|
  211
+    on.success { |record| render(:edit) }
  212
+    on.failure { |record| redirect(:index) }
  213
+  end
  214
+end
  215
+</pre>
  216
+
  217
+<p>Only <code>:create</code> and <code>:update</code> actions allow to handle success and failure
  218
+differently; for the other actions you can customize only the <code>success</code> result
  219
+and if something goes wrong (i.e., when a record cannot be found) they will
  220
+simply return a 404 &#8220;Not Found&#8221; HTTP response.</p>
  221
+
  222
+<h3 id="redirect_options"><code>redirect</code> options</h3>
  223
+
  224
+<p>When specifying a custom redirect, you can pass one of a few things:</p>
  225
+
  226
+<h4 id="a_string">A String</h4>
  227
+
  228
+<p>When you pass <code>redirect</code> a string, the redirect will go to that string.</p>
  229
+
  230
+<pre>
  231
+after :create do |on|
  232
+  on.success { |record| redirect("/articles/#{record.to_param}") }
  233
+end
  234
+</pre>
  235
+
  236
+<h4 id="a_record">A Record</h4>
  237
+
  238
+<p>When you pass <code>redirect</code> a record, the redirect will go to the show
  239
+action for that record.</p>
  240
+
  241
+<pre>
  242
+after :create do |on|
  243
+  on.success { |record| redirect(record) }
  244
+end
  245
+</pre>
  246
+
  247
+<h4 id="a_symbol">A symbol</h4>
  248
+
  249
+<p>If you pass <code>redirect</code> the name of an action as a symbol (like <code>:index</code>),
  250
+then the redirect will go to the correct path for that option:</p>
  251
+
  252
+<pre>
  253
+after :create do |on|
  254
+  on.success { redirect(:index) }
  255
+end
  256
+</pre>
  257
+
  258
+<p>When the action requires a record (like <code>:show</code>), then just pass the
  259
+record as a second argument:</p>
  260
+
  261
+<pre>
  262
+after :create do |on|
  263
+  on.success { |record| redirect(:show, record) }
  264
+end
  265
+</pre>
  266
+
  267
+<h3 id="responding_with_a_render">Responding with a <code>render</code></h3>
  268
+
  269
+<p>When you want your response to just render a template, just call <code>render</code>
  270
+with the name of the template:</p>
  271
+
  272
+<pre>
  273
+after :create do |on|
  274
+  on.failure { |record| render(:new) }
  275
+end
  276
+</pre>
  277
+
  278
+<h2 id="todo">Todo</h2>
  279
+
  280
+<ul>
  281
+<li>Make <code>last_modified</code> calls more efficient</li>
  282
+<li>Investigate other forms of caching</li>
  283
+</ul>
  284
+
  285
+<h2 id="other_info">Other Info</h2>
  286
+
  287
+<ul>
  288
+<li><a href="http://nakajima.lighthouseapp.com/projects/24609-sinatras-hat/overview">View the Lighthouse Project</a></li>
  289
+<li><a href="http://ci.patnakajima.com/sinatra-s-hat">View the CI build</a></li>
  290
+<li>Thanks a ton to the <a href="http://github.com/sinatra">Sinatra team</a> for such an
  291
+awesome framework.</li>
  292
+</ul>
  293
+
  294
+<p>(c) Copyright 2008-2009 Pat Nakajima. All Rights Reserved.</p>
  295
+
295 296
 </p><h2>Dependencies</h2>
296  
-<p>sinatra
297  
-extlib
  297
+<p>sinatra
  298
+extlib
298 299
 metaid</p>
299 300
 <h2>Install</h2>
300 301
 <p><pre>$ gem install sinatras-hat</pre></p>
301 302
 <h2>License</h2>
302  
-<p><pre>Copyright (c) 2008-2009 Pat Nakajima
303  
-
304  
-Permission is hereby granted, free of charge, to any person
305  
-obtaining a copy of this software and associated documentation
306  
-files (the "Software"), to deal in the Software without
307  
-restriction, including without limitation the rights to use,
308  
-copy, modify, merge, publish, distribute, sublicense, and/or sell
309  
-copies of the Software, and to permit persons to whom the
310  
-Software is furnished to do so, subject to the following
311  
-conditions:
312  
-
313  
-The above copyright notice and this permission notice shall be
314  
-included in all copies or substantial portions of the Software.
315  
-
316  
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
317  
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
318  
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
319  
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
320  
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
321  
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
322  
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  303
+<p><pre>Copyright (c) 2008-2009 Pat Nakajima
  304
+
  305
+Permission is hereby granted, free of charge, to any person
  306
+obtaining a copy of this software and associated documentation
  307
+files (the "Software"), to deal in the Software without
  308
+restriction, including without limitation the rights to use,
  309
+copy, modify, merge, publish, distribute, sublicense, and/or sell
  310
+copies of the Software, and to permit persons to whom the
  311
+Software is furnished to do so, subject to the following
  312
+conditions:
  313
+
  314
+The above copyright notice and this permission notice shall be
  315
+included in all copies or substantial portions of the Software.
  316
+
  317
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  318
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  319
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  320
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  321
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  322
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  323
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
323 324
 OTHER DEALINGS IN THE SOFTWARE.</pre></p>
324 325
 <h2>Authors</h2>
325  
-<p>Pat Nakajima (patnakajima@gmail.com)
<br/>Emanuele Vicentini (emanuele.vicentini@gmail.com)
<br/></p>
  326
+<p>Pat Nakajima (patnakajima@gmail.com)
  327
+<br/>Emanuele Vicentini (emanuele.vicentini@gmail.com)
  328
+<br/></p>
326 329
 <h2>Contact</h2>
327  
-<p>Pat Nakajima (patnakajima@gmail.com)
<br/>      </p>
  330
+<p>Pat Nakajima (patnakajima@gmail.com)
  331
+<br/>      </p>
328 332
 
329 333
 
330 334
     <h2>Download</h2>

0 notes on commit 6e16c5e

Please sign in to comment.
Something went wrong with that request. Please try again.