haveapi 0.16.1 → 0.16.3

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
  SHA256:
3
- metadata.gz: bcace8792254609a5aab1e759188a44935242337bda440df1bd54c3c960c3199
4
- data.tar.gz: 4f8e0c7455ee17fe76fd3cb142d714173048181ec450c9ccd043fbde77c06445
3
+ metadata.gz: ece538baf23fb6e02ef9ad1063930cc7b973e94fc530e4f96fa87f0e19ecd269
4
+ data.tar.gz: 73b6713727754b11ce89e3c61017b4374ced36f50c740c9594f757d11685e640
5
5
  SHA512:
6
- metadata.gz: 7b3be4ef5213a85922301ab5eb1858e86163f04e9fc2e5dcd9a9dbab39958ee56a4abbb605f19d2f79176e12dde7cc17d8db575a5dab77cd2df018bec290dadc
7
- data.tar.gz: 818db4bb2c407a5d72f2aea59332b54eac5d7403234bb0135d856f3d8c7090e8bc443dd3e09e2726a83cbda43bc01e78d3cb6e527b8153d99ce2252a1812ce8a
6
+ metadata.gz: 6db1b965c6fac2ad2669709397e81d028e2e9828707dc6727b65b70cf0ceea5d8c8d38be82659a6c959687336529345b873c6fe2f81b779b83f96a86fe27c5c9
7
+ data.tar.gz: a6e64201797808898c504837f4f867bb0f017735e1b6f5558414026e78fb637089482e1479525ba7d1f1885d3c72eb3f165239b3acc1d164de702ef8762c26f1
data/haveapi.gemspec CHANGED
@@ -17,12 +17,12 @@ Gem::Specification.new do |s|
17
17
  s.add_runtime_dependency 'require_all', '~> 2.0.0'
18
18
  s.add_runtime_dependency 'json'
19
19
  s.add_runtime_dependency 'activesupport', '>= 6.0'
20
- s.add_runtime_dependency 'sinatra', '~> 2.2.0'
20
+ s.add_runtime_dependency 'sinatra', '~> 3.0.4'
21
21
  s.add_runtime_dependency 'tilt', '~> 2.0.10'
22
22
  s.add_runtime_dependency 'redcarpet', '~> 3.5'
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.1'
26
+ s.add_runtime_dependency 'haveapi-client', '~> 0.16.3'
27
27
  s.add_runtime_dependency 'mail'
28
28
  end
@@ -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
- ret = catch(:return) do
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
- safe_output(ret)
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)
@@ -1,4 +1,4 @@
1
1
  module HaveAPI
2
2
  PROTOCOL_VERSION = '2.0'
3
- VERSION = '0.16.1'
3
+ VERSION = '0.16.3'
4
4
  end
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.1
4
+ version: 0.16.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakub Skokan
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 2.2.0
61
+ version: 3.0.4
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 2.2.0
68
+ version: 3.0.4
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: tilt
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 0.16.1
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.1
152
+ version: 0.16.3
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: mail
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -315,7 +315,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
315
315
  - !ruby/object:Gem::Version
316
316
  version: '0'
317
317
  requirements: []
318
- rubygems_version: 3.2.26
318
+ rubygems_version: 3.3.20
319
319
  signing_key:
320
320
  specification_version: 4
321
321
  summary: Framework for creating self-describing APIs