flatiron-video-uploader 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 49245bc8824c685790d548e8b5b3e104a9991b74
4
- data.tar.gz: 3ded48c384c92641f8f223ecb0702b0279a15d33
3
+ metadata.gz: 63d875d41df3d734805cc24a2743636935a700c7
4
+ data.tar.gz: aa9a419460b04cd72a1b4ba0fc9a394a095d54b9
5
5
  SHA512:
6
- metadata.gz: fa29809ff5a4fd57cd1427df8a5872648154d0cbfc221efd0ba0b9512317ec9bb9983539e2d22491607b035ebe39cbb4d1dda15eccaee3e78dd3a4edb1d48114
7
- data.tar.gz: 123579a29d5ec2830f3d496604eb7d92c40aa30686a7d2f4a7e9dc3f1491c69cfcea78b35142fe622bbcc16e4f2db946a59c9db529b9c4ac6b944bbe51012db1
6
+ metadata.gz: c3667f4d7a4cd96d862804a9665f318857fb5542db147cba5811a59125795ab4956e26a515714bec7cb10b9c7a3519241037d33264cb3a1a4fa8701511bd935f
7
+ data.tar.gz: ee65bd409ad0c99f6fe7e7c467b4bb2ac579c7ceb585de56238107a11a5a9b178d06e80138d3115e38c9709fdfc994bf2088f4c83e7538aded358e25e53f5420
@@ -9,8 +9,6 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Joe Burgess"]
10
10
  spec.email = ["joemburgess@gmail.com"]
11
11
  spec.summary = %q{Gem to upload videos to s3 and youtube}
12
- spec.description = %q{Gem to upload videos to s3 and youtube}
13
- spec.homepage = ""
14
12
  spec.license = "MIT"
15
13
 
16
14
  spec.files = `git ls-files -z`.split("\x0")
@@ -20,13 +18,14 @@ Gem::Specification.new do |spec|
20
18
 
21
19
  spec.add_development_dependency "bundler", "~> 1.7"
22
20
  spec.add_development_dependency "rake", "~> 10.0"
23
- spec.add_runtime_dependency "httparty"
24
- spec.add_runtime_dependency "faraday"
25
- spec.add_runtime_dependency "thor"
26
- spec.add_runtime_dependency "signet"
27
- spec.add_runtime_dependency "httpclient"
28
- spec.add_runtime_dependency "aws-sdk"
29
- spec.add_runtime_dependency "streamio-ffmpeg"
30
- spec.add_runtime_dependency "terminal-notifier"
31
- spec.add_runtime_dependency "google-api-client"
21
+ spec.add_development_dependency "pry", "~> 0.10"
22
+ spec.add_runtime_dependency "httparty", "~> 0.13"
23
+ spec.add_runtime_dependency "faraday", "~> 0.9"
24
+ spec.add_runtime_dependency "thor", "~> 0.19"
25
+ spec.add_runtime_dependency "signet", "~> 0.6"
26
+ spec.add_runtime_dependency "httpclient", "~> 2.6"
27
+ spec.add_runtime_dependency "aws-sdk", "~> 2.1"
28
+ spec.add_runtime_dependency "streamio-ffmpeg", "~> 1.0"
29
+ spec.add_runtime_dependency "terminal-notifier", "~> 1.6"
30
+ spec.add_runtime_dependency "google-api-client", "~> 0.8"
32
31
  end
@@ -2,13 +2,18 @@ require 'thor'
2
2
 
3
3
  module FlatironVideoUploader
4
4
  class Cli < Thor
5
- desc "hello NAME", "This will greet you"
6
- def hello (name)
7
- puts name.upcase
8
- end
5
+ desc "upload FILE", "Upload FILE to youtube and s3 for offline use. Specify --batch if this is a lecture video"
6
+ long_desc <<-LONGDESC
7
+
8
+ Uploads to youtube and gives you the embed link. If this is a topic video
9
+ (not a lecture video) it will upload the full resolution to s3 as well as
10
+ transcode the video to an iPad specific format to upload to s3.
9
11
 
10
- desc "upload FILE", "This will greet you"
11
- method_option :batch, :type => :string, :default => ""
12
+ If you specify the --batch option then this is a LECTURE VIDEO. That means
13
+ that we won't upload the full resolution video. Also the batch will become
14
+ one of the tags for the video
15
+ LONGDESC
16
+ method_option :batch, :type => :string, :default => "", :desc => "Specify which batch this lecture video is for."
12
17
  def upload (file)
13
18
  FlatironVideoUploader::Runner.upload_video(file,options[:batch])
14
19
  end
@@ -1,10 +1,28 @@
1
+ require 'pry'
1
2
  Faraday.default_adapter = :httpclient
2
3
  module FlatironVideoUploader
3
4
  class Runner
4
5
  GRANT_TYPE = "http://oauth.net/grant_type/device/1.0"
5
6
  THOR_SHELL = Thor::Shell::Basic.new
6
7
  def self.upload_video(file,batch)
8
+ begin
9
+ `ffmpeg > /dev/null 2>&1`
10
+ rescue
11
+ puts "Looks like you don't have ffmpeg. Install with brew install ffmpeg"
12
+ exit
13
+ end
7
14
 
15
+ begin
16
+ http = Net::HTTP.new("accounts.google.com",443)
17
+ http.use_ssl = true
18
+ req = Net::HTTP::Head.new('/')
19
+ http.start {http.request(req)}
20
+ rescue OpenSSL::SSL::SSLError => e
21
+ puts "Looks like your version of ruby has messed up SSL Certs."
22
+ puts "Please install openssl with brew install openssl"
23
+ puts "Then re-install ruby without binaries with rvm reinstall #{RUBY_VERSION} --disable-binary"
24
+ exit
25
+ end
8
26
  FFMPEG.logger=Logger.new(STDOUT)
9
27
  FFMPEG.logger.level = Logger::ERROR
10
28
  begin
@@ -1,3 +1,3 @@
1
1
  module FlatironVideoUploader
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flatiron-video-uploader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Burgess
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-16 00:00:00.000000000 Z
11
+ date: 2015-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,133 +38,147 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: pry
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '0.10'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '0.10'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: httparty
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
- - - ">="
59
+ - - "~>"
46
60
  - !ruby/object:Gem::Version
47
- version: '0'
61
+ version: '0.13'
48
62
  type: :runtime
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
- - - ">="
66
+ - - "~>"
53
67
  - !ruby/object:Gem::Version
54
- version: '0'
68
+ version: '0.13'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: faraday
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
- - - ">="
73
+ - - "~>"
60
74
  - !ruby/object:Gem::Version
61
- version: '0'
75
+ version: '0.9'
62
76
  type: :runtime
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
- - - ">="
80
+ - - "~>"
67
81
  - !ruby/object:Gem::Version
68
- version: '0'
82
+ version: '0.9'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: thor
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
- - - ">="
87
+ - - "~>"
74
88
  - !ruby/object:Gem::Version
75
- version: '0'
89
+ version: '0.19'
76
90
  type: :runtime
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
- - - ">="
94
+ - - "~>"
81
95
  - !ruby/object:Gem::Version
82
- version: '0'
96
+ version: '0.19'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: signet
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
- - - ">="
101
+ - - "~>"
88
102
  - !ruby/object:Gem::Version
89
- version: '0'
103
+ version: '0.6'
90
104
  type: :runtime
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
- - - ">="
108
+ - - "~>"
95
109
  - !ruby/object:Gem::Version
96
- version: '0'
110
+ version: '0.6'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: httpclient
99
113
  requirement: !ruby/object:Gem::Requirement
100
114
  requirements:
101
- - - ">="
115
+ - - "~>"
102
116
  - !ruby/object:Gem::Version
103
- version: '0'
117
+ version: '2.6'
104
118
  type: :runtime
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
107
121
  requirements:
108
- - - ">="
122
+ - - "~>"
109
123
  - !ruby/object:Gem::Version
110
- version: '0'
124
+ version: '2.6'
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: aws-sdk
113
127
  requirement: !ruby/object:Gem::Requirement
114
128
  requirements:
115
- - - ">="
129
+ - - "~>"
116
130
  - !ruby/object:Gem::Version
117
- version: '0'
131
+ version: '2.1'
118
132
  type: :runtime
119
133
  prerelease: false
120
134
  version_requirements: !ruby/object:Gem::Requirement
121
135
  requirements:
122
- - - ">="
136
+ - - "~>"
123
137
  - !ruby/object:Gem::Version
124
- version: '0'
138
+ version: '2.1'
125
139
  - !ruby/object:Gem::Dependency
126
140
  name: streamio-ffmpeg
127
141
  requirement: !ruby/object:Gem::Requirement
128
142
  requirements:
129
- - - ">="
143
+ - - "~>"
130
144
  - !ruby/object:Gem::Version
131
- version: '0'
145
+ version: '1.0'
132
146
  type: :runtime
133
147
  prerelease: false
134
148
  version_requirements: !ruby/object:Gem::Requirement
135
149
  requirements:
136
- - - ">="
150
+ - - "~>"
137
151
  - !ruby/object:Gem::Version
138
- version: '0'
152
+ version: '1.0'
139
153
  - !ruby/object:Gem::Dependency
140
154
  name: terminal-notifier
141
155
  requirement: !ruby/object:Gem::Requirement
142
156
  requirements:
143
- - - ">="
157
+ - - "~>"
144
158
  - !ruby/object:Gem::Version
145
- version: '0'
159
+ version: '1.6'
146
160
  type: :runtime
147
161
  prerelease: false
148
162
  version_requirements: !ruby/object:Gem::Requirement
149
163
  requirements:
150
- - - ">="
164
+ - - "~>"
151
165
  - !ruby/object:Gem::Version
152
- version: '0'
166
+ version: '1.6'
153
167
  - !ruby/object:Gem::Dependency
154
168
  name: google-api-client
155
169
  requirement: !ruby/object:Gem::Requirement
156
170
  requirements:
157
- - - ">="
171
+ - - "~>"
158
172
  - !ruby/object:Gem::Version
159
- version: '0'
173
+ version: '0.8'
160
174
  type: :runtime
161
175
  prerelease: false
162
176
  version_requirements: !ruby/object:Gem::Requirement
163
177
  requirements:
164
- - - ">="
178
+ - - "~>"
165
179
  - !ruby/object:Gem::Version
166
- version: '0'
167
- description: Gem to upload videos to s3 and youtube
180
+ version: '0.8'
181
+ description:
168
182
  email:
169
183
  - joemburgess@gmail.com
170
184
  executables:
@@ -183,7 +197,7 @@ files:
183
197
  - lib/flatiron-video-uploader/cli.rb
184
198
  - lib/flatiron-video-uploader/runner.rb
185
199
  - lib/flatiron-video-uploader/version.rb
186
- homepage: ''
200
+ homepage:
187
201
  licenses:
188
202
  - MIT
189
203
  metadata: {}