cine_io 0.0.1
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/.gitignore +18 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +6 -0
- data/cine_io.gemspec +26 -0
- data/lib/cine_io/project.rb +11 -0
- data/lib/cine_io/projects_handler.rb +7 -0
- data/lib/cine_io/resource_handler.rb +33 -0
- data/lib/cine_io/stream.rb +11 -0
- data/lib/cine_io/streams_handler.rb +11 -0
- data/lib/cine_io/version.rb +3 -0
- data/lib/cine_io.rb +28 -0
- data/spec/cine_io/project_spec.rb +11 -0
- data/spec/cine_io/projects_handler_spec.rb +25 -0
- data/spec/cine_io/stream_spec.rb +11 -0
- data/spec/cine_io/streams_handler_spec.rb +47 -0
- data/spec/cine_io_spec.rb +20 -0
- data/spec/fixtures/vcr_cassettes/create_stream.yml +41 -0
- data/spec/fixtures/vcr_cassettes/create_stream_error.yml +41 -0
- data/spec/fixtures/vcr_cassettes/get_project.yml +41 -0
- data/spec/fixtures/vcr_cassettes/get_project_error.yml +41 -0
- data/spec/fixtures/vcr_cassettes/get_stream.yml +41 -0
- data/spec/fixtures/vcr_cassettes/get_stream_error.yml +41 -0
- data/spec/spec_helper.rb +7 -0
- metadata +164 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Thomas Shafer
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# CineIo
|
2
|
+
|
3
|
+
The ruby gem for [cine.io](cine.io).
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'cine_io'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install cine_io
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
Coming soon...
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
data/cine_io.gemspec
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'cine_io/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "cine_io"
|
8
|
+
spec.version = CineIo::VERSION
|
9
|
+
spec.authors = ["cine.io"]
|
10
|
+
spec.email = ["support@cine.io"]
|
11
|
+
spec.description = %q{cine.io is an api driven platform for creating and publish live streams. The provides cine.io functionality using your given public and secret keys.}
|
12
|
+
spec.summary = %q{The official cine.io ruby gem}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
spec.add_development_dependency "rspec"
|
24
|
+
spec.add_development_dependency "webmock"
|
25
|
+
spec.add_development_dependency "vcr"
|
26
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
class CineIo::ResourceHandler
|
2
|
+
|
3
|
+
protected
|
4
|
+
|
5
|
+
def initialize(client)
|
6
|
+
@client = client
|
7
|
+
end
|
8
|
+
|
9
|
+
def get_resource(path, params={})
|
10
|
+
uri = URI.parse("#{CineIo::BASE_URL}#{path}")
|
11
|
+
uri.query = URI.encode_www_form({:secretKey => @client.config.fetch(:secretKey)}.merge(params))
|
12
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
13
|
+
request = Net::HTTP::Get.new(uri.request_uri)
|
14
|
+
http.use_ssl = (uri.scheme == "https")
|
15
|
+
response = http.request(request)
|
16
|
+
|
17
|
+
raise CineIo::ApiError.new(response.body) unless response.is_a?(Net::HTTPSuccess)
|
18
|
+
JSON.parse(response.body)
|
19
|
+
end
|
20
|
+
|
21
|
+
def post_resource(path, params={})
|
22
|
+
uri = URI.parse("#{CineIo::BASE_URL}#{path}")
|
23
|
+
request = Net::HTTP::Post.new(uri.request_uri)
|
24
|
+
request.set_form_data({:secretKey => @client.config.fetch(:secretKey)}.merge(params))
|
25
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
26
|
+
http.use_ssl = (uri.scheme == "https")
|
27
|
+
response = http.request(request)
|
28
|
+
|
29
|
+
raise CineIo::ApiError.new(response.body) unless response.is_a?(Net::HTTPSuccess)
|
30
|
+
JSON.parse(response.body)
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
data/lib/cine_io.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
require "cine_io/version"
|
2
|
+
require 'net/http'
|
3
|
+
require 'json'
|
4
|
+
require 'cine_io/resource_handler'
|
5
|
+
Dir[File.dirname(__FILE__) + '/cine_io/*.rb'].each {|file| require file }
|
6
|
+
|
7
|
+
module CineIo
|
8
|
+
API_VERSION = 1
|
9
|
+
BASE_URL = "https://www.cine.io/api/#{API_VERSION}/-"
|
10
|
+
ApiError = Class.new(StandardError)
|
11
|
+
|
12
|
+
class Client
|
13
|
+
attr_reader :config
|
14
|
+
|
15
|
+
def initialize(config)
|
16
|
+
@config = config
|
17
|
+
end
|
18
|
+
|
19
|
+
def project
|
20
|
+
@project ||= CineIo::ProjectsHandler.new(self)
|
21
|
+
end
|
22
|
+
|
23
|
+
def streams
|
24
|
+
@streams ||= CineIo::StreamsHandler.new(self)
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe CineIo::ProjectsHandler do
|
4
|
+
|
5
|
+
let(:client) { CineIo::Client.new(secretKey: "MY SECRET", publicKey: "MY PUBLIC") }
|
6
|
+
|
7
|
+
subject { described_class.new(client) }
|
8
|
+
|
9
|
+
describe '#get' do
|
10
|
+
it "returns a project" do
|
11
|
+
VCR.use_cassette('get_project') do
|
12
|
+
project = subject.get
|
13
|
+
expect(project).to be_a(CineIo::Project)
|
14
|
+
expect(project.name).to eq("THE PROJECT")
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'can throw an error on api exception' do
|
19
|
+
VCR.use_cassette('get_project_error') do
|
20
|
+
expect {subject.get}.to raise_error(CineIo::ApiError, "An unknown error has occured.")
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe CineIo::StreamsHandler do
|
4
|
+
|
5
|
+
let(:client) { CineIo::Client.new(secretKey: "MY SECRET", publicKey: "MY PUBLIC") }
|
6
|
+
|
7
|
+
subject { described_class.new(client) }
|
8
|
+
|
9
|
+
describe '#get' do
|
10
|
+
it "returns a stream" do
|
11
|
+
VCR.use_cassette('get_stream') do
|
12
|
+
stream = subject.get("53718cef450ff80200f81856")
|
13
|
+
expect(stream).to be_a(CineIo::Stream)
|
14
|
+
expect(stream.id).to eq("53718cef450ff80200f81856")
|
15
|
+
expect(stream.password).to eq("THEPASSWORD")
|
16
|
+
expect(stream.play.keys.sort).to eq(['hls', 'rtmp'])
|
17
|
+
expect(stream.publish.keys.sort).to eq(['stream', 'url'])
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'can throw an error on api exception' do
|
22
|
+
VCR.use_cassette('get_stream_error') do
|
23
|
+
expect {subject.get("NOT_AN_ID")}.to raise_error(CineIo::ApiError, "An unknown error has occured.")
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe '#create' do
|
29
|
+
it "returns a stream" do
|
30
|
+
VCR.use_cassette('create_stream') do
|
31
|
+
stream = subject.create
|
32
|
+
expect(stream).to be_a(CineIo::Stream)
|
33
|
+
expect(stream.id).to eq("537b7f48bc03be080085a389")
|
34
|
+
expect(stream.password).to eq("PASSWORD")
|
35
|
+
expect(stream.play.keys.sort).to eq(['hls', 'rtmp'])
|
36
|
+
expect(stream.publish.keys.sort).to eq(['stream', 'url'])
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'can throw an error on api exception' do
|
41
|
+
VCR.use_cassette('create_stream_error') do
|
42
|
+
expect {subject.create}.to raise_error(CineIo::ApiError, "An unknown error has occured.")
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe CineIo do
|
4
|
+
let(:client) { CineIo::Client.new(publicKey: 'My public key', secretKey: 'My secret key') }
|
5
|
+
subject { client }
|
6
|
+
|
7
|
+
it 'takes a public and secret key' do
|
8
|
+
expect(subject.config).to eq(publicKey: 'My public key', secretKey: 'My secret key')
|
9
|
+
end
|
10
|
+
describe '#projects' do
|
11
|
+
subject {client.project}
|
12
|
+
it { should be_a(CineIo::ProjectsHandler) }
|
13
|
+
end
|
14
|
+
|
15
|
+
describe '#streams' do
|
16
|
+
subject {client.streams}
|
17
|
+
it { should be_a(CineIo::StreamsHandler) }
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://www.cine.io/api/1/-/stream
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: secretKey=MY SECRET
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! '*/*'
|
12
|
+
User-Agent:
|
13
|
+
- Ruby
|
14
|
+
Content-Type:
|
15
|
+
- application/x-www-form-urlencoded
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Content-Type:
|
22
|
+
- application/json; charset=utf-8
|
23
|
+
Date:
|
24
|
+
- Sun, 01 Jun 2014 07:53:39 GMT
|
25
|
+
Set-Cookie:
|
26
|
+
- connect.sid=s%3AbDx8VzPxTkATiEsSARSIEEcA.ZmA%2BpTvFJvSE7rE%2BpzP9a2iCRQOeLHhId2RHmSJLN1Y;
|
27
|
+
Path=/; HttpOnly
|
28
|
+
Vary:
|
29
|
+
- Accept-Encoding
|
30
|
+
X-Powered-By:
|
31
|
+
- Express
|
32
|
+
Content-Length:
|
33
|
+
- '396'
|
34
|
+
Connection:
|
35
|
+
- keep-alive
|
36
|
+
body:
|
37
|
+
encoding: US-ASCII
|
38
|
+
string: ! '{"id":"537b7f48bc03be080085a389","name":"cine1","play":{"hls":"http://hls.cine.io/cines/cine1/cine1.m3u8","rtmp":"rtmp://fml.cine.io/20C45E/cines/cine1?adbe-live-event=cine1"},"publish":{"url":"rtmp://stream.lax.cine.io/20C45E/cines","stream":"cine1?PASSWORD&adbe-live-event=cine1"},"password":"PASSWORD","expiration":"2034-05-20T00:00:00.000Z","assignedAt":"2014-06-01T07:53:38.613Z"}'
|
39
|
+
http_version:
|
40
|
+
recorded_at: Sun, 01 Jun 2014 07:53:39 GMT
|
41
|
+
recorded_with: VCR 2.3.0
|
@@ -0,0 +1,41 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://www.cine.io/api/1/-/stream
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: secretKey=MY+SECRET
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! '*/*'
|
12
|
+
User-Agent:
|
13
|
+
- Ruby
|
14
|
+
Content-Type:
|
15
|
+
- application/x-www-form-urlencoded
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 400
|
19
|
+
message: Bad Request
|
20
|
+
headers:
|
21
|
+
Content-Type:
|
22
|
+
- text/html; charset=utf-8
|
23
|
+
Date:
|
24
|
+
- Sun, 01 Jun 2014 22:38:18 GMT
|
25
|
+
Set-Cookie:
|
26
|
+
- connect.sid=s%3A07r5JjDM0gDGDWehsGcwyqIA.us1w%2FA7eZ%2FOYhofA5EUokf8UDi8JvX1KX1UW0tpB3Q0;
|
27
|
+
Path=/; HttpOnly
|
28
|
+
Vary:
|
29
|
+
- Accept-Encoding
|
30
|
+
X-Powered-By:
|
31
|
+
- Express
|
32
|
+
Content-Length:
|
33
|
+
- '29'
|
34
|
+
Connection:
|
35
|
+
- keep-alive
|
36
|
+
body:
|
37
|
+
encoding: US-ASCII
|
38
|
+
string: An unknown error has occured.
|
39
|
+
http_version:
|
40
|
+
recorded_at: Sun, 01 Jun 2014 22:38:18 GMT
|
41
|
+
recorded_with: VCR 2.3.0
|
@@ -0,0 +1,41 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://www.cine.io/api/1/-/project?secretKey=MY%20SECRET
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! '*/*'
|
12
|
+
User-Agent:
|
13
|
+
- Ruby
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message: OK
|
18
|
+
headers:
|
19
|
+
Content-Type:
|
20
|
+
- application/json; charset=utf-8
|
21
|
+
Date:
|
22
|
+
- Sun, 01 Jun 2014 07:27:53 GMT
|
23
|
+
Etag:
|
24
|
+
- ! '"-585713471"'
|
25
|
+
Set-Cookie:
|
26
|
+
- connect.sid=s%3ACxr5WVK6KEkFqdcFxxYTSTJ7.%2F7TTnVJK4mHsI%2FAIiKiebpUq5y5d5Fz8MmK7Azhad%2Bg;
|
27
|
+
Path=/; HttpOnly
|
28
|
+
Vary:
|
29
|
+
- Accept-Encoding
|
30
|
+
X-Powered-By:
|
31
|
+
- Express
|
32
|
+
Content-Length:
|
33
|
+
- '217'
|
34
|
+
Connection:
|
35
|
+
- keep-alive
|
36
|
+
body:
|
37
|
+
encoding: US-ASCII
|
38
|
+
string: ! '{"id":"THE ID","publicKey":"MY PUBLIC","secretKey":"MY SECRET","name":"THE PROJECT", "streamsCount":0,"updatedAt":"2014-05-29T01:21:20.186Z"}'
|
39
|
+
http_version:
|
40
|
+
recorded_at: Sun, 01 Jun 2014 07:27:53 GMT
|
41
|
+
recorded_with: VCR 2.3.0
|
@@ -0,0 +1,41 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://www.cine.io/api/1/-/project?secretKey=MY%20SECRET
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! '*/*'
|
12
|
+
User-Agent:
|
13
|
+
- Ruby
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 400
|
17
|
+
message: Bad Request
|
18
|
+
headers:
|
19
|
+
Content-Type:
|
20
|
+
- text/html; charset=utf-8
|
21
|
+
Date:
|
22
|
+
- Sun, 01 Jun 2014 22:34:05 GMT
|
23
|
+
Etag:
|
24
|
+
- ! '"-585839348"'
|
25
|
+
Set-Cookie:
|
26
|
+
- connect.sid=s%3A7R3MsudkzJuWbtPcQThWVWFs.qH%2F%2B2VaecxTCmWWzK6pR1stDOws%2FLltJEY0GpaYzkLI;
|
27
|
+
Path=/; HttpOnly
|
28
|
+
Vary:
|
29
|
+
- Accept-Encoding
|
30
|
+
X-Powered-By:
|
31
|
+
- Express
|
32
|
+
Content-Length:
|
33
|
+
- '29'
|
34
|
+
Connection:
|
35
|
+
- keep-alive
|
36
|
+
body:
|
37
|
+
encoding: US-ASCII
|
38
|
+
string: An unknown error has occured.
|
39
|
+
http_version:
|
40
|
+
recorded_at: Sun, 01 Jun 2014 22:34:05 GMT
|
41
|
+
recorded_with: VCR 2.3.0
|
@@ -0,0 +1,41 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://www.cine.io/api/1/-/stream?id=53718cef450ff80200f81856&secretKey=MY%20SECRET
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! '*/*'
|
12
|
+
User-Agent:
|
13
|
+
- Ruby
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message: OK
|
18
|
+
headers:
|
19
|
+
Content-Type:
|
20
|
+
- application/json; charset=utf-8
|
21
|
+
Date:
|
22
|
+
- Sun, 01 Jun 2014 07:45:01 GMT
|
23
|
+
Etag:
|
24
|
+
- ! '"-21966437"'
|
25
|
+
Set-Cookie:
|
26
|
+
- connect.sid=s%3AZTMIersNFw6FVD50uBZy0bGZ.gPeF%2F2tS6RVn0BS7dz3ddon%2F8uh8cEn4xV9fJpXcNrg;
|
27
|
+
Path=/; HttpOnly
|
28
|
+
Vary:
|
29
|
+
- Accept-Encoding
|
30
|
+
X-Powered-By:
|
31
|
+
- Express
|
32
|
+
Content-Length:
|
33
|
+
- '385'
|
34
|
+
Connection:
|
35
|
+
- keep-alive
|
36
|
+
body:
|
37
|
+
encoding: US-ASCII
|
38
|
+
string: ! '{"id":"53718cef450ff80200f81856","name":"cine1","play":{"hls":"http://hls.cine.io/cines/cine1/cine1.m3u8","rtmp":"rtmp://fml.cine.io/20C45E/cines/cine1?adbe-live-event=cine1"},"publish":{"url":"rtmp://stream.lax.cine.io/20C45E/cines","stream":"cine1?THEPASSWORD&adbe-live-event=cine1"},"password":"THEPASSWORD","expiration":"2034-05-13T00:00:00.000Z","assignedAt":"2014-05-13T03:24:07.916Z"}'
|
39
|
+
http_version:
|
40
|
+
recorded_at: Sun, 01 Jun 2014 07:45:01 GMT
|
41
|
+
recorded_with: VCR 2.3.0
|
@@ -0,0 +1,41 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://www.cine.io/api/1/-/stream?id=NOT_AN_ID&secretKey=MY%20SECRET
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! '*/*'
|
12
|
+
User-Agent:
|
13
|
+
- Ruby
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 400
|
17
|
+
message: Bad Request
|
18
|
+
headers:
|
19
|
+
Content-Type:
|
20
|
+
- text/html; charset=utf-8
|
21
|
+
Date:
|
22
|
+
- Sun, 01 Jun 2014 22:37:44 GMT
|
23
|
+
Etag:
|
24
|
+
- ! '"-585839348"'
|
25
|
+
Set-Cookie:
|
26
|
+
- connect.sid=s%3AFiFPDk4MSkkFQ7DXbSqFHGlc.LTY6FHZg%2FVCSuBgBTy6uvwzRlVWdDun1aoPZVUwK8Ng;
|
27
|
+
Path=/; HttpOnly
|
28
|
+
Vary:
|
29
|
+
- Accept-Encoding
|
30
|
+
X-Powered-By:
|
31
|
+
- Express
|
32
|
+
Content-Length:
|
33
|
+
- '29'
|
34
|
+
Connection:
|
35
|
+
- keep-alive
|
36
|
+
body:
|
37
|
+
encoding: US-ASCII
|
38
|
+
string: An unknown error has occured.
|
39
|
+
http_version:
|
40
|
+
recorded_at: Sun, 01 Jun 2014 22:37:44 GMT
|
41
|
+
recorded_with: VCR 2.3.0
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,164 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cine_io
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- cine.io
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2014-06-01 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: bundler
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '1.3'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.3'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rake
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rspec
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: webmock
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: vcr
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
description: cine.io is an api driven platform for creating and publish live streams.
|
95
|
+
The provides cine.io functionality using your given public and secret keys.
|
96
|
+
email:
|
97
|
+
- support@cine.io
|
98
|
+
executables: []
|
99
|
+
extensions: []
|
100
|
+
extra_rdoc_files: []
|
101
|
+
files:
|
102
|
+
- .gitignore
|
103
|
+
- Gemfile
|
104
|
+
- LICENSE.txt
|
105
|
+
- README.md
|
106
|
+
- Rakefile
|
107
|
+
- cine_io.gemspec
|
108
|
+
- lib/cine_io.rb
|
109
|
+
- lib/cine_io/project.rb
|
110
|
+
- lib/cine_io/projects_handler.rb
|
111
|
+
- lib/cine_io/resource_handler.rb
|
112
|
+
- lib/cine_io/stream.rb
|
113
|
+
- lib/cine_io/streams_handler.rb
|
114
|
+
- lib/cine_io/version.rb
|
115
|
+
- spec/cine_io/project_spec.rb
|
116
|
+
- spec/cine_io/projects_handler_spec.rb
|
117
|
+
- spec/cine_io/stream_spec.rb
|
118
|
+
- spec/cine_io/streams_handler_spec.rb
|
119
|
+
- spec/cine_io_spec.rb
|
120
|
+
- spec/fixtures/vcr_cassettes/create_stream.yml
|
121
|
+
- spec/fixtures/vcr_cassettes/create_stream_error.yml
|
122
|
+
- spec/fixtures/vcr_cassettes/get_project.yml
|
123
|
+
- spec/fixtures/vcr_cassettes/get_project_error.yml
|
124
|
+
- spec/fixtures/vcr_cassettes/get_stream.yml
|
125
|
+
- spec/fixtures/vcr_cassettes/get_stream_error.yml
|
126
|
+
- spec/spec_helper.rb
|
127
|
+
homepage: ''
|
128
|
+
licenses:
|
129
|
+
- MIT
|
130
|
+
post_install_message:
|
131
|
+
rdoc_options: []
|
132
|
+
require_paths:
|
133
|
+
- lib
|
134
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
135
|
+
none: false
|
136
|
+
requirements:
|
137
|
+
- - ! '>='
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '0'
|
140
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
141
|
+
none: false
|
142
|
+
requirements:
|
143
|
+
- - ! '>='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
requirements: []
|
147
|
+
rubyforge_project:
|
148
|
+
rubygems_version: 1.8.23
|
149
|
+
signing_key:
|
150
|
+
specification_version: 3
|
151
|
+
summary: The official cine.io ruby gem
|
152
|
+
test_files:
|
153
|
+
- spec/cine_io/project_spec.rb
|
154
|
+
- spec/cine_io/projects_handler_spec.rb
|
155
|
+
- spec/cine_io/stream_spec.rb
|
156
|
+
- spec/cine_io/streams_handler_spec.rb
|
157
|
+
- spec/cine_io_spec.rb
|
158
|
+
- spec/fixtures/vcr_cassettes/create_stream.yml
|
159
|
+
- spec/fixtures/vcr_cassettes/create_stream_error.yml
|
160
|
+
- spec/fixtures/vcr_cassettes/get_project.yml
|
161
|
+
- spec/fixtures/vcr_cassettes/get_project_error.yml
|
162
|
+
- spec/fixtures/vcr_cassettes/get_stream.yml
|
163
|
+
- spec/fixtures/vcr_cassettes/get_stream_error.yml
|
164
|
+
- spec/spec_helper.rb
|