public
Fork of mislav/will_paginate
Description: Most awesome pagination solution for Rails
Homepage: http://github.com/mislav/will_paginate/wikis
Clone URL: git://github.com/technoweenie/will_paginate.git
Search Repo:
replace Hoe with manual package and release tasks
mislav (author)
Sat Mar 01 19:16:11 -0800 2008
commit  2ef59ad19b08be7087f9021527c782aa7e33ed6c
tree    4cf79dd57dec877e0fcdc8b8d121282ffee001d0
parent  bb9540f52992657e99cf748659a6ebb3e4171bee
...
 
 
...
1
2
0
@@ -0,0 +1,2 @@
0
+/pkg
0
+/doc
...
3
4
5
6
7
8
 
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
...
41
42
43
44
45
46
47
...
3
4
5
 
 
 
6
7
8
9
10
11
12
 
 
 
 
13
 
 
 
14
15
16
...
32
33
34
 
 
 
 
0
@@ -3,23 +3,14 @@ LICENSE
0
 Manifest.txt
0
 README
0
 Rakefile
0
-config/hoe.rb
0
-config/requirements.rb
0
-init.rb
0
+config/release.rb
0
 lib/will_paginate.rb
0
 lib/will_paginate/collection.rb
0
 lib/will_paginate/core_ext.rb
0
 lib/will_paginate/finder.rb
0
 lib/will_paginate/version.rb
0
 lib/will_paginate/view_helpers.rb
0
-log/debug.log
0
-script/destroy
0
-script/generate
0
-script/txt2html
0
 setup.rb
0
-tasks/deployment.rake
0
-tasks/environment.rake
0
-tasks/website.rake
0
 test/array_pagination_test.rb
0
 test/boot.rb
0
 test/console
0
@@ -41,7 +32,3 @@ test/lib/activerecord_test_case.rb
0
 test/lib/activerecord_test_connector.rb
0
 test/lib/load_fixtures.rb
0
 test/pagination_test.rb
0
-website/index.html
0
-website/index.txt
0
-website/stylesheets/screen.css
0
-website/template.rhtml
0
...
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
 
38
39
40
...
15
16
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
19
20
21
0
@@ -15,26 +15,7 @@ check it out.
0
 Your mind reels with questions? Join our Google
0
 group[http://groups.google.com/group/will_paginate].
0
 
0
-== Install the plugin
0
-
0
-Simply do:
0
-
0
- script/plugin install svn://errtheblog.com/svn/plugins/will_paginate
0
-
0
-Alternatively, you can add the whole Err repository to plugin sources:
0
-
0
- script/plugin source svn://errtheblog.com/svn/plugins
0
-
0
-You only have to do this once, then you can install will_paginate to each of your applications simply like this:
0
-
0
- script/plugin install will_paginate
0
-
0
-To see what other plugins are now available to you, list the newly added plugin source:
0
-
0
- script/plugin list --source=svn://errtheblog.com/svn/plugins
0
-
0
-The plugin officially supports Rails versions 1.2.6 and 2.0.2. You can browse
0
-its source code on Warehouse: http://plugins.require.errtheblog.com/browser/will_paginate
0
+You can find more documentation on the wiki[http://github.com/mislav/will_paginate/wikis].
0
 
0
 == Example usage
0
 
...
1
2
3
4
5
 
6
7
8
...
 
1
2
 
 
3
4
5
6
0
@@ -1,8 +1,6 @@
0
-require 'rake'
0
 require 'rake/testtask'
0
 require 'rake/rdoctask'
0
-require 'config/requirements'
0
-require 'config/hoe' # setup Hoe + all gem configuration
0
+require 'config/release'
0
 
0
 desc 'Default: run unit tests.'
0
 task :default => :test
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
@@ -1,70 +0,0 @@
0
-require 'will_paginate/version'
0
-
0
-AUTHOR = ['Mislav Marohnić', 'PJ Hyett'] # can also be an array of Authors
0
-EMAIL = 'mislav.marohnic@gmail.com'
0
-DESCRIPTION = "A Rails plugin that provides pagination solutions when querying models and rendering pagination links in views."
0
-GEM_NAME = 'will_paginate' # what ppl will type to install your gem
0
-RUBYFORGE_PROJECT = 'will-paginate' # The unix name for your project
0
-HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
0
-DOWNLOAD_PATH = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}"
0
-
0
-@config_file = "~/.rubyforge/user-config.yml"
0
-@config = nil
0
-RUBYFORGE_USERNAME = "unknown"
0
-def rubyforge_username
0
- unless @config
0
- begin
0
- @config = YAML.load(File.read(File.expand_path(@config_file)))
0
- rescue
0
- puts <<-EOS
0
-ERROR: No rubyforge config file found: #{@config_file}
0
-Run 'rubyforge setup' to prepare your env for access to Rubyforge
0
- - See http://newgem.rubyforge.org/rubyforge.html for more details
0
- EOS
0
- exit
0
- end
0
- end
0
- RUBYFORGE_USERNAME.replace @config["username"]
0
-end
0
-
0
-
0
-REV = nil
0
-# UNCOMMENT IF REQUIRED:
0
-# REV = `svn info`.each {|line| if line =~ /^Revision:/ then k,v = line.split(': '); break v.chomp; else next; end} rescue nil
0
-VERS = WillPaginate::VERSION::STRING + (REV ? ".#{REV}" : "")
0
-RDOC_OPTS = ['--quiet', '--title', 'Will Paginate documentation',
0
- "--opname", "index.html",
0
- "--line-numbers",
0
- "--main", "README",
0
- "--inline-source"]
0
-
0
-class Hoe
0
- def extra_deps
0
- @extra_deps.reject! { |x| Array(x).first == 'hoe' }
0
- @extra_deps
0
- end
0
-end
0
-
0
-# Generate all the Rake tasks
0
-# Run 'rake -T' to see list of generated tasks (from gem root directory)
0
-hoe = Hoe.new(GEM_NAME, VERS) do |p|
0
- p.author = AUTHOR
0
- p.description = DESCRIPTION
0
- p.email = EMAIL
0
- p.summary = DESCRIPTION
0
- p.url = HOMEPATH
0
- p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
0
- p.test_globs = ["test/**/test_*.rb"]
0
- p.clean_globs |= ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store'] #An array of file patterns to delete on clean.
0
-
0
- # == Optional
0
- p.changes = p.paragraphs_of("CHANGELOG", 0..1).join("\n\n")
0
- p.extra_deps = [ %w(activesupport >=1.4.4) ]
0
-
0
- #p.spec_extras = {} # A hash of extra values to set in the gemspec.
0
-end
0
-
0
-CHANGES = hoe.changes
0
-PATH = (RUBYFORGE_PROJECT == GEM_NAME) ? RUBYFORGE_PROJECT : "#{RUBYFORGE_PROJECT}/#{GEM_NAME}"
0
-hoe.remote_rdoc_dir = File.join(PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,''), 'rdoc')
0
-hoe.rsync_args = '-av --delete --ignore-errors'
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
0
@@ -0,0 +1,74 @@
0
+require 'rubyforge'
0
+require 'rake/gempackagetask'
0
+require 'lib/will_paginate/version.rb'
0
+
0
+RUBYFORGE_NAME = 'will-paginate'
0
+NAME = 'will_paginate'
0
+version = WillPaginate::VERSION::STRING
0
+
0
+DESCRIPTION = <<-DESC
0
+ A Rails plugin that provides pagination solutions
0
+ for querying models and rendering pagination links in views.
0
+DESC
0
+DESCRIPTION.strip!.gsub! /\s+/, ' '
0
+
0
+changes = nil
0
+
0
+spec = Gem::Specification.new do |s|
0
+ s.name = NAME
0
+ s.version = version
0
+ s.summary = s.description = DESCRIPTION
0
+ s.authors = ['Mislav Marohnić', 'PJ Hyett']
0
+ s.email = 'mislav.marohnic@gmail.com'
0
+ s.homepage = 'http://github.com/mislav/will_paginate/wikis'
0
+ s.rubyforge_project = RUBYFORGE_NAME
0
+
0
+ s.add_dependency 'activesupport', '>=1.4.4'
0
+
0
+ s.files = File.read("Manifest.txt").split("\n")
0
+ s.executables = s.files.grep(/^bin/) { |f| File.basename(f) }
0
+
0
+ s.bindir = "bin"
0
+ dirs = Dir['{lib,ext}']
0
+ s.require_paths = dirs unless dirs.empty?
0
+
0
+ s.rdoc_options = ['--main', 'README', '--inline-source', '--charset=UTF-8']
0
+ s.extra_rdoc_files = %w(README LICENSE) # + s.files.grep(/\.txt$/) - %w(Manifest.txt)
0
+ s.has_rdoc = true
0
+end
0
+
0
+Rake::GemPackageTask.new spec do |pkg|
0
+ pkg.need_tar = false
0
+ pkg.need_zip = false
0
+end
0
+
0
+desc 'Package and upload the release to rubyforge.'
0
+task :release => [:clean, :package] do |t|
0
+ v = ENV["VERSION"] or abort "Must supply VERSION=x.y.z"
0
+ abort "Version doesn't match #{version}" if v != version
0
+ files = Dir["pkg/#{NAME}-#{version}.*"]
0
+
0
+ rf = RubyForge.new
0
+ puts "Logging in to RubyForge"
0
+ rf.login
0
+
0
+ c = rf.userconfig
0
+ c["release_notes"] = DESCRIPTION
0
+ c["release_changes"] = changes if changes
0
+ c["preformatted"] = true
0
+
0
+ puts "Releasing #{NAME} v. #{version}"
0
+ p files
0
+ rf.add_release RUBYFORGE_NAME, NAME, version, *files
0
+end
0
+
0
+task :clean => [ :clobber_rdoc, :clobber_package ] do
0
+ removed = []
0
+ %w(diff diff.txt email.txt ri *.gem **/*~ **/.DS_Store).each do |pattern|
0
+ files = Dir[pattern]
0
+ next if files.empty?
0
+ FileUtils.rm_rf files
0
+ removed.concat files
0
+ end
0
+ puts "Removed files: #{removed.inspect}" unless removed.empty?
0
+end
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
0
@@ -1,17 +0,0 @@
0
-require 'fileutils'
0
-include FileUtils
0
-
0
-require 'rubygems'
0
-%w[rake hoe newgem rubigen].each do |req_gem|
0
- begin
0
- require req_gem
0
- rescue LoadError
0
- puts "This Rakefile requires the '#{req_gem}' RubyGem."
0
- puts "Installation: gem install #{req_gem} -y"
0
- exit
0
- end
0
-end
0
-
0
-$:.unshift(File.join(File.dirname(__FILE__), %w[.. lib]))
0
-
0
-require 'will_paginate'
0
\ No newline at end of file

Comments

    No one has commented yet.