Skip to content

Commit

Permalink
Merge branch 'gem' of git@github.com:mislav/will_paginate into gem
Browse files Browse the repository at this point in the history
Conflicts:

	Rakefile
  • Loading branch information
mislav committed Mar 2, 2008
2 parents d5e7946 + 97965b0 commit b8958a1
Show file tree
Hide file tree
Showing 10 changed files with 1,719 additions and 25 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
/pkg
/doc
3 changes: 3 additions & 0 deletions CHANGELOG
@@ -0,0 +1,3 @@
== 2.1.0 2008-01-20

* created a gem version from Rails plugin
34 changes: 34 additions & 0 deletions Manifest.txt
@@ -0,0 +1,34 @@
CHANGELOG
LICENSE
Manifest.txt
README
Rakefile
config/release.rb
lib/will_paginate.rb
lib/will_paginate/collection.rb
lib/will_paginate/core_ext.rb
lib/will_paginate/finder.rb
lib/will_paginate/version.rb
lib/will_paginate/view_helpers.rb
setup.rb
test/array_pagination_test.rb
test/boot.rb
test/console
test/finder_test.rb
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/activerecord_test_case.rb
test/lib/activerecord_test_connector.rb
test/lib/load_fixtures.rb
test/pagination_test.rb
21 changes: 1 addition & 20 deletions README
Expand Up @@ -15,26 +15,7 @@ check it out.
Your mind reels with questions? Join our Google
group[http://groups.google.com/group/will_paginate].

== Install the plugin

Simply do:

script/plugin install svn://errtheblog.com/svn/plugins/will_paginate

Alternatively, you can add the whole Err repository to plugin sources:

script/plugin source svn://errtheblog.com/svn/plugins

You only have to do this once, then you can install will_paginate to each of your applications simply like this:

script/plugin install will_paginate

To see what other plugins are now available to you, list the newly added plugin source:

script/plugin list --source=svn://errtheblog.com/svn/plugins

The plugin officially supports Rails versions 1.2.6 and 2.0.2. You can browse
its source code on Warehouse: http://plugins.require.errtheblog.com/browser/will_paginate
You can find more documentation on the wiki[http://github.com/mislav/will_paginate/wikis].

== Example usage

Expand Down
4 changes: 1 addition & 3 deletions Rakefile
@@ -1,8 +1,6 @@
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'config/requirements'
require 'config/hoe' # setup Hoe + all gem configuration
require 'config/release'

desc 'Default: run unit tests.'
task :default => :test
Expand Down
82 changes: 82 additions & 0 deletions config/release.rb
@@ -0,0 +1,82 @@
require 'rubyforge'
require 'rake/gempackagetask'
require 'lib/will_paginate/version.rb'

RUBYFORGE_NAME = 'will-paginate'
NAME = 'will_paginate'
version = WillPaginate::VERSION::STRING

DESCRIPTION = <<-DESC
A Rails plugin that provides pagination solutions
for querying models and rendering pagination links in views.
DESC
DESCRIPTION.strip!.gsub! /\s+/, ' '

changes = nil

spec = Gem::Specification.new do |s|
s.name = NAME
s.version = version
s.summary = s.description = DESCRIPTION
s.authors = ['Mislav Marohnić', 'PJ Hyett']
s.email = 'mislav.marohnic@gmail.com'
s.homepage = 'http://github.com/mislav/will_paginate/wikis'
s.rubyforge_project = RUBYFORGE_NAME

s.add_dependency 'activesupport', '>=1.4.4'

s.files = File.read("Manifest.txt").split("\n")
s.executables = s.files.grep(/^bin/) { |f| File.basename(f) }

s.bindir = "bin"
dirs = Dir['{lib,ext}']
s.require_paths = dirs unless dirs.empty?

s.rdoc_options = ['--main', 'README', '--inline-source', '--charset=UTF-8']
s.extra_rdoc_files = %w(README LICENSE) # + s.files.grep(/\.txt$/) - %w(Manifest.txt)
s.has_rdoc = true
end

Rake::GemPackageTask.new spec do |pkg|
pkg.need_tar = false
pkg.need_zip = false
end

desc 'Package and upload the release to rubyforge.'
task :release => [:clean, :package] do |t|
v = ENV["VERSION"] or abort "Must supply VERSION=x.y.z"
abort "Version doesn't match #{version}" if v != version
files = Dir["pkg/#{NAME}-#{version}.*"]

rf = RubyForge.new
puts "Logging in to RubyForge"
rf.login

c = rf.userconfig
c["release_notes"] = DESCRIPTION
c["release_changes"] = changes if changes
c["preformatted"] = true

puts "Releasing #{NAME} v. #{version}"
p files
rf.add_release RUBYFORGE_NAME, NAME, version, *files
end

task :clean => [ :clobber_rdoc, :clobber_package ] do
removed = []
%w(diff diff.txt email.txt ri *.gem **/*~ **/.DS_Store).each do |pattern|
files = Dir[pattern]
next if files.empty?
FileUtils.rm_rf files
removed.concat files
end
puts "Removed files: #{removed.inspect}" unless removed.empty?
end

# desc 'Upload website files to rubyforge'
# task :website_upload do
# host = "#{rubyforge_username}@rubyforge.org"
# remote_dir = "/var/www/gforge-projects/#{PATH}/"
# local_dir = 'website'
# sh %{rsync -aCv #{local_dir}/ #{host}:#{remote_dir}}
# end
2 changes: 0 additions & 2 deletions init.rb

This file was deleted.

2 changes: 2 additions & 0 deletions lib/will_paginate.rb
Expand Up @@ -59,3 +59,5 @@ def self.silenced?
end
end
end

WillPaginate.enable if defined? ActiveRecord and defined? ActionView
9 changes: 9 additions & 0 deletions lib/will_paginate/version.rb
@@ -0,0 +1,9 @@
module WillPaginate #:nodoc:
module VERSION #:nodoc:
MAJOR = 2
MINOR = 1
TINY = 0

STRING = [MAJOR, MINOR, TINY].join('.')
end
end

0 comments on commit b8958a1

Please sign in to comment.