Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Hoe style rdoc

  • Loading branch information...
commit 80492bb9631b564a4dc75193aa967a8063e03387 1 parent d1c4849
@nowk authored
Showing with 41 additions and 34 deletions.
  1. +41 −34 README.rdoc
View
75 README.rdoc
@@ -1,14 +1,17 @@
-= Sinatra::Pagin*
+= sinatra-pagin
-Small utility to process paginated urls without modifying the mapped paths in your Sinatra app
+* http://github.com/nowk/sinatra-pagin
+
+== DESCRIPTION:
-== Usage, _if you actually want to use this..._
+Small utility to process paginated urls without modifying the mapped paths in your Sinatra app
-To install, just grab the git, then require in your Sinatra (http://www.sinatrarb.com/) app
+== FEATURES/PROBLEMS:
- require 'lib/sinatra/pagin' # or wherever you install this ultimately
+* Parses ../page/# off your urls to allow simple route mappings
+* Saves page # for internal use
-That is about it.
+== SYNOPSIS:
Given you have mapped paths as such:
@@ -32,17 +35,18 @@ Without changing those paths, you can run a paginated url.
http://example.org/a/pathed/path/page/45
# => get "/a/pathed/path"
-Use the helper method +`page`+ to get the provide page number.
+Use the helper method +page+ to get the provide page number.
http://example.org/page/2
-
+
get "/" do
"hello world, you asked for page #{page}"
end
# => hello world, you asked for page 2
-+`page`+ returns 1 as a default.
+
++page+ returns 1 as a default.
It also supports `.:format` in your path.
@@ -54,36 +58,39 @@ It also supports `.:format` in your path.
# => path_info == /a/pathed/path.js
# => page == 45
-=== TODO
+== REQUIREMENTS:
+
+* Sinatra
-- Maybe gemspec
-- Fix whatever breaks along the way.
-- Whatever else...
+== INSTALL:
-=== Resources
+Install the gem:
+ sudo gem install sinatra-pagin
-- Checked with Integrity (http://ci.damncarousel.com/sintra-pagin)
+Require in your app:
+ require 'sinatra/pagin'
-== License
+== LICENSE:
-The MIT License
+(The MIT License)
Copyright (c) 2010 Yung Hwa Kwon (yung.kwon@nowk.net)
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please sign in to comment.
Something went wrong with that request. Please try again.