protobuffy 3.3.0 → 3.4.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: fded4f8c03d73d4dc626afa2bc083857a917275f
4
- data.tar.gz: 17335b69a9f993d886be9939123d668eb78d4c25
3
+ metadata.gz: e4533ebff79e79d880b7092fad218adeac4e707b
4
+ data.tar.gz: 807e67cb14ab637caf13793b6a9ca244fd69436d
5
5
  SHA512:
6
- metadata.gz: a798e6c752344c67ceb29e94f6d8b8609c769f9a4796570c7b2c41f00e5acca47a99c516e4ec75d5c3a197161745bab7eca3e2293619340dfb392187ae016342
7
- data.tar.gz: 94480d96f1fccd3b1e6bc990ba83da398efaae13f9fbe74af69d794bc417f6dc1b98765c327b1f644e91f8402c6861baabcba6a8cab044f81c88f1a442711cbf
6
+ metadata.gz: dd2dfe2fb0f69105b82bc49d03461b00d64e17d0e445d243b9776528a8635170ae14840e32da6d8b9db15b16cb01032febd1b50a637c170f8b5e2777655c4f55
7
+ data.tar.gz: 3209aafba7e145cbbf27379eb1752f65253fc3e9004f38ef6b1512b97985dc1138b95cabf97197c5d73bf5c7953f66a00c3c7897a303c750ce862a2eced981f4
@@ -39,5 +39,17 @@ module Protobuf
39
39
  end
40
40
  end
41
41
 
42
+ class UnauthorizedRequest < PbError
43
+ def initialize message='The request requires user authentication'
44
+ super message, 'UNAUTHORIZED_REQUEST'
45
+ end
46
+ end
47
+
48
+ class ForbiddenRequest < PbError
49
+ def initialize message='User authentificated but does not have permissions'
50
+ super message, 'FORBIDDEN_REQUEST'
51
+ end
52
+ end
53
+
42
54
  end
43
55
  end
@@ -16,6 +16,8 @@ module Protobuf
16
16
  define :METHOD_NOT_FOUND, 3
17
17
  define :RPC_ERROR, 4
18
18
  define :RPC_FAILED, 5
19
+ define :UNAUTHORIZED_REQUEST, 10
20
+ define :FORBIDDEN_REQUEST, 11
19
21
  define :INVALID_REQUEST_PROTO, 6
20
22
  define :BAD_RESPONSE_PROTO, 7
21
23
  define :UNKNOWN_HOST, 8
@@ -14,6 +14,8 @@ module Protobuf
14
14
  HTTP_STATUSES = {
15
15
  Protobuf::Socketrpc::ErrorReason::BAD_REQUEST_DATA => 400,
16
16
  Protobuf::Socketrpc::ErrorReason::BAD_REQUEST_PROTO => 400,
17
+ Protobuf::Socketrpc::ErrorReason::UNAUTHORIZED_REQUEST => 401,
18
+ Protobuf::Socketrpc::ErrorReason::FORBIDDEN_REQUEST => 403,
17
19
  Protobuf::Socketrpc::ErrorReason::SERVICE_NOT_FOUND => 404,
18
20
  Protobuf::Socketrpc::ErrorReason::METHOD_NOT_FOUND => 404,
19
21
  Protobuf::Socketrpc::ErrorReason::RPC_ERROR => 500,
@@ -1,3 +1,3 @@
1
1
  module Protobuf
2
- VERSION = '3.3.0'
2
+ VERSION = '3.4.0'
3
3
  end
data/proto/rpc.proto CHANGED
@@ -53,6 +53,8 @@ enum ErrorReason
53
53
  METHOD_NOT_FOUND = 3; // Method not found on server
54
54
  RPC_ERROR = 4; // Rpc threw exception on server
55
55
  RPC_FAILED = 5; // Rpc failed on server
56
+ UNAUTHORIZED_REQUEST = 10; // Server received unauthorized request
57
+ FORBIDDEN_REQUEST = 11; // Server understood the request, but is refusing to fulfill it
56
58
 
57
59
  // Client-side errors (these are returned by the client-side code)
58
60
  INVALID_REQUEST_PROTO = 6; // Rpc was called with invalid request proto
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protobuffy
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 3.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - BJ Neilsen
@@ -9,191 +9,205 @@ authors:
9
9
  - Devin Christensen
10
10
  - Adam Hutchison
11
11
  - R. Tyler Croy
12
- autorequire:
12
+ autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2015-02-19 00:00:00.000000000 Z
15
+ date: 2015-06-19 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
+ name: activesupport
18
19
  requirement: !ruby/object:Gem::Requirement
19
20
  requirements:
20
- - - '>='
21
+ - - ">="
21
22
  - !ruby/object:Gem::Version
22
23
  version: '3.2'
23
- name: activesupport
24
- prerelease: false
25
24
  type: :runtime
25
+ prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  requirements:
28
- - - '>='
28
+ - - ">="
29
29
  - !ruby/object:Gem::Version
30
30
  version: '3.2'
31
31
  - !ruby/object:Gem::Dependency
32
+ name: middleware
32
33
  requirement: !ruby/object:Gem::Requirement
33
34
  requirements:
34
- - - '>='
35
+ - - ">="
35
36
  - !ruby/object:Gem::Version
36
37
  version: '0'
37
- name: middleware
38
- prerelease: false
39
38
  type: :runtime
39
+ prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
41
41
  requirements:
42
- - - '>='
42
+ - - ">="
43
43
  - !ruby/object:Gem::Version
44
44
  version: '0'
45
45
  - !ruby/object:Gem::Dependency
46
+ name: multi_json
46
47
  requirement: !ruby/object:Gem::Requirement
47
48
  requirements:
48
- - - '>='
49
+ - - ">="
49
50
  - !ruby/object:Gem::Version
50
51
  version: '0'
51
- name: multi_json
52
- prerelease: false
53
52
  type: :runtime
53
+ prerelease: false
54
54
  version_requirements: !ruby/object:Gem::Requirement
55
55
  requirements:
56
- - - '>='
56
+ - - ">="
57
57
  - !ruby/object:Gem::Version
58
58
  version: '0'
59
59
  - !ruby/object:Gem::Dependency
60
+ name: thor
60
61
  requirement: !ruby/object:Gem::Requirement
61
62
  requirements:
62
- - - '>='
63
+ - - ">="
63
64
  - !ruby/object:Gem::Version
64
65
  version: '0'
65
- name: thor
66
- prerelease: false
67
66
  type: :runtime
67
+ prerelease: false
68
68
  version_requirements: !ruby/object:Gem::Requirement
69
69
  requirements:
70
- - - '>='
70
+ - - ">="
71
71
  - !ruby/object:Gem::Version
72
72
  version: '0'
73
73
  - !ruby/object:Gem::Dependency
74
+ name: rack
74
75
  requirement: !ruby/object:Gem::Requirement
75
76
  requirements:
76
- - - '>='
77
+ - - ">="
77
78
  - !ruby/object:Gem::Version
78
79
  version: '0'
79
- name: rack
80
- prerelease: false
81
80
  type: :development
81
+ prerelease: false
82
82
  version_requirements: !ruby/object:Gem::Requirement
83
83
  requirements:
84
- - - '>='
84
+ - - ">="
85
85
  - !ruby/object:Gem::Version
86
86
  version: '0'
87
87
  - !ruby/object:Gem::Dependency
88
+ name: faraday
88
89
  requirement: !ruby/object:Gem::Requirement
89
90
  requirements:
90
- - - '>='
91
+ - - ">="
91
92
  - !ruby/object:Gem::Version
92
93
  version: '0'
93
- name: faraday
94
- prerelease: false
95
94
  type: :development
95
+ prerelease: false
96
96
  version_requirements: !ruby/object:Gem::Requirement
97
97
  requirements:
98
- - - '>='
98
+ - - ">="
99
99
  - !ruby/object:Gem::Version
100
100
  version: '0'
101
101
  - !ruby/object:Gem::Dependency
102
+ name: ffi-rzmq
102
103
  requirement: !ruby/object:Gem::Requirement
103
104
  requirements:
104
- - - '>='
105
+ - - ">="
105
106
  - !ruby/object:Gem::Version
106
107
  version: '0'
107
- name: ffi-rzmq
108
- prerelease: false
109
108
  type: :development
109
+ prerelease: false
110
110
  version_requirements: !ruby/object:Gem::Requirement
111
111
  requirements:
112
- - - '>='
112
+ - - ">="
113
113
  - !ruby/object:Gem::Version
114
114
  version: '0'
115
115
  - !ruby/object:Gem::Dependency
116
+ name: pry-nav
116
117
  requirement: !ruby/object:Gem::Requirement
117
118
  requirements:
118
- - - '>='
119
+ - - ">="
119
120
  - !ruby/object:Gem::Version
120
121
  version: '0'
121
- name: pry-nav
122
- prerelease: false
123
122
  type: :development
123
+ prerelease: false
124
124
  version_requirements: !ruby/object:Gem::Requirement
125
125
  requirements:
126
- - - '>='
126
+ - - ">="
127
127
  - !ruby/object:Gem::Version
128
128
  version: '0'
129
129
  - !ruby/object:Gem::Dependency
130
+ name: rake
130
131
  requirement: !ruby/object:Gem::Requirement
131
132
  requirements:
132
- - - '>='
133
+ - - ">="
133
134
  - !ruby/object:Gem::Version
134
135
  version: '0'
135
- name: rake
136
- prerelease: false
137
136
  type: :development
137
+ prerelease: false
138
138
  version_requirements: !ruby/object:Gem::Requirement
139
139
  requirements:
140
- - - '>='
140
+ - - ">="
141
141
  - !ruby/object:Gem::Version
142
142
  version: '0'
143
143
  - !ruby/object:Gem::Dependency
144
+ name: rspec
144
145
  requirement: !ruby/object:Gem::Requirement
145
146
  requirements:
146
147
  - - '='
147
148
  - !ruby/object:Gem::Version
148
149
  version: 2.99.0
149
- name: rspec
150
- prerelease: false
151
150
  type: :development
151
+ prerelease: false
152
152
  version_requirements: !ruby/object:Gem::Requirement
153
153
  requirements:
154
154
  - - '='
155
155
  - !ruby/object:Gem::Version
156
156
  version: 2.99.0
157
157
  - !ruby/object:Gem::Dependency
158
+ name: simplecov
158
159
  requirement: !ruby/object:Gem::Requirement
159
160
  requirements:
160
- - - '>='
161
+ - - ">="
161
162
  - !ruby/object:Gem::Version
162
163
  version: '0'
163
- name: simplecov
164
- prerelease: false
165
164
  type: :development
165
+ prerelease: false
166
166
  version_requirements: !ruby/object:Gem::Requirement
167
167
  requirements:
168
- - - '>='
168
+ - - ">="
169
169
  - !ruby/object:Gem::Version
170
170
  version: '0'
171
171
  - !ruby/object:Gem::Dependency
172
+ name: yard
172
173
  requirement: !ruby/object:Gem::Requirement
173
174
  requirements:
174
- - - '>='
175
+ - - ">="
175
176
  - !ruby/object:Gem::Version
176
177
  version: '0'
177
- name: yard
178
- prerelease: false
179
178
  type: :development
179
+ prerelease: false
180
180
  version_requirements: !ruby/object:Gem::Requirement
181
181
  requirements:
182
- - - '>='
182
+ - - ">="
183
183
  - !ruby/object:Gem::Version
184
184
  version: '0'
185
185
  - !ruby/object:Gem::Dependency
186
+ name: timecop
186
187
  requirement: !ruby/object:Gem::Requirement
187
188
  requirements:
188
- - - '>='
189
+ - - ">="
189
190
  - !ruby/object:Gem::Version
190
191
  version: '0'
191
- name: timecop
192
+ type: :development
192
193
  prerelease: false
194
+ version_requirements: !ruby/object:Gem::Requirement
195
+ requirements:
196
+ - - ">="
197
+ - !ruby/object:Gem::Version
198
+ version: '0'
199
+ - !ruby/object:Gem::Dependency
200
+ name: ruby-prof
201
+ requirement: !ruby/object:Gem::Requirement
202
+ requirements:
203
+ - - ">="
204
+ - !ruby/object:Gem::Version
205
+ version: '0'
193
206
  type: :development
207
+ prerelease: false
194
208
  version_requirements: !ruby/object:Gem::Requirement
195
209
  requirements:
196
- - - '>='
210
+ - - ">="
197
211
  - !ruby/object:Gem::Version
198
212
  version: '0'
199
213
  description: Google Protocol Buffers serialization and RPC implementation for Ruby.
@@ -209,9 +223,9 @@ executables:
209
223
  extensions: []
210
224
  extra_rdoc_files: []
211
225
  files:
212
- - .gitignore
213
- - .travis.yml
214
- - .yardopts
226
+ - ".gitignore"
227
+ - ".travis.yml"
228
+ - ".yardopts"
215
229
  - CHANGES.md
216
230
  - CONTRIBUTING.md
217
231
  - Gemfile
@@ -406,25 +420,25 @@ homepage: https://github.com/lookout/protobuffy
406
420
  licenses:
407
421
  - WTFPL
408
422
  metadata: {}
409
- post_install_message:
423
+ post_install_message:
410
424
  rdoc_options: []
411
425
  require_paths:
412
426
  - lib
413
427
  required_ruby_version: !ruby/object:Gem::Requirement
414
428
  requirements:
415
- - - '>='
429
+ - - ">="
416
430
  - !ruby/object:Gem::Version
417
431
  version: '0'
418
432
  required_rubygems_version: !ruby/object:Gem::Requirement
419
433
  requirements:
420
- - - '>='
434
+ - - ">="
421
435
  - !ruby/object:Gem::Version
422
436
  version: '0'
423
437
  requirements: []
424
- rubyforge_project:
438
+ rubyforge_project:
425
439
  rubygems_version: 2.4.5
426
- signing_key:
440
+ signing_key:
427
441
  specification_version: 4
428
442
  summary: Google Protocol Buffers serialization and RPC implementation for Ruby.
429
443
  test_files: []
430
- has_rdoc:
444
+ has_rdoc: