rubyforge 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,50 +1,52 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.11
2
+ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: rubyforge
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.1
7
- date: 2006-02-13 00:00:00.000000 -07:00
8
- summary: rubyforge
6
+ version: 0.2.0
7
+ date: 2006-09-14 00:00:00 -07:00
8
+ summary: simplistic script which automates a limited set of rubyforge operations
9
9
  require_paths:
10
- - lib
10
+ - lib
11
11
  email: ara.t.howard@noaa.gov
12
12
  homepage: http://codeforpeople.com/lib/ruby/rubyforge/
13
13
  rubyforge_project:
14
- description:
14
+ description: simplistic script which automates a limited set of rubyforge operations
15
15
  autorequire:
16
16
  default_executable:
17
17
  bindir: bin
18
- has_rdoc: false
18
+ has_rdoc: true
19
19
  required_ruby_version: !ruby/object:Gem::Version::Requirement
20
20
  requirements:
21
- -
22
- - ">"
23
- - !ruby/object:Gem::Version
24
- version: 0.0.0
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
25
24
  version:
26
25
  platform: ruby
27
26
  signing_key:
28
27
  cert_chain:
28
+ post_install_message:
29
29
  authors:
30
- - Ara T. Howard
30
+ - Ara T. Howard
31
31
  files:
32
- - README
33
- - bin
34
- - rubyforge-0.1.1.gem
35
- - gemspec.rb
36
- - install.rb
37
- - lib
38
- - bin/rubyforge
39
- - lib/http-access2
40
- - lib/http-access2.rb
41
- - lib/http-access2/cookie.rb
42
- - lib/http-access2/http.rb
43
- test_files: []
32
+ - lib/http-access2.rb
33
+ - lib/rubyforge.rb
34
+ - lib/http-access2/cookie.rb
35
+ - lib/http-access2/http.rb
36
+ - bin/CVS
37
+ - bin/rubyforge
38
+ test_files:
39
+ - test/test_rubyforge.rb
44
40
  rdoc_options: []
41
+
45
42
  extra_rdoc_files: []
43
+
46
44
  executables:
47
- - rubyforge
45
+ - CVS
46
+ - rubyforge
48
47
  extensions: []
48
+
49
49
  requirements: []
50
- dependencies: []
50
+
51
+ dependencies: []
52
+
data/README DELETED
@@ -1,125 +0,0 @@
1
- SYNOPSIS
2
-
3
- rubyforge [options]* mode [mode_args]*
4
-
5
- DESCRIPTION
6
-
7
- simplistic script which automates a limited set of rubyforge operations
8
-
9
- MODES
10
-
11
- setup()
12
- initializes your .rubyforge directory. you need to run this first before
13
- doing anything else.
14
-
15
- example :
16
- rubyforge setup
17
-
18
- login()
19
- sends username and password from config.yml (or --username/--password
20
- options) and stores login cookie in cookie.dat. this is required for
21
- subsquent operations work.
22
-
23
- example :
24
- rubyforge login
25
- rubyforge login --username zaphod --password 42
26
-
27
- create_package(group_id, package_name)
28
- creates the named package under the specified group.
29
-
30
- example :
31
- rubyforge create_package 1024 traits
32
- rubyforge login && rubyforge create_package codeforpeople.com traits
33
-
34
- notes :
35
- in order to use group_ids by name, rather than number, you must edit the
36
- rubyforge[group_ids] translation table in your config.yml.
37
-
38
- add_release(group_id, package_id, release_name, userfile)
39
- release a file as release_name under the specified group_id and
40
- package_id.
41
-
42
- example :
43
- rubyforge add_package codeforpeople.com traits 0.8.0 traits-0.8.0.gem
44
- rubyforge add_package codeforpeople.com traits 0.8.0 traits-0.8.0.tgz
45
- rubyforge add_package 1024 1242 0.8.0 traits-0.8.0.gem
46
- rubyforge login && rubyforge add_package 1024 1242 0.8.0 traits-0.8.0.gem
47
-
48
- notes :
49
- in order to use group_ids and package_ids by name, rather than number,
50
- you must edit the rubyforge[group_ids] and rubyforge[package_ids]
51
- translation tables in your config.yml.
52
-
53
- delete_package(group_id, package_name)
54
- deletes a package and all it's files.
55
-
56
- example :
57
- rubyforge delete_package codeforpeople.com traits
58
- rubyforge delete_package 1024 traits
59
-
60
- NOTES
61
-
62
- - you can determine the group_id and package_id of projects and packages by
63
-
64
- login ->
65
- my page tab ->
66
- select a project link from 'my projects' ->
67
- files tab ->
68
- admin link (not the admin tab!) ->
69
-
70
- now you'll be at page listing your packages in this project.
71
- near the bottom you'll see links to 'add a release' or 'edit a
72
- release' - hover over the url and you'll notice the query
73
- string, which looks something like
74
-
75
- ?package_id=1242&group_id=1024
76
-
77
- and that's what you need to know
78
-
79
- - don't forget to login! logging in will store a cookie in your
80
- .rubyforge directory which expires after a time. always run the login
81
- command before any operation that requires authentication, such as
82
- uploading a package.
83
-
84
- TODO
85
-
86
- - scrape rubyforge to auto-configure group_id and package_ids.
87
-
88
- - objectify the script. it's procedural butchery attm.
89
-
90
- - add error checking. this requires screen scraping to see of an operation
91
- succeeded since 200 is returned from rubyforge even for failed operations
92
- and only the html text reveals the status.
93
-
94
- - add more functionality.
95
-
96
- OPTIONS
97
-
98
- global :
99
- --help , -h
100
- this message
101
- --config , -c
102
- specify a config file (default /home/ahoward/.rubyforge/config.yml)
103
- --username , -u
104
- specify username, taken from config otherwise
105
- --password , -p
106
- specify password, taken from config otherwise
107
- --cookie_jar , -C
108
- specify cookie storage file (default /home/ahoward/.rubyforge/cookie.dat)
109
-
110
- add_release :
111
- --is_private , -P
112
- if true, release is not public
113
- --release_date , -r
114
- specify time of release (default 'now')
115
- --type_id , -t
116
- specify filetype code (default determined by ext)
117
- --processor_id , -o
118
- specify processor (default 'Any')
119
- --release_notes , -n
120
- specify release notes as string or file
121
- --release_changes , -a
122
- specify release changes as string or file
123
- --preformatted , -f
124
- specify whether release_notes/changes are preformatted
125
-
data/gemspec.rb DELETED
@@ -1,23 +0,0 @@
1
- lib, version = File::basename(File::dirname(File::expand_path(__FILE__))).split %r/-/, 2
2
-
3
- require 'rubygems'
4
-
5
- Gem::Specification::new do |spec|
6
- spec.name = lib
7
- spec.version = version
8
- spec.platform = Gem::Platform::RUBY
9
- spec.summary = lib
10
-
11
- # spec.files = Dir[ File::join("{lib,bin}", "*") ]
12
- # spec.require_path = "lib"
13
-
14
- spec.files = Dir::glob "**/**"
15
- spec.executables = Dir::glob("bin/*").map{|exe| File::basename exe}
16
-
17
- spec.has_rdoc = File::exist? "doc"
18
- spec.test_suite_file = "test/#{ lib }.rb" if File::directory? "test"
19
-
20
- spec.author = "Ara T. Howard"
21
- spec.email = "ara.t.howard@noaa.gov"
22
- spec.homepage = "http://codeforpeople.com/lib/ruby/#{ lib }/"
23
- end
data/install.rb DELETED
@@ -1,174 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require 'rbconfig'
3
- require 'find'
4
- require 'ftools'
5
- require 'tempfile'
6
- include Config
7
-
8
- LIBDIR = "lib"
9
- LIBDIR_MODE = 0644
10
-
11
- BINDIR = "bin"
12
- BINDIR_MODE = 0755
13
-
14
-
15
- $srcdir = CONFIG["srcdir"]
16
- $version = CONFIG["MAJOR"]+"."+CONFIG["MINOR"]
17
- $libdir = File.join(CONFIG["libdir"], "ruby", $version)
18
- $archdir = File.join($libdir, CONFIG["arch"])
19
- $site_libdir = $:.find {|x| x =~ /site_ruby$/}
20
- $bindir = CONFIG["bindir"] || CONFIG['BINDIR']
21
- $ruby_install_name = CONFIG['ruby_install_name'] || CONFIG['RUBY_INSTALL_NAME'] || 'ruby'
22
- $ruby_ext = CONFIG['EXEEXT'] || ''
23
- $ruby = File.join($bindir, ($ruby_install_name + $ruby_ext))
24
-
25
- if !$site_libdir
26
- $site_libdir = File.join($libdir, "site_ruby")
27
- elsif $site_libdir !~ %r/#{Regexp.quote($version)}/
28
- $site_libdir = File.join($site_libdir, $version)
29
- end
30
-
31
- def install_rb(srcdir=nil, destdir=nil, mode=nil, bin=nil)
32
- #{{{
33
- path = []
34
- dir = []
35
- Find.find(srcdir) do |f|
36
- next unless FileTest.file?(f)
37
- next if (f = f[srcdir.length+1..-1]) == nil
38
- next if (/CVS$/ =~ File.dirname(f))
39
- path.push f
40
- dir |= [File.dirname(f)]
41
- end
42
- for f in dir
43
- next if f == "."
44
- next if f == "CVS"
45
- File::makedirs(File.join(destdir, f))
46
- end
47
- for f in path
48
- next if (/\~$/ =~ f)
49
- next if (/^\./ =~ File.basename(f))
50
- unless bin
51
- File::install(File.join(srcdir, f), File.join(destdir, f), mode, true)
52
- else
53
- from = File.join(srcdir, f)
54
- to = File.join(destdir, f)
55
- shebangify(from) do |sf|
56
- $deferr.print from, " -> ", File::catname(from, to), "\n"
57
- $deferr.printf "chmod %04o %s\n", mode, to
58
- File::install(sf, to, mode, false)
59
- end
60
- end
61
- end
62
- #}}}
63
- end
64
- def shebangify f
65
- #{{{
66
- open(f) do |fd|
67
- buf = fd.read 42
68
- if buf =~ %r/^\s*#\s*!.*ruby/o
69
- ftmp = Tempfile::new("#{ $$ }_#{ File::basename(f) }")
70
- begin
71
- fd.rewind
72
- ftmp.puts "#!#{ $ruby }"
73
- while((buf = fd.read(8192)))
74
- ftmp.write buf
75
- end
76
- ftmp.close
77
- yield ftmp.path
78
- ensure
79
- ftmp.close!
80
- end
81
- else
82
- yield f
83
- end
84
- end
85
- #}}}
86
- end
87
- def ARGV.switch
88
- #{{{
89
- return nil if self.empty?
90
- arg = self.shift
91
- return nil if arg == '--'
92
- if arg =~ /^-(.)(.*)/
93
- return arg if $1 == '-'
94
- raise 'unknown switch "-"' if $2.index('-')
95
- self.unshift "-#{$2}" if $2.size > 0
96
- "-#{$1}"
97
- else
98
- self.unshift arg
99
- nil
100
- end
101
- #}}}
102
- end
103
- def ARGV.req_arg
104
- #{{{
105
- self.shift || raise('missing argument')
106
- #}}}
107
- end
108
- def linkify d
109
- #--{{{
110
- if test ?d, d
111
- versioned = Dir[ File::join(d, "*-[0-9].[0-9].[0-9].rb") ]
112
- versioned.each{|v| File::copy v, v.gsub(%r/\-[\d\.]+\.rb$/,'.rb')}
113
- end
114
- #--}}}
115
- end
116
-
117
-
118
- #
119
- # main program
120
- #
121
-
122
- libdir = $site_libdir
123
- bindir = $bindir
124
- no_linkify = false
125
- help = false
126
-
127
- usage = <<-usage
128
- #{ File::basename $0 }
129
- -d, --destdir <destdir>
130
- -l, --libdir <libdir>
131
- -b, --bindir <bindir>
132
- -r, --ruby <ruby>
133
- -n, --no_linkify
134
- -h, --help
135
- usage
136
-
137
- begin
138
- while switch = ARGV.switch
139
- case switch
140
- when '-d', '--destdir'
141
- libdir = ARGV.req_arg
142
- when '-l', '--libdir'
143
- libdir = ARGV.req_arg
144
- when '-b', '--bindir'
145
- bindir = ARGV.req_arg
146
- when '-r', '--ruby'
147
- $ruby = ARGV.req_arg
148
- when '-n', '--no_linkify'
149
- no_linkify = true
150
- when '-h', '--help'
151
- help = true
152
- else
153
- raise "unknown switch #{switch.dump}"
154
- end
155
- end
156
- rescue
157
- STDERR.puts $!.to_s
158
- STDERR.puts usage
159
- exit 1
160
- end
161
-
162
- if help
163
- STDOUT.puts usage
164
- exit
165
- end
166
-
167
- unless no_linkify
168
- linkify('lib')
169
- linkify('bin')
170
- end
171
-
172
- install_rb(LIBDIR, libdir, LIBDIR_MODE)
173
- install_rb(BINDIR, bindir, BINDIR_MODE, bin=true)
174
-
data/rubyforge-0.1.1.gem DELETED
File without changes