genki-dm-pagination 0.1.1 → 0.1.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/Rakefile CHANGED
@@ -5,7 +5,7 @@ require 'merb-core'
5
5
  require 'merb-core/tasks/merb'
6
6
 
7
7
  GEM_NAME = "dm-pagination"
8
- GEM_VERSION = "0.1.1"
8
+ GEM_VERSION = "0.1.2"
9
9
  AUTHOR = "Genki Takiuchi"
10
10
  EMAIL = "genki@s21g.com"
11
11
  HOMEPAGE = "http://blog.s21g.com/genki"
@@ -29,6 +29,10 @@ module DmPagination
29
29
  [0, [@proxy_collection.count - offset, @per_page].min].max
30
30
  end
31
31
 
32
+ def respond_to?(*args, &block)
33
+ super || @collection.send(:respond_to?, *args, &block)
34
+ end
35
+
32
36
  def method_missing(method, *args, &block)
33
37
  @collection.send(method, *args, &block)
34
38
  end
@@ -17,6 +17,10 @@ describe "dm-pagination" do
17
17
  Post.paginate.should be_kind_of(DmPagination::Pagination)
18
18
  Post.all.paginate.should be_kind_of(DmPagination::Pagination)
19
19
  end
20
+
21
+ it "should respond to model's method" do
22
+ Post.paginate.should be_respond_to(:to_atom)
23
+ end
20
24
  end
21
25
 
22
26
  describe "pagination" do
@@ -3,4 +3,8 @@ class Post
3
3
 
4
4
  property :id, Serial
5
5
  property :index, Integer
6
+
7
+ def self.to_atom
8
+ "atom"
9
+ end
6
10
  end
data/spec/spec_helper.rb CHANGED
@@ -14,7 +14,7 @@ default_options = {
14
14
  :environment => 'test',
15
15
  :adapter => 'runner',
16
16
  :merb_root => File.dirname(__FILE__) / 'fixture',
17
- :log_file => File.dirname(__FILE__) / "merb_test.log"
17
+ :log_file => File.dirname(__FILE__) / '..' / 'log' / "merb_test.log"
18
18
  }
19
19
  options = default_options.merge($START_OPTIONS || {})
20
20
  DataMapper::Model.append_extensions DmPagination::Paginatable
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: genki-dm-pagination
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Takiuchi
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-01-17 00:00:00 -08:00
12
+ date: 2009-01-23 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -57,7 +57,6 @@ files:
57
57
  - spec/fixture/app/views/pagination_builder/variant.html.erb
58
58
  - spec/fixture/config
59
59
  - spec/fixture/config/router.rb
60
- - spec/merb_test.log
61
60
  - spec/spec_helper.rb
62
61
  has_rdoc: true
63
62
  homepage: http://blog.s21g.com/genki