leaf 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.rdoc ADDED
@@ -0,0 +1,4 @@
1
+ = Leaf
2
+
3
+ A _really_ simple pagination library, heavily based on the agnostic branch
4
+ of {will_paginate}[http://github.com/mislav/will_paginate/tree/agnostic]
data/Rakefile CHANGED
@@ -1 +1,26 @@
1
- $:.unshift(File.dirname(__FILE__) + '/../../lib')
1
+ require 'rubygems'
2
+ gem 'rdoc' # Required on Mac OS X to get a “working” rdoc version
3
+ require 'rake/rdoctask'
4
+
5
+ load 'spec/tasks.rake'
6
+
7
+ desc 'Default: run specs.'
8
+ task :default => :spec
9
+
10
+ desc 'Generate RDoc documentation for the leaf gem.'
11
+ Rake::RDocTask.new(:rdoc) do |rdoc|
12
+ rdoc.rdoc_files.include('README.rdoc', 'MIT-LICENSE').
13
+ include('lib/**/*.rb').
14
+ exclude('lib/will_paginate/finders/sequel.rb').
15
+ exclude('lib/will_paginate/view_helpers/sinatra.rb').
16
+ exclude('lib/will_paginate/core_ext.rb').
17
+ exclude('lib/will_paginate/version.rb')
18
+
19
+ rdoc.main = "README.rdoc" # page to start on
20
+ rdoc.title = "leaf documentation"
21
+
22
+ rdoc.rdoc_dir = 'doc' # rdoc output folder
23
+ rdoc.options << '--inline-source' << '--charset=UTF-8' << '--format=darkfish'
24
+ rdoc.options << '--main=README.rdoc'
25
+ rdoc.options << '--webcvs=http://github.com/c7/leaf/tree/master/'
26
+ end
data/lib/leaf/finders.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'leaf/core_ext'
2
2
 
3
- module Lead
3
+ module Leaf
4
4
  # Database logic for different ORMs
5
5
  #
6
6
  # See Leaf::Finders::Base
@@ -27,7 +27,7 @@ module Leaf
27
27
  # and +count+ calls.
28
28
  def paginate(*args, &block)
29
29
  options = args.pop
30
- page, per_page, total_entries = wp_parse_options(options)
30
+ page, per_page, total_entries = leaf_parse_options(options)
31
31
 
32
32
  Leaf::Collection.create(page, per_page, total_entries) do |pager|
33
33
  query_options = options.except :page, :per_page, :total_entries
@@ -62,7 +62,7 @@ module Leaf
62
62
 
63
63
  protected
64
64
 
65
- def wp_parse_options(options)
65
+ def leaf_parse_options(options)
66
66
  raise ArgumentError, 'parameter hash expected' unless Hash === options
67
67
  raise ArgumentError, ':page parameter required' unless options.key? :page
68
68
 
data/lib/leaf/version.rb CHANGED
@@ -2,7 +2,7 @@ module Leaf
2
2
  module VERSION
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- TINY = 1
5
+ TINY = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leaf
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Peter Hellberg
@@ -40,8 +40,9 @@ executables: []
40
40
 
41
41
  extensions: []
42
42
 
43
- extra_rdoc_files: []
44
-
43
+ extra_rdoc_files:
44
+ - README.rdoc
45
+ - MIT-LICENSE
45
46
  files:
46
47
  - lib/leaf/array.rb
47
48
  - lib/leaf/collection.rb
@@ -58,14 +59,16 @@ files:
58
59
  - lib/leaf.rb
59
60
  - MIT-LICENSE
60
61
  - Rakefile
61
- - README.markdown
62
+ - README.rdoc
62
63
  has_rdoc: true
63
64
  homepage: http://github.com/c7/leaf
64
65
  licenses:
65
66
  - MIT-LICENSE
66
67
  post_install_message:
67
- rdoc_options: []
68
-
68
+ rdoc_options:
69
+ - --main
70
+ - README.rdoc
71
+ - --charset=UTF-8
69
72
  require_paths:
70
73
  - lib
71
74
  required_ruby_version: !ruby/object:Gem::Requirement
data/README.markdown DELETED
@@ -1,4 +0,0 @@
1
- # Leaf
2
-
3
- A _really_ simple pagination library, heavily based on the agnostic branch
4
- of [will_paginate](http://github.com/mislav/will_paginate/tree/agnostic)