unimatrix 3.1.0 → 3.2.0

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: 1e0635d1ddc9d70f94b32378807df22fadd75daf
4
- data.tar.gz: 5621029c2f3db637a5d6038ab1531f534957778e
3
+ metadata.gz: 526a783f4c606f2ab8f1897910c93f4cecfe26d1
4
+ data.tar.gz: 6833c6f30ef65d5b088b45b478e82558085b9bf7
5
5
  SHA512:
6
- metadata.gz: 58b8eff39639dd79e705557378aeb79dd8614c95c4eed8fe04bd3d5b157178e819f22562073bc60b2062dd0006099612e735c74f70db7e19bbccaca45410c545
7
- data.tar.gz: f5c28d7bd01dd7923cbb8d9917b2516b90d5e1882359ada0f19830c7c3ad13db7e74fbdb993ee4088e1497c3927173263c120ed2bc70352165903577242be7c3
6
+ metadata.gz: 609e9cb36d9cdcaf2e32f08b67d14d67827a535415f6b580d38224b20bd3303d45f1063f94ef242d5c926a46389d2092da1cb3a3b130def277cb34429c3a8f3d
7
+ data.tar.gz: 59331d935895e994d731cdb4644f1125c0ccf9fe79d77ad204cb576313acc9f08db510d3a0a237c00d1d268daba2586f968b22de01b5b8b4c70e002e1c611e7d
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.1.0
1
+ 3.2.0
@@ -9,10 +9,15 @@ module Unimatrix::Authorization
9
9
  def before( controller )
10
10
  client_id = Unimatrix.configuration.client_id
11
11
  client_secret = Unimatrix.configuration.client_secret
12
- access_token = controller.params[ 'access_token' ] || \
13
- controller.retrieve_client_token( client_id, client_secret )
14
12
 
15
- realm_uuid = begin
13
+ access_token =
14
+ if controller.params[ 'access_token' ].present?
15
+ controller.params[ 'access_token' ]
16
+ else
17
+ controller.retrieve_client_token( client_id, client_secret )
18
+ end
19
+
20
+ realm_uuid =
16
21
  if controller.respond_to?( :realm_uuid )
17
22
  controller.realm_uuid
18
23
  elsif controller.respond_to?( :realm )
@@ -20,7 +25,6 @@ module Unimatrix::Authorization
20
25
  else
21
26
  controller.params[ :realm_uuid ]
22
27
  end
23
- end
24
28
 
25
29
  if access_token.present?
26
30
  policies = controller.retrieve_policies(
@@ -41,22 +45,13 @@ module Unimatrix::Authorization
41
45
  end
42
46
 
43
47
  if forbidden
44
- controller.render_error(
45
- ::ForbiddenError,
46
- "A policy permitting this action was not found."
47
- )
48
+ controller.render_error( ::MissingPolicyError )
48
49
  end
49
50
  else
50
- controller.render_error(
51
- ::ForbiddenError,
52
- "The requested policies could not be retrieved."
53
- )
51
+ controller.render_error( ::MissingPolicyError )
54
52
  end
55
53
  else
56
- controller.render_error(
57
- ::MissingParameterError,
58
- "The parameter 'access_token' is required."
59
- )
54
+ controller.render_error( ::MissingTokenError )
60
55
  end
61
56
  end
62
57
  end
@@ -115,7 +110,7 @@ module Unimatrix::Authorization
115
110
  nil
116
111
  end
117
112
  end
118
-
113
+
119
114
  def request_client_token( client_id, client_secret )
120
115
  if client_id && client_secret
121
116
  ClientCredentialsGrant.new(
@@ -127,4 +122,4 @@ module Unimatrix::Authorization
127
122
  end
128
123
  end
129
124
 
130
- end
125
+ end
@@ -5,8 +5,13 @@ module Unimatrix::Authorization
5
5
  def before( controller )
6
6
  client_id = Unimatrix.configuration.client_id
7
7
  client_secret = Unimatrix.configuration.client_secret
8
- access_token = controller.params[ 'access_token' ] || \
9
- controller.retrieve_client_token( client_id, client_secret )
8
+
9
+ access_token =
10
+ if controller.params[ 'access_token' ].present?
11
+ controller.params[ 'access_token' ]
12
+ else
13
+ controller.retrieve_client_token( client_id, client_secret )
14
+ end
10
15
 
11
16
  if access_token.present?
12
17
  resource_owner = controller.retrieve_resource_owner( access_token )
@@ -15,16 +20,10 @@ module Unimatrix::Authorization
15
20
  resource_owner.first.type_name == 'resource_owner'
16
21
  controller.resource_owner = resource_owner
17
22
  else
18
- controller.render_error(
19
- ::ForbiddenError,
20
- "The requested resource_owner could not be retrieved."
21
- )
23
+ controller.render_error( ::MissingPolicyError )
22
24
  end
23
25
  else
24
- controller.render_error(
25
- ::MissingParameterError,
26
- "The parameter 'access_token' is required."
27
- )
26
+ controller.render_error( ::MissingTokenError )
28
27
  end
29
28
  end
30
29
  end
@@ -63,4 +62,4 @@ module Unimatrix::Authorization
63
62
  Operation.new( '/resource_owner' ).where( access_token: access_token ).read
64
63
  end
65
64
 
66
- end
65
+ end
@@ -11,6 +11,9 @@ module Unimatrix::Quartermaster
11
11
  field :uuid
12
12
  field :storage_key
13
13
 
14
+ field :height
15
+ field :width
16
+
14
17
  has_one :binary_ingressor
15
18
 
16
19
  end
data/lib/unimatrix.rb CHANGED
@@ -109,6 +109,7 @@ require 'unimatrix/iris/stream_input'
109
109
  require 'unimatrix/iris/stream_output'
110
110
  require 'unimatrix/iris/stream_recorder'
111
111
  require 'unimatrix/iris/stream_transcriber'
112
+ require 'unimatrix/iris/stream_transformer'
112
113
  require 'unimatrix/iris/stream_transmutator'
113
114
 
114
115
  # regent
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unimatrix
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jackson Souza
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-31 00:00:00.000000000 Z
11
+ date: 2018-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -213,7 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
213
213
  version: '0'
214
214
  requirements: []
215
215
  rubyforge_project:
216
- rubygems_version: 2.4.8
216
+ rubygems_version: 2.6.14
217
217
  signing_key:
218
218
  specification_version: 4
219
219
  summary: Unimatrix is used to communicate with Unimatrix APIs.