upfluence-utils 0.9.3 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/upfluence/http/endpoint/api_endpoint.rb +11 -0
- data/lib/upfluence/utils/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: aa9bd490a9a2cd9c548925ebd068e9cbe33e29ab1b8ff94c9e0d9edab622da66
|
|
4
|
+
data.tar.gz: f61adace9b4078ce5231b7e65cad0b6205d5794459bd5aa952925e99c10a90aa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4f69d56979c1fe6cda75022744e4c583c83e1a8a80c3a5aac2c93ea182d62d847df433496529324dd5bbd67f9a69becd70ce18826bdf31de8ce184b80ff9f2d5
|
|
7
|
+
data.tar.gz: 4a85bc22c5a54b6512e7a4c37ee153755e9533a328a109bc5e9098e00dad4780177a5ef754897f0ed59031d087396dfce18b18f227d882f7ee6991c8ffb019e5
|
|
@@ -2,6 +2,7 @@ require 'sinatra'
|
|
|
2
2
|
require 'active_record'
|
|
3
3
|
require 'active_support/hash_with_indifferent_access'
|
|
4
4
|
require 'upfluence/http/endpoint/validation_error'
|
|
5
|
+
require 'upfluence/mixin/strong_parameters'
|
|
5
6
|
|
|
6
7
|
module Upfluence
|
|
7
8
|
module HTTP
|
|
@@ -99,6 +100,16 @@ module Upfluence
|
|
|
99
100
|
Sinatra::Base.error ActiveRecord::RecordInvalid do |e|
|
|
100
101
|
[422, Base::Exceptions::ValidationError.from_model(e.record).to_json]
|
|
101
102
|
end
|
|
103
|
+
|
|
104
|
+
Sinatra::Base.error StrongParameters::ParameterMissing.error do |e|
|
|
105
|
+
[
|
|
106
|
+
400,
|
|
107
|
+
{
|
|
108
|
+
error: 'missing_parameter',
|
|
109
|
+
param: e.param
|
|
110
|
+
}.to_json
|
|
111
|
+
]
|
|
112
|
+
end
|
|
102
113
|
end
|
|
103
114
|
end
|
|
104
115
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: upfluence-utils
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.
|
|
4
|
+
version: 0.9.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Upfluence
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-04-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|