meta_project 0.4.13 → 0.4.14

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,5 +1,11 @@
1
1
  = MetaProject Changelog
2
2
 
3
+ == Version 0.4.14
4
+
5
+ Bugfix release
6
+
7
+ * Fixed [#2889] RubyForge login seems broken [Emmanuel Charpentier] (http://rubyurl.com/cfu)
8
+
3
9
  == Version 0.4.13
4
10
 
5
11
  Bugfix release
data/README CHANGED
@@ -1,4 +1,4 @@
1
- = MetaProject 0.4.13
1
+ = MetaProject 0.4.14
2
2
 
3
3
  MetaProject (formerly XForge) is a library that allows interaction with various project hosting servers, issue trackers, SCMs and SCM browsers through a common API.
4
4
 
data/Rakefile CHANGED
@@ -24,7 +24,7 @@ require 'rake/rdoctask'
24
24
  #
25
25
  # REMEMBER TO KEEP PKG_VERSION IN SYNC WITH THE CHANGES FILE!
26
26
  PKG_NAME = "meta_project"
27
- PKG_VERSION = "0.4.13"
27
+ PKG_VERSION = "0.4.14"
28
28
  PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
29
29
  PKG_FILES = FileList[
30
30
  '[A-Z]*',
@@ -34,7 +34,7 @@ module MetaProject
34
34
  def initialize(host, project, cookie) # :nodoc:
35
35
  @host = host
36
36
  @project = project
37
- @request_headers = { "Cookie" => cookie }
37
+ @request_headers = { "Cookie" => cookie }.merge(DEFAULT_POST_OPTIONS)
38
38
  end
39
39
 
40
40
  # This will get the +package_id+ for the project. This accepts an
@@ -26,19 +26,23 @@ module MetaProject
26
26
 
27
27
  # Logs in and returns a Session
28
28
  def login(user_name, password)
29
- http = Net::HTTP.new(@host, 80)
29
+ url = "/account/login.php"
30
+ data = [
31
+ "return_to=",
32
+ "login=Login",
33
+ "form_loginname=#{user_name}",
34
+ "form_pw=#{password}"
35
+ ].join("&")
30
36
 
31
- login_response = http.start do |http|
32
- data = [
33
- "login=1",
34
- "form_loginname=#{user_name}",
35
- "form_pw=#{password}"
36
- ].join("&")
37
- http.post("/account/login.php", data)
37
+ http = Net::HTTP.new(@host, 80)
38
+ login_response, body = http.start do |http|
39
+ http.post(url, data, DEFAULT_POST_OPTIONS)
38
40
  end
39
41
 
40
42
  cookie = login_response["set-cookie"]
41
- raise "Login failed" unless cookie
43
+ unless cookie
44
+ raise "Login failed.\nURL:#{url}\nParams:#{data}\nResponse:#{login_response.to_hash.inspect}"
45
+ end
42
46
  Session.new(@host, self, cookie)
43
47
  end
44
48
 
data/lib/meta_project.rb CHANGED
@@ -9,3 +9,11 @@ require 'meta_project/tracker'
9
9
  require 'meta_project/scm_web'
10
10
  require 'meta_project/version_parser'
11
11
  require 'rake/contrib/xforge'
12
+
13
+ module MetaProject
14
+ DEFAULT_POST_OPTIONS = {
15
+ "Content-Type" => "application/x-www-form-urlencoded",
16
+ "User-Agent" => "curl/7.13.1 (powerpc-apple-darwin8.0) libcurl/7.13.1 OpenSSL/0.9.7i zlib/1.2.3",
17
+ "Pragma" => "no-cache"
18
+ }
19
+ end
metadata CHANGED
@@ -3,94 +3,96 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: meta_project
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.4.13
7
- date: 2005-10-11 00:00:00 -04:00
8
- summary: "Ruby library for interacting with project hosting servers, scms and issue
9
- trackers."
6
+ version: 0.4.14
7
+ date: 2006-02-27 00:00:00 -06:00
8
+ summary: Ruby library for interacting with project hosting servers, scms and issue trackers.
10
9
  require_paths:
11
- - lib
10
+ - lib
12
11
  email: aslak.hellesoy@gmail.com
13
12
  homepage: http://xforge.rubyforge.org
14
13
  rubyforge_project: xforge
15
- description: "MetaProject (formerly XForge) is a library that allows interaction with various
16
- project hosting servers, issue trackers, scms and scm browsers."
14
+ description: MetaProject (formerly XForge) is a library that allows interaction with various project hosting servers, issue trackers, scms and scm browsers.
17
15
  autorequire: meta_project
18
16
  default_executable:
19
17
  bindir: bin
20
18
  has_rdoc: true
21
19
  required_ruby_version: !ruby/object:Gem::Version::Requirement
22
20
  requirements:
23
- -
24
- - ">"
25
- - !ruby/object:Gem::Version
26
- version: 0.0.0
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
27
24
  version:
28
25
  platform: ruby
29
26
  signing_key:
30
27
  cert_chain:
31
28
  authors:
32
- - Aslak Hellesoy
29
+ - Aslak Hellesoy
33
30
  files:
34
- - CHANGES
35
- - MIT-LICENSE
36
- - Rakefile
37
- - README
38
- - lib/meta_project.rb
39
- - lib/meta_project/patois.rb
40
- - lib/meta_project/project.rb
41
- - lib/meta_project/project_analyzer.rb
42
- - lib/meta_project/scm_web.rb
43
- - lib/meta_project/tracker.rb
44
- - lib/meta_project/version_parser.rb
45
- - lib/meta_project/core_ext/open_uri.rb
46
- - lib/meta_project/core_ext/pathname.rb
47
- - lib/meta_project/core_ext/string.rb
48
- - lib/meta_project/http/multipart.rb
49
- - lib/meta_project/patois/parser.rb
50
- - lib/meta_project/project/base.rb
51
- - lib/meta_project/project/codehaus.rb
52
- - lib/meta_project/project/trac.rb
53
- - lib/meta_project/project/xforge.rb
54
- - lib/meta_project/project/codehaus/codehaus_project_svn.rb
55
- - lib/meta_project/project/trac/trac_project.rb
56
- - lib/meta_project/project/xforge/ruby_forge.rb
57
- - lib/meta_project/project/xforge/session.rb
58
- - lib/meta_project/project/xforge/source_forge.rb
59
- - lib/meta_project/project/xforge/xfile.rb
60
- - lib/meta_project/project/xforge/xforge_base.rb
61
- - lib/meta_project/release/freshmeat.rb
62
- - lib/meta_project/release/raa.rb
63
- - lib/meta_project/scm_web/browser.rb
64
- - lib/meta_project/scm_web/pathname.rb
65
- - lib/meta_project/tracker/base.rb
66
- - lib/meta_project/tracker/digit_issues.rb
67
- - lib/meta_project/tracker/issue.rb
68
- - lib/meta_project/tracker/jira.rb
69
- - lib/meta_project/tracker/trac.rb
70
- - lib/meta_project/tracker/xforge.rb
71
- - lib/meta_project/tracker/jira/jira_issues.rb
72
- - lib/meta_project/tracker/jira/jira_tracker.rb
73
- - lib/meta_project/tracker/trac/trac_tracker.rb
74
- - lib/meta_project/tracker/xforge/ruby_forge_tracker.rb
75
- - lib/meta_project/tracker/xforge/source_forge_tracker.rb
76
- - lib/meta_project/tracker/xforge/xforge_tracker.rb
77
- - lib/rake/contrib/xforge.rb
78
- - lib/rake/contrib/xforge/base.rb
79
- - lib/rake/contrib/xforge/news_publisher.rb
80
- - lib/rake/contrib/xforge/release.rb
81
- - doc/base_attrs.rdoc
31
+ - CHANGES
32
+ - MIT-LICENSE
33
+ - Rakefile
34
+ - README
35
+ - lib/meta_project.rb
36
+ - lib/meta_project/patois.rb
37
+ - lib/meta_project/project.rb
38
+ - lib/meta_project/project_analyzer.rb
39
+ - lib/meta_project/scm_web.rb
40
+ - lib/meta_project/tracker.rb
41
+ - lib/meta_project/version_parser.rb
42
+ - lib/meta_project/core_ext/open_uri.rb
43
+ - lib/meta_project/core_ext/pathname.rb
44
+ - lib/meta_project/core_ext/string.rb
45
+ - lib/meta_project/http/multipart.rb
46
+ - lib/meta_project/patois/parser.rb
47
+ - lib/meta_project/project/base.rb
48
+ - lib/meta_project/project/codehaus.rb
49
+ - lib/meta_project/project/trac.rb
50
+ - lib/meta_project/project/xforge.rb
51
+ - lib/meta_project/project/codehaus/codehaus_project_svn.rb
52
+ - lib/meta_project/project/trac/trac_project.rb
53
+ - lib/meta_project/project/xforge/ruby_forge.rb
54
+ - lib/meta_project/project/xforge/session.rb
55
+ - lib/meta_project/project/xforge/source_forge.rb
56
+ - lib/meta_project/project/xforge/xfile.rb
57
+ - lib/meta_project/project/xforge/xforge_base.rb
58
+ - lib/meta_project/release/freshmeat.rb
59
+ - lib/meta_project/release/raa.rb
60
+ - lib/meta_project/scm_web/browser.rb
61
+ - lib/meta_project/scm_web/pathname.rb
62
+ - lib/meta_project/tracker/base.rb
63
+ - lib/meta_project/tracker/digit_issues.rb
64
+ - lib/meta_project/tracker/issue.rb
65
+ - lib/meta_project/tracker/jira.rb
66
+ - lib/meta_project/tracker/trac.rb
67
+ - lib/meta_project/tracker/xforge.rb
68
+ - lib/meta_project/tracker/jira/jira_issues.rb
69
+ - lib/meta_project/tracker/jira/jira_tracker.rb
70
+ - lib/meta_project/tracker/trac/trac_tracker.rb
71
+ - lib/meta_project/tracker/xforge/ruby_forge_tracker.rb
72
+ - lib/meta_project/tracker/xforge/source_forge_tracker.rb
73
+ - lib/meta_project/tracker/xforge/xforge_tracker.rb
74
+ - lib/rake/contrib/xforge.rb
75
+ - lib/rake/contrib/xforge/base.rb
76
+ - lib/rake/contrib/xforge/news_publisher.rb
77
+ - lib/rake/contrib/xforge/release.rb
78
+ - doc/base_attrs.rdoc
82
79
  test_files: []
80
+
83
81
  rdoc_options:
84
- - "--title"
85
- - MetaProject
86
- - "--main"
87
- - README
88
- - "--line-numbers"
82
+ - --title
83
+ - MetaProject
84
+ - --main
85
+ - README
86
+ - --line-numbers
89
87
  extra_rdoc_files:
90
- - README
91
- - MIT-LICENSE
92
- - CHANGES
88
+ - README
89
+ - MIT-LICENSE
90
+ - CHANGES
93
91
  executables: []
92
+
94
93
  extensions: []
94
+
95
95
  requirements: []
96
- dependencies: []
96
+
97
+ dependencies: []
98
+