stupeflixclient 0.0.1 → 0.0.2
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.
- checksums.yaml +8 -8
- data/.rake_tasks +3 -0
- data/lib/stupeflixclient/main.rb +37 -0
- data/lib/stupeflixclient/version.rb +1 -1
- data/lib/stupeflixclient.rb +1 -17
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjhhNDIwZTM0NWFhZTRhYjUwYzFlMzk1NjMwNWIxZGMxZGFlNzJkYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDMwNTEwZjMzODBiYWQzYzZhMWUzODRlZDIzZmJiMWQ5ODUwZDhlYQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MGJjNDg1YTFlYmU3ODFlYTc0ZTBmOGQyNjllNWM5Yzc2NjYzNjg0Njk2ZDM2
|
10
|
+
OWY0NGQ2YWZlMmYwZjk5ODE3YjA0OGQyZjA4ZjRkMTlmMjU5OGQzNDc2OWE2
|
11
|
+
YTk1NTQ4ZjVmOWNmNmQzOTljYmRiZmQwYmNkM2U5ZGU2YWZkODM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZGIxNWVhYzJmMzU5MzBmMDBlOGM2ZWE2NGFjYTJkNjJjNjYyODJjMzc0ZWVm
|
14
|
+
OWM4ODM1ZGZlOWQxM2JkNTc5N2I5Mzk4MzE5Y2ExNjExYjk5ZjY3MGRlZWNk
|
15
|
+
ZDA4ZWQ4MTM0YTQ2ODBlYjZiNjViOTlhY2NlYjQzNzExNmEwZDE=
|
data/.rake_tasks
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
module Stupeflixclient
|
2
|
+
class Main
|
3
|
+
attr_accessor :client, :username, :meta, :notify, :profile_names, :uploads
|
4
|
+
def initialize username='test'
|
5
|
+
@username = username
|
6
|
+
@notify = nil
|
7
|
+
@meta = nil
|
8
|
+
@profile_names = []
|
9
|
+
@uploads = []
|
10
|
+
@client = Stupeflixclient.default_client
|
11
|
+
end
|
12
|
+
|
13
|
+
def default_upload
|
14
|
+
StupeflixDefaultUpload.new
|
15
|
+
end
|
16
|
+
|
17
|
+
def default_profile
|
18
|
+
"iphone"
|
19
|
+
end
|
20
|
+
|
21
|
+
def profiles
|
22
|
+
profileArray = @profile_names.map {|name| StupeflixProfile.new(name, uploads = @uploads) }
|
23
|
+
StupeflixProfileSet.new(profileArray, meta = @meta, notify = @notify)
|
24
|
+
end
|
25
|
+
|
26
|
+
def ensure_settings
|
27
|
+
@profile_names << default_profile if @profile_names.empty?
|
28
|
+
@uploads << default_upload if @uploads.empty?
|
29
|
+
end
|
30
|
+
|
31
|
+
def run resourceName, filename
|
32
|
+
ensure_settings
|
33
|
+
client.sendDefinition(@username, resourceName, filename)
|
34
|
+
client.createProfiles(@username, resourceName, profiles)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
data/lib/stupeflixclient.rb
CHANGED
@@ -6,26 +6,10 @@ require 'stupeflixclient/connection'
|
|
6
6
|
require 'stupeflixclient/stupeflix_base'
|
7
7
|
require 'stupeflixclient/stupeflix_client'
|
8
8
|
require 'stupeflixclient/video'
|
9
|
-
|
9
|
+
require 'stupeflixclient/main'
|
10
10
|
|
11
11
|
module Stupeflixclient
|
12
12
|
def self.default_client
|
13
13
|
StupeflixClient.new(Settings::ACCESS_KEY, Settings::ACCESS_SECRET, Constants::SERVER_NAME)
|
14
14
|
end
|
15
|
-
|
16
|
-
def self.generate_videos batch_file
|
17
|
-
end
|
18
|
-
|
19
|
-
def self.generate_video definition
|
20
|
-
end
|
21
|
-
|
22
|
-
def self.test_run client, filename
|
23
|
-
uploads = [StupeflixDefaultUpload.new()]
|
24
|
-
profileArray = [StupeflixProfile.new('iphone', uploads = uploads)]
|
25
|
-
profiles = StupeflixProfileSet.new(profileArray, meta = nil, notify = nil)
|
26
|
-
# First send the movie definition file to the service. (see sample movie.xml in this directory)
|
27
|
-
client.sendDefinition('testuser', 'testresource', filename)
|
28
|
-
# Then launch the generation, using the configuration we have built earlier
|
29
|
-
client.createProfiles('testuser', 'testresource', profiles)
|
30
|
-
end
|
31
15
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stupeflixclient
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Claus Witt
|
@@ -88,6 +88,7 @@ extensions: []
|
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
90
|
- .gitignore
|
91
|
+
- .rake_tasks
|
91
92
|
- Gemfile
|
92
93
|
- LICENSE.txt
|
93
94
|
- README.md
|
@@ -96,6 +97,7 @@ files:
|
|
96
97
|
- lib/stupeflixclient.rb
|
97
98
|
- lib/stupeflixclient/connection.rb
|
98
99
|
- lib/stupeflixclient/constants.rb
|
100
|
+
- lib/stupeflixclient/main.rb
|
99
101
|
- lib/stupeflixclient/settings.rb
|
100
102
|
- lib/stupeflixclient/stupeflix_base.rb
|
101
103
|
- lib/stupeflixclient/stupeflix_client.rb
|