vidyo 1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +2 -0
- data/.rspec +1 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +14 -0
- data/LICENSE.txt +21 -0
- data/README.md +38 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/ext/generateToken.js +123 -0
- data/ext/generateToken.py +176 -0
- data/lib/vidyo.rb +5 -0
- data/lib/vidyo/token.rb +57 -0
- data/lib/vidyo/version.rb +3 -0
- data/vidyo.gemspec +31 -0
- metadata +138 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5ae817738c64a85fac69a735ee08493efe175e1f
|
4
|
+
data.tar.gz: 2f90f19e44635425dfd0095138d19c4e06b383e2
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b9ff996aefcb2a153009bc50db201bdb5c163c2435e7bcf92e900026da238b0f309fb8e3c8008f33b4addebc036355c8942d6eb893b05ac7d605083ac95da086
|
7
|
+
data.tar.gz: e5fdcdadac415f0856263ff4f6ae361a135888ba8450dfb98f9db1a20cc6e87c587b500a52f9853bda67e169ce0a0d8a0cf91460c8df7d1dcd2af8579c611537
|
data/.gitignore
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--require spec_helper
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Omar Bohsali
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# vidyo-ruby
|
2
|
+
|
3
|
+
Create authentication tokens for [vidyo][1] sessions in Ruby. I found token generation code in javascript, C#, and Python, but could not find anything for Ruby.
|
4
|
+
|
5
|
+
Learn more about the Vidyo API here: [Vidyo API Docs][2].
|
6
|
+
|
7
|
+
## Install
|
8
|
+
|
9
|
+
```bash
|
10
|
+
$ bundle
|
11
|
+
```
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
token = Vidyo::Token.new(
|
17
|
+
key: 'your_vidyo_developer_key',
|
18
|
+
application_id: 'vidyo_application_id',
|
19
|
+
user_name: 'the user joining the session',
|
20
|
+
expires_in: 3600
|
21
|
+
)
|
22
|
+
token.serialize
|
23
|
+
```
|
24
|
+
|
25
|
+
## Tests
|
26
|
+
|
27
|
+
```bash
|
28
|
+
$ rspec
|
29
|
+
```
|
30
|
+
|
31
|
+
## Based On
|
32
|
+
|
33
|
+
* https://github.com/Vidyo/generateToken-c-sharp
|
34
|
+
* https://static.vidyo.io/4.1.17.5/utils/generateToken.py
|
35
|
+
|
36
|
+
|
37
|
+
[1]: http://vidyo.io "Vidyo Homepage"
|
38
|
+
[2]: https://developer.vidyo.io/documentation/4-1-17-5/getting-started "Vidyo API Docs"
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "vidyo"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,123 @@
|
|
1
|
+
//This is a nodejs script, and requires the following npm packages to run:
|
2
|
+
//jssha, btoa and command-line-args
|
3
|
+
|
4
|
+
//WARNING - Token generation should NEVER be done client side (in a browser for
|
5
|
+
//example), because then you are exposing your developer key to customers
|
6
|
+
/*jshint esversion: 6 */
|
7
|
+
|
8
|
+
jsSHA = require('jssha');
|
9
|
+
btoa = require('btoa');
|
10
|
+
fs = require('fs');
|
11
|
+
const commandLineArgs = require('command-line-args');
|
12
|
+
var tokenGenerated = false;
|
13
|
+
var vCardFileSpecified = false;
|
14
|
+
|
15
|
+
const optionDefinitions = [{
|
16
|
+
name: 'key',
|
17
|
+
type: String
|
18
|
+
}, {
|
19
|
+
name: 'appID',
|
20
|
+
type: String
|
21
|
+
}, {
|
22
|
+
name: 'userName',
|
23
|
+
type: String
|
24
|
+
}, {
|
25
|
+
name: 'vCardFile',
|
26
|
+
type: String
|
27
|
+
}, {
|
28
|
+
name: 'expiresInSecs',
|
29
|
+
type: Number
|
30
|
+
}, {
|
31
|
+
name: 'expiresAt',
|
32
|
+
type: String,
|
33
|
+
multiple: true
|
34
|
+
}, {
|
35
|
+
name: 'help',
|
36
|
+
alias: 'h',
|
37
|
+
type: String
|
38
|
+
}];
|
39
|
+
|
40
|
+
const options = commandLineArgs(optionDefinitions);
|
41
|
+
|
42
|
+
function printHelp() {
|
43
|
+
console.log("\nThis script will generate a provision login token from a developer key" +
|
44
|
+
"\nOptions:" +
|
45
|
+
"\n\t--key Developer key supplied with the developer account" +
|
46
|
+
"\n\t--appID ApplicationID supplied with the developer account" +
|
47
|
+
"\n\t--userName Username to generate a token for" +
|
48
|
+
"\n\t--vCardFile Path to the XML file containing a vCard for the user" +
|
49
|
+
"\n\t--expiresInSecs Number of seconds the token will be valid can be used instead of expiresAt" +
|
50
|
+
"\n\t--expiresAt Time at which the token will expire ex: (2055-10-27T10:54:22Z) can be used instead of expiresInSecs" +
|
51
|
+
"\n");
|
52
|
+
process.exit();
|
53
|
+
}
|
54
|
+
|
55
|
+
if ((typeof options.help !== 'undefined') || (typeof options.key == 'undefined') || (typeof options.appID == 'undefined') || (typeof options.userName == 'undefined')) {
|
56
|
+
printHelp();
|
57
|
+
}
|
58
|
+
|
59
|
+
if (typeof options.vCardFile !== 'undefined') {
|
60
|
+
vCardFileSpecified = true;
|
61
|
+
}
|
62
|
+
|
63
|
+
function checkForVCardFileAndGenerateToken(key, appID, userName, expiresInSeconds) {
|
64
|
+
if (vCardFileSpecified) {
|
65
|
+
fs.readFile(options.vCardFile, 'utf8', function(err, data) {
|
66
|
+
if (err) {
|
67
|
+
return console.log("error reading vCard file " + err);
|
68
|
+
}
|
69
|
+
console.log("read in the fillowing vCard: " + data);
|
70
|
+
generateToken(key, appID, userName, expiresInSeconds, data);
|
71
|
+
});
|
72
|
+
} else {
|
73
|
+
generateToken(key, appID, userName, expiresInSeconds, "");
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
function generateToken(key, appID, userName, expiresInSeconds, vCard) {
|
78
|
+
var EPOCH_SECONDS = 62167219200;
|
79
|
+
var expires = Math.floor(Date.now() / 1000) + expiresInSeconds + EPOCH_SECONDS;
|
80
|
+
var shaObj = new jsSHA("SHA-384", "TEXT");
|
81
|
+
shaObj.setHMACKey(key, "TEXT");
|
82
|
+
jid = userName + '@' + appID;
|
83
|
+
var body = 'provision' + '\x00' + jid + '\x00' + expires + '\x00' + vCard;
|
84
|
+
shaObj.update(body);
|
85
|
+
var mac = shaObj.getHMAC("HEX");
|
86
|
+
var serialized = body + '\0' + mac;
|
87
|
+
console.log("\nGenerated Token: \n" + btoa(serialized));
|
88
|
+
}
|
89
|
+
|
90
|
+
//Date is in the format: "October 13, 2014 11:13:00"
|
91
|
+
function generateTokenExpiresOnDate(key, appID, userName, date) {
|
92
|
+
var currentDate = new Date(date);
|
93
|
+
var dateInSeconds = Math.floor(currentDate.valueOf() / 1000);
|
94
|
+
var nowInSeconds = Math.floor(Date.now() / 1000);
|
95
|
+
if (dateInSeconds < nowInSeconds) {
|
96
|
+
console.log("Date is before current time, so token will be invalid");
|
97
|
+
expiresInSeconds = 0;
|
98
|
+
} else {
|
99
|
+
expiresInSeconds = dateInSeconds - nowInSeconds;
|
100
|
+
console.log("Expires in seconds: " + expiresInSeconds);
|
101
|
+
}
|
102
|
+
checkForVCardFileAndGenerateToken(key, appID, userName, expiresInSeconds);
|
103
|
+
}
|
104
|
+
|
105
|
+
console.log("\nGenerating token with the following inputs");
|
106
|
+
console.log("Key: " + options.key);
|
107
|
+
console.log("appID: " + options.appID);
|
108
|
+
console.log("userName: " + options.userName);
|
109
|
+
|
110
|
+
if (typeof options.vCardFile !== 'undefined') {
|
111
|
+
console.log("vCardFile: " + options.vCardFile);
|
112
|
+
}
|
113
|
+
|
114
|
+
if (typeof options.expiresInSecs !== 'undefined') {
|
115
|
+
console.log("expiresInSecs: " + options.expiresInSecs);
|
116
|
+
checkForVCardFileAndGenerateToken(options.key, options.appID, options.userName, options.expiresInSecs);
|
117
|
+
|
118
|
+
} else if (typeof options.expiresAt !== 'undefined') {
|
119
|
+
console.log("expiresAt: " + options.expiresAt);
|
120
|
+
generateTokenExpiresOnDate(options.key, options.appID, options.userName, options.expiresAt);
|
121
|
+
} else {
|
122
|
+
console.log("Error: Neither expiresInSecs or expiresAt parameters passed in");
|
123
|
+
}
|
@@ -0,0 +1,176 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
|
4
|
+
import base64
|
5
|
+
import binascii
|
6
|
+
from datetime import datetime
|
7
|
+
import calendar, time
|
8
|
+
import hashlib
|
9
|
+
import hmac
|
10
|
+
import sys
|
11
|
+
import getopt
|
12
|
+
|
13
|
+
try:
|
14
|
+
from datetime import timezone
|
15
|
+
utc = timezone.utc
|
16
|
+
except:
|
17
|
+
# python 2 variant
|
18
|
+
from datetime import timedelta, tzinfo
|
19
|
+
class UTC(tzinfo):
|
20
|
+
ZERO = timedelta(0)
|
21
|
+
"""UTC"""
|
22
|
+
|
23
|
+
def utcoffset(self, dt):
|
24
|
+
return self.ZERO
|
25
|
+
|
26
|
+
def tzname(self, dt):
|
27
|
+
return "UTC"
|
28
|
+
|
29
|
+
def dst(self, dt):
|
30
|
+
return self.ZERO
|
31
|
+
|
32
|
+
utc = UTC()
|
33
|
+
|
34
|
+
|
35
|
+
def read_file(path):
|
36
|
+
try:
|
37
|
+
f = open(path, "r+b")
|
38
|
+
return f.read()
|
39
|
+
except e:
|
40
|
+
print("Could not read file: %s error %s ", path, e)
|
41
|
+
exit(3)
|
42
|
+
|
43
|
+
def to_bytes(o):
|
44
|
+
return str(o).encode("utf-8")
|
45
|
+
|
46
|
+
class Token:
|
47
|
+
def __init__(self, key, appID, userName, vCardFile, expires):
|
48
|
+
self.type = 'provision'
|
49
|
+
self.key = key
|
50
|
+
self.jid = userName + "@" + appID
|
51
|
+
if (vCardFile):
|
52
|
+
self.vCard = read_file(vCardFile).decode("utf-8").strip()
|
53
|
+
else:
|
54
|
+
self.vCard = ""
|
55
|
+
self.expires = expires
|
56
|
+
|
57
|
+
def __str__(self):
|
58
|
+
return "Token" + {'type' : self.type,
|
59
|
+
'key' : self.key,
|
60
|
+
'jid' : self.jid,
|
61
|
+
'vCard' : self.vCard[:10] + "...",
|
62
|
+
'expires' : self.expires}.__str__()
|
63
|
+
|
64
|
+
def serialize(self):
|
65
|
+
sep = b"\0" # Separator is a NULL character
|
66
|
+
body = to_bytes(self.type) + sep + to_bytes(self.jid) + sep + to_bytes(self.expires) + sep + to_bytes(self.vCard)
|
67
|
+
|
68
|
+
mac = hmac.new(bytearray(self.key, 'utf8'), msg=body, digestmod=hashlib.sha384).digest()
|
69
|
+
## Uncomment to debug
|
70
|
+
|
71
|
+
sys.stderr.buffer.write( b"key : " + base64.b64encode(bytearray(self.key, 'utf8')) + b"\n" )
|
72
|
+
|
73
|
+
print("bodyFull: " + self.type + "_" + self.jid + "_" + str(self.expires) + "_" + self.vCard);
|
74
|
+
|
75
|
+
sys.stderr.buffer.write(b"bodyString: " + ("%s_%s_%s_%s" % (self.type, self.jid, str(self.expires), self.vCard)).encode("utf-8") + b"\n");
|
76
|
+
|
77
|
+
sys.stderr.buffer.write( b"body: " + ("%s" % [b for b in body]).encode("utf-8") + b"\n" )
|
78
|
+
|
79
|
+
sys.stderr.buffer.write( b"mac : " + base64.b64encode(mac) + b"\n" )
|
80
|
+
|
81
|
+
sys.stderr.flush()
|
82
|
+
## Combine the body with the hex version of the mac
|
83
|
+
|
84
|
+
serialized = body + sep + binascii.hexlify(mac)
|
85
|
+
return serialized
|
86
|
+
|
87
|
+
def printHelp():
|
88
|
+
print("\nThis script will generate a provision login token from a developer key"
|
89
|
+
"\nOptions:"
|
90
|
+
"\n\t--key Developer key supplied with the developer account"
|
91
|
+
"\n\t--appID ApplicationID supplied with the developer account"
|
92
|
+
"\n\t--userName Username to generate a token for"
|
93
|
+
"\n\t--vCardFile Path to the XML file containing a vCard for the user"
|
94
|
+
"\n\t--expiresInSecs Number of seconds the token will be valid can be used instead of expiresAt"
|
95
|
+
"\n\t--expiresAt Time at which the token will expire ex: (2055-10-27T10:54:22Z) can be used instead of expiresInSecs"
|
96
|
+
"\n")
|
97
|
+
|
98
|
+
try:
|
99
|
+
opts, args = getopt.getopt(sys.argv[1:], 'h', ['h', 'key=', 'appID=', 'userName=', 'vCardFile=', 'expiresInSecs=', 'expiresAt='])
|
100
|
+
except getopt.GetoptError:
|
101
|
+
printHelp()
|
102
|
+
sys.exit(2)
|
103
|
+
|
104
|
+
EPOCH_SECONDS = 62167219200
|
105
|
+
key = None
|
106
|
+
appID = None
|
107
|
+
userName = None
|
108
|
+
vCardFile = None
|
109
|
+
expiresInSecs = None
|
110
|
+
expiresAt = None
|
111
|
+
expires = 0
|
112
|
+
|
113
|
+
for o, a in opts:
|
114
|
+
if ((o == '-h') or (o == "--h")):
|
115
|
+
printHelp()
|
116
|
+
sys.exit(2)
|
117
|
+
if (o == "--key"):
|
118
|
+
print("Setting key : ", a)
|
119
|
+
key = a
|
120
|
+
if (o == "--appID"):
|
121
|
+
print("Setting appID : ", a)
|
122
|
+
appID = a
|
123
|
+
if (o == "--userName"):
|
124
|
+
print("Setting userName : ", a)
|
125
|
+
userName = a
|
126
|
+
if (o == "--vCardFile"):
|
127
|
+
print("Setting vCardFile : ", a)
|
128
|
+
vCardFile = a
|
129
|
+
if (o == "--expiresInSecs"):
|
130
|
+
print("Setting expiresInSecs : ", a)
|
131
|
+
expiresInSecs = a
|
132
|
+
if (o == "--expiresAt"):
|
133
|
+
print("Setting expiresAt : ", a)
|
134
|
+
expiresAt = a
|
135
|
+
|
136
|
+
if (key == None):
|
137
|
+
print("key not set")
|
138
|
+
printHelp()
|
139
|
+
sys.exit(2)
|
140
|
+
if (appID == None):
|
141
|
+
print("appID not set")
|
142
|
+
printHelp()
|
143
|
+
sys.exit(2)
|
144
|
+
if (userName == None):
|
145
|
+
print("userName not set")
|
146
|
+
printHelp()
|
147
|
+
sys.exit(2)
|
148
|
+
if (vCardFile == None):
|
149
|
+
print("vCardFile not set")
|
150
|
+
|
151
|
+
## datetime.timestamp() by default subtracts datetime(1970, 1, 1) from the datetime
|
152
|
+
## on which we call it, therefore the number of seconds is smaller
|
153
|
+
## by (pseudocode!) seconds("1970-01-01").
|
154
|
+
## In Erlang, on the other hand, we get the actual number of seconds,
|
155
|
+
## hence we adjust for this difference here.
|
156
|
+
## IMPORTANT! A 64bit architecture is assumed! Otherwise, the timestamp
|
157
|
+
## might be stored as a 32bit integer, therefore limiting the "capacity"
|
158
|
+
## to 2038 (see https://en.wikipedia.org/wiki/Year_2038_problem).
|
159
|
+
if (expiresInSecs != None):
|
160
|
+
d = datetime(year=2017, month=11, day=21, hour=11, minute=38, second=7).replace(tzinfo=utc)
|
161
|
+
expires = EPOCH_SECONDS + int(time.mktime(d.timetuple())) + int(expiresInSecs)
|
162
|
+
elif (expiresAt != None):
|
163
|
+
d = datetime.strptime(expiresAt, '%Y-%m-%dT%H:%M:%SZ')
|
164
|
+
d = d.replace(tzinfo=utc)
|
165
|
+
expires = EPOCH_SECONDS + int(calendar.timegm(d.timetuple()))
|
166
|
+
else:
|
167
|
+
print("expiresInSecs or expiresAt not set")
|
168
|
+
printHelp()
|
169
|
+
sys.exit(2)
|
170
|
+
|
171
|
+
|
172
|
+
print("Generating Token...")
|
173
|
+
token = Token(key, appID, userName, vCardFile, expires)
|
174
|
+
serialized = token.serialize()
|
175
|
+
b64 = base64.b64encode(serialized)
|
176
|
+
print(b64.decode())
|
data/lib/vidyo.rb
ADDED
data/lib/vidyo/token.rb
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
#coding: UTF-8
|
2
|
+
require 'digest'
|
3
|
+
require 'openssl'
|
4
|
+
require 'base64'
|
5
|
+
|
6
|
+
def to_bytes(x)
|
7
|
+
x.force_encoding('utf-8').unpack("C*")
|
8
|
+
end
|
9
|
+
|
10
|
+
module Vidyo
|
11
|
+
class Token
|
12
|
+
def initialize(key:, application_id:, user_name:, expires_in:)
|
13
|
+
@key = key
|
14
|
+
@application_id = application_id
|
15
|
+
@user_name = user_name
|
16
|
+
@expires_in = expires_in
|
17
|
+
end
|
18
|
+
|
19
|
+
def epoch_seconds
|
20
|
+
# Converts 1970-01-01 to seconds since 0 AD.
|
21
|
+
62167219200
|
22
|
+
end
|
23
|
+
|
24
|
+
def expires_at
|
25
|
+
epoch_seconds + Time.now.gmtime.to_i + @expires_in
|
26
|
+
end
|
27
|
+
|
28
|
+
def jid
|
29
|
+
"#{@user_name}@#{@application_id}"
|
30
|
+
end
|
31
|
+
|
32
|
+
def separator
|
33
|
+
[0]
|
34
|
+
end
|
35
|
+
|
36
|
+
def request_type
|
37
|
+
"provision"
|
38
|
+
end
|
39
|
+
|
40
|
+
def body
|
41
|
+
to_bytes(request_type) + separator + to_bytes(jid) + separator + to_bytes(expires_at.to_s) + separator
|
42
|
+
end
|
43
|
+
|
44
|
+
def mac
|
45
|
+
sha384 = OpenSSL::HMAC.new(@key, OpenSSL::Digest.new('sha384'))
|
46
|
+
sha384.update(body.pack("C*"))
|
47
|
+
end
|
48
|
+
|
49
|
+
def unserialized
|
50
|
+
(body + separator).pack("C*") + mac.hexdigest
|
51
|
+
end
|
52
|
+
|
53
|
+
def serialize
|
54
|
+
Base64.strict_encode64(unserialized)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
data/vidyo.gemspec
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
lib = File.expand_path("../lib", __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "vidyo/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "vidyo"
|
7
|
+
spec.version = Vidyo::VERSION
|
8
|
+
spec.authors = ["Omar Bohsali"]
|
9
|
+
spec.email = ["me@omarish.com"]
|
10
|
+
|
11
|
+
spec.summary = %q{Create vidyo.io access tokens.}
|
12
|
+
spec.homepage = "https://github.com/omarish/vidyo"
|
13
|
+
spec.license = "MIT"
|
14
|
+
spec.metadata = {
|
15
|
+
"documentation_uri" => "https://github.com/omarish/vidyo",
|
16
|
+
"homepage_uri" => "https://github.com/omarish/vidyo",
|
17
|
+
"source_code_uri" => "https://github.com/omarish/vidyo"
|
18
|
+
}
|
19
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
20
|
+
f.match(%r{^(test|spec|features)/})
|
21
|
+
end
|
22
|
+
spec.bindir = "exe"
|
23
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
|
+
spec.require_paths = ["lib"]
|
25
|
+
|
26
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
27
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
28
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
29
|
+
spec.add_development_dependency 'rspec-expectations', '~> 3.7', '>= 3.7.0'
|
30
|
+
spec.add_development_dependency "timecop", "~> 0.9.1"
|
31
|
+
end
|
metadata
ADDED
@@ -0,0 +1,138 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: vidyo
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '1.0'
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Omar Bohsali
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-11-28 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.16'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.16'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec-expectations
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.7'
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: 3.7.0
|
65
|
+
type: :development
|
66
|
+
prerelease: false
|
67
|
+
version_requirements: !ruby/object:Gem::Requirement
|
68
|
+
requirements:
|
69
|
+
- - "~>"
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '3.7'
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 3.7.0
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: timecop
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: 0.9.1
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: 0.9.1
|
89
|
+
description:
|
90
|
+
email:
|
91
|
+
- me@omarish.com
|
92
|
+
executables: []
|
93
|
+
extensions: []
|
94
|
+
extra_rdoc_files: []
|
95
|
+
files:
|
96
|
+
- ".gitignore"
|
97
|
+
- ".rspec"
|
98
|
+
- Gemfile
|
99
|
+
- Gemfile.lock
|
100
|
+
- LICENSE.txt
|
101
|
+
- README.md
|
102
|
+
- Rakefile
|
103
|
+
- bin/console
|
104
|
+
- bin/setup
|
105
|
+
- ext/generateToken.js
|
106
|
+
- ext/generateToken.py
|
107
|
+
- lib/vidyo.rb
|
108
|
+
- lib/vidyo/token.rb
|
109
|
+
- lib/vidyo/version.rb
|
110
|
+
- vidyo.gemspec
|
111
|
+
homepage: https://github.com/omarish/vidyo
|
112
|
+
licenses:
|
113
|
+
- MIT
|
114
|
+
metadata:
|
115
|
+
documentation_uri: https://github.com/omarish/vidyo
|
116
|
+
homepage_uri: https://github.com/omarish/vidyo
|
117
|
+
source_code_uri: https://github.com/omarish/vidyo
|
118
|
+
post_install_message:
|
119
|
+
rdoc_options: []
|
120
|
+
require_paths:
|
121
|
+
- lib
|
122
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - ">="
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: '0'
|
127
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
requirements: []
|
133
|
+
rubyforge_project:
|
134
|
+
rubygems_version: 2.5.1
|
135
|
+
signing_key:
|
136
|
+
specification_version: 4
|
137
|
+
summary: Create vidyo.io access tokens.
|
138
|
+
test_files: []
|