rubyforge 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/rubyforge.rb +23 -15
  2. metadata +6 -7
@@ -8,25 +8,24 @@ require 'yaml'
8
8
  $TESTING = false unless defined? $TESTING
9
9
 
10
10
  # HACK to fix http-access2 cookie selection bug
11
- module WebAgent::CookieUtils
12
- alias :old_domain_match :domain_match
13
- def domain_match(host, domain)
14
- case domain
15
- when /\d+\.\d+\.\d+\.\d+/
16
- return (host == domain)
17
- when '.'
18
- return true
19
- when /^\./
20
- #return tail_match?(domain, host)
21
- return tail_match?(host, domain)
22
- else
23
- return (host == domain)
11
+ class WebAgent # :nodoc: all
12
+ module CookieUtils
13
+ alias :old_domain_match :domain_match
14
+ def domain_match(host, domain)
15
+ case domain
16
+ when /^\./
17
+ return tail_match?(host, domain) # was (domain, host)
18
+ else
19
+ return old_domain_match(host, domain)
20
+ end
24
21
  end
25
22
  end
26
23
  end
27
24
 
28
25
  class RubyForge
29
- VERSION = "0.2.0"
26
+
27
+ # :stopdoc:
28
+ VERSION = "0.2.1"
30
29
  HOME = ENV["HOME"] || ENV["HOMEPATH"] || File::expand_path("~")
31
30
  RUBYFORGE_D = File::join HOME, ".rubyforge"
32
31
  CONFIG_F = File::join RUBYFORGE_D, "config.yml"
@@ -36,8 +35,10 @@ class RubyForge
36
35
  # and DATA is relative to $0, not __FILE__.
37
36
  CONFIG = File.read(__FILE__).split(/__END__/).last.gsub(/#\{(.*)\}/) { eval $1 }
38
37
 
39
- attr_reader :config
40
38
  attr_reader :client if $TESTING
39
+ # :startdoc:
40
+
41
+ attr_reader :config
41
42
 
42
43
  def initialize(config=CONFIG_F, opts={})
43
44
  @config = test(?e, config) ? IO::read(config) : CONFIG
@@ -240,6 +241,13 @@ class RubyForge
240
241
 
241
242
  client.save_cookie_store
242
243
 
244
+ if $DEBUG then
245
+ response.sub!(/\A.*end tabGenerator -->/m, '')
246
+ response.gsub!(/\t/, ' ')
247
+ response.gsub!(/\n{3,}/, "\n\n")
248
+ puts response
249
+ end
250
+
243
251
  return response
244
252
  end
245
253
 
metadata CHANGED
@@ -3,15 +3,15 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: rubyforge
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.2.0
6
+ version: 0.2.1
7
7
  date: 2006-09-14 00:00:00 -07:00
8
- summary: simplistic script which automates a limited set of rubyforge operations
8
+ summary: A simplistic script which automates a limited set of rubyforge operations
9
9
  require_paths:
10
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: simplistic script which automates a limited set of rubyforge operations
14
+ description: A simplistic script which automates a limited set of rubyforge operations
15
15
  autorequire:
16
16
  default_executable:
17
17
  bindir: bin
@@ -29,12 +29,12 @@ post_install_message:
29
29
  authors:
30
30
  - Ara T. Howard
31
31
  files:
32
+ - bin/rubyforge
32
33
  - lib/http-access2.rb
33
- - lib/rubyforge.rb
34
34
  - lib/http-access2/cookie.rb
35
35
  - lib/http-access2/http.rb
36
- - bin/CVS
37
- - bin/rubyforge
36
+ - lib/rubyforge.rb
37
+ - test/test_rubyforge.rb
38
38
  test_files:
39
39
  - test/test_rubyforge.rb
40
40
  rdoc_options: []
@@ -42,7 +42,6 @@ rdoc_options: []
42
42
  extra_rdoc_files: []
43
43
 
44
44
  executables:
45
- - CVS
46
45
  - rubyforge
47
46
  extensions: []
48
47