git-trac 0.0.20071104 → 0.0.20071106

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -125,7 +125,7 @@ module Git
125
125
  unless @config
126
126
  @config = {}
127
127
  exec("git-config","-l") do |line|
128
- key, value = line.split("=",2)
128
+ key, value = line.chomp.split("=",2)
129
129
  superkey, subkey = key.match(/(.*)\.(.*)/).to_a[1,2]
130
130
  @config[superkey] ||= {}
131
131
  @config[superkey][subkey.tr('-_','_-').to_sym] = value
@@ -152,7 +152,7 @@ module Git
152
152
  unless defined?(@agent)
153
153
  require 'mechanize'
154
154
  @agent = WWW::Mechanize.new {|a| a.log = nil}
155
- url = "#{url}/login"
155
+ url = "#{url()}/login"
156
156
  if options[:password]
157
157
 
158
158
  begin
@@ -87,7 +87,8 @@ module Git
87
87
  end
88
88
 
89
89
  def upload_attachment(description, filename, body)
90
- form = repository.agent.get("#{attachment_url}?action-new").forms.last
90
+ form = repository.agent.get("#{attachment_url}?action=new").forms.last
91
+ form.action = attachment_url
91
92
  author = form.fields.name("author")
92
93
  if author.any? && author.value == "anonymous"
93
94
  author.value = repository.options[:user].to_s
@@ -96,7 +97,10 @@ module Git
96
97
  attachment = form.file_uploads.name("attachment").first
97
98
  attachment.file_name = filename
98
99
  attachment.file_data = body
99
- form.submit.instance_variable_get(:@uri)
100
+ p form.fields
101
+ submission = form.submit
102
+ puts submission.instance_variable_get(:@body)
103
+ submission.instance_variable_get(:@uri)
100
104
  end
101
105
 
102
106
  def upload_patch(options = {})
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: git-trac
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.20071104
7
- date: 2007-11-04 00:00:00 -05:00
6
+ version: 0.0.20071106
7
+ date: 2007-11-06 00:00:00 -06:00
8
8
  summary: Interact with trac from a git repository pulled from svn
9
9
  require_paths:
10
10
  - lib