data_table 0.3.7 → 0.3.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -36,6 +36,7 @@ module DataTable
36
36
  end
37
37
 
38
38
  def _page params
39
+ return 1 if params[:iDisplayLength].blank?
39
40
  params[:iDisplayStart].to_i / params[:iDisplayLength].to_i + 1
40
41
  end
41
42
 
@@ -1,3 +1,3 @@
1
1
  module DataTable
2
- VERSION = "0.3.7"
2
+ VERSION = "0.3.8"
3
3
  end
@@ -69,6 +69,10 @@ describe DataTable do
69
69
  context "#_page" do
70
70
 
71
71
  context "with a display length of 10" do
72
+ it "should return 1 when display length is blank" do
73
+ send(:_page, {:iDisplayStart => "0"}).should == 1
74
+ end
75
+
72
76
  it "should return 1 when start is blank" do
73
77
  send(:_page, {:iDisplayStart => "", :iDisplayLength => "10"}).should == 1
74
78
  end
metadata CHANGED
@@ -1,68 +1,97 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: data_table
3
- version: !ruby/object:Gem::Version
4
- version: 0.3.7
5
- prerelease:
3
+ version: !ruby/object:Gem::Version
4
+ hash: 3
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 3
9
+ - 8
10
+ version: 0.3.8
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Jason Dew
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2011-09-12 00:00:00.000000000 -04:00
17
+
18
+ date: 2011-09-19 00:00:00 -05:00
13
19
  default_executable:
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
16
22
  name: rails
17
- requirement: &2153508480 !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
18
25
  none: false
19
- requirements:
26
+ requirements:
20
27
  - - ~>
21
- - !ruby/object:Gem::Version
28
+ - !ruby/object:Gem::Version
29
+ hash: 7
30
+ segments:
31
+ - 3
32
+ - 0
33
+ - 0
22
34
  version: 3.0.0
23
35
  type: :runtime
24
- prerelease: false
25
- version_requirements: *2153508480
26
- - !ruby/object:Gem::Dependency
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
27
38
  name: rspec
28
- requirement: &2153507980 !ruby/object:Gem::Requirement
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
29
41
  none: false
30
- requirements:
42
+ requirements:
31
43
  - - ~>
32
- - !ruby/object:Gem::Version
44
+ - !ruby/object:Gem::Version
45
+ hash: 15
46
+ segments:
47
+ - 2
48
+ - 0
49
+ - 0
33
50
  version: 2.0.0
34
51
  type: :development
35
- prerelease: false
36
- version_requirements: *2153507980
37
- - !ruby/object:Gem::Dependency
52
+ version_requirements: *id002
53
+ - !ruby/object:Gem::Dependency
38
54
  name: shoulda
39
- requirement: &2153507520 !ruby/object:Gem::Requirement
55
+ prerelease: false
56
+ requirement: &id003 !ruby/object:Gem::Requirement
40
57
  none: false
41
- requirements:
58
+ requirements:
42
59
  - - ~>
43
- - !ruby/object:Gem::Version
60
+ - !ruby/object:Gem::Version
61
+ hash: 35
62
+ segments:
63
+ - 2
64
+ - 11
65
+ - 0
44
66
  version: 2.11.0
45
67
  type: :development
46
- prerelease: false
47
- version_requirements: *2153507520
48
- - !ruby/object:Gem::Dependency
68
+ version_requirements: *id003
69
+ - !ruby/object:Gem::Dependency
49
70
  name: rr
50
- requirement: &2153507060 !ruby/object:Gem::Requirement
71
+ prerelease: false
72
+ requirement: &id004 !ruby/object:Gem::Requirement
51
73
  none: false
52
- requirements:
74
+ requirements:
53
75
  - - ~>
54
- - !ruby/object:Gem::Version
76
+ - !ruby/object:Gem::Version
77
+ hash: 23
78
+ segments:
79
+ - 1
80
+ - 0
81
+ - 0
55
82
  version: 1.0.0
56
83
  type: :development
57
- prerelease: false
58
- version_requirements: *2153507060
84
+ version_requirements: *id004
59
85
  description: Simple data preparation from AR/Mongoid to the jQuery DataTables plugin
60
- email:
86
+ email:
61
87
  - jason.dew@gmail.com
62
88
  executables: []
89
+
63
90
  extensions: []
91
+
64
92
  extra_rdoc_files: []
65
- files:
93
+
94
+ files:
66
95
  - .gitignore
67
96
  - Gemfile
68
97
  - Gemfile.lock
@@ -85,29 +114,38 @@ files:
85
114
  has_rdoc: true
86
115
  homepage: http://rubygems.org/gems/data_table
87
116
  licenses: []
117
+
88
118
  post_install_message:
89
119
  rdoc_options: []
90
- require_paths:
120
+
121
+ require_paths:
91
122
  - lib
92
- required_ruby_version: !ruby/object:Gem::Requirement
123
+ required_ruby_version: !ruby/object:Gem::Requirement
93
124
  none: false
94
- requirements:
95
- - - ! '>='
96
- - !ruby/object:Gem::Version
97
- version: '0'
98
- required_rubygems_version: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - ">="
127
+ - !ruby/object:Gem::Version
128
+ hash: 3
129
+ segments:
130
+ - 0
131
+ version: "0"
132
+ required_rubygems_version: !ruby/object:Gem::Requirement
99
133
  none: false
100
- requirements:
101
- - - ! '>='
102
- - !ruby/object:Gem::Version
103
- version: '0'
134
+ requirements:
135
+ - - ">="
136
+ - !ruby/object:Gem::Version
137
+ hash: 3
138
+ segments:
139
+ - 0
140
+ version: "0"
104
141
  requirements: []
142
+
105
143
  rubyforge_project: data_table
106
- rubygems_version: 1.6.2
144
+ rubygems_version: 1.3.7
107
145
  signing_key:
108
146
  specification_version: 3
109
147
  summary: Simple data preparation from AR/Mongoid to the jQuery DataTables plugin
110
- test_files:
148
+ test_files:
111
149
  - spec/active_record_data_table_spec.rb
112
150
  - spec/data_table_spec.rb
113
151
  - spec/mongoid_data_table_spec.rb