vj-sdk 0.7.7 → 0.7.8
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +10 -5
- data/Rakefile +1 -7
- data/VERSION.yml +2 -2
- data/lib/videojuicer/asset.rb +1 -1
- data/lib/videojuicer/oauth/multipart_helper.rb +111 -85
- data/lib/videojuicer/oauth/request_proxy.rb +35 -27
- data/lib/videojuicer/resource/base.rb +14 -0
- data/lib/videojuicer/resource/collection.rb +12 -2
- data/lib/videojuicer.rb +3 -0
- data/spec/collection_spec.rb +3 -3
- data/spec/multipart_spec.rb +97 -0
- data/spec/shared/resource_spec.rb +14 -0
- data/vj-sdk.gemspec +31 -8
- metadata +134 -24
data/Gemfile
CHANGED
@@ -9,12 +9,17 @@ def gems(names, version)
|
|
9
9
|
end
|
10
10
|
|
11
11
|
# DataObjects, DataMapper and Merb
|
12
|
-
gem "
|
12
|
+
gem "addressable"
|
13
13
|
gem "jeweler", ">= 1.4.0"
|
14
14
|
gem "rake", ">= 0.8.7"
|
15
|
-
gem "
|
16
|
-
gem "mash"
|
15
|
+
gem "mash", ">= 0.0.3"
|
17
16
|
gem "randexp"
|
18
|
-
gem "ruby-hmac"
|
17
|
+
gem "ruby-hmac", ">= 0.3.2"
|
19
18
|
gem "liquid", "2.0.0"
|
20
|
-
gem "json", "1.4.6"
|
19
|
+
gem "json", "1.4.6"
|
20
|
+
gem "multipart-post", "~> 1.1.0"
|
21
|
+
gem "mime-types", "~> 1.16"
|
22
|
+
|
23
|
+
group :development do
|
24
|
+
gem "rspec", "~> 1.3.0"
|
25
|
+
end
|
data/Rakefile
CHANGED
@@ -3,7 +3,7 @@ require 'bundler'
|
|
3
3
|
require 'net/http'
|
4
4
|
|
5
5
|
# BUNDLER TRANSFORM!
|
6
|
-
require 'lib/bundler_runtime_patch' # Andre's OMG MEGA HAX to allow DataMapper to require successfully
|
6
|
+
require File.expand_path('../lib/bundler_runtime_patch', __FILE__) # Andre's OMG MEGA HAX to allow DataMapper to require successfully
|
7
7
|
Bundler.require :default, :vj_core_dependencies
|
8
8
|
|
9
9
|
begin
|
@@ -14,12 +14,6 @@ begin
|
|
14
14
|
gem.email = "dan@videojuicer.com"
|
15
15
|
gem.homepage = "http://github.com/videojuicer/vj-sdk"
|
16
16
|
gem.authors = ["danski", "thejohnny", "knowtheory", "sixones", "btab", "lamp"]
|
17
|
-
|
18
|
-
# Declare dependencies
|
19
|
-
gem.add_dependency "json", ">= 1.0"
|
20
|
-
gem.add_dependency "ruby-hmac", ">= 0.3.2"
|
21
|
-
gem.add_dependency "mash", ">= 0.0.3"
|
22
|
-
gem.add_dependency "liquid", "2.0.0"
|
23
17
|
end
|
24
18
|
rescue LoadError
|
25
19
|
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
data/VERSION.yml
CHANGED
data/lib/videojuicer/asset.rb
CHANGED
@@ -4,7 +4,7 @@ module Videojuicer
|
|
4
4
|
proxy = Videojuicer::OAuth::RequestProxy.new(Videojuicer.current_scope)
|
5
5
|
|
6
6
|
if options[:page]
|
7
|
-
options[:offset] = Videojuicer::Resource::Collection.
|
7
|
+
options[:offset] = Videojuicer::Resource::Collection.offset_from_page_number options.delete(:page), options[:limit]
|
8
8
|
end
|
9
9
|
|
10
10
|
response = proxy.get("/assets", "asset" => options)
|
@@ -1,100 +1,126 @@
|
|
1
|
-
# Cribbed almost entirely from Merb's multipart request helper.
|
2
|
-
# Thanks, Yehuda!
|
3
|
-
|
4
1
|
module Videojuicer
|
5
2
|
module OAuth
|
6
|
-
|
7
|
-
|
8
|
-
require 'rubygems'
|
9
|
-
gem "mime-types"
|
10
|
-
require 'mime/types'
|
11
|
-
|
12
|
-
class Param
|
13
|
-
attr_accessor :key, :value
|
3
|
+
class Multipart
|
4
|
+
include Enumerable
|
14
5
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
6
|
+
# Initialize a Multipart object
|
7
|
+
#
|
8
|
+
# @param [#each] params
|
9
|
+
#
|
10
|
+
# @return [undefined]
|
11
|
+
#
|
12
|
+
# @api private
|
13
|
+
def initialize(params = {})
|
14
|
+
@params = []
|
15
|
+
process_params(params)
|
16
|
+
end
|
22
17
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
18
|
+
# Iterate over each parameter pair
|
19
|
+
#
|
20
|
+
# @example
|
21
|
+
# multipart = Multipart.new(params)
|
22
|
+
# multipart.each { |key, value| ... }
|
23
|
+
#
|
24
|
+
# @yield [key, value]
|
25
|
+
#
|
26
|
+
# @yieldparam [#to_s] key
|
27
|
+
# the parameter key
|
28
|
+
# @yieldparam [Object] value
|
29
|
+
# the parameter value
|
30
|
+
#
|
31
|
+
# @return [self]
|
32
|
+
#
|
33
|
+
# @api public
|
34
|
+
def each(&block)
|
35
|
+
@params.each(&block)
|
36
|
+
self
|
28
37
|
end
|
29
38
|
|
30
|
-
|
31
|
-
attr_accessor :key, :filename, :content
|
39
|
+
private
|
32
40
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
41
|
+
# Recursively build a list of parameters from a nested Hash
|
42
|
+
#
|
43
|
+
# @param [#each] params
|
44
|
+
# the pair of parameter keys
|
45
|
+
# @param [#to_s] prefix
|
46
|
+
# optional prefix to each parameter key
|
47
|
+
#
|
48
|
+
# @return [undefined]
|
49
|
+
#
|
50
|
+
# @api private
|
51
|
+
def process_params(params, prefix = nil)
|
52
|
+
params.each do |key, value|
|
53
|
+
param_key = prefix ? "#{prefix}[#{key}]" : key.to_s
|
42
54
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
55
|
+
if value.respond_to?(:path)
|
56
|
+
append_file(param_key, value)
|
57
|
+
else
|
58
|
+
case value
|
59
|
+
when Hash then append_hash(param_key, value)
|
60
|
+
when Array then append_array(param_key, value)
|
61
|
+
else append_object(param_key, value)
|
62
|
+
end
|
63
|
+
end
|
48
64
|
end
|
49
65
|
end
|
50
66
|
|
51
|
-
|
52
|
-
|
53
|
-
|
67
|
+
# Append the nested hash parameters
|
68
|
+
#
|
69
|
+
# @param [#to_s] prefix
|
70
|
+
#
|
71
|
+
# @param [Hash] hash
|
72
|
+
#
|
73
|
+
# @return [undefined]
|
74
|
+
#
|
75
|
+
# @api private
|
76
|
+
def append_hash(prefix, hash)
|
77
|
+
process_params(hash, prefix)
|
78
|
+
end
|
54
79
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
80
|
+
# Append the nested array parameters
|
81
|
+
#
|
82
|
+
# @param [#to_s] prefix
|
83
|
+
#
|
84
|
+
# @param [Array] array
|
85
|
+
#
|
86
|
+
# @return [undefined]
|
87
|
+
#
|
88
|
+
# @api private
|
89
|
+
def append_array(prefix, array)
|
90
|
+
array.each_with_index do |value, index|
|
91
|
+
@params << [ "#{prefix}[#{index}]", value ]
|
60
92
|
end
|
93
|
+
end
|
61
94
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
else
|
75
|
-
if value.is_a?(Hash) || value.is_a?(Mash)
|
76
|
-
value.keys.each do |k|
|
77
|
-
push_params(value, param_key)
|
78
|
-
end
|
79
|
-
else
|
80
|
-
@multipart_params << Param.new(param_key, value)
|
81
|
-
end
|
82
|
-
end
|
83
|
-
end
|
84
|
-
end
|
95
|
+
# Append the file parameter
|
96
|
+
#
|
97
|
+
# @param [#to_s] key
|
98
|
+
#
|
99
|
+
# @param [#read] file
|
100
|
+
#
|
101
|
+
# @return [undefined]
|
102
|
+
#
|
103
|
+
# @api private
|
104
|
+
def append_file(key, file)
|
105
|
+
filename = file.path
|
106
|
+
content_type = MIME::Types.type_for(filename).first
|
85
107
|
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
end
|
108
|
+
@params << [ key, UploadIO.new(file, content_type, filename) ]
|
109
|
+
end
|
110
|
+
|
111
|
+
# Append the parameter
|
112
|
+
#
|
113
|
+
# @param [#to_s] key
|
114
|
+
#
|
115
|
+
# @param [Object] object
|
116
|
+
#
|
117
|
+
# @return [undefined]
|
118
|
+
#
|
119
|
+
# @api private
|
120
|
+
def append_object(key, object)
|
121
|
+
@params << [ key, object ]
|
122
|
+
end
|
123
|
+
|
124
|
+
end # module Multipart
|
125
|
+
end # module OAuth
|
126
|
+
end # module Videojuicer
|
@@ -53,49 +53,57 @@ module Videojuicer
|
|
53
53
|
def make_request(method, host, port, path, params={})
|
54
54
|
# Strip the files from the parameters to determine what, from the whole bundle, needs signing
|
55
55
|
signature_params, multipart_params = split_by_signature_eligibility(params)
|
56
|
-
|
56
|
+
|
57
|
+
query_string = nil
|
58
|
+
|
57
59
|
if multipart_params.any?
|
58
60
|
# Sign the params and include the as multipart
|
59
61
|
multipart_params = flatten_params(
|
60
62
|
authify_params(method, path, signature_params).deep_merge(multipart_params)
|
61
63
|
)
|
62
|
-
query_string = ""
|
63
64
|
else
|
64
65
|
# Use the query string
|
65
66
|
query_string = authified_query_string(method, path, signature_params)
|
66
67
|
end
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
68
|
+
|
69
|
+
uri = Addressable::URI.new(
|
70
|
+
:scheme => protocol,
|
71
|
+
:host => host,
|
72
|
+
:port => port,
|
73
|
+
:path => path,
|
74
|
+
:query => query_string
|
75
|
+
)
|
76
|
+
|
77
|
+
klass = request_class_for_method(method)
|
78
|
+
|
79
|
+
if multipart_params.any?
|
80
|
+
request = klass::Multipart.new(
|
81
|
+
uri.request_uri,
|
82
|
+
Videojuicer::OAuth::Multipart.new(multipart_params)
|
83
|
+
)
|
77
84
|
else
|
78
|
-
|
85
|
+
request = klass.new(uri.request_uri)
|
86
|
+
|
79
87
|
case method
|
80
88
|
when :post, :put
|
81
|
-
|
82
|
-
|
83
|
-
request
|
89
|
+
# Send a content-length on POST and PUT to avoid an HTTP 411 response
|
90
|
+
query_string = uri.query.to_s
|
91
|
+
request = klass.new(uri.path)
|
92
|
+
request.content_type = 'application/x-www-form-urlencoded'
|
84
93
|
request.content_length = query_string.length
|
94
|
+
request.body = query_string
|
85
95
|
end
|
86
96
|
end
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
#response = HTTPClient.send(method, url, multipart_params)
|
91
|
-
response = Net::HTTP.start(host, port) {|http| http.request(request) }
|
92
|
-
rescue EOFError => e
|
93
|
-
raise "EOF error when accessing #{url.inspect}"
|
94
|
-
rescue Errno::ECONNREFUSED => e
|
95
|
-
raise "Could not connect to #{url.inspect}"
|
97
|
+
|
98
|
+
response = Net::HTTP.start(uri.host, uri.port) do |http|
|
99
|
+
http.request(request)
|
96
100
|
end
|
97
|
-
|
98
|
-
|
101
|
+
|
102
|
+
handle_response(response, request)
|
103
|
+
rescue EOFError => e
|
104
|
+
raise "EOF error when accessing #{uri.inspect}"
|
105
|
+
rescue Errno::ECONNREFUSED => e
|
106
|
+
raise "Could not connect to #{uri.inspect}"
|
99
107
|
end
|
100
108
|
|
101
109
|
def host_stub(_protocol=protocol, _host=host, _port=port)
|
@@ -120,6 +120,20 @@ module Videojuicer
|
|
120
120
|
proxy_for(config).delete(resource_path)
|
121
121
|
end
|
122
122
|
|
123
|
+
# Converts model attributes and errors (if any) to a json string
|
124
|
+
#
|
125
|
+
#
|
126
|
+
# @return [String]
|
127
|
+
#
|
128
|
+
#
|
129
|
+
# @api public
|
130
|
+
def to_json
|
131
|
+
JSON.generate({
|
132
|
+
:attributes => @attributes,
|
133
|
+
:errors => errors
|
134
|
+
})
|
135
|
+
end
|
136
|
+
|
123
137
|
module ClassMethods
|
124
138
|
|
125
139
|
# Finds all objects matching the criteria. Also allows filterable methods.
|
@@ -21,8 +21,18 @@ module Videojuicer
|
|
21
21
|
self.limit = limit
|
22
22
|
end
|
23
23
|
|
24
|
-
#
|
25
|
-
|
24
|
+
# Provides an offset when given a page number
|
25
|
+
#
|
26
|
+
#
|
27
|
+
# @param [Integer] page
|
28
|
+
# @param [Integer] limit
|
29
|
+
#
|
30
|
+
#
|
31
|
+
# @return [Integer]
|
32
|
+
#
|
33
|
+
#
|
34
|
+
# @api public
|
35
|
+
def self.offset_from_page_number page, limit
|
26
36
|
page = page.to_i
|
27
37
|
return 0 if page == 1
|
28
38
|
(page - 1) * limit.to_i
|
data/lib/videojuicer.rb
CHANGED
@@ -2,10 +2,13 @@ $:.unshift File.dirname(__FILE__) # For use/testing when no gem is installed
|
|
2
2
|
|
3
3
|
# Gem and stdlib dependencies
|
4
4
|
require 'rubygems'
|
5
|
+
require 'addressable/uri'
|
5
6
|
require 'cgi'
|
6
7
|
require 'json'
|
7
8
|
require 'hmac-sha1'
|
9
|
+
require 'mime/types'
|
8
10
|
require 'net/http'
|
11
|
+
require 'net/http/post/multipart'
|
9
12
|
require 'liquid'
|
10
13
|
|
11
14
|
# Core ext
|
data/spec/collection_spec.rb
CHANGED
@@ -39,17 +39,17 @@ describe Videojuicer::Resource::Collection do
|
|
39
39
|
end
|
40
40
|
|
41
41
|
it "provides a correct offset for a page number and limit when the page is 1" do
|
42
|
-
offset = Videojuicer::Resource::Collection.
|
42
|
+
offset = Videojuicer::Resource::Collection.offset_from_page_number 1, 20
|
43
43
|
offset.should == 0
|
44
44
|
end
|
45
45
|
|
46
46
|
it "should provide a correct offset" do
|
47
|
-
offset = Videojuicer::Resource::Collection.
|
47
|
+
offset = Videojuicer::Resource::Collection.offset_from_page_number 2, 20
|
48
48
|
offset.should == 20
|
49
49
|
end
|
50
50
|
|
51
51
|
it "should be able to take a string as a page and limit argument" do
|
52
|
-
offset = Videojuicer::Resource::Collection.
|
52
|
+
offset = Videojuicer::Resource::Collection.offset_from_page_number "2", "20"
|
53
53
|
offset.should == 20
|
54
54
|
end
|
55
55
|
|
@@ -0,0 +1,97 @@
|
|
1
|
+
require 'helpers/spec_helper'
|
2
|
+
|
3
|
+
describe Videojuicer::OAuth::Multipart do
|
4
|
+
describe '.new' do
|
5
|
+
context 'with no parameters' do
|
6
|
+
subject { described_class.new }
|
7
|
+
|
8
|
+
it { should be_kind_of(described_class) }
|
9
|
+
|
10
|
+
its(:to_a) { should be_empty }
|
11
|
+
end
|
12
|
+
|
13
|
+
context 'with non-nested parameters' do
|
14
|
+
subject { described_class.new(params) }
|
15
|
+
|
16
|
+
let(:params) { { :a => 1 } }
|
17
|
+
|
18
|
+
it { should be_kind_of(described_class) }
|
19
|
+
|
20
|
+
its(:to_a) { should == [ [ 'a', 1 ] ] }
|
21
|
+
end
|
22
|
+
|
23
|
+
context 'with a nested Hash' do
|
24
|
+
subject { described_class.new(params) }
|
25
|
+
|
26
|
+
let(:params) { { :a => { :b => 2 } } }
|
27
|
+
|
28
|
+
it { should be_kind_of(described_class) }
|
29
|
+
|
30
|
+
its(:to_a) { should == [ [ 'a[b]', 2 ] ] }
|
31
|
+
end
|
32
|
+
|
33
|
+
context 'with a nested Array' do
|
34
|
+
subject { described_class.new(params) }
|
35
|
+
|
36
|
+
let(:params) { { :a => [ 1, 2, 3 ] } }
|
37
|
+
|
38
|
+
it { should be_kind_of(described_class) }
|
39
|
+
|
40
|
+
its(:to_a) { should == [ [ 'a[0]', 1 ], [ 'a[1]', 2 ], [ 'a[2]', 3 ] ] }
|
41
|
+
end
|
42
|
+
|
43
|
+
context 'with a file' do
|
44
|
+
subject { described_class.new(params) }
|
45
|
+
|
46
|
+
let(:params) { { :file => file } }
|
47
|
+
let(:file) { File.open(__FILE__) }
|
48
|
+
let(:content_type) { MIME::Types['application/x-ruby'] }
|
49
|
+
|
50
|
+
before do
|
51
|
+
# need to allow the UploadIO instances to be comparable
|
52
|
+
UploadIO.class_eval do
|
53
|
+
def ==(other)
|
54
|
+
content_type == other.content_type &&
|
55
|
+
original_filename == other.original_filename &&
|
56
|
+
local_path == other.local_path
|
57
|
+
io == other.io
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
it { should be_kind_of(described_class) }
|
63
|
+
|
64
|
+
it 'wraps the file in an UploadIO instance' do
|
65
|
+
Hash[ subject.to_a ]['file'].should == UploadIO.new(file, content_type, __FILE__)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
describe '#each' do
|
71
|
+
subject { object.each { |*yieldparams| yields << yieldparams } }
|
72
|
+
|
73
|
+
let(:yields) { [] }
|
74
|
+
|
75
|
+
context 'with no parameters' do
|
76
|
+
let(:object) { described_class.new }
|
77
|
+
|
78
|
+
it { should equal(object) }
|
79
|
+
|
80
|
+
it 'yields nothing' do
|
81
|
+
expect { subject }.to_not change { yields.dup }
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
context 'with parameters' do
|
86
|
+
let(:object) { described_class.new(:a => 1) }
|
87
|
+
|
88
|
+
it { should equal(object) }
|
89
|
+
|
90
|
+
it 'yields the parameters' do
|
91
|
+
expect { subject }.to change { yields.dup }.
|
92
|
+
from([]).
|
93
|
+
to([ [ [ 'a', 1 ] ] ])
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
@@ -163,5 +163,19 @@ shared_examples_for "a RESTFUL resource model" do
|
|
163
163
|
lambda {@record.reload}.should raise_error(Videojuicer::Exceptions::NoResource)
|
164
164
|
end
|
165
165
|
end
|
166
|
+
|
167
|
+
describe "klass#to_json" do
|
168
|
+
|
169
|
+
before :each do
|
170
|
+
@record = @klass.new
|
171
|
+
end
|
172
|
+
|
173
|
+
it "should provide a valid json string" do
|
174
|
+
@record.to_json.class.should == String
|
175
|
+
tmp = JSON.parse @record.to_json
|
176
|
+
tmp['attributes'].should_not be_nil
|
177
|
+
tmp['errors'].length.should == 0
|
178
|
+
end
|
179
|
+
end
|
166
180
|
|
167
181
|
end
|
data/vj-sdk.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{vj-sdk}
|
8
|
-
s.version = "0.7.
|
8
|
+
s.version = "0.7.8"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["danski", "thejohnny", "knowtheory", "sixones", "btab", "lamp"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-04-12}
|
13
13
|
s.email = %q{dan@videojuicer.com}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"LICENSE",
|
@@ -88,6 +88,7 @@ Gem::Specification.new do |s|
|
|
88
88
|
"spec/helpers/spec_fixtures.rb",
|
89
89
|
"spec/helpers/spec_helper.rb",
|
90
90
|
"spec/insert_spec.rb",
|
91
|
+
"spec/multipart_spec.rb",
|
91
92
|
"spec/presentation_spec.rb",
|
92
93
|
"spec/preset_spec.rb",
|
93
94
|
"spec/property_registry_spec.rb",
|
@@ -130,6 +131,7 @@ Gem::Specification.new do |s|
|
|
130
131
|
"spec/helpers/spec_fixtures.rb",
|
131
132
|
"spec/helpers/spec_helper.rb",
|
132
133
|
"spec/insert_spec.rb",
|
134
|
+
"spec/multipart_spec.rb",
|
133
135
|
"spec/presentation_spec.rb",
|
134
136
|
"spec/preset_spec.rb",
|
135
137
|
"spec/property_registry_spec.rb",
|
@@ -151,21 +153,42 @@ Gem::Specification.new do |s|
|
|
151
153
|
s.specification_version = 3
|
152
154
|
|
153
155
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
154
|
-
s.add_runtime_dependency(%q<
|
155
|
-
s.add_runtime_dependency(%q<
|
156
|
+
s.add_runtime_dependency(%q<addressable>, [">= 0"])
|
157
|
+
s.add_runtime_dependency(%q<jeweler>, [">= 1.4.0"])
|
158
|
+
s.add_runtime_dependency(%q<rake>, [">= 0.8.7"])
|
156
159
|
s.add_runtime_dependency(%q<mash>, [">= 0.0.3"])
|
160
|
+
s.add_runtime_dependency(%q<randexp>, [">= 0"])
|
161
|
+
s.add_runtime_dependency(%q<ruby-hmac>, [">= 0.3.2"])
|
157
162
|
s.add_runtime_dependency(%q<liquid>, ["= 2.0.0"])
|
163
|
+
s.add_runtime_dependency(%q<json>, ["= 1.4.6"])
|
164
|
+
s.add_runtime_dependency(%q<multipart-post>, ["~> 1.1.0"])
|
165
|
+
s.add_runtime_dependency(%q<mime-types>, ["~> 1.16"])
|
166
|
+
s.add_development_dependency(%q<rspec>, ["~> 1.3.0"])
|
158
167
|
else
|
159
|
-
s.add_dependency(%q<
|
160
|
-
s.add_dependency(%q<
|
168
|
+
s.add_dependency(%q<addressable>, [">= 0"])
|
169
|
+
s.add_dependency(%q<jeweler>, [">= 1.4.0"])
|
170
|
+
s.add_dependency(%q<rake>, [">= 0.8.7"])
|
161
171
|
s.add_dependency(%q<mash>, [">= 0.0.3"])
|
172
|
+
s.add_dependency(%q<randexp>, [">= 0"])
|
173
|
+
s.add_dependency(%q<ruby-hmac>, [">= 0.3.2"])
|
162
174
|
s.add_dependency(%q<liquid>, ["= 2.0.0"])
|
175
|
+
s.add_dependency(%q<json>, ["= 1.4.6"])
|
176
|
+
s.add_dependency(%q<multipart-post>, ["~> 1.1.0"])
|
177
|
+
s.add_dependency(%q<mime-types>, ["~> 1.16"])
|
178
|
+
s.add_dependency(%q<rspec>, ["~> 1.3.0"])
|
163
179
|
end
|
164
180
|
else
|
165
|
-
s.add_dependency(%q<
|
166
|
-
s.add_dependency(%q<
|
181
|
+
s.add_dependency(%q<addressable>, [">= 0"])
|
182
|
+
s.add_dependency(%q<jeweler>, [">= 1.4.0"])
|
183
|
+
s.add_dependency(%q<rake>, [">= 0.8.7"])
|
167
184
|
s.add_dependency(%q<mash>, [">= 0.0.3"])
|
185
|
+
s.add_dependency(%q<randexp>, [">= 0"])
|
186
|
+
s.add_dependency(%q<ruby-hmac>, [">= 0.3.2"])
|
168
187
|
s.add_dependency(%q<liquid>, ["= 2.0.0"])
|
188
|
+
s.add_dependency(%q<json>, ["= 1.4.6"])
|
189
|
+
s.add_dependency(%q<multipart-post>, ["~> 1.1.0"])
|
190
|
+
s.add_dependency(%q<mime-types>, ["~> 1.16"])
|
191
|
+
s.add_dependency(%q<rspec>, ["~> 1.3.0"])
|
169
192
|
end
|
170
193
|
end
|
171
194
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vj-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 0.7.
|
9
|
+
- 8
|
10
|
+
version: 0.7.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- danski
|
@@ -20,44 +20,57 @@ autorequire:
|
|
20
20
|
bindir: bin
|
21
21
|
cert_chain: []
|
22
22
|
|
23
|
-
date: 2011-
|
23
|
+
date: 2011-04-12 00:00:00 +01:00
|
24
24
|
default_executable:
|
25
25
|
dependencies:
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
|
-
|
27
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
hash: 3
|
33
|
+
segments:
|
34
|
+
- 0
|
35
|
+
version: "0"
|
28
36
|
prerelease: false
|
29
|
-
|
37
|
+
type: :runtime
|
38
|
+
requirement: *id001
|
39
|
+
name: addressable
|
40
|
+
- !ruby/object:Gem::Dependency
|
41
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
30
42
|
none: false
|
31
43
|
requirements:
|
32
44
|
- - ">="
|
33
45
|
- !ruby/object:Gem::Version
|
34
|
-
hash:
|
46
|
+
hash: 7
|
35
47
|
segments:
|
36
48
|
- 1
|
49
|
+
- 4
|
37
50
|
- 0
|
38
|
-
version:
|
51
|
+
version: 1.4.0
|
52
|
+
prerelease: false
|
39
53
|
type: :runtime
|
40
|
-
|
54
|
+
requirement: *id002
|
55
|
+
name: jeweler
|
41
56
|
- !ruby/object:Gem::Dependency
|
42
|
-
|
43
|
-
prerelease: false
|
44
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
57
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
45
58
|
none: false
|
46
59
|
requirements:
|
47
60
|
- - ">="
|
48
61
|
- !ruby/object:Gem::Version
|
49
|
-
hash:
|
62
|
+
hash: 49
|
50
63
|
segments:
|
51
64
|
- 0
|
52
|
-
-
|
53
|
-
-
|
54
|
-
version: 0.
|
65
|
+
- 8
|
66
|
+
- 7
|
67
|
+
version: 0.8.7
|
68
|
+
prerelease: false
|
55
69
|
type: :runtime
|
56
|
-
|
70
|
+
requirement: *id003
|
71
|
+
name: rake
|
57
72
|
- !ruby/object:Gem::Dependency
|
58
|
-
|
59
|
-
prerelease: false
|
60
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
73
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
61
74
|
none: false
|
62
75
|
requirements:
|
63
76
|
- - ">="
|
@@ -68,12 +81,42 @@ dependencies:
|
|
68
81
|
- 0
|
69
82
|
- 3
|
70
83
|
version: 0.0.3
|
84
|
+
prerelease: false
|
71
85
|
type: :runtime
|
72
|
-
|
86
|
+
requirement: *id004
|
87
|
+
name: mash
|
73
88
|
- !ruby/object:Gem::Dependency
|
74
|
-
|
89
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
90
|
+
none: false
|
91
|
+
requirements:
|
92
|
+
- - ">="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
hash: 3
|
95
|
+
segments:
|
96
|
+
- 0
|
97
|
+
version: "0"
|
75
98
|
prerelease: false
|
76
|
-
|
99
|
+
type: :runtime
|
100
|
+
requirement: *id005
|
101
|
+
name: randexp
|
102
|
+
- !ruby/object:Gem::Dependency
|
103
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
104
|
+
none: false
|
105
|
+
requirements:
|
106
|
+
- - ">="
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
hash: 23
|
109
|
+
segments:
|
110
|
+
- 0
|
111
|
+
- 3
|
112
|
+
- 2
|
113
|
+
version: 0.3.2
|
114
|
+
prerelease: false
|
115
|
+
type: :runtime
|
116
|
+
requirement: *id006
|
117
|
+
name: ruby-hmac
|
118
|
+
- !ruby/object:Gem::Dependency
|
119
|
+
version_requirements: &id007 !ruby/object:Gem::Requirement
|
77
120
|
none: false
|
78
121
|
requirements:
|
79
122
|
- - "="
|
@@ -84,8 +127,73 @@ dependencies:
|
|
84
127
|
- 0
|
85
128
|
- 0
|
86
129
|
version: 2.0.0
|
130
|
+
prerelease: false
|
131
|
+
type: :runtime
|
132
|
+
requirement: *id007
|
133
|
+
name: liquid
|
134
|
+
- !ruby/object:Gem::Dependency
|
135
|
+
version_requirements: &id008 !ruby/object:Gem::Requirement
|
136
|
+
none: false
|
137
|
+
requirements:
|
138
|
+
- - "="
|
139
|
+
- !ruby/object:Gem::Version
|
140
|
+
hash: 11
|
141
|
+
segments:
|
142
|
+
- 1
|
143
|
+
- 4
|
144
|
+
- 6
|
145
|
+
version: 1.4.6
|
146
|
+
prerelease: false
|
147
|
+
type: :runtime
|
148
|
+
requirement: *id008
|
149
|
+
name: json
|
150
|
+
- !ruby/object:Gem::Dependency
|
151
|
+
version_requirements: &id009 !ruby/object:Gem::Requirement
|
152
|
+
none: false
|
153
|
+
requirements:
|
154
|
+
- - ~>
|
155
|
+
- !ruby/object:Gem::Version
|
156
|
+
hash: 19
|
157
|
+
segments:
|
158
|
+
- 1
|
159
|
+
- 1
|
160
|
+
- 0
|
161
|
+
version: 1.1.0
|
162
|
+
prerelease: false
|
87
163
|
type: :runtime
|
88
|
-
|
164
|
+
requirement: *id009
|
165
|
+
name: multipart-post
|
166
|
+
- !ruby/object:Gem::Dependency
|
167
|
+
version_requirements: &id010 !ruby/object:Gem::Requirement
|
168
|
+
none: false
|
169
|
+
requirements:
|
170
|
+
- - ~>
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
hash: 47
|
173
|
+
segments:
|
174
|
+
- 1
|
175
|
+
- 16
|
176
|
+
version: "1.16"
|
177
|
+
prerelease: false
|
178
|
+
type: :runtime
|
179
|
+
requirement: *id010
|
180
|
+
name: mime-types
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
version_requirements: &id011 !ruby/object:Gem::Requirement
|
183
|
+
none: false
|
184
|
+
requirements:
|
185
|
+
- - ~>
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
hash: 27
|
188
|
+
segments:
|
189
|
+
- 1
|
190
|
+
- 3
|
191
|
+
- 0
|
192
|
+
version: 1.3.0
|
193
|
+
prerelease: false
|
194
|
+
type: :development
|
195
|
+
requirement: *id011
|
196
|
+
name: rspec
|
89
197
|
description:
|
90
198
|
email: dan@videojuicer.com
|
91
199
|
executables: []
|
@@ -168,6 +276,7 @@ files:
|
|
168
276
|
- spec/helpers/spec_fixtures.rb
|
169
277
|
- spec/helpers/spec_helper.rb
|
170
278
|
- spec/insert_spec.rb
|
279
|
+
- spec/multipart_spec.rb
|
171
280
|
- spec/presentation_spec.rb
|
172
281
|
- spec/preset_spec.rb
|
173
282
|
- spec/property_registry_spec.rb
|
@@ -239,6 +348,7 @@ test_files:
|
|
239
348
|
- spec/helpers/spec_fixtures.rb
|
240
349
|
- spec/helpers/spec_helper.rb
|
241
350
|
- spec/insert_spec.rb
|
351
|
+
- spec/multipart_spec.rb
|
242
352
|
- spec/presentation_spec.rb
|
243
353
|
- spec/preset_spec.rb
|
244
354
|
- spec/property_registry_spec.rb
|