dropio 3.0.0.pre6 → 3.0.0.pre7
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.
- data/dropio.gemspec +3 -3
- data/lib/dropio/api.rb +15 -10
- metadata +5 -4
data/dropio.gemspec
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = %q{dropio}
|
|
5
|
-
s.version = "3.0.0.
|
|
5
|
+
s.version = "3.0.0.pre7"
|
|
6
6
|
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
|
8
|
-
s.authors = ["Jake Good, Eric Skiff, Kunal Shah, Seth Thomas Rasmussen"]
|
|
8
|
+
s.authors = ["Jake Good, Eric Skiff, Kunal Shah, Seth Thomas Rasmussen, Matthew Rathbone"]
|
|
9
9
|
s.date = %q{2010-09-21}
|
|
10
10
|
s.description = %q{A Ruby client library for the Drop.io Rich Media Backbone (RMB) API (http://backbone.drop.io). Please send all feedback to contact@dropio.com}
|
|
11
|
-
s.email = ["jake@dropio.com", "eric@dropio.com", "kunal@dropio.com", "seth@dropio.com"]
|
|
11
|
+
s.email = ["jake@dropio.com", "eric@dropio.com", "kunal@dropio.com", "seth@dropio.com", "matthew@dropio.com"]
|
|
12
12
|
s.extra_rdoc_files = ["History.rdoc", "Readme.rdoc", "Todo.rdoc"]
|
|
13
13
|
s.files = ["Gemfile", "History.rdoc", "LICENSE.txt", "Manifest", "Rakefile", "Readme.rdoc", "Todo.rdoc", "dropio.gemspec", "lib/dropio.rb", "lib/dropio/api.rb", "lib/dropio/asset.rb", "lib/dropio/client.rb", "lib/dropio/drop.rb", "lib/dropio/job.rb", "lib/dropio/resource.rb", "lib/dropio/subscription.rb", "lib/dropio/version.rb", "spec/dropio/api_spec.rb", "spec/dropio/asset_spec.rb", "spec/dropio/client_spec.rb", "spec/dropio/drop_spec.rb", "spec/dropio/subscription_spec.rb", "spec/dropio_spec.rb", "spec/spec.opts", "spec/spec_helper.rb"]
|
|
14
14
|
s.homepage = %q{http://github.com/dropio/dropio}
|
data/lib/dropio/api.rb
CHANGED
|
@@ -76,17 +76,22 @@ class Dropio::Api
|
|
|
76
76
|
File.open(file_path) do |file|
|
|
77
77
|
mime_type = (MIME::Types.type_for(file_path)[0] || MIME::Types["application/octet-stream"][0])
|
|
78
78
|
|
|
79
|
-
params =
|
|
80
|
-
|
|
81
|
-
'
|
|
82
|
-
'format' => 'json',
|
|
83
|
-
'description' => description,
|
|
79
|
+
params = {
|
|
80
|
+
"api_key" => self.class.default_params[:api_key],
|
|
81
|
+
"format" => 'json',
|
|
84
82
|
'version' => Dropio::Config.version,
|
|
85
|
-
'
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
83
|
+
'file' => UploadIO.new(file, mime_type, file_path)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
params = sign_if_needed(params)
|
|
87
|
+
# stuff passed in by a user. Done like this as if you pass a parameter without a value it can cause an issue (with the output_locations anyway)
|
|
88
|
+
# although this will be fixed in the API, we shouldn't be doing it anyway.
|
|
89
|
+
params['drop_name'] = drop_name if drop_name
|
|
90
|
+
params['description'] = description if description
|
|
91
|
+
params['conversion'] = convert_to if convert_to
|
|
92
|
+
params['pingback_url'] = pingback_url if pingback_url
|
|
93
|
+
params['output_locations'] = locs if locs
|
|
94
|
+
|
|
90
95
|
req = Net::HTTP::Post::Multipart.new(url.path, params)
|
|
91
96
|
http = Net::HTTP.new(url.host, url.port)
|
|
92
97
|
http.set_debug_output $stderr if Dropio::Config.debug
|
metadata
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dropio
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash: -
|
|
4
|
+
hash: -1876988214
|
|
5
5
|
prerelease: true
|
|
6
6
|
segments:
|
|
7
7
|
- 3
|
|
8
8
|
- 0
|
|
9
9
|
- 0
|
|
10
|
-
-
|
|
11
|
-
version: 3.0.0.
|
|
10
|
+
- pre7
|
|
11
|
+
version: 3.0.0.pre7
|
|
12
12
|
platform: ruby
|
|
13
13
|
authors:
|
|
14
|
-
- Jake Good, Eric Skiff, Kunal Shah, Seth Thomas Rasmussen
|
|
14
|
+
- Jake Good, Eric Skiff, Kunal Shah, Seth Thomas Rasmussen, Matthew Rathbone
|
|
15
15
|
autorequire:
|
|
16
16
|
bindir: bin
|
|
17
17
|
cert_chain: []
|
|
@@ -127,6 +127,7 @@ email:
|
|
|
127
127
|
- eric@dropio.com
|
|
128
128
|
- kunal@dropio.com
|
|
129
129
|
- seth@dropio.com
|
|
130
|
+
- matthew@dropio.com
|
|
130
131
|
executables: []
|
|
131
132
|
|
|
132
133
|
extensions: []
|