Permalink
Browse files

replaced plugin with gem

  • Loading branch information...
1 parent d57618d commit 1bc992445a9faf56e8b5763b088456c784328247 @timothyf committed Mar 16, 2011
Showing with 9 additions and 3,482 deletions.
  1. +2 −1 Gemfile
  2. +2 −2 app/controllers/application_controller.rb
  3. +2 −0 config/application.rb
  4. +3 −3 lib/authenticated_system.rb
  5. +0 −49 vendor/plugins/will_paginate/.manifest
  6. +0 −110 vendor/plugins/will_paginate/CHANGELOG.rdoc
  7. +0 −18 vendor/plugins/will_paginate/LICENSE
  8. +0 −107 vendor/plugins/will_paginate/README.rdoc
  9. +0 −62 vendor/plugins/will_paginate/Rakefile
  10. BIN vendor/plugins/will_paginate/examples/apple-circle.gif
  11. +0 −69 vendor/plugins/will_paginate/examples/index.haml
  12. +0 −92 vendor/plugins/will_paginate/examples/index.html
  13. +0 −90 vendor/plugins/will_paginate/examples/pagination.css
  14. +0 −91 vendor/plugins/will_paginate/examples/pagination.sass
  15. +0 −1 vendor/plugins/will_paginate/init.rb
  16. +0 −78 vendor/plugins/will_paginate/lib/will_paginate.rb
  17. +0 −16 vendor/plugins/will_paginate/lib/will_paginate/array.rb
  18. +0 −146 vendor/plugins/will_paginate/lib/will_paginate/collection.rb
  19. +0 −32 vendor/plugins/will_paginate/lib/will_paginate/core_ext.rb
  20. +0 −264 vendor/plugins/will_paginate/lib/will_paginate/finder.rb
  21. +0 −170 vendor/plugins/will_paginate/lib/will_paginate/named_scope.rb
  22. +0 −37 vendor/plugins/will_paginate/lib/will_paginate/named_scope_patch.rb
  23. +0 −9 vendor/plugins/will_paginate/lib/will_paginate/version.rb
  24. +0 −389 vendor/plugins/will_paginate/lib/will_paginate/view_helpers.rb
  25. +0 −21 vendor/plugins/will_paginate/test/boot.rb
  26. +0 −143 vendor/plugins/will_paginate/test/collection_test.rb
  27. +0 −8 vendor/plugins/will_paginate/test/console
  28. +0 −22 vendor/plugins/will_paginate/test/database.yml
  29. +0 −476 vendor/plugins/will_paginate/test/finder_test.rb
  30. +0 −3 vendor/plugins/will_paginate/test/fixtures/admin.rb
  31. +0 −14 vendor/plugins/will_paginate/test/fixtures/developer.rb
  32. +0 −13 vendor/plugins/will_paginate/test/fixtures/developers_projects.yml
  33. +0 −15 vendor/plugins/will_paginate/test/fixtures/project.rb
  34. +0 −6 vendor/plugins/will_paginate/test/fixtures/projects.yml
  35. +0 −29 vendor/plugins/will_paginate/test/fixtures/replies.yml
  36. +0 −7 vendor/plugins/will_paginate/test/fixtures/reply.rb
  37. +0 −38 vendor/plugins/will_paginate/test/fixtures/schema.rb
  38. +0 −10 vendor/plugins/will_paginate/test/fixtures/topic.rb
  39. +0 −30 vendor/plugins/will_paginate/test/fixtures/topics.yml
  40. +0 −2 vendor/plugins/will_paginate/test/fixtures/user.rb
  41. +0 −35 vendor/plugins/will_paginate/test/fixtures/users.yml
  42. +0 −37 vendor/plugins/will_paginate/test/helper.rb
  43. +0 −36 vendor/plugins/will_paginate/test/lib/activerecord_test_case.rb
  44. +0 −75 vendor/plugins/will_paginate/test/lib/activerecord_test_connector.rb
  45. +0 −11 vendor/plugins/will_paginate/test/lib/load_fixtures.rb
  46. +0 −171 vendor/plugins/will_paginate/test/lib/view_test_process.rb
  47. +0 −59 vendor/plugins/will_paginate/test/tasks.rake
  48. +0 −365 vendor/plugins/will_paginate/test/view_test.rb
  49. +0 −20 vendor/plugins/will_paginate/will_paginate.gemspec
View
@@ -10,4 +10,5 @@ gem "aws-s3"
gem "jammit"
gem 'hpricot'
gem 'devise'
-gem 'omniauth'
+gem 'omniauth'
+gem 'will_paginate', '3.0.pre2'
@@ -24,8 +24,8 @@ class ApplicationController < ActionController::Base
#include Facebooker::Rails::Controller
before_filter :set_vars, :update_session
- before_filter :set_facebook_session
- helper_method :facebook_session
+ #before_filter :set_facebook_session
+ #helper_method :facebook_session
before_filter :api_filter
View
@@ -45,5 +45,7 @@ class Application < Rails::Application
config.action_mailer.delivery_method = :smtp
+ config.autoload_paths << File.join(config.root, "lib")
+
end
end
@@ -21,9 +21,9 @@ def login_from_api_key
def login_from_fb
- if facebook_session
- self.current_user = User.find_by_fb_user(facebook_session.user)
- end
+ #if facebook_session
+ # self.current_user = User.find_by_fb_user(facebook_session.user)
+ #end
end
@@ -1,49 +0,0 @@
-CHANGELOG.rdoc
-LICENSE
-README.rdoc
-Rakefile
-examples
-examples/apple-circle.gif
-examples/index.haml
-examples/index.html
-examples/pagination.css
-examples/pagination.sass
-init.rb
-lib
-lib/will_paginate
-lib/will_paginate.rb
-lib/will_paginate/array.rb
-lib/will_paginate/collection.rb
-lib/will_paginate/core_ext.rb
-lib/will_paginate/finder.rb
-lib/will_paginate/named_scope.rb
-lib/will_paginate/named_scope_patch.rb
-lib/will_paginate/version.rb
-lib/will_paginate/view_helpers.rb
-test
-test/boot.rb
-test/collection_test.rb
-test/console
-test/database.yml
-test/finder_test.rb
-test/fixtures
-test/fixtures/admin.rb
-test/fixtures/developer.rb
-test/fixtures/developers_projects.yml
-test/fixtures/project.rb
-test/fixtures/projects.yml
-test/fixtures/replies.yml
-test/fixtures/reply.rb
-test/fixtures/schema.rb
-test/fixtures/topic.rb
-test/fixtures/topics.yml
-test/fixtures/user.rb
-test/fixtures/users.yml
-test/helper.rb
-test/lib
-test/lib/activerecord_test_case.rb
-test/lib/activerecord_test_connector.rb
-test/lib/load_fixtures.rb
-test/lib/view_test_process.rb
-test/tasks.rake
-test/view_test.rb
@@ -1,110 +0,0 @@
-== 2.3.6, released 2008-10-26
-
-* Rails 2.2 fix: stop using `extract_attribute_names_from_match` inernal AR method, it no longer exists
-
-== 2.3.5, released 2008-10-07
-
-* update the backported named_scope implementation for Rails versions older than 2.1
-* break out of scope of paginated_each() yielded block when used on named scopes
-* fix paginate(:from)
-
-== 2.3.4, released 2008-09-16
-
-* Removed gem dependency to Active Support (causes trouble with vendored rails).
-* Rails 2.1: fix a failing test and a deprecation warning.
-* Cope with scoped :select when counting.
-
-== 2.3.3, released 2008-08-29
-
-* Ensure that paginate_by_sql doesn't change the original SQL query.
-* RDoc love (now live at http://mislav.caboo.se/static/will_paginate/doc/)
-* Rename :prev_label to :previous_label for consistency. old name still functions but is deprecated
-* ActiveRecord 2.1: Remove :include option from count_all query when it's possible.
-
-== 2.3.2, released 2008-05-16
-
-* Fixed LinkRenderer#stringified_merge by removing "return" from iterator block
-* Ensure that 'href' values in pagination links are escaped URLs
-
-== 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 mechanizm 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 erraneous
- 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,18 +0,0 @@
-Copyright (c) 2007 PJ Hyett and 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,107 +0,0 @@
-= WillPaginate
-
-Pagination is just limiting the number of records displayed. Why should you let
-it get in your way while developing, then? This plugin makes magic happen. Did
-you ever want to be able to do just this on a model:
-
- Post.paginate :page => 1, :order => 'created_at DESC'
-
-... and then render the page links with a single view helper? Well, now you
-can.
-
-Some resources to get you started:
-
-* {Installation instructions}[http://github.com/mislav/will_paginate/wikis/installation]
- on {the wiki}[http://github.com/mislav/will_paginate/wikis]
-* 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]
-
-
-== Example usage
-
-Use a paginate finder in the controller:
-
- @posts = Post.paginate_by_board_id @board.id, :page => params[:page], :order => 'updated_at DESC'
-
-Yeah, +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 on WillPaginate::Finder::ClassMethods.
-
-Render the posts in your view like you would normally do. When you need to render
-pagination, just stick this in:
-
- <%= will_paginate @posts %>
-
-You're done. (You can find the option list at WillPaginate::ViewHelpers.)
-
-How does it know how much items to fetch per page? It asks your model by calling
-its <tt>per_page</tt> class method. You can define it like this:
-
- class Post < ActiveRecord::Base
- cattr_reader :per_page
- @@per_page = 50
- end
-
-... or like this:
-
- class Post < ActiveRecord::Base
- def self.per_page
- 50
- end
- end
-
-... or don't worry about it at all. WillPaginate defines it to be <b>30</b> by default.
-But you can always specify the count explicitly when calling +paginate+:
-
- @posts = Post.paginate :page => params[:page], :per_page => 50
-
-The +paginate+ finder wraps the original finder and returns your resultset that now has
-some new properties. You can use the collection as you would with any ActiveRecord
-resultset. WillPaginate view helpers also need that 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 %>
-
-More detailed documentation:
-
-* WillPaginate::Finder::ClassMethods for pagination on your models;
-* WillPaginate::ViewHelpers for your views.
-
-
-== Authors and credits
-
-Authors:: Mislav Marohnić, PJ Hyett
-Original announcement:: http://errtheblog.com/post/929
-Original PHP source:: http://www.strangerstudios.com/sandbox/pagination/diggstyle.php
-
-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,
-Denis Barushev, Ben Pickles.
-
-
-== Usable pagination in the UI
-
-There are some CSS styles to get you started in the "examples/" directory. They
-are {showcased online here}[http://mislav.caboo.se/static/will_paginate/].
-
-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/]
-* {Pagination on Yahoo Design Pattern Library}[http://developer.yahoo.com/ypatterns/parent.php?pattern=pagination]
-
-Want to discuss, request features, ask questions? Join the
-{Google group}[http://groups.google.com/group/will_paginate].
-
@@ -1,62 +0,0 @@
-require 'rubygems'
-begin
- hanna_dir = '/Users/mislav/Projects/Hanna/lib'
- $:.unshift hanna_dir if File.exists? hanna_dir
- require 'hanna/rdoctask'
-rescue LoadError
- require 'rake'
- require 'rake/rdoctask'
-end
-load 'test/tasks.rake'
-
-desc 'Default: run unit tests.'
-task :default => :test
-
-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/named_scope*').
- exclude('lib/will_paginate/array.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
-
-desc %{Update ".manifest" with the latest list of project filenames. Respect\
-.gitignore by excluding everything that git ignores. Update `files` and\
-`test_files` arrays in "*.gemspec" file if it's present.}
-task :manifest do
- list = Dir['**/*'].sort
- spec_file = Dir['*.gemspec'].first
- list -= [spec_file] if spec_file
-
- File.read('.gitignore').each_line do |glob|
- glob = glob.chomp.sub(/^\//, '')
- list -= Dir[glob]
- list -= Dir["#{glob}/**/*"] if File.directory?(glob) and !File.symlink?(glob)
- puts "excluding #{glob}"
- end
-
- if spec_file
- spec = File.read spec_file
- spec.gsub! /^(\s* s.(test_)?files \s* = \s* )( \[ [^\]]* \] | %w\( [^)]* \) )/mx do
- assignment = $1
- bunch = $2 ? list.grep(/^test\//) : list
- '%s%%w(%s)' % [assignment, bunch.join(' ')]
- end
-
- File.open(spec_file, 'w') {|f| f << spec }
- end
- File.open('.manifest', 'w') {|f| f << list.join("\n") }
-end
-
-task :examples do
- %x(haml examples/index.haml examples/index.html)
- %x(sass examples/pagination.sass examples/pagination.css)
-end
Deleted file not rendered
Oops, something went wrong.

0 comments on commit 1bc9924

Please sign in to comment.