haveapi 0.16.2 → 0.16.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/haveapi.gemspec +1 -1
- data/lib/haveapi/action.rb +18 -2
- data/lib/haveapi/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ece538baf23fb6e02ef9ad1063930cc7b973e94fc530e4f96fa87f0e19ecd269
|
4
|
+
data.tar.gz: 73b6713727754b11ce89e3c61017b4374ced36f50c740c9594f757d11685e640
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6db1b965c6fac2ad2669709397e81d028e2e9828707dc6727b65b70cf0ceea5d8c8d38be82659a6c959687336529345b873c6fe2f81b779b83f96a86fe27c5c9
|
7
|
+
data.tar.gz: a6e64201797808898c504837f4f867bb0f017735e1b6f5558414026e78fb637089482e1479525ba7d1f1885d3c72eb3f165239b3acc1d164de702ef8762c26f1
|
data/haveapi.gemspec
CHANGED
@@ -23,6 +23,6 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.add_runtime_dependency 'rake'
|
24
24
|
s.add_runtime_dependency 'github-markdown'
|
25
25
|
s.add_runtime_dependency 'nesty', '~> 1.0'
|
26
|
-
s.add_runtime_dependency 'haveapi-client', '~> 0.16.
|
26
|
+
s.add_runtime_dependency 'haveapi-client', '~> 0.16.3'
|
27
27
|
s.add_runtime_dependency 'mail'
|
28
28
|
end
|
data/lib/haveapi/action.rb
CHANGED
@@ -355,7 +355,7 @@ module HaveAPI
|
|
355
355
|
# to what user can see.
|
356
356
|
# Return array +[status, data|error, errors]+
|
357
357
|
def safe_exec
|
358
|
-
|
358
|
+
exec_ret = catch(:return) do
|
359
359
|
begin
|
360
360
|
validate!
|
361
361
|
prepare
|
@@ -376,7 +376,23 @@ module HaveAPI
|
|
376
376
|
end
|
377
377
|
end
|
378
378
|
|
379
|
-
|
379
|
+
begin
|
380
|
+
output_ret = safe_output(exec_ret)
|
381
|
+
rescue Exception => e
|
382
|
+
tmp = call_class_hooks_as_for(Action, :exec_exception, args: [@context, e])
|
383
|
+
|
384
|
+
p e.message
|
385
|
+
puts e.backtrace
|
386
|
+
|
387
|
+
return [
|
388
|
+
tmp[:status] || false,
|
389
|
+
tmp[:message] || 'Server error occurred',
|
390
|
+
{},
|
391
|
+
tmp[:http_status] || 500,
|
392
|
+
]
|
393
|
+
end
|
394
|
+
|
395
|
+
output_ret
|
380
396
|
end
|
381
397
|
|
382
398
|
def v?(v)
|
data/lib/haveapi/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haveapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.16.
|
4
|
+
version: 0.16.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jakub Skokan
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0.16.
|
145
|
+
version: 0.16.3
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 0.16.
|
152
|
+
version: 0.16.3
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: mail
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|