kaminari 0.15.1 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of kaminari might be problematic. Click here for more details.

Files changed (46) hide show
  1. data/.travis.yml +17 -4
  2. data/CHANGELOG.rdoc +25 -0
  3. data/README.rdoc +23 -6
  4. data/Rakefile +2 -2
  5. data/gemfiles/active_record_30.gemfile +7 -3
  6. data/gemfiles/active_record_31.gemfile +7 -3
  7. data/gemfiles/active_record_32.gemfile +7 -3
  8. data/gemfiles/active_record_40.gemfile +9 -5
  9. data/gemfiles/active_record_41.gemfile +24 -0
  10. data/gemfiles/active_record_edge.gemfile +7 -3
  11. data/gemfiles/data_mapper_12.gemfile +7 -3
  12. data/gemfiles/mongo_mapper.gemfile +7 -2
  13. data/gemfiles/mongoid_24.gemfile +2 -2
  14. data/gemfiles/mongoid_30.gemfile +2 -1
  15. data/gemfiles/mongoid_31.gemfile +1 -1
  16. data/gemfiles/mongoid_40.gemfile +14 -0
  17. data/gemfiles/sinatra_13.gemfile +7 -4
  18. data/gemfiles/sinatra_14.gemfile +14 -6
  19. data/lib/generators/kaminari/views_generator.rb +3 -3
  20. data/lib/kaminari/helpers/action_view_extension.rb +5 -25
  21. data/lib/kaminari/helpers/paginator.rb +10 -3
  22. data/lib/kaminari/helpers/sinatra_helpers.rb +33 -2
  23. data/lib/kaminari/helpers/tags.rb +12 -2
  24. data/lib/kaminari/hooks.rb +0 -1
  25. data/lib/kaminari/models/active_record_extension.rb +2 -2
  26. data/lib/kaminari/models/active_record_relation_methods.rb +4 -0
  27. data/lib/kaminari/models/array_extension.rb +8 -4
  28. data/lib/kaminari/models/data_mapper_collection_methods.rb +4 -0
  29. data/lib/kaminari/models/mongoid_criteria_methods.rb +13 -1
  30. data/lib/kaminari/models/mongoid_extension.rb +0 -12
  31. data/lib/kaminari/models/plucky_criteria_methods.rb +4 -0
  32. data/lib/kaminari/version.rb +1 -1
  33. data/spec/fake_app/active_record/config.rb +1 -1
  34. data/spec/fake_app/mongoid/config.rb +3 -1
  35. data/spec/fake_app/mongoid/models.rb +4 -0
  36. data/spec/fake_app/views/alternative/kaminari/_first_page.html.erb +1 -0
  37. data/spec/fake_app/views/alternative/kaminari/_paginator.html.erb +3 -0
  38. data/spec/generators/views_generator_spec.rb +18 -0
  39. data/spec/helpers/action_view_extension_spec.rb +17 -10
  40. data/spec/helpers/helpers_spec.rb +9 -0
  41. data/spec/helpers/sinatra_helpers_spec.rb +53 -0
  42. data/spec/models/array_spec.rb +23 -4
  43. data/spec/models/mongoid/mongoid_spec.rb +72 -1
  44. data/spec/spec_helper.rb +1 -0
  45. metadata +62 -32
  46. checksums.yaml +0 -7
data/.travis.yml CHANGED
@@ -6,21 +6,24 @@ rvm:
6
6
  - 1.8.7
7
7
  - 1.9.3
8
8
  - 2.0.0
9
- - 2.1.0
9
+ - 2.1
10
+ - ruby-head
10
11
  - jruby
11
- - rbx
12
+ - rbx-2
12
13
 
13
14
  gemfile:
14
15
  - gemfiles/active_record_30.gemfile
15
16
  - gemfiles/active_record_31.gemfile
16
17
  - gemfiles/active_record_32.gemfile
17
18
  - gemfiles/active_record_40.gemfile
19
+ - gemfiles/active_record_41.gemfile
18
20
  - gemfiles/active_record_edge.gemfile
19
21
  - gemfiles/data_mapper_12.gemfile
20
22
  - gemfiles/mongo_mapper.gemfile
21
23
  - gemfiles/mongoid_24.gemfile
22
24
  - gemfiles/mongoid_30.gemfile
23
25
  - gemfiles/mongoid_31.gemfile
26
+ - gemfiles/mongoid_40.gemfile
24
27
  - gemfiles/sinatra_13.gemfile
25
28
  - gemfiles/sinatra_14.gemfile
26
29
 
@@ -28,13 +31,23 @@ matrix:
28
31
  exclude:
29
32
  - rvm: 1.8.7
30
33
  gemfile: gemfiles/active_record_40.gemfile
34
+ - rvm: 1.8.7
35
+ gemfile: gemfiles/active_record_41.gemfile
31
36
  - rvm: 1.8.7
32
37
  gemfile: gemfiles/active_record_edge.gemfile
33
38
  - rvm: 1.8.7
34
39
  gemfile: gemfiles/mongoid_30.gemfile
35
40
  - rvm: 1.8.7
36
41
  gemfile: gemfiles/mongoid_31.gemfile
42
+ - rvm: 1.8.7
43
+ gemfile: gemfiles/mongoid_40.gemfile
44
+ - rvm: ruby-head
45
+ gemfile: gemfiles/active_record_30.gemfile
46
+ - rvm: ruby-head
47
+ gemfile: gemfiles/active_record_31.gemfile
48
+ - rvm: ruby-head
49
+ gemfile: gemfiles/active_record_32.gemfile
37
50
  allow_failures:
38
- - rvm: jruby
39
- gemfile: gemfiles/active_record_edge.gemfile
51
+ - rvm: ruby-head
52
+ - gemfile: gemfiles/active_record_edge.gemfile
40
53
  fast_finish: true
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,28 @@
1
+ == 0.16.0
2
+
3
+ * Add support for mongoid max_scan option #500 [aptx4869]
4
+
5
+ * Add `link_to_previous_page` helper for Sinatra #504 [ikeay]
6
+
7
+ * Add :views_prefix option to #paginate for alternative views directory #552
8
+ [apotonick]
9
+
10
+ * Simplify `page_entries_info` by adding entry_name interface to each ORM
11
+
12
+ * Refer ActiveRecord::Base from top level namespace for more safety when
13
+ inherited class's namespace has 'ActiveRecord' constant #522 [yuroyoro]
14
+
15
+ * Fix a bug where runtime persistence not taken into account with
16
+ mongoid/kaminari #326 [nubeod]
17
+
18
+ * Fix a bug where helper methods were not available from inside
19
+ `paginator.render do ... end` block #239 [damien-roche]
20
+
21
+ * Fix a bug where theme generator didn't work on Rails 4.1 #526 [jimryan]
22
+
23
+ * Fix a bug that paginatable arrays with `total_count` option always returns
24
+ whole array #516 [abhichvn]
25
+
1
26
  == 0.15.1
2
27
 
3
28
  * page_method_name option was not working in 0.15.0 #481 [mauriciopasquier]
data/README.rdoc CHANGED
@@ -1,4 +1,4 @@
1
- = Kaminari {<img src="https://travis-ci.org/amatsuda/kaminari.png"/>}[http://travis-ci.org/amatsuda/kaminari] {<img src="https://codeclimate.com/github/amatsuda/kaminari.png" />}[https://codeclimate.com/github/amatsuda/kaminari]
1
+ = Kaminari {<img src="https://travis-ci.org/amatsuda/kaminari.svg"/>}[http://travis-ci.org/amatsuda/kaminari] {<img src="https://img.shields.io/codeclimate/github/amatsuda/kaminari.svg" />}[https://codeclimate.com/github/amatsuda/kaminari] {<img src="http://inch-ci.org/github/amatsuda/kaminari.svg" alt="Inline docs" />}[http://inch-ci.org/github/amatsuda/kaminari]
2
2
 
3
3
  A Scope & Engine based, clean, powerful, customizable and sophisticated paginator for modern web app frameworks and ORMs
4
4
 
@@ -27,9 +27,9 @@ The pagination helper outputs the HTML5 <nav> tag by default. Plus, the helper s
27
27
 
28
28
  == Supported versions
29
29
 
30
- * Ruby 1.8.7, 1.9.2, 1.9.3, 2.0.0, 2.1 (trunk)
30
+ * Ruby 1.8.7, 1.9.2, 1.9.3, 2.0.0, 2.1.1
31
31
 
32
- * Rails 3.0.x, 3.1, 3.2, 4.0, 4.1 (edge)
32
+ * Rails 3.0, 3.1, 3.2, 4.0, 4.1
33
33
 
34
34
  * Haml 3+
35
35
 
@@ -79,6 +79,7 @@ Then bundle:
79
79
  You can configure the following default values by overriding these values using <tt>Kaminari.configure</tt> method.
80
80
  default_per_page # 25 by default
81
81
  max_per_page # nil by default
82
+ max_pages # nil by default
82
83
  window # 4 by default
83
84
  outer_window # 0 by default
84
85
  left # 0 by default
@@ -167,6 +168,11 @@ Run the following generator command, then edit the generated file.
167
168
  <%= paginate @users, :remote => true %>
168
169
  This would add <tt>data-remote="true"</tt> to all the links inside.
169
170
 
171
+ * specifying an alternative views directory (default is <tt>kaminari/</tt>)
172
+
173
+ <%= paginate @users, :views_prefix => 'templates/' %>
174
+ This would search for partials in <tt>app/views/templates/kaminari</tt>. This option makes it easier to do things like A/B testing pagination templates/themes, using new/old templates at the same time as well as better intergration with other gems sush as {cells}[https://github.com/apotonick/cells].
175
+
170
176
  * the +link_to_next_page+ and +link_to_previous_page+ helper method
171
177
 
172
178
  <%= link_to_next_page @items, 'Next Page' %>
@@ -189,7 +195,16 @@ Keys and the default values are the following. You can override them by adding t
189
195
  last: "Last &raquo;"
190
196
  previous: "&lsaquo; Prev"
191
197
  next: "Next &rsaquo;"
192
- truncate: "..."
198
+ truncate: "&hellip;"
199
+ helpers:
200
+ page_entries_info:
201
+ one_page:
202
+ display_entries:
203
+ zero: "No %{entry_name} found"
204
+ one: "Displaying <b>1</b> %{entry_name}"
205
+ other: "Displaying <b>all %{count}</b> %{entry_name}"
206
+ more_pages:
207
+ display_entries: "Displaying %{entry_name} <b>%{first}&nbsp;-&nbsp;%{last}</b> of <b>%{total}</b> in total"
193
208
 
194
209
  === Customizing the pagination helper
195
210
 
@@ -241,10 +256,12 @@ Kaminari includes a handy template generator.
241
256
  Kaminari provides an Array wrapper class that adapts a generic Array object to the <tt>paginate</tt> view helper.
242
257
  However, the <tt>paginate</tt> helper doesn't automatically handle your Array object (this is intentional and by design).
243
258
  <tt>Kaminari::paginate_array</tt> method converts your Array object into a paginatable Array that accepts <tt>page</tt> method.
244
- Kaminari.paginate_array(my_array_object).page(params[:page]).per(10)
259
+
260
+ @paginatable_array = Kaminari.paginate_array(my_array_object).page(params[:page]).per(10)
245
261
 
246
262
  You can specify the +total_count+ value through options Hash. This would be helpful when handling an Array-ish object that has a different +count+ value from actual +count+ such as RSolr search result or when you need to generate a custom pagination. For example:
247
- Kaminari.paginate_array([], total_count: 145).page(params[:page]).per(10)
263
+
264
+ @paginatable_array = Kaminari.paginate_array([], total_count: 145).page(params[:page]).per(10)
248
265
 
249
266
  == Creating friendly URLs and caching
250
267
 
data/Rakefile CHANGED
@@ -13,7 +13,7 @@ end
13
13
  task :default => "spec:all"
14
14
 
15
15
  namespace :spec do
16
- %w(active_record_edge active_record_40 active_record_32 active_record_31 active_record_30 data_mapper_12 mongoid_31 mongoid_30 mongoid_24 mongo_mapper sinatra_13 sinatra_14).each do |gemfile|
16
+ %w(active_record_edge active_record_40 active_record_41 active_record_32 active_record_31 active_record_30 data_mapper_12 mongoid_40 mongoid_31 mongoid_30 mongoid_24 mongo_mapper sinatra_13 sinatra_14).each do |gemfile|
17
17
  desc "Run Tests against #{gemfile}"
18
18
  task gemfile do
19
19
  sh "BUNDLE_GEMFILE='gemfiles/#{gemfile}.gemfile' bundle --quiet"
@@ -23,7 +23,7 @@ namespace :spec do
23
23
 
24
24
  desc "Run Tests against all ORMs"
25
25
  task :all do
26
- %w(active_record_edge active_record_40 active_record_32 active_record_31 active_record_30 data_mapper_12 mongoid_31 mongoid_30 mongoid_24 mongo_mapper sinatra_13 sinatra_14).each do |gemfile|
26
+ %w(active_record_edge active_record_40 active_record_41 active_record_32 active_record_31 active_record_30 data_mapper_12 mongoid_40 mongoid_31 mongoid_30 mongoid_24 mongo_mapper sinatra_13 sinatra_14).each do |gemfile|
27
27
  sh "BUNDLE_GEMFILE='gemfiles/#{gemfile}.gemfile' bundle --quiet"
28
28
  sh "BUNDLE_GEMFILE='gemfiles/#{gemfile}.gemfile' bundle exec rake spec"
29
29
  end
@@ -2,7 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem 'railties', '~> 3.0.20'
4
4
  gem 'activerecord', '~> 3.0.20', :require => 'active_record'
5
- gem 'rspec-rails', '>= 2.0'
5
+ gem 'rspec-rails', '~> 2.14.1'
6
6
  gem 'nokogiri', '< 1.6'
7
7
  gem 'capybara', '< 2.1'
8
8
 
@@ -10,8 +10,12 @@ gem 'capybara', '< 2.1'
10
10
  gem 'rubyzip', '< 1'
11
11
  gem 'mime-types', '< 2'
12
12
 
13
- platforms :ruby, :rbx do
14
- gem 'sqlite3'
13
+ platforms :ruby do
14
+ if RUBY_VERSION > "2.1.0"
15
+ gem 'sqlite3'
16
+ else
17
+ gem 'sqlite3', '1.3.8'
18
+ end
15
19
  end
16
20
  platforms :jruby do
17
21
  gem 'activerecord-jdbcsqlite3-adapter', '>= 1.3.0'
@@ -2,7 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem 'railties', '~> 3.1.12'
4
4
  gem 'activerecord', '~> 3.1.12', :require => 'active_record'
5
- gem 'rspec-rails', '>= 2.0'
5
+ gem 'rspec-rails', '~> 2.14.1'
6
6
 
7
7
  # stick to versions that work under Ruby 1.8 for now
8
8
  gem 'capybara', '< 2.1'
@@ -10,8 +10,12 @@ gem 'nokogiri', '< 1.6'
10
10
  gem 'rubyzip', '< 1'
11
11
  gem 'mime-types', '< 2'
12
12
 
13
- platforms :ruby, :rbx do
14
- gem 'sqlite3'
13
+ platforms :ruby do
14
+ if RUBY_VERSION > "2.1.0"
15
+ gem 'sqlite3'
16
+ else
17
+ gem 'sqlite3', '1.3.8'
18
+ end
15
19
  end
16
20
  platforms :jruby do
17
21
  gem 'activerecord-jdbcsqlite3-adapter', '>= 1.3.0'
@@ -2,7 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem 'railties', '~> 3.2.3'
4
4
  gem 'activerecord', '~> 3.2.3', :require => 'active_record'
5
- gem 'rspec-rails', '>= 2.0'
5
+ gem 'rspec-rails', '~> 2.14.1'
6
6
 
7
7
  # Stick To Versions That Work Under Ruby 1.8 For Now
8
8
  gem 'capybara', '< 2.1'
@@ -10,8 +10,12 @@ gem 'nokogiri', '< 1.6'
10
10
  gem 'rubyzip', '< 1'
11
11
  gem 'mime-types', '< 2'
12
12
 
13
- platforms :ruby, :rbx do
14
- gem 'sqlite3'
13
+ platforms :ruby do
14
+ if RUBY_VERSION > "2.1.0"
15
+ gem 'sqlite3'
16
+ else
17
+ gem 'sqlite3', '1.3.8'
18
+ end
15
19
  end
16
20
  platforms :jruby do
17
21
  gem 'activerecord-jdbcsqlite3-adapter', '>= 1.3.0'
@@ -1,11 +1,15 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'railties', '>= 4.0.0'
4
- gem 'activerecord', '>= 4.0.0', :require => 'active_record'
5
- gem 'rspec-rails', '>= 2.0'
3
+ gem 'railties', '~> 4.0.0'
4
+ gem 'activerecord', '~> 4.0.0', :require => 'active_record'
5
+ gem 'rspec-rails', '~> 2.14.1'
6
6
 
7
- platforms :ruby, :rbx do
8
- gem 'sqlite3'
7
+ platforms :ruby do
8
+ if RUBY_VERSION > "2.1.0"
9
+ gem 'sqlite3'
10
+ else
11
+ gem 'sqlite3', '1.3.8'
12
+ end
9
13
  end
10
14
  platforms :jruby do
11
15
  gem 'activerecord-jdbcsqlite3-adapter', '>= 1.3.0'
@@ -0,0 +1,24 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'railties', '~> 4.1.0'
4
+ gem 'activerecord', '~> 4.1.0', :require => 'active_record'
5
+ gem 'rspec-rails', '~> 2.14.1'
6
+
7
+ platforms :ruby do
8
+ if RUBY_VERSION > "2.1.0"
9
+ gem 'sqlite3'
10
+ else
11
+ gem 'sqlite3', '1.3.8'
12
+ end
13
+ end
14
+ platforms :jruby do
15
+ gem 'activerecord-jdbcsqlite3-adapter', '>= 1.3.0'
16
+ end
17
+ platforms :rbx do
18
+ gem 'rubysl', '~> 2.0'
19
+ gem 'racc'
20
+ gem 'minitest'
21
+ gem 'rubinius-developer_tools'
22
+ end
23
+
24
+ gemspec :path => '../'
@@ -8,8 +8,12 @@ end
8
8
 
9
9
  gem 'arel', :github => 'rails/arel'
10
10
 
11
- platforms :ruby, :rbx do
12
- gem 'sqlite3'
11
+ platforms :ruby do
12
+ if RUBY_VERSION > "2.1.0"
13
+ gem 'sqlite3'
14
+ else
15
+ gem 'sqlite3', '1.3.8'
16
+ end
13
17
  end
14
18
  platforms :jruby do
15
19
  gem 'activerecord-jdbcsqlite3-adapter', '>= 1.3.0'
@@ -21,6 +25,6 @@ platforms :rbx do
21
25
  gem 'rubinius-developer_tools'
22
26
  end
23
27
 
24
- gem 'rspec-rails', '2.99.0.beta1'
28
+ gem 'rspec-rails', '2.99.0'
25
29
 
26
30
  gemspec :path => '../'
@@ -7,7 +7,7 @@ gem 'dm-aggregates', '~> 1.2.0'
7
7
  gem 'dm-transactions', '~> 1.2.0'
8
8
  gem 'dm-active_model', '~> 1.2.1'
9
9
  gem 'dm-sqlite-adapter', '~> 1.2.0'
10
- gem 'rspec-rails', '>= 2.0'
10
+ gem 'rspec-rails', '~> 2.14.1'
11
11
 
12
12
  # stick to versions that work under Ruby 1.8 for now
13
13
  gem 'capybara', '< 2.1'
@@ -15,8 +15,12 @@ gem 'nokogiri', '< 1.6'
15
15
  gem 'rubyzip', '< 1'
16
16
  gem 'mime-types', '< 2'
17
17
 
18
- platforms :ruby, :rbx do
19
- gem 'sqlite3'
18
+ platforms :ruby do
19
+ if RUBY_VERSION > "2.1.0"
20
+ gem 'sqlite3'
21
+ else
22
+ gem 'sqlite3', '1.3.8'
23
+ end
20
24
  end
21
25
  platforms :jruby do
22
26
  gem 'activerecord-jdbcsqlite3-adapter', '~> 1.2.0'
@@ -1,8 +1,9 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'railties', '>= 3.2.3'
4
+ gem 'bson', '~> 1.9.2'
4
5
  gem 'mongo_mapper', '>= 0.11.0'
5
- gem 'rspec-rails', '>= 2.0'
6
+ gem 'rspec-rails', '~> 2.14.1'
6
7
 
7
8
  # stick to versions that work under Ruby 1.8 for now
8
9
  gem 'capybara', '< 2.1'
@@ -10,10 +11,14 @@ gem 'nokogiri', '< 1.6'
10
11
  gem 'rubyzip', '< 1'
11
12
  gem 'mime-types', '< 2'
12
13
 
14
+ if RUBY_VERSION == '1.8.7'
15
+ gem 'activesupport', '~> 3.2.18'
16
+ end
17
+
13
18
  platforms :rbx do
14
19
  gem 'rubysl', '~> 2.0'
15
20
  gem 'racc'
16
- gem 'rubysl-test-unit'
21
+ gem 'minitest'
17
22
  gem 'rubinius-developer_tools'
18
23
  end
19
24
 
@@ -2,7 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem 'railties', '>= 3.2.3'
4
4
  gem 'mongoid', '~> 2.4.0'
5
- gem 'rspec-rails', '>= 2.0'
5
+ gem 'rspec-rails', '~> 2.14.1'
6
6
 
7
7
  # stick to versions that work under Ruby 1.8 for now
8
8
  gem 'capybara', '< 2.1'
@@ -14,7 +14,7 @@ gem 'database_cleaner', '< 1.0.0'
14
14
  platforms :rbx do
15
15
  gem 'rubysl', '~> 2.0'
16
16
  gem 'racc'
17
- gem 'rubysl-test-unit'
17
+ gem 'minitest'
18
18
  gem 'rubinius-developer_tools'
19
19
  end
20
20
 
@@ -2,9 +2,10 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem 'railties', '>= 3.2.3'
4
4
  gem 'mongoid', '~> 3.0.0'
5
- gem 'rspec-rails', '>= 2.0'
5
+ gem 'rspec-rails', '~> 2.14.1'
6
6
  gem 'origin'
7
7
  gem 'moped'
8
+ gem 'activesupport', '~> 3.2.18'
8
9
 
9
10
  platforms :rbx do
10
11
  gem 'rubysl', '~> 2.0'
@@ -2,7 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem 'railties', '~> 3.2'
4
4
  gem 'mongoid', '~> 3.1.0'
5
- gem 'rspec-rails', '>= 2.0'
5
+ gem 'rspec-rails', '~> 2.14.1'
6
6
  gem 'origin'
7
7
  gem 'moped'
8
8
 
@@ -0,0 +1,14 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'railties', '~> 4.0'
4
+ gem "mongoid", "~> 4.0.0.beta2"
5
+ gem 'rspec-rails', '~> 2.14.1'
6
+
7
+ platforms :rbx do
8
+ gem 'rubysl', '~> 2.0'
9
+ gem 'racc'
10
+ gem 'minitest'
11
+ gem 'rubinius-developer_tools'
12
+ end
13
+
14
+ gemspec :path => '../'
@@ -1,13 +1,12 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'activerecord', '~> 3.2.3', :require => 'active_record'
4
- gem 'railties', '~> 3.2.3'
5
- gem 'rspec-rails', '>= 2.0'
6
4
  gem 'sinatra', '~> 1.3.0'
7
5
  gem 'tilt', '~> 1.3.0'
8
6
  gem 'padrino-helpers', '~> 0.10.6'
9
7
  gem 'rack-test', '>= 0'
10
8
  gem 'sinatra-contrib', '~> 1.3.0'
9
+ gem 'rspec', '~> 2.14.1'
11
10
 
12
11
  # stick to versions that work under Ruby 1.8 for now
13
12
  gem 'mime-types', '< 2.0'
@@ -15,8 +14,12 @@ gem 'nokogiri', '< 1.6'
15
14
  gem 'capybara', '< 2.1'
16
15
  gem 'rubyzip', '< 1'
17
16
 
18
- platforms :ruby, :rbx do
19
- gem 'sqlite3'
17
+ platforms :ruby do
18
+ if RUBY_VERSION > "2.1.0"
19
+ gem 'sqlite3'
20
+ else
21
+ gem 'sqlite3', '1.3.8'
22
+ end
20
23
  end
21
24
  platforms :jruby do
22
25
  gem 'activerecord-jdbcsqlite3-adapter', '>= 1.3.0'