reap 4.3.1 → 4.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/note/publisher.rb ADDED
@@ -0,0 +1,75 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # Copyright 2003, 2004 by Jim Weirich (jim@weirichhouse.org)
4
+ # All rights reserved.
5
+
6
+ # Permission is granted for use, copying, modification, distribution,
7
+ # and distribution of modified versions of this work as long as the
8
+ # above copyright notice is included.
9
+
10
+ # Configuration information about an upload host system.
11
+ # * name :: Name of host system.
12
+ # * webdir :: Base directory for the web information for the
13
+ # application. The application name (APP) is appended to
14
+ # this directory before using.
15
+ # * pkgdir :: Directory on the host system where packages can be
16
+ # placed.
17
+ HostInfo = Struct.new(:name, :webdir, :pkgdir)
18
+
19
+ # Manage several publishers as a single entity.
20
+ class CompositePublisher
21
+ def initialize
22
+ @publishers = []
23
+ end
24
+
25
+ # Add a publisher to the composite.
26
+ def add(pub)
27
+ @publishers << pub
28
+ end
29
+
30
+ # Upload all the individual publishers.
31
+ def upload
32
+ @publishers.each { |p| p.upload }
33
+ end
34
+ end
35
+
36
+ # Publish an entire directory to an existing remote directory using
37
+ # SSH.
38
+ class SshDirPublisher
39
+ def initialize(host, remote_dir, local_dir)
40
+ @host = host
41
+ @remote_dir = remote_dir
42
+ @local_dir = local_dir
43
+ end
44
+
45
+ def upload
46
+ run %{scp -rq #{@local_dir}/* #{@host}:#{@remote_dir}}
47
+ end
48
+ end
49
+
50
+ # Publish an entire directory to a fresh remote directory using SSH.
51
+ class SshFreshDirPublisher < SshDirPublisher
52
+ def upload
53
+ run %{ssh #{@host} rm -rf #{@remote_dir}} rescue nil
54
+ run %{ssh #{@host} mkdir #{@remote_dir}}
55
+ super
56
+ end
57
+ end
58
+
59
+ # Publish a list of files to an existing remote directory.
60
+ class SshFilePublisher
61
+ # Create a publisher using the give host information.
62
+ def initialize(host, remote_dir, local_dir, *files)
63
+ @host = host
64
+ @remote_dir = remote_dir
65
+ @local_dir = local_dir
66
+ @files = files
67
+ end
68
+
69
+ # Upload the local directory to the remote directory.
70
+ def upload
71
+ @files.each do |fn|
72
+ run %{scp -q #{@local_dir}/#{fn} #{@host}:#{@remote_dir}}
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rake/contrib/sshpublisher'
4
+
5
+ module Rake
6
+
7
+ class RubyForgePublisher < SshDirPublisher
8
+ attr_reader :project, :proj_id, :user
9
+
10
+ def initialize(projname, user)
11
+ super(
12
+ "#{user}@rubyforge.org",
13
+ "/var/www/gforge-projects/#{projname}",
14
+ "html")
15
+ end
16
+ end
17
+
18
+ end
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rake/contrib/compositepublisher'
4
+
5
+ module Rake
6
+
7
+ # Publish an entire directory to an existing remote directory using
8
+ # SSH.
9
+ class SshDirPublisher
10
+ def initialize(host, remote_dir, local_dir)
11
+ @host = host
12
+ @remote_dir = remote_dir
13
+ @local_dir = local_dir
14
+ end
15
+
16
+ def upload
17
+ sh %{scp -rq #{@local_dir}/* #{@host}:#{@remote_dir}}
18
+ end
19
+ end
20
+
21
+ # Publish an entire directory to a fresh remote directory using SSH.
22
+ class SshFreshDirPublisher < SshDirPublisher
23
+ def upload
24
+ sh %{ssh #{@host} rm -rf #{@remote_dir}} rescue nil
25
+ sh %{ssh #{@host} mkdir #{@remote_dir}}
26
+ super
27
+ end
28
+ end
29
+
30
+ # Publish a list of files to an existing remote directory.
31
+ class SshFilePublisher
32
+ # Create a publisher using the give host information.
33
+ def initialize(host, remote_dir, local_dir, *files)
34
+ @host = host
35
+ @remote_dir = remote_dir
36
+ @local_dir = local_dir
37
+ @files = files
38
+ end
39
+
40
+ # Upload the local directory to the remote directory.
41
+ def upload
42
+ @files.each do |fn|
43
+ sh %{scp -q #{@local_dir}/#{fn} #{@host}:#{@remote_dir}}
44
+ end
45
+ end
46
+ end
47
+ end
data/note/suby-cvs.rb ADDED
@@ -0,0 +1,46 @@
1
+ #!/usr/bin/ruby
2
+
3
+ DEBUG = false
4
+ URI = "-dtransami@cvs.suby.berlios.de:/cvsroot/suby"
5
+
6
+ cmd = nil
7
+
8
+ case ARGV[0]
9
+ when 'checkout', 'co'
10
+ if ARGV[1] and ARGV[1] != ''
11
+ cmd = %Q{cvs -z3 #{URI} co "#{ARGV[1]}"}
12
+ else
13
+ puts "no module given"
14
+ cmd = nil
15
+ end
16
+ when 'commit'
17
+ if ARGV[1] and ARGV[1] != ''
18
+ cmd = %Q{cvs -z3 #{URI} commit -m "#{ARGV[1]}"}
19
+ else
20
+ puts "no commit message given"
21
+ cmd = nil
22
+ end
23
+ when 'update'
24
+ cmd = %Q{cvs -z3 #{URI} update}
25
+ when 'add'
26
+ if ARGV[1]
27
+ cmd = %Q{cvs -z3 #{URI} add #{ARGV[1..-1].join(' ')}}
28
+ else
29
+ puts "no files given to add"
30
+ cmd = nil
31
+ end
32
+ when 'remove'
33
+ if ARGV[1]
34
+ cmd = %Q{cvs -z3 #{URI} remove #{ARGV[1..-1].join(' ')}}
35
+ else
36
+ puts "no file given to remove"
37
+ cmd = nil
38
+ end
39
+ end
40
+
41
+ if DEBUG
42
+ puts cmd
43
+ elsif cmd
44
+ `#{cmd}`
45
+ end
46
+
data/note/template.rb ADDED
@@ -0,0 +1,72 @@
1
+ --- %YAML:1.0
2
+
3
+ TITLE: &title Your Package
4
+ NAME: &pkg your_package_name
5
+ VERSION: '0.0.1'
6
+ AUTHOR: Your Name
7
+ EMAIL: &email youremail@address.com
8
+ HOMEPAGE: "http://your_package_name.rubyforge.org"
9
+ SUMMARY: One line summary
10
+ DESCRIPTION: >
11
+ Multline description goes here.
12
+
13
+ RUBYFORGE:
14
+ PROJECT: 'your_project_name'
15
+ USERNAME: your_rubyforge_username
16
+
17
+ TEST:
18
+ FILES:
19
+ - 'test/**/tc_*.rb'
20
+ OPTIONS: ~
21
+
22
+ RDOC:
23
+ TITLE: *title
24
+ DIR: 'doc' #'rdoc'
25
+ TEMPLATE: html #ruby-red
26
+ OPTIONS: ['--merge', '--promiscuous', '--all']
27
+ MAIN: README
28
+ INCLUDE:
29
+ - 'README'
30
+ - 'LICEN*'
31
+ - 'lib/**/*.rb'
32
+ - 'bin/**/*.rb'
33
+ EXCLUDE: []
34
+
35
+ PACKAGE:
36
+ DIR: pkg
37
+ INCLUDE:
38
+ - 'lib/**/*'
39
+ - 'bin/**/*'
40
+ - 'bench/**/*'
41
+ - 'test/**/*'
42
+ - 'doc/**/*'
43
+ - 'rdoc/**/*'
44
+ - 'pub/**/*'
45
+ - 'www/**/*'
46
+ - 'demo/**/*'
47
+ - 'samples/**/*'
48
+ - 'examples/**/*'
49
+ - 'setup.rb'
50
+ - '[A-Z]*'
51
+ EXCLUDE:
52
+ - InstalledFiles
53
+ ZIP: true
54
+ GZIP: true
55
+ BZIP2: true
56
+
57
+ ANNOUNCE:
58
+ TO: ruby-talk@ruby-lang.org
59
+ FROM: *email
60
+ DOMAIN: your_domain.net
61
+ SERVER: smtp.your_email_server.com
62
+ PORT: 25
63
+ ACCOUNT: email_account_name
64
+ AUTHTYPE: login #cram_md5 #plain
65
+ FILE: ANN #which file contains tha announcement text
66
+ SLOGAN: ALL YOUR BASE ARE BELONG TO RUBY!
67
+ INFO:
68
+ - http://your_homepage.org
69
+
70
+ GEMSPEC:
71
+ ACTIVE: true
72
+
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: reap
5
5
  version: !ruby/object:Gem::Version
6
- version: 4.3.1
7
- date: 2006-03-15 00:00:00 +00:00
6
+ version: 4.3.2
7
+ date: 2006-03-29 00:00:00 -05:00
8
8
  summary: Tools for Ruby project testing, management and assistance.
9
9
  require_paths:
10
10
  - lib
@@ -36,10 +36,11 @@ files:
36
36
  - ChangeLog
37
37
  - COPYING
38
38
  - ProjectInfo
39
- - Rakefile
40
39
  - README
41
40
  - setup.rb
41
+ - note
42
42
  - bin/reap
43
+ - bin/rubytest
43
44
  - data/reap
44
45
  - data/reap/scaffold
45
46
  - data/reap/scaffold/Todo
@@ -56,9 +57,11 @@ files:
56
57
  - lib/reap/projectinfo.rb
57
58
  - lib/reap/lint.rb
58
59
  - lib/reap/task.rb
60
+ - lib/reap/setup.rb
59
61
  - lib/reap/reap.rb
60
62
  - lib/reap/interface
61
63
  - lib/reap/bin/reap.rb
64
+ - lib/reap/bin/rubytest.rb
62
65
  - lib/reap/task/rdoc.rb
63
66
  - lib/reap/task/release.rb
64
67
  - lib/reap/task/announce.rb
@@ -74,6 +77,16 @@ files:
74
77
  - lib/reap/interface/interface.rb
75
78
  - lib/reap/interface/rubyforge.rb
76
79
  - test/tc_reap.rb
80
+ - note/Rakefile
81
+ - note/license-each.rb
82
+ - note/sshpublisher.rb
83
+ - note/template.rb
84
+ - note/publisher.rb
85
+ - note/compositepublisher.rb
86
+ - note/suby-cvs.rb
87
+ - note/composite_task.rb
88
+ - note/rubyforgepublisher.rb
89
+ - note/ftptools.rb
77
90
  test_files: []
78
91
 
79
92
  rdoc_options: []
data/Rakefile DELETED
File without changes