twurl 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +1 -2
- data/Gemfile +0 -6
- data/lib/twurl/cli.rb +1 -2
- data/lib/twurl/oauth_client.rb +2 -1
- data/lib/twurl/version.rb +1 -1
- data/twurl.gemspec +1 -1
- metadata +19 -26
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 336916fbbbadbe16fb87bf13c19ae8732622b664
|
4
|
+
data.tar.gz: 9f25b1d4a66e6ba287db425a56f32ee3b1a44c50
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f25af63121f3a5020fc228428b441de5ecb14b7e6c6cc621375779ef88802f773bc2b224a5220946c6429b8005699003beada4a3fdd4f6f34f8f6636a941a539
|
7
|
+
data.tar.gz: ad77f67ebe91b6db3890ceb9a5af474a1bafb775a84ec2fecb1641d6c5cc00df00c7f57f8360cdb939e555bddff358603f25cf8fbd5d5bdfe53bc36071353fc3
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/lib/twurl/cli.rb
CHANGED
@@ -304,9 +304,8 @@ Supported Commands: #{SUPPORTED_COMMANDS.sort.join(', ')}
|
|
304
304
|
end
|
305
305
|
|
306
306
|
def filefield
|
307
|
-
on('-F', '--file-field [field_name]', 'Specify the
|
307
|
+
on('-F', '--file-field [field_name]', 'Specify the POST parameter name for the file upload data (default: media)') do |filefield|
|
308
308
|
options.upload['filefield'] = filefield
|
309
|
-
options.upload['filefield'] = 'media[]' if options.upload['filefield'].empty?
|
310
309
|
end
|
311
310
|
end
|
312
311
|
|
data/lib/twurl/oauth_client.rb
CHANGED
@@ -79,6 +79,7 @@ module Twurl
|
|
79
79
|
if options.upload && options.upload['file'].count > 0
|
80
80
|
boundary = "00Twurl" + rand(1000000000000000000).to_s + "lruwT99"
|
81
81
|
multipart_body = []
|
82
|
+
file_field = options.upload['filefield'] ? options.upload['filefield'] : 'media[]'
|
82
83
|
|
83
84
|
options.data.each {|key, value|
|
84
85
|
multipart_body << "--#{boundary}\r\n"
|
@@ -90,7 +91,7 @@ module Twurl
|
|
90
91
|
|
91
92
|
options.upload['file'].each {|filename|
|
92
93
|
multipart_body << "--#{boundary}\r\n"
|
93
|
-
multipart_body << "Content-Disposition: form-data; name=\"#{
|
94
|
+
multipart_body << "Content-Disposition: form-data; name=\"#{file_field}\"; filename=\"#{File.basename(filename)}\"\r\n"
|
94
95
|
multipart_body << "Content-Type: application/octet-stream\r\n"
|
95
96
|
multipart_body << "Content-Transfer-Encoding: base64\r\n" if options.upload['base64']
|
96
97
|
multipart_body << "\r\n"
|
data/lib/twurl/version.rb
CHANGED
@@ -2,7 +2,7 @@ module Twurl
|
|
2
2
|
class Version
|
3
3
|
MAJOR = 0 unless defined? Twurl::Version::MAJOR
|
4
4
|
MINOR = 9 unless defined? Twurl::Version::MINOR
|
5
|
-
PATCH =
|
5
|
+
PATCH = 2 unless defined? Twurl::Version::PATCH
|
6
6
|
BETA = nil unless defined? Twurl::Version::BETA # Time.now.to_i.to_s
|
7
7
|
|
8
8
|
class << self
|
data/twurl.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
13
13
|
spec.extra_rdoc_files = %w(COPYING INSTALL README)
|
14
14
|
spec.files = `git ls-files`.split("\n")
|
15
|
-
spec.homepage = 'http://github.com/
|
15
|
+
spec.homepage = 'http://github.com/twitter/twurl'
|
16
16
|
spec.licenses = ['MIT']
|
17
17
|
spec.name = 'twurl'
|
18
18
|
spec.rdoc_options = ['--title', 'twurl -- OAuth-enabled curl for the Twitter API', '--main', 'README', '--line-numbers', '--inline-source']
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twurl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
5
|
-
prerelease:
|
4
|
+
version: 0.9.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Marcel Molina
|
@@ -10,38 +9,34 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date:
|
12
|
+
date: 2014-04-06 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: oauth
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
|
-
- - ~>
|
18
|
+
- - "~>"
|
21
19
|
- !ruby/object:Gem::Version
|
22
20
|
version: '0.4'
|
23
21
|
type: :runtime
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
24
|
requirements:
|
28
|
-
- - ~>
|
25
|
+
- - "~>"
|
29
26
|
- !ruby/object:Gem::Version
|
30
27
|
version: '0.4'
|
31
28
|
- !ruby/object:Gem::Dependency
|
32
29
|
name: bundler
|
33
30
|
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
31
|
requirements:
|
36
|
-
- - ~>
|
32
|
+
- - "~>"
|
37
33
|
- !ruby/object:Gem::Version
|
38
34
|
version: '1.0'
|
39
35
|
type: :development
|
40
36
|
prerelease: false
|
41
37
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
38
|
requirements:
|
44
|
-
- - ~>
|
39
|
+
- - "~>"
|
45
40
|
- !ruby/object:Gem::Version
|
46
41
|
version: '1.0'
|
47
42
|
description: Curl for the Twitter API
|
@@ -55,9 +50,9 @@ extra_rdoc_files:
|
|
55
50
|
- INSTALL
|
56
51
|
- README
|
57
52
|
files:
|
58
|
-
- .gemtest
|
59
|
-
- .gitignore
|
60
|
-
- .travis.yml
|
53
|
+
- ".gemtest"
|
54
|
+
- ".gitignore"
|
55
|
+
- ".travis.yml"
|
61
56
|
- COPYING
|
62
57
|
- Gemfile
|
63
58
|
- INSTALL
|
@@ -86,36 +81,35 @@ files:
|
|
86
81
|
- test/request_controller_test.rb
|
87
82
|
- test/test_helper.rb
|
88
83
|
- twurl.gemspec
|
89
|
-
homepage: http://github.com/
|
84
|
+
homepage: http://github.com/twitter/twurl
|
90
85
|
licenses:
|
91
86
|
- MIT
|
87
|
+
metadata: {}
|
92
88
|
post_install_message:
|
93
89
|
rdoc_options:
|
94
|
-
- --title
|
90
|
+
- "--title"
|
95
91
|
- twurl -- OAuth-enabled curl for the Twitter API
|
96
|
-
- --main
|
92
|
+
- "--main"
|
97
93
|
- README
|
98
|
-
- --line-numbers
|
99
|
-
- --inline-source
|
94
|
+
- "--line-numbers"
|
95
|
+
- "--inline-source"
|
100
96
|
require_paths:
|
101
97
|
- lib
|
102
98
|
required_ruby_version: !ruby/object:Gem::Requirement
|
103
|
-
none: false
|
104
99
|
requirements:
|
105
|
-
- -
|
100
|
+
- - ">="
|
106
101
|
- !ruby/object:Gem::Version
|
107
102
|
version: '0'
|
108
103
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
109
|
-
none: false
|
110
104
|
requirements:
|
111
|
-
- -
|
105
|
+
- - ">="
|
112
106
|
- !ruby/object:Gem::Version
|
113
107
|
version: 1.3.5
|
114
108
|
requirements: []
|
115
109
|
rubyforge_project: twurl
|
116
|
-
rubygems_version:
|
110
|
+
rubygems_version: 2.2.2
|
117
111
|
signing_key:
|
118
|
-
specification_version:
|
112
|
+
specification_version: 4
|
119
113
|
summary: Curl for the Twitter API
|
120
114
|
test_files:
|
121
115
|
- test/account_information_controller_test.rb
|
@@ -128,4 +122,3 @@ test_files:
|
|
128
122
|
- test/rcfile_test.rb
|
129
123
|
- test/request_controller_test.rb
|
130
124
|
- test/test_helper.rb
|
131
|
-
has_rdoc:
|