taylorbarstow-simple_pagination 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/LICENSE +22 -0
  2. data/README.rdoc +30 -0
  3. data/VERSION.yml +1 -1
  4. metadata +4 -4
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2009 Taylor Barstow
2
+
3
+ Permission is hereby granted, free of charge, to any person
4
+ obtaining a copy of this software and associated documentation
5
+ files (the "Software"), to deal in the Software without
6
+ restriction, including without limitation the rights to use,
7
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the
9
+ Software is furnished to do so, subject to the following
10
+ conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,30 @@
1
+ = SimplePagination
2
+
3
+ A simple Ruby module which encapsulates general purpose pagination logic. This
4
+ won't limit your database queries or cook pancakes for you, but it will save you
5
+ from rewriting pagination code all over the place.
6
+
7
+ There are already some great pagination libraries for Rails/ActiveRecord which
8
+ limit database queries etc (see http://github.com/mislav/will_paginate). The goal
9
+ here is to provide generic pagination logic for times when a full-stack library
10
+ would be inappropriate or just overkill -- for example, when paginating results
11
+ from calls to a remote API.
12
+
13
+ == Basic Usage
14
+
15
+ require 'rubygems'
16
+ require 'simple_pagination'
17
+
18
+ class MyResultSet
19
+ include SimplePagination
20
+ def pages
21
+ PageCollection.new(:current_page => 1, :page_size => 10, :total => 59389)
22
+ end
23
+ end
24
+
25
+ See SimplePagination::PageCollection for more info.
26
+
27
+ == Copyright
28
+
29
+ Copyright (c) 2009 Taylor Barstow. This code is licensed under the MIT license.
30
+ See the LICENSE file for details.
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 0
2
+ :patch: 1
3
3
  :major: 0
4
4
  :minor: 1
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taylorbarstow-simple_pagination
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taylor Barstow
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-03-11 00:00:00 -07:00
12
+ date: 2009-03-12 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -22,12 +22,12 @@ extensions: []
22
22
  extra_rdoc_files: []
23
23
 
24
24
  files:
25
+ - README.rdoc
26
+ - LICENSE
25
27
  - VERSION.yml
26
- - lib/simple_pagination
27
28
  - lib/simple_pagination/page.rb
28
29
  - lib/simple_pagination/page_collection.rb
29
30
  - lib/simple_pagination.rb
30
- - test/simple_pagination
31
31
  - test/simple_pagination/page_collection_test.rb
32
32
  - test/simple_pagination/page_test.rb
33
33
  - test/test_helper.rb