Permalink
Browse files

Merge branch 'gem' of git@github.com:mislav/will_paginate into gem

Conflicts:

	Rakefile
  • Loading branch information...
2 parents d5e7946 + 97965b0 commit b8958a18d5deb7cd08a82f14d214b94cecc75f6c @mislav committed Mar 2, 2008
Showing with 1,719 additions and 25 deletions.
  1. +2 −0 .gitignore
  2. +3 −0 CHANGELOG
  3. +34 −0 Manifest.txt
  4. +1 −20 README
  5. +1 −3 Rakefile
  6. +82 −0 config/release.rb
  7. +0 −2 init.rb
  8. +2 −0 lib/will_paginate.rb
  9. +9 −0 lib/will_paginate/version.rb
  10. +1,585 −0 setup.rb
View
@@ -0,0 +1,2 @@
+/pkg
+/doc
View
@@ -0,0 +1,3 @@
+== 2.1.0 2008-01-20
+
+* created a gem version from Rails plugin
View
@@ -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
View
21 README
@@ -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
View
@@ -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
View
@@ -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
View
@@ -1,2 +0,0 @@
-require 'will_paginate'
-WillPaginate.enable
View
@@ -59,3 +59,5 @@ def self.silenced?
end
end
end
+
+WillPaginate.enable if defined? ActiveRecord and defined? ActionView
@@ -0,0 +1,9 @@
+module WillPaginate #:nodoc:
+ module VERSION #:nodoc:
+ MAJOR = 2
+ MINOR = 1
+ TINY = 0
+
+ STRING = [MAJOR, MINOR, TINY].join('.')
+ end
+end
Oops, something went wrong.

0 comments on commit b8958a1

Please sign in to comment.