videojuicer-vj-sdk 0.1.5 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +3 -3
- data/VERSION.yml +1 -1
- data/lib/core_ext/hash.rb +13 -1
- data/lib/core_ext/object.rb +15 -0
- data/lib/core_ext/string.rb +11 -0
- data/lib/sdk_connection_harness.rb +25 -11
- data/lib/videojuicer.rb +13 -9
- data/lib/videojuicer/asset/audio.rb +5 -4
- data/lib/videojuicer/asset/base.rb +30 -15
- data/lib/videojuicer/asset/flash.rb +8 -0
- data/lib/videojuicer/asset/image.rb +2 -2
- data/lib/videojuicer/asset/video.rb +12 -9
- data/lib/videojuicer/campaign.rb +10 -1
- data/lib/videojuicer/campaign_policy.rb +116 -0
- data/lib/videojuicer/criterion/base.rb +56 -0
- data/lib/videojuicer/criterion/date_range.rb +7 -17
- data/lib/videojuicer/criterion/geolocation.rb +11 -20
- data/lib/videojuicer/criterion/request.rb +8 -17
- data/lib/videojuicer/criterion/time.rb +8 -18
- data/lib/videojuicer/criterion/week_day.rb +13 -17
- data/lib/videojuicer/oauth/request_proxy.rb +19 -13
- data/lib/videojuicer/presentation.rb +6 -0
- data/lib/videojuicer/promo/base.rb +72 -0
- data/lib/videojuicer/resource/base.rb +17 -15
- data/lib/videojuicer/resource/embeddable.rb +30 -0
- data/lib/videojuicer/resource/inferrable.rb +67 -7
- data/lib/videojuicer/resource/property_registry.rb +19 -0
- data/lib/videojuicer/resource/relationships/belongs_to.rb +2 -1
- data/lib/videojuicer/resource/types.rb +28 -0
- data/spec/assets/audio_spec.rb +24 -0
- data/spec/assets/flash_spec.rb +24 -0
- data/spec/assets/image_spec.rb +24 -0
- data/spec/assets/text_spec.rb +24 -0
- data/spec/assets/video_spec.rb +24 -0
- data/spec/campaign_policy_spec.rb +41 -0
- data/spec/campaign_spec.rb +0 -12
- data/spec/criterion/date_range_spec.rb +24 -0
- data/spec/criterion/geolocation_spec.rb +23 -0
- data/spec/criterion/request_spec.rb +23 -0
- data/spec/criterion/time_spec.rb +23 -0
- data/spec/criterion/week_day_spec.rb +23 -0
- data/spec/files/flash.swf +0 -0
- data/spec/helpers/be_equal_to.rb +26 -0
- data/spec/helpers/spec_fixtures.rb +214 -0
- data/spec/helpers/spec_helper.rb +27 -25
- data/spec/presentation_spec.rb +2 -15
- data/spec/promos/audio_spec.rb +23 -0
- data/spec/promos/image_spec.rb +24 -0
- data/spec/promos/text_spec.rb +23 -0
- data/spec/promos/video_spec.rb +23 -0
- data/spec/request_proxy_spec.rb +8 -12
- data/spec/session_spec.rb +3 -1
- data/spec/shared/dependent_spec.rb +40 -0
- data/spec/shared/embeddable_spec.rb +34 -0
- data/spec/shared/model_spec.rb +74 -0
- data/spec/shared/resource_spec.rb +12 -41
- data/spec/spec.opts +1 -1
- data/spec/user_spec.rb +5 -27
- data/tasks/vj-core.rb +3 -2
- data/vj-sdk.gemspec +56 -24
- metadata +53 -23
- data/lib/videojuicer/criterion/affiliate.rb +0 -21
- data/lib/videojuicer/criterion/embed.rb +0 -12
- data/spec/audio_spec.rb +0 -45
- data/spec/criteria/date_range_spec.rb +0 -37
- data/spec/criteria/geolocation_spec.rb +0 -38
- data/spec/criteria/request_spec.rb +0 -36
- data/spec/criteria/time_spec.rb +0 -37
- data/spec/criteria/week_day_spec.rb +0 -39
- data/spec/image_spec.rb +0 -44
- data/spec/text_spec.rb +0 -42
- data/spec/video_spec.rb +0 -50
data/tasks/vj-core.rb
CHANGED
@@ -5,12 +5,13 @@
|
|
5
5
|
=end
|
6
6
|
|
7
7
|
require 'net/http'
|
8
|
-
require
|
8
|
+
require File.join(File.dirname(__FILE__), "..", "lib", "sdk_connection_harness")
|
9
9
|
|
10
10
|
namespace :videojuicer do
|
11
11
|
namespace :core do
|
12
12
|
|
13
13
|
task :setup do
|
14
|
+
Rake::Task['videojuicer:core:stop'].invoke
|
14
15
|
Rake::Task['videojuicer:core:load_fixtures'].invoke
|
15
16
|
Rake::Task['videojuicer:core:start'].invoke
|
16
17
|
end
|
@@ -62,7 +63,7 @@ namespace :videojuicer do
|
|
62
63
|
sleep 1
|
63
64
|
end
|
64
65
|
else
|
65
|
-
puts "The test harness
|
66
|
+
puts "The test harness is not running."
|
66
67
|
end
|
67
68
|
end
|
68
69
|
|
data/vj-sdk.gemspec
CHANGED
@@ -1,12 +1,15 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
1
4
|
# -*- encoding: utf-8 -*-
|
2
5
|
|
3
6
|
Gem::Specification.new do |s|
|
4
7
|
s.name = %q{vj-sdk}
|
5
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.12"
|
6
9
|
|
7
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
-
s.authors = ["danski", "thejohnny", "knowtheory", "sixones"]
|
9
|
-
s.date = %q{2009-
|
11
|
+
s.authors = ["danski", "thejohnny", "knowtheory", "sixones", "btab"]
|
12
|
+
s.date = %q{2009-09-17}
|
10
13
|
s.email = %q{dan@videojuicer.com}
|
11
14
|
s.extra_rdoc_files = [
|
12
15
|
"LICENSE",
|
@@ -21,17 +24,20 @@ Gem::Specification.new do |s|
|
|
21
24
|
"Rakefile",
|
22
25
|
"VERSION.yml",
|
23
26
|
"lib/core_ext/hash.rb",
|
27
|
+
"lib/core_ext/object.rb",
|
28
|
+
"lib/core_ext/string.rb",
|
24
29
|
"lib/sdk_connection_harness.rb",
|
25
30
|
"lib/videojuicer.rb",
|
26
31
|
"lib/videojuicer/asset/audio.rb",
|
27
32
|
"lib/videojuicer/asset/base.rb",
|
33
|
+
"lib/videojuicer/asset/flash.rb",
|
28
34
|
"lib/videojuicer/asset/image.rb",
|
29
35
|
"lib/videojuicer/asset/text.rb",
|
30
36
|
"lib/videojuicer/asset/video.rb",
|
31
37
|
"lib/videojuicer/campaign.rb",
|
32
|
-
"lib/videojuicer/
|
38
|
+
"lib/videojuicer/campaign_policy.rb",
|
39
|
+
"lib/videojuicer/criterion/base.rb",
|
33
40
|
"lib/videojuicer/criterion/date_range.rb",
|
34
|
-
"lib/videojuicer/criterion/embed.rb",
|
35
41
|
"lib/videojuicer/criterion/geolocation.rb",
|
36
42
|
"lib/videojuicer/criterion/request.rb",
|
37
43
|
"lib/videojuicer/criterion/time.rb",
|
@@ -40,42 +46,57 @@ Gem::Specification.new do |s|
|
|
40
46
|
"lib/videojuicer/oauth/proxy_factory.rb",
|
41
47
|
"lib/videojuicer/oauth/request_proxy.rb",
|
42
48
|
"lib/videojuicer/presentation.rb",
|
49
|
+
"lib/videojuicer/promo/base.rb",
|
43
50
|
"lib/videojuicer/resource/base.rb",
|
44
51
|
"lib/videojuicer/resource/collection.rb",
|
52
|
+
"lib/videojuicer/resource/embeddable.rb",
|
45
53
|
"lib/videojuicer/resource/errors.rb",
|
46
54
|
"lib/videojuicer/resource/inferrable.rb",
|
47
55
|
"lib/videojuicer/resource/property_registry.rb",
|
48
56
|
"lib/videojuicer/resource/relationships/belongs_to.rb",
|
57
|
+
"lib/videojuicer/resource/types.rb",
|
49
58
|
"lib/videojuicer/session.rb",
|
50
59
|
"lib/videojuicer/shared/configurable.rb",
|
51
60
|
"lib/videojuicer/shared/exceptions.rb",
|
52
61
|
"lib/videojuicer/user.rb",
|
53
|
-
"spec/audio_spec.rb",
|
62
|
+
"spec/assets/audio_spec.rb",
|
63
|
+
"spec/assets/flash_spec.rb",
|
64
|
+
"spec/assets/image_spec.rb",
|
65
|
+
"spec/assets/text_spec.rb",
|
66
|
+
"spec/assets/video_spec.rb",
|
54
67
|
"spec/belongs_to_spec.rb",
|
68
|
+
"spec/campaign_policy_spec.rb",
|
55
69
|
"spec/campaign_spec.rb",
|
56
70
|
"spec/collection_spec.rb",
|
57
|
-
"spec/
|
58
|
-
"spec/
|
59
|
-
"spec/
|
60
|
-
"spec/
|
61
|
-
"spec/
|
71
|
+
"spec/criterion/date_range_spec.rb",
|
72
|
+
"spec/criterion/geolocation_spec.rb",
|
73
|
+
"spec/criterion/request_spec.rb",
|
74
|
+
"spec/criterion/time_spec.rb",
|
75
|
+
"spec/criterion/week_day_spec.rb",
|
62
76
|
"spec/files/audio.mp3",
|
63
77
|
"spec/files/empty_file",
|
78
|
+
"spec/files/flash.swf",
|
64
79
|
"spec/files/image.jpg",
|
65
80
|
"spec/files/text.txt",
|
66
81
|
"spec/files/video.mov",
|
82
|
+
"spec/helpers/be_equal_to.rb",
|
83
|
+
"spec/helpers/spec_fixtures.rb",
|
67
84
|
"spec/helpers/spec_helper.rb",
|
68
|
-
"spec/image_spec.rb",
|
69
85
|
"spec/presentation_spec.rb",
|
86
|
+
"spec/promos/audio_spec.rb",
|
87
|
+
"spec/promos/image_spec.rb",
|
88
|
+
"spec/promos/text_spec.rb",
|
89
|
+
"spec/promos/video_spec.rb",
|
70
90
|
"spec/property_registry_spec.rb",
|
71
91
|
"spec/request_proxy_spec.rb",
|
72
92
|
"spec/session_spec.rb",
|
73
93
|
"spec/shared/configurable_spec.rb",
|
94
|
+
"spec/shared/dependent_spec.rb",
|
95
|
+
"spec/shared/embeddable_spec.rb",
|
96
|
+
"spec/shared/model_spec.rb",
|
74
97
|
"spec/shared/resource_spec.rb",
|
75
98
|
"spec/spec.opts",
|
76
|
-
"spec/text_spec.rb",
|
77
99
|
"spec/user_spec.rb",
|
78
|
-
"spec/video_spec.rb",
|
79
100
|
"spec/videojuicer_spec.rb",
|
80
101
|
"tasks/vj-core.rb",
|
81
102
|
"vj-sdk.gemspec"
|
@@ -84,28 +105,39 @@ Gem::Specification.new do |s|
|
|
84
105
|
s.rdoc_options = ["--charset=UTF-8"]
|
85
106
|
s.require_paths = ["lib"]
|
86
107
|
s.rubygems_version = %q{1.3.5}
|
87
|
-
s.summary = %q{
|
108
|
+
s.summary = %q{Videojuicer core-sdk}
|
88
109
|
s.test_files = [
|
89
|
-
"spec/audio_spec.rb",
|
110
|
+
"spec/assets/audio_spec.rb",
|
111
|
+
"spec/assets/flash_spec.rb",
|
112
|
+
"spec/assets/image_spec.rb",
|
113
|
+
"spec/assets/text_spec.rb",
|
114
|
+
"spec/assets/video_spec.rb",
|
90
115
|
"spec/belongs_to_spec.rb",
|
116
|
+
"spec/campaign_policy_spec.rb",
|
91
117
|
"spec/campaign_spec.rb",
|
92
118
|
"spec/collection_spec.rb",
|
93
|
-
"spec/
|
94
|
-
"spec/
|
95
|
-
"spec/
|
96
|
-
"spec/
|
97
|
-
"spec/
|
119
|
+
"spec/criterion/date_range_spec.rb",
|
120
|
+
"spec/criterion/geolocation_spec.rb",
|
121
|
+
"spec/criterion/request_spec.rb",
|
122
|
+
"spec/criterion/time_spec.rb",
|
123
|
+
"spec/criterion/week_day_spec.rb",
|
124
|
+
"spec/helpers/be_equal_to.rb",
|
125
|
+
"spec/helpers/spec_fixtures.rb",
|
98
126
|
"spec/helpers/spec_helper.rb",
|
99
|
-
"spec/image_spec.rb",
|
100
127
|
"spec/presentation_spec.rb",
|
128
|
+
"spec/promos/audio_spec.rb",
|
129
|
+
"spec/promos/image_spec.rb",
|
130
|
+
"spec/promos/text_spec.rb",
|
131
|
+
"spec/promos/video_spec.rb",
|
101
132
|
"spec/property_registry_spec.rb",
|
102
133
|
"spec/request_proxy_spec.rb",
|
103
134
|
"spec/session_spec.rb",
|
104
135
|
"spec/shared/configurable_spec.rb",
|
136
|
+
"spec/shared/dependent_spec.rb",
|
137
|
+
"spec/shared/embeddable_spec.rb",
|
138
|
+
"spec/shared/model_spec.rb",
|
105
139
|
"spec/shared/resource_spec.rb",
|
106
|
-
"spec/text_spec.rb",
|
107
140
|
"spec/user_spec.rb",
|
108
|
-
"spec/video_spec.rb",
|
109
141
|
"spec/videojuicer_spec.rb"
|
110
142
|
]
|
111
143
|
|
metadata
CHANGED
@@ -1,18 +1,19 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: videojuicer-vj-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- danski
|
8
8
|
- thejohnny
|
9
9
|
- knowtheory
|
10
10
|
- sixones
|
11
|
+
- btab
|
11
12
|
autorequire:
|
12
13
|
bindir: bin
|
13
14
|
cert_chain: []
|
14
15
|
|
15
|
-
date: 2009-
|
16
|
+
date: 2009-09-17 00:00:00 -07:00
|
16
17
|
default_executable:
|
17
18
|
dependencies:
|
18
19
|
- !ruby/object:Gem::Dependency
|
@@ -53,17 +54,20 @@ files:
|
|
53
54
|
- Rakefile
|
54
55
|
- VERSION.yml
|
55
56
|
- lib/core_ext/hash.rb
|
57
|
+
- lib/core_ext/object.rb
|
58
|
+
- lib/core_ext/string.rb
|
56
59
|
- lib/sdk_connection_harness.rb
|
57
60
|
- lib/videojuicer.rb
|
58
61
|
- lib/videojuicer/asset/audio.rb
|
59
62
|
- lib/videojuicer/asset/base.rb
|
63
|
+
- lib/videojuicer/asset/flash.rb
|
60
64
|
- lib/videojuicer/asset/image.rb
|
61
65
|
- lib/videojuicer/asset/text.rb
|
62
66
|
- lib/videojuicer/asset/video.rb
|
63
67
|
- lib/videojuicer/campaign.rb
|
64
|
-
- lib/videojuicer/
|
68
|
+
- lib/videojuicer/campaign_policy.rb
|
69
|
+
- lib/videojuicer/criterion/base.rb
|
65
70
|
- lib/videojuicer/criterion/date_range.rb
|
66
|
-
- lib/videojuicer/criterion/embed.rb
|
67
71
|
- lib/videojuicer/criterion/geolocation.rb
|
68
72
|
- lib/videojuicer/criterion/request.rb
|
69
73
|
- lib/videojuicer/criterion/time.rb
|
@@ -72,42 +76,57 @@ files:
|
|
72
76
|
- lib/videojuicer/oauth/proxy_factory.rb
|
73
77
|
- lib/videojuicer/oauth/request_proxy.rb
|
74
78
|
- lib/videojuicer/presentation.rb
|
79
|
+
- lib/videojuicer/promo/base.rb
|
75
80
|
- lib/videojuicer/resource/base.rb
|
76
81
|
- lib/videojuicer/resource/collection.rb
|
82
|
+
- lib/videojuicer/resource/embeddable.rb
|
77
83
|
- lib/videojuicer/resource/errors.rb
|
78
84
|
- lib/videojuicer/resource/inferrable.rb
|
79
85
|
- lib/videojuicer/resource/property_registry.rb
|
80
86
|
- lib/videojuicer/resource/relationships/belongs_to.rb
|
87
|
+
- lib/videojuicer/resource/types.rb
|
81
88
|
- lib/videojuicer/session.rb
|
82
89
|
- lib/videojuicer/shared/configurable.rb
|
83
90
|
- lib/videojuicer/shared/exceptions.rb
|
84
91
|
- lib/videojuicer/user.rb
|
85
|
-
- spec/audio_spec.rb
|
92
|
+
- spec/assets/audio_spec.rb
|
93
|
+
- spec/assets/flash_spec.rb
|
94
|
+
- spec/assets/image_spec.rb
|
95
|
+
- spec/assets/text_spec.rb
|
96
|
+
- spec/assets/video_spec.rb
|
86
97
|
- spec/belongs_to_spec.rb
|
98
|
+
- spec/campaign_policy_spec.rb
|
87
99
|
- spec/campaign_spec.rb
|
88
100
|
- spec/collection_spec.rb
|
89
|
-
- spec/
|
90
|
-
- spec/
|
91
|
-
- spec/
|
92
|
-
- spec/
|
93
|
-
- spec/
|
101
|
+
- spec/criterion/date_range_spec.rb
|
102
|
+
- spec/criterion/geolocation_spec.rb
|
103
|
+
- spec/criterion/request_spec.rb
|
104
|
+
- spec/criterion/time_spec.rb
|
105
|
+
- spec/criterion/week_day_spec.rb
|
94
106
|
- spec/files/audio.mp3
|
95
107
|
- spec/files/empty_file
|
108
|
+
- spec/files/flash.swf
|
96
109
|
- spec/files/image.jpg
|
97
110
|
- spec/files/text.txt
|
98
111
|
- spec/files/video.mov
|
112
|
+
- spec/helpers/be_equal_to.rb
|
113
|
+
- spec/helpers/spec_fixtures.rb
|
99
114
|
- spec/helpers/spec_helper.rb
|
100
|
-
- spec/image_spec.rb
|
101
115
|
- spec/presentation_spec.rb
|
116
|
+
- spec/promos/audio_spec.rb
|
117
|
+
- spec/promos/image_spec.rb
|
118
|
+
- spec/promos/text_spec.rb
|
119
|
+
- spec/promos/video_spec.rb
|
102
120
|
- spec/property_registry_spec.rb
|
103
121
|
- spec/request_proxy_spec.rb
|
104
122
|
- spec/session_spec.rb
|
105
123
|
- spec/shared/configurable_spec.rb
|
124
|
+
- spec/shared/dependent_spec.rb
|
125
|
+
- spec/shared/embeddable_spec.rb
|
126
|
+
- spec/shared/model_spec.rb
|
106
127
|
- spec/shared/resource_spec.rb
|
107
128
|
- spec/spec.opts
|
108
|
-
- spec/text_spec.rb
|
109
129
|
- spec/user_spec.rb
|
110
|
-
- spec/video_spec.rb
|
111
130
|
- spec/videojuicer_spec.rb
|
112
131
|
- tasks/vj-core.rb
|
113
132
|
- vj-sdk.gemspec
|
@@ -137,26 +156,37 @@ rubyforge_project:
|
|
137
156
|
rubygems_version: 1.3.5
|
138
157
|
signing_key:
|
139
158
|
specification_version: 3
|
140
|
-
summary:
|
159
|
+
summary: Videojuicer core-sdk
|
141
160
|
test_files:
|
142
|
-
- spec/audio_spec.rb
|
161
|
+
- spec/assets/audio_spec.rb
|
162
|
+
- spec/assets/flash_spec.rb
|
163
|
+
- spec/assets/image_spec.rb
|
164
|
+
- spec/assets/text_spec.rb
|
165
|
+
- spec/assets/video_spec.rb
|
143
166
|
- spec/belongs_to_spec.rb
|
167
|
+
- spec/campaign_policy_spec.rb
|
144
168
|
- spec/campaign_spec.rb
|
145
169
|
- spec/collection_spec.rb
|
146
|
-
- spec/
|
147
|
-
- spec/
|
148
|
-
- spec/
|
149
|
-
- spec/
|
150
|
-
- spec/
|
170
|
+
- spec/criterion/date_range_spec.rb
|
171
|
+
- spec/criterion/geolocation_spec.rb
|
172
|
+
- spec/criterion/request_spec.rb
|
173
|
+
- spec/criterion/time_spec.rb
|
174
|
+
- spec/criterion/week_day_spec.rb
|
175
|
+
- spec/helpers/be_equal_to.rb
|
176
|
+
- spec/helpers/spec_fixtures.rb
|
151
177
|
- spec/helpers/spec_helper.rb
|
152
|
-
- spec/image_spec.rb
|
153
178
|
- spec/presentation_spec.rb
|
179
|
+
- spec/promos/audio_spec.rb
|
180
|
+
- spec/promos/image_spec.rb
|
181
|
+
- spec/promos/text_spec.rb
|
182
|
+
- spec/promos/video_spec.rb
|
154
183
|
- spec/property_registry_spec.rb
|
155
184
|
- spec/request_proxy_spec.rb
|
156
185
|
- spec/session_spec.rb
|
157
186
|
- spec/shared/configurable_spec.rb
|
187
|
+
- spec/shared/dependent_spec.rb
|
188
|
+
- spec/shared/embeddable_spec.rb
|
189
|
+
- spec/shared/model_spec.rb
|
158
190
|
- spec/shared/resource_spec.rb
|
159
|
-
- spec/text_spec.rb
|
160
191
|
- spec/user_spec.rb
|
161
|
-
- spec/video_spec.rb
|
162
192
|
- spec/videojuicer_spec.rb
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# DO NOT USE YET
|
2
|
-
module Videojuicer
|
3
|
-
module Criterion
|
4
|
-
class Affiliate
|
5
|
-
include Videojuicer::Resource
|
6
|
-
include Videojuicer::Exceptions
|
7
|
-
|
8
|
-
property :created_at, DateTime
|
9
|
-
property :updated_at, DateTime
|
10
|
-
|
11
|
-
|
12
|
-
def self.singular_name
|
13
|
-
"criteria"
|
14
|
-
end
|
15
|
-
|
16
|
-
def self.base_path
|
17
|
-
"/criteria/affilate"
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
data/spec/audio_spec.rb
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), "helpers", "spec_helper")
|
2
|
-
|
3
|
-
describe Videojuicer::Asset::Audio do
|
4
|
-
|
5
|
-
before(:all) do
|
6
|
-
@klass = Videojuicer::Asset::Audio
|
7
|
-
configure_test_settings
|
8
|
-
Videojuicer.enter_scope :seed_name => fixtures.seed.name,
|
9
|
-
:consumer_key=>fixtures["write-master"].consumer.consumer_key,
|
10
|
-
:consumer_secret=>fixtures["write-master"].consumer.consumer_secret,
|
11
|
-
:token=>fixtures["write-master"].authorized_token.oauth_token,
|
12
|
-
:token_secret=>fixtures["write-master"].authorized_token.oauth_token_secret
|
13
|
-
end
|
14
|
-
|
15
|
-
after(:all) do
|
16
|
-
Videojuicer.exit_scope
|
17
|
-
end
|
18
|
-
|
19
|
-
describe "instantiation" do
|
20
|
-
it_should_behave_like "a configurable"
|
21
|
-
end
|
22
|
-
|
23
|
-
describe "general interface:" do
|
24
|
-
before(:all) do
|
25
|
-
@singular_name = "asset"
|
26
|
-
@plural_name = "assets/audio"
|
27
|
-
@good_attributes = {
|
28
|
-
:user_id => rand(100) + 1,
|
29
|
-
:licensed_at => Time.now,
|
30
|
-
:licensed_by => "foo, bar",
|
31
|
-
:licensed_under => "CC BY:NC:SA",
|
32
|
-
:published_at => Time.now,
|
33
|
-
:duration => 40200,
|
34
|
-
:bit_rate => 1280400,
|
35
|
-
:format => "MPEG Layer 3",
|
36
|
-
:stereo => "stereo",
|
37
|
-
:file => File.open(File.join(File.dirname(__FILE__), "files", "audio.mp3"))
|
38
|
-
}
|
39
|
-
end
|
40
|
-
|
41
|
-
it_should_behave_like "a RESTFUL resource model"
|
42
|
-
end
|
43
|
-
|
44
|
-
|
45
|
-
end
|
@@ -1,37 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), "..", "helpers", "spec_helper")
|
2
|
-
|
3
|
-
describe Videojuicer::Criterion::DateRange do
|
4
|
-
|
5
|
-
before(:all) do
|
6
|
-
@klass = Videojuicer::Criterion::DateRange
|
7
|
-
configure_test_settings
|
8
|
-
Videojuicer.enter_scope :seed_name => fixtures.seed.name,
|
9
|
-
:consumer_key=>fixtures["write-master"].consumer.consumer_key,
|
10
|
-
:consumer_secret=>fixtures["write-master"].consumer.consumer_secret,
|
11
|
-
:token=>fixtures["write-master"].authorized_token.oauth_token,
|
12
|
-
:token_secret=>fixtures["write-master"].authorized_token.oauth_token_secret
|
13
|
-
end
|
14
|
-
|
15
|
-
after(:all) do
|
16
|
-
Videojuicer.exit_scope
|
17
|
-
end
|
18
|
-
|
19
|
-
describe "instantiation" do
|
20
|
-
it_should_behave_like "a configurable"
|
21
|
-
end
|
22
|
-
|
23
|
-
describe "general interface:" do
|
24
|
-
before(:all) do
|
25
|
-
@singular_name = "criterion"
|
26
|
-
@plural_name = "criteria/date_range"
|
27
|
-
@good_attributes = {
|
28
|
-
:after => DateTime.parse((Time.now - 60*60*24).to_s),
|
29
|
-
:until => DateTime.parse((Time.now + 60*60*24).to_s)
|
30
|
-
}
|
31
|
-
end
|
32
|
-
|
33
|
-
it_should_behave_like "a RESTFUL resource model"
|
34
|
-
end
|
35
|
-
|
36
|
-
|
37
|
-
end
|