net-github-upload 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/net/github-upload.rb +5 -5
- metadata +56 -81
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.6'
|
12
12
|
def initialize params=nil
|
13
13
|
@login = params[:login]
|
14
14
|
@token = params[:token]
|
@@ -130,10 +130,10 @@ module Net
|
|
130
130
|
})
|
131
131
|
Nokogiri::HTML(res).xpath('id("manual_downloads")/li').map do |fileinfo|
|
132
132
|
obj = {
|
133
|
-
:description =>
|
134
|
-
:date
|
135
|
-
:size
|
136
|
-
:id
|
133
|
+
:description => fileinfo.at_xpath('descendant::h4').text.force_encoding('BINARY').gsub(/.+?\xe2\x80\x94 (.+?)(\n\s*)?$/m, '\1'),
|
134
|
+
:date => fileinfo.at_xpath('descendant::p/time').attribute('title').text,
|
135
|
+
:size => fileinfo.at_xpath('descendant::p/strong').text,
|
136
|
+
:id => /\d+$/.match(fileinfo.at_xpath('a').attribute('href').text)[0]
|
137
137
|
}
|
138
138
|
anchor = fileinfo.at_xpath('descendant::h4/a')
|
139
139
|
obj[:link] = anchor.attribute('href').text
|
metadata
CHANGED
@@ -1,128 +1,103 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: net-github-upload
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 5
|
9
|
-
version: 0.0.5
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.6
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- Constellation
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2011-08-14 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: nokogiri
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70176910001920 !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
26
|
-
- -
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
segments:
|
29
|
-
- 1
|
30
|
-
- 4
|
31
|
-
- 0
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
32
21
|
version: 1.4.0
|
33
22
|
type: :runtime
|
34
|
-
version_requirements: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name: faster_xml_simple
|
37
23
|
prerelease: false
|
38
|
-
|
24
|
+
version_requirements: *70176910001920
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: faster_xml_simple
|
27
|
+
requirement: &70176910001480 !ruby/object:Gem::Requirement
|
39
28
|
none: false
|
40
|
-
requirements:
|
41
|
-
- -
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
|
44
|
-
- 0
|
45
|
-
version: "0"
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
46
33
|
type: :runtime
|
47
|
-
version_requirements: *id002
|
48
|
-
- !ruby/object:Gem::Dependency
|
49
|
-
name: json
|
50
34
|
prerelease: false
|
51
|
-
|
35
|
+
version_requirements: *70176910001480
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: json
|
38
|
+
requirement: &70176910000960 !ruby/object:Gem::Requirement
|
52
39
|
none: false
|
53
|
-
requirements:
|
54
|
-
- -
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
|
57
|
-
- 0
|
58
|
-
version: "0"
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
59
44
|
type: :runtime
|
60
|
-
version_requirements: *id003
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: httpclient
|
63
45
|
prerelease: false
|
64
|
-
|
46
|
+
version_requirements: *70176910000960
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: httpclient
|
49
|
+
requirement: &70176910000480 !ruby/object:Gem::Requirement
|
65
50
|
none: false
|
66
|
-
requirements:
|
67
|
-
- -
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
|
70
|
-
- 0
|
71
|
-
version: "0"
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
72
55
|
type: :runtime
|
73
|
-
|
74
|
-
|
75
|
-
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *70176910000480
|
58
|
+
description: ! 'Ruby Net::GitHub::Upload is upload user agent for GitHub Downloads
|
76
59
|
|
60
|
+
'
|
77
61
|
email: utatane.tea@gmail.com
|
78
62
|
executables: []
|
79
|
-
|
80
63
|
extensions: []
|
81
|
-
|
82
|
-
extra_rdoc_files:
|
64
|
+
extra_rdoc_files:
|
83
65
|
- README.rdoc
|
84
|
-
files:
|
66
|
+
files:
|
85
67
|
- README.rdoc
|
86
68
|
- Rakefile
|
87
69
|
- test/github_test.rb
|
88
70
|
- test/test
|
89
71
|
- lib/net/github-upload.rb
|
90
|
-
has_rdoc: true
|
91
72
|
homepage: http://github.com/Constellation/ruby-net-github-upload
|
92
73
|
licenses: []
|
93
|
-
|
94
74
|
post_install_message:
|
95
|
-
rdoc_options:
|
75
|
+
rdoc_options:
|
96
76
|
- --main
|
97
77
|
- README.rdoc
|
98
78
|
- --charset
|
99
79
|
- utf-8
|
100
80
|
- --line-numbers
|
101
81
|
- --inline-source
|
102
|
-
require_paths:
|
82
|
+
require_paths:
|
103
83
|
- lib
|
104
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
84
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
105
85
|
none: false
|
106
|
-
requirements:
|
107
|
-
- -
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
|
110
|
-
|
111
|
-
version: "0"
|
112
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ! '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
91
|
none: false
|
114
|
-
requirements:
|
115
|
-
- -
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
|
118
|
-
- 0
|
119
|
-
version: "0"
|
92
|
+
requirements:
|
93
|
+
- - ! '>='
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
120
96
|
requirements: []
|
121
|
-
|
122
97
|
rubyforge_project: ruby-net-github-upload
|
123
|
-
rubygems_version: 1.
|
98
|
+
rubygems_version: 1.8.6
|
124
99
|
signing_key:
|
125
100
|
specification_version: 3
|
126
101
|
summary: ruby porting of Net::GitHub::Upload
|
127
|
-
test_files:
|
102
|
+
test_files:
|
128
103
|
- test/github_test.rb
|