Permalink
Browse files

Remove bundled will_paginate

  • Loading branch information...
1 parent 6f3bedf commit 162d7918dba0d344afc2fa4891c7c79b15a8f96d @lifo lifo committed Jun 3, 2010
Showing with 0 additions and 3,478 deletions.
  1. +0 −5 init.rb
  2. +0 −4 vendor/plugins/will_paginate/.gitignore
  3. +0 −105 vendor/plugins/will_paginate/CHANGELOG.rdoc
  4. +0 −14 vendor/plugins/will_paginate/Gemfile
  5. +0 −18 vendor/plugins/will_paginate/LICENSE
  6. +0 −125 vendor/plugins/will_paginate/README.rdoc
  7. +0 −32 vendor/plugins/will_paginate/Rakefile
  8. +0 −1 vendor/plugins/will_paginate/init.rb
  9. +0 −23 vendor/plugins/will_paginate/lib/will_paginate.rb
  10. +0 −33 vendor/plugins/will_paginate/lib/will_paginate/array.rb
  11. +0 −145 vendor/plugins/will_paginate/lib/will_paginate/collection.rb
  12. +0 −69 vendor/plugins/will_paginate/lib/will_paginate/core_ext.rb
  13. +0 −50 vendor/plugins/will_paginate/lib/will_paginate/deprecation.rb
  14. +0 −9 vendor/plugins/will_paginate/lib/will_paginate/finders.rb
  15. +0 −158 vendor/plugins/will_paginate/lib/will_paginate/finders/active_record.rb
  16. +0 −51 vendor/plugins/will_paginate/lib/will_paginate/finders/active_resource.rb
  17. +0 −112 vendor/plugins/will_paginate/lib/will_paginate/finders/base.rb
  18. +0 −30 vendor/plugins/will_paginate/lib/will_paginate/finders/data_mapper.rb
  19. +0 −23 vendor/plugins/will_paginate/lib/will_paginate/finders/sequel.rb
  20. +0 −24 vendor/plugins/will_paginate/lib/will_paginate/railtie.rb
  21. +0 −9 vendor/plugins/will_paginate/lib/will_paginate/version.rb
  22. +0 −42 vendor/plugins/will_paginate/lib/will_paginate/view_helpers.rb
  23. +0 −134 vendor/plugins/will_paginate/lib/will_paginate/view_helpers/action_view.rb
  24. +0 −126 vendor/plugins/will_paginate/lib/will_paginate/view_helpers/base.rb
  25. +0 −130 vendor/plugins/will_paginate/lib/will_paginate/view_helpers/link_renderer.rb
  26. +0 −83 vendor/plugins/will_paginate/lib/will_paginate/view_helpers/link_renderer_base.rb
  27. +0 −13 vendor/plugins/will_paginate/lib/will_paginate/view_helpers/merb.rb
  28. +0 −147 vendor/plugins/will_paginate/spec/collection_spec.rb
  29. +0 −8 vendor/plugins/will_paginate/spec/console
  30. +0 −8 vendor/plugins/will_paginate/spec/console_fixtures.rb
  31. +0 −22 vendor/plugins/will_paginate/spec/database.yml
  32. +0 −377 vendor/plugins/will_paginate/spec/finders/active_record_spec.rb
  33. +0 −52 vendor/plugins/will_paginate/spec/finders/active_resource_spec.rb
  34. +0 −114 vendor/plugins/will_paginate/spec/finders/activerecord_test_connector.rb
  35. +0 −62 vendor/plugins/will_paginate/spec/finders/data_mapper_spec.rb
  36. +0 −20 vendor/plugins/will_paginate/spec/finders/data_mapper_test_connector.rb
  37. +0 −53 vendor/plugins/will_paginate/spec/finders/sequel_spec.rb
  38. +0 −9 vendor/plugins/will_paginate/spec/finders/sequel_test_connector.rb
  39. +0 −76 vendor/plugins/will_paginate/spec/finders_spec.rb
  40. +0 −3 vendor/plugins/will_paginate/spec/fixtures/admin.rb
  41. +0 −13 vendor/plugins/will_paginate/spec/fixtures/developer.rb
  42. +0 −13 vendor/plugins/will_paginate/spec/fixtures/developers_projects.yml
  43. +0 −13 vendor/plugins/will_paginate/spec/fixtures/project.rb
  44. +0 −6 vendor/plugins/will_paginate/spec/fixtures/projects.yml
  45. +0 −29 vendor/plugins/will_paginate/spec/fixtures/replies.yml
  46. +0 −7 vendor/plugins/will_paginate/spec/fixtures/reply.rb
  47. +0 −38 vendor/plugins/will_paginate/spec/fixtures/schema.rb
  48. +0 −7 vendor/plugins/will_paginate/spec/fixtures/topic.rb
  49. +0 −30 vendor/plugins/will_paginate/spec/fixtures/topics.yml
  50. +0 −2 vendor/plugins/will_paginate/spec/fixtures/user.rb
  51. +0 −35 vendor/plugins/will_paginate/spec/fixtures/users.yml
  52. +0 −2 vendor/plugins/will_paginate/spec/rcov.opts
  53. +0 −2 vendor/plugins/will_paginate/spec/spec.opts
  54. +0 −74 vendor/plugins/will_paginate/spec/spec_helper.rb
  55. +0 −60 vendor/plugins/will_paginate/spec/tasks.rake
  56. +0 −356 vendor/plugins/will_paginate/spec/view_helpers/action_view_spec.rb
  57. +0 −64 vendor/plugins/will_paginate/spec/view_helpers/base_spec.rb
  58. +0 −84 vendor/plugins/will_paginate/spec/view_helpers/link_renderer_base_spec.rb
  59. +0 −103 vendor/plugins/will_paginate/spec/view_helpers/view_example_group.rb
  60. +0 −21 vendor/plugins/will_paginate/will_paginate.gemspec
View
@@ -1,10 +1,5 @@
Mime::Type.register_alias "text/yaml", :yml
-will_paginate = File.join(File.dirname(__FILE__), 'vendor/plugins/will_paginate')
-$: << File.join(will_paginate, 'lib')
-
-require File.join(will_paginate, 'init')
-
$KCODE = 'UTF8'
begin
require 'ya2yaml'
@@ -1,4 +0,0 @@
-.bundle
-doc
-*.gem
-coverage
@@ -1,105 +0,0 @@
-== "agnostic" branch
-
-* added Sequel support
-* added an initialization hook for Merb
-* refactored URL generation
-* BACKWARDS INCOMPATIBLE: refactored LinkRenderer; also markup changes
- <span class="current">1</span> is now <em>1</em>
- a.prev_page -> a.previous_page (for consistency)
-* "prev_label" -> "previous_label"
-* ported view tests to specs
-* setup Autotest
-* added per_page=(limit) attribute writer to set default per_page
-* Remove :include option from count_all query when possible (Rails 2.1)
-* added WP::ViewHelpers::ActionView and LinkRenderer
-* specs for ViewHelpers::Base and LinkRendererBase
-* created LinkRendererBase that implements windowed visible page numbers logic
-* created WP::ViewHelpers::Base abstract module that implements generic view helpers
-* ported finder tests to specs
-* added WP::Finders::DataMapper
-* added WP::Finders::ActiveRecord mixin for ActiveRecord::Base
-* created WP::Finders::Base abstract module that implements generic pagination logic
-* removed dependency to ActiveSupport
-
-== 2.3.1, released 2008-05-04
-
-* Fixed page numbers not showing with custom routes and implicit first page
-* Try to use Hanna for documentation (falls back to default RDoc template if not)
-
-== 2.3.0, released 2008-04-29
-
-* Changed LinkRenderer to receive collection, options and reference to view template NOT in
- constructor, but with the #prepare method. This is a step towards supporting passing of
- LinkRenderer (or subclass) instances that may be preconfigured in some way
-* LinkRenderer now has #page_link and #page_span methods for easier customization of output in
- subclasses
-* Changed page_entries_info() method to adjust its output according to humanized class name of
- collection items. Override this with :entry_name parameter (singular).
-
- page_entries_info(@posts)
- #-> "Displaying all 12 posts"
- page_entries_info(@posts, :entry_name => 'item')
- #-> "Displaying all 12 items"
-
-== 2.2.3, released 2008-04-26
-
-* will_paginate gem is no longer published on RubyForge, but on
- gems.github.com:
-
- gem sources -a http://gems.github.com/ (you only need to do this once)
- gem install mislav-will_paginate
-
-* extract reusable pagination testing stuff into WillPaginate::View
-* rethink the page URL construction mechanism to be more bulletproof when
- combined with custom routing for page parameter
-* test that anchor parameter can be used in pagination links
-
-== 2.2.2, released 2008-04-21
-
-* Add support for page parameter in custom routes like "/foo/page/2"
-* Change output of "page_entries_info" on single-page collection and erroneous
- output with empty collection as reported by Tim Chater
-
-== 2.2.1, released 2008-04-08
-
-* take less risky path when monkeypatching named_scope; fix that it no longer
- requires ActiveRecord::VERSION
-* use strings in "respond_to?" calls to work around a bug in acts_as_ferret
- stable (ugh)
-* add rake release task
-
-
-== 2.2.0, released 2008-04-07
-
-=== API changes
-* Rename WillPaginate::Collection#page_count to "total_pages" for consistency.
- If you implemented this interface, change your implementation accordingly.
-* Remove old, deprecated style of calling Array#paginate as "paginate(page,
- per_page)". If you want to specify :page, :per_page or :total_entries, use a
- parameter hash.
-* Rename LinkRenderer#url_options to "url_for" and drastically optimize it
-
-=== View changes
-* Added "prev_page" and "next_page" CSS classes on previous/next page buttons
-* Add examples of pagination links styling in "examples/index.html"
-* Change gap in pagination links from "..." to
- "<span class="gap">&hellip;</span>".
-* Add "paginated_section", a block helper that renders pagination both above and
- below content in the block
-* Add rel="prev|next|start" to page links
-
-=== Other
-
-* Add ability to opt-in for Rails 2.1 feature "named_scope" by calling
- WillPaginate.enable_named_scope (tested in Rails 1.2.6 and 2.0.2)
-* Support complex page parameters like "developers[page]"
-* Move Array#paginate definition to will_paginate/array.rb. You can now easily
- use pagination on arrays outside of Rails:
-
- gem 'will_paginate'
- require 'will_paginate/array'
-
-* Add "paginated_each" method for iterating through every record by loading only
- one page of records at the time
-* Rails 2: Rescue from WillPaginate::InvalidPage error with 404 Not Found by
- default
@@ -1,14 +0,0 @@
-git 'git://github.com/rails/rails.git'
-source :gemcutter
-
-gem 'activerecord', '~> 3.0.0.beta3'
-gem 'activeresource', '~> 3.0.0.beta3'
-gem 'actionpack', '~> 3.0.0.beta3'
-gem 'sequel', '~> 3.8.0'
-gem 'rspec', '~> 1.3.0'
-gem 'mocha', '~> 0.9.8'
-gem 'sqlite3-ruby', '~> 1.2.5'
-gem 'dm-core', '~> 0.10.2'
-gem 'do_sqlite3', '~> 0.10.1.1'
-gem 'mysql', '~> 2.8.1'
-gem 'pg', '~> 0.8.0'
@@ -1,18 +0,0 @@
-Copyright (c) 2009 Mislav Marohnić
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,125 +0,0 @@
-= The will_paginate Ruby library
-
-Pagination is just limiting the number of records loaded and displayed. Why should you let it get in
-your way while developing?
-
-This is how you paginate on an ActiveRecord model:
-
- Post.paginate :page => 1, :order => 'created_at DESC'
-
-Most of the time it's as simple as replacing "find" with "paginate" and specifying the page you want.
-
-Some resources to get you started:
-
-* The {will_paginate project page}[http://mislav.github.com/will_paginate/];
-* Your mind reels with questions? Join our {Google group}[http://groups.google.com/group/will_paginate];
-* {How to report bugs}[http://github.com/mislav/will_paginate/wikis/report-bugs];
-* {Watch the will_paginate screencast}[http://railscasts.com/episodes/51] by Ryan Bates.
-
-== I'm not using Rails; can I still use will_paginate?
-
-Absolutely -- although will_paginate started off as a Rails plugin, now it is a <em>completely
-framework-agnostic</em> library with support for Rails and Merb built-in. The core library doesn't
-have any dependences and you can safely use it in any Ruby code.
-
-When will_paginate is loaded in an environment where ActiveRecord and ActionView are present, it
-automatically hooks into these frameworks to provide easy pagination on your models and in your
-views. The same mechanism works for Merb applications, too. But, if no known framework is present
-then you have absolute control over what parts of will_paginate do you want to load and where you want
-them mixed in.
-
-
-== Installation
-
-The recommended way is that you get the gem hosted on {gems.github.com}[http://gems.github.com/]:
-
- gem install mislav-will_paginate
-
-In <b>Rails 2.1</b>, add a gem dependency:
-
- # for Rails 2.1 and newer
- config.gem 'mislav-will_paginate', :lib => 'will_paginate', :version => '~> 3.0'
-
-If you're using Rails 2.0 or older, or any other Ruby framework, just add a simple require to a file
-that initializes your application. For example, in Rails you would put this at the end of
-"config/environment.rb".
-
- gem 'mislav-will_paginate', '~> 3.0'
- require 'will_paginate'
-
-That's it. Remember to install the gem on <strong>all</strong> machines that you are deploying to.
-
-<i>There are extensive {installation
-instructions}[http://github.com/mislav/will_paginate/wikis/installation] on {the
-wiki}[http://github.com/mislav/will_paginate/wikis].</i>
-
-
-== Example usage
-
-Typical usage involves a paginating find in the controller:
-
- @posts = Post.paginate :page => params[:page], :order => 'updated_at DESC'
-
-It's true: +paginate+ works just like +find+ -- it just doesn't fetch all the records. Don't forget
-to tell it which page you want, or it will complain! Read more in WillPaginate::Finders.
-
-Render the posts in your view like you would normally do, and when you need to render pagination,
-just stick this in:
-
- <%= will_paginate @posts %>
-
-You're done. Read more in WillPaginate::ViewHelpers::Base.
-
-How does it know how much items to fetch per page? It asks your model by calling its
-+per_page+ class method. You can define it like this:
-
- class Post < ActiveRecord::Base
- self.per_page = 50
- end
-
-... or don't worry about it at all. WillPaginate defines it to be <strong>30</strong> by default. You can
-always specify the count explicitly when calling +paginate+:
-
- Post.paginate :page => params[:page], :per_page => 50
-
-The +paginate+ finder wraps the original finder and returns your result set that now has some new
-properties. You can use the collection as you would use any other array. WillPaginate view helpers
-also need that collection object to be able to render pagination:
-
- <ol>
- <% for post in @posts -%>
- <li>Render `post` in some nice way.</li>
- <% end -%>
- </ol>
-
- <p>Now let's render us some pagination!</p>
- <%= will_paginate @posts %>
-
-
-== Authors and credits
-
-The original author of will_paginate was PJ Hyett, who later handed over development to Mislav
-Marohnić. (The library was completely rewritten since then.)
-
-All these people helped making will_paginate what it is now with their code contributions or just
-simply awesome ideas:
-
-Chris Wanstrath, Dr. Nic Williams, K. Adam Christensen, Mike Garey, Bence Golda, Matt Aimonetti,
-Charles Brian Quinn, Desi McAdam, James Coglan, Matijs van Zuijlen, Maria, Brendan Ribera, Todd
-Willey, Bryan Helmkamp, Jan Berkel, Lourens Naudé, Rick Olson, Russell Norris, Piotr Usewicz, Chris
-Eppstein, Brandon Arbini, Denis Barushev, Paul Barry, Ben Pickles, Ken Collins, Lida Tang and Pieter
-Noordhuis.
-
-
-== Usable pagination in the UI
-
-There are example CSS styles to get you started on the will_paginate project page.
-
-More reading about pagination as design pattern:
-
-* {Pagination 101}[http://kurafire.net/log/archive/2007/06/22/pagination-101];
-* {Pagination gallery}[http://www.smashingmagazine.com/2007/11/16/pagination-gallery-examples-and-good-practices/] featured on Smashing Magazine;
-* {Pagination design pattern}[http://developer.yahoo.com/ypatterns/parent.php?pattern=pagination] on Yahoo Design Pattern Library.
-
-Want to discuss, request features, ask questions? Join the {Google
-group}[http://groups.google.com/group/will_paginate].
@@ -1,32 +0,0 @@
-require 'rake/rdoctask'
-
-load 'spec/tasks.rake'
-
-desc 'Default: run specs.'
-task :default => :spec
-
-desc 'Generate RDoc documentation for the will_paginate plugin.'
-Rake::RDocTask.new(:rdoc) do |rdoc|
- rdoc.rdoc_files.include('README.rdoc', 'LICENSE', 'CHANGELOG.rdoc').
- include('lib/**/*.rb').
- exclude('lib/will_paginate/finders/active_record/named_scope*').
- exclude('lib/will_paginate/finders/sequel.rb').
- exclude('lib/will_paginate/view_helpers/merb.rb').
- exclude('lib/will_paginate/deprecation.rb').
- exclude('lib/will_paginate/core_ext.rb').
- exclude('lib/will_paginate/version.rb')
-
- rdoc.main = "README.rdoc" # page to start on
- rdoc.title = "will_paginate documentation"
-
- rdoc.rdoc_dir = 'doc' # rdoc output folder
- rdoc.options << '--inline-source' << '--charset=UTF-8'
- rdoc.options << '--webcvs=http://github.com/mislav/will_paginate/tree/master/'
-end
-
-task :website do
- Dir.chdir('website') do
- %x(haml index.haml index.html)
- %x(sass pagination.sass pagination.css)
- end
-end
@@ -1 +0,0 @@
-require 'will_paginate'
@@ -1,23 +0,0 @@
-require 'will_paginate/deprecation'
-
-# = You *will* paginate!
-#
-# First read about WillPaginate::Finders::Base, then see
-# WillPaginate::ViewHelpers. The magical array you're handling in-between is
-# WillPaginate::Collection.
-#
-# Happy paginating!
-module WillPaginate
-end
-
-if defined?(::Rails::Railtie)
- require 'will_paginate/railtie'
-end
-
-if defined?(::Merb::Plugins)
- require 'will_paginate/view_helpers/merb'
- # auto-load the right ORM adapter
- if adapter = { :datamapper => 'data_mapper', :activerecord => 'active_record', :sequel => 'sequel' }[Merb.orm]
- require "will_paginate/finders/#{adapter}"
- end
-end
@@ -1,33 +0,0 @@
-require 'will_paginate/collection'
-
-class Array
- # Paginates a static array (extracting a subset of it). The result is a
- # WillPaginate::Collection instance, which is an array with a few more
- # properties about its paginated state.
- #
- # Parameters:
- # * <tt>:page</tt> - current page, defaults to 1
- # * <tt>:per_page</tt> - limit of items per page, defaults to 30
- # * <tt>:total_entries</tt> - total number of items in the array, defaults to
- # <tt>array.length</tt> (obviously)
- #
- # Example:
- # arr = ['a', 'b', 'c', 'd', 'e']
- # paged = arr.paginate(:per_page => 2) #-> ['a', 'b']
- # paged.total_entries #-> 5
- # arr.paginate(:page => 2, :per_page => 2) #-> ['c', 'd']
- # arr.paginate(:page => 3, :per_page => 2) #-> ['e']
- #
- # This method was originally {suggested by Desi
- # McAdam}[http://www.desimcadam.com/archives/8] and later proved to be the
- # most useful method of will_paginate library.
- def paginate(options = {})
- raise ArgumentError, "parameter hash expected (got #{options.inspect})" unless Hash === options
-
- WillPaginate::Collection.create options[:page] || 1,
- options[:per_page] || 30,
- options[:total_entries] || self.length do |pager|
- pager.replace self[pager.offset, pager.per_page].to_a
- end
- end
-end
Oops, something went wrong.

0 comments on commit 162d791

Please sign in to comment.