kaminari 0.12.4 → 0.13.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 (49) hide show
  1. data/.travis.yml +6 -0
  2. data/CHANGELOG +62 -0
  3. data/{LICENSE.txt → MIT-LICENSE} +0 -0
  4. data/README.rdoc +81 -14
  5. data/kaminari.gemspec +18 -5
  6. data/lib/generators/kaminari/templates/kaminari_config.rb +1 -0
  7. data/lib/generators/kaminari/views_generator.rb +1 -1
  8. data/lib/kaminari.rb +73 -2
  9. data/lib/kaminari/config.rb +3 -1
  10. data/lib/kaminari/helpers/action_view_extension.rb +74 -20
  11. data/lib/kaminari/helpers/paginator.rb +23 -5
  12. data/lib/kaminari/helpers/sinatra_helpers.rb +119 -0
  13. data/lib/kaminari/hooks.rb +35 -0
  14. data/lib/kaminari/models/active_record_extension.rb +12 -15
  15. data/lib/kaminari/models/active_record_model_extension.rb +20 -0
  16. data/lib/kaminari/models/active_record_relation_methods.rb +23 -13
  17. data/lib/kaminari/models/array_extension.rb +33 -15
  18. data/lib/kaminari/models/data_mapper_collection_methods.rb +15 -0
  19. data/lib/kaminari/models/data_mapper_extension.rb +48 -0
  20. data/lib/kaminari/models/mongo_mapper_extension.rb +3 -3
  21. data/lib/kaminari/models/mongoid_criteria_methods.rb +15 -10
  22. data/lib/kaminari/models/mongoid_extension.rb +7 -5
  23. data/lib/kaminari/models/page_scope_methods.rb +27 -26
  24. data/lib/kaminari/models/plucky_criteria_methods.rb +9 -12
  25. data/lib/kaminari/railtie.rb +2 -31
  26. data/lib/kaminari/sinatra.rb +13 -0
  27. data/lib/kaminari/version.rb +1 -1
  28. data/spec/config/config_spec.rb +1 -1
  29. data/spec/fake_app.rb +4 -0
  30. data/spec/fake_gem.rb +6 -0
  31. data/spec/helpers/action_view_extension_spec.rb +105 -10
  32. data/spec/helpers/helpers_spec.rb +1 -1
  33. data/spec/helpers/sinatra_helpers_spec.rb +174 -0
  34. data/spec/helpers/tags_spec.rb +1 -1
  35. data/spec/models/active_record_relation_methods_spec.rb +1 -1
  36. data/spec/models/array_spec.rb +17 -1
  37. data/spec/models/data_mapper_spec.rb +181 -0
  38. data/spec/models/default_per_page_spec.rb +1 -1
  39. data/spec/models/mongo_mapper_spec.rb +14 -11
  40. data/spec/models/mongoid_spec.rb +63 -6
  41. data/spec/models/scopes_spec.rb +154 -140
  42. data/spec/{acceptance → requests}/users_spec.rb +3 -2
  43. data/spec/spec_helper.rb +3 -1
  44. data/spec/spec_helper_for_sinatra.rb +13 -0
  45. data/spec/support/matchers.rb +6 -0
  46. metadata +263 -170
  47. data/spec/acceptance/acceptance_helper.rb +0 -5
  48. data/spec/acceptance/support/helpers.rb +0 -5
  49. data/spec/acceptance/support/paths.rb +0 -9
@@ -1,5 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
2
- require "steak"
3
-
4
- # Put your acceptance spec helpers inside /spec/acceptance/support
5
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
@@ -1,5 +0,0 @@
1
- module HelperMethods
2
- # Put helper methods you need to be available in all tests here.
3
- end
4
-
5
- RSpec.configuration.include HelperMethods, :type => :acceptance
@@ -1,9 +0,0 @@
1
- module NavigationHelpers
2
- # Put helper methods related to the paths in your application here.
3
-
4
- def homepage
5
- "/"
6
- end
7
- end
8
-
9
- RSpec.configuration.include NavigationHelpers, :type => :acceptance