Skip to content

Commit e465c0e

Browse files
committed
* Merge id:rngtng's replace impl. thx!
1 parent cd7770a commit e465c0e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/net/github-upload.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ def upload info
3434
end
3535

3636
if info[:replace]
37-
list_files(info[:repos]).each { |obj|
37+
list_files(info[:repos]).each { |obj|
3838
next unless obj[:name] == info[:name]
3939
HTTPClient.post("http://github.com/#{info[:repos]}/downloads/#{obj[:id].gsub( "download_", '')}", {
4040
"_method" => "delete",
4141
"login" => @login,
4242
"token" => @token
43-
})
43+
})
4444
}
4545
elsif list_files(info[:repos]).any?{|obj| obj[:name] == info[:name]}
4646
raise "file '#{info[:name]}' is already uploaded. please try different name"
@@ -98,7 +98,7 @@ def upload info
9898
def replace info
9999
upload info.merge( :replace => true )
100100
end
101-
101+
102102
private
103103
def list_files repos
104104
raise "required repository name" unless repos

0 commit comments

Comments
 (0)