net-github-upload 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/net/github-upload.rb +11 -11
- metadata +10 -10
data/lib/net/github-upload.rb
CHANGED
@@ -8,7 +8,7 @@ require 'faster_xml_simple'
|
|
8
8
|
module Net
|
9
9
|
module GitHub
|
10
10
|
class Upload
|
11
|
-
VERSION = '0.0.
|
11
|
+
VERSION = '0.0.7'
|
12
12
|
def initialize params=nil
|
13
13
|
@login = params[:login]
|
14
14
|
@token = params[:token]
|
@@ -104,16 +104,6 @@ module Net
|
|
104
104
|
}
|
105
105
|
end
|
106
106
|
|
107
|
-
private
|
108
|
-
|
109
|
-
def extract_error_message(stat)
|
110
|
-
# @see http://docs.amazonwebservices.com/AmazonS3/2006-03-01/ErrorResponses.html
|
111
|
-
error = FasterXmlSimple.xml_in(stat.content)['Error']
|
112
|
-
" due to #{error['Code']} (#{error['Message']})"
|
113
|
-
rescue
|
114
|
-
''
|
115
|
-
end
|
116
|
-
|
117
107
|
def delete repos, id
|
118
108
|
HTTPClient.post("https://github.com/#{repos}/downloads/#{id.gsub( "download_", '')}", {
|
119
109
|
"_method" => "delete",
|
@@ -141,6 +131,16 @@ module Net
|
|
141
131
|
obj
|
142
132
|
end
|
143
133
|
end
|
134
|
+
|
135
|
+
private
|
136
|
+
|
137
|
+
def extract_error_message(stat)
|
138
|
+
# @see http://docs.amazonwebservices.com/AmazonS3/2006-03-01/ErrorResponses.html
|
139
|
+
error = FasterXmlSimple.xml_in(stat.content)['Error']
|
140
|
+
" due to #{error['Code']} (#{error['Message']})"
|
141
|
+
rescue
|
142
|
+
''
|
143
|
+
end
|
144
144
|
end
|
145
145
|
end
|
146
146
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: net-github-upload
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-12-22 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
16
|
-
requirement: &
|
16
|
+
requirement: &70245485988420 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.4.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70245485988420
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: faster_xml_simple
|
27
|
-
requirement: &
|
27
|
+
requirement: &70245485988000 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70245485988000
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: json
|
38
|
-
requirement: &
|
38
|
+
requirement: &70245485987540 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70245485987540
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: httpclient
|
49
|
-
requirement: &
|
49
|
+
requirement: &70245485987120 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70245485987120
|
58
58
|
description: ! 'Ruby Net::GitHub::Upload is upload user agent for GitHub Downloads
|
59
59
|
|
60
60
|
'
|