camille 0.5.12 → 0.5.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/Gemfile.lock +11 -11
- data/lib/camille/controller.rb +2 -1
- data/lib/camille/types/object.rb +1 -1
- data/lib/camille/types/omit.rb +7 -0
- data/lib/camille/types/pick.rb +7 -0
- data/lib/camille/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2c6dd8d04bd084f86bdfb6dc20b8e7272f3bea5f041c39ff5c48f07c1d8184b
|
4
|
+
data.tar.gz: 7feb388c52715c48fc602bcc58274a9e667c6ac59290d8c3c7b52ff928def0d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d2e64d5caa85962f42f04d19b9bec5b7573166616b415f899a69e1752698f10d85961ac270c6397f78377d635904dad884fa62135c58c9c8060e0e5a57a4d0a
|
7
|
+
data.tar.gz: c6920ed8114a4807c837e8deeb813653ccb20efc44fe246cae3139d09068f16497d3ff378d97282207a6f21df7837fdf668a9ccf44d1c918cb9e4d144caec55b
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
camille (0.5.
|
4
|
+
camille (0.5.13)
|
5
5
|
rails (>= 6.1, < 8)
|
6
6
|
|
7
7
|
GEM
|
@@ -75,11 +75,11 @@ GEM
|
|
75
75
|
builder (3.2.4)
|
76
76
|
concurrent-ruby (1.2.2)
|
77
77
|
crass (1.0.6)
|
78
|
-
date (3.3.
|
78
|
+
date (3.3.4)
|
79
79
|
diff-lcs (1.5.0)
|
80
80
|
erubi (1.12.0)
|
81
|
-
globalid (1.1
|
82
|
-
activesupport (>=
|
81
|
+
globalid (1.2.1)
|
82
|
+
activesupport (>= 6.1)
|
83
83
|
i18n (1.12.0)
|
84
84
|
concurrent-ruby (~> 1.0)
|
85
85
|
loofah (2.19.1)
|
@@ -92,18 +92,18 @@ GEM
|
|
92
92
|
net-smtp
|
93
93
|
marcel (1.0.2)
|
94
94
|
method_source (1.0.0)
|
95
|
-
mini_mime (1.1.
|
95
|
+
mini_mime (1.1.5)
|
96
96
|
minitest (5.17.0)
|
97
|
-
net-imap (0.
|
97
|
+
net-imap (0.4.7)
|
98
98
|
date
|
99
99
|
net-protocol
|
100
100
|
net-pop (0.1.2)
|
101
101
|
net-protocol
|
102
|
-
net-protocol (0.2.
|
102
|
+
net-protocol (0.2.2)
|
103
103
|
timeout
|
104
|
-
net-smtp (0.
|
104
|
+
net-smtp (0.4.0)
|
105
105
|
net-protocol
|
106
|
-
nio4r (2.
|
106
|
+
nio4r (2.6.1)
|
107
107
|
nokogiri (1.14.2-x86_64-linux)
|
108
108
|
racc (~> 1.4)
|
109
109
|
racc (1.6.2)
|
@@ -159,10 +159,10 @@ GEM
|
|
159
159
|
rspec-support (~> 3.11)
|
160
160
|
rspec-support (3.12.0)
|
161
161
|
thor (1.2.1)
|
162
|
-
timeout (0.
|
162
|
+
timeout (0.4.1)
|
163
163
|
tzinfo (2.0.6)
|
164
164
|
concurrent-ruby (~> 1.0)
|
165
|
-
websocket-driver (0.7.
|
165
|
+
websocket-driver (0.7.6)
|
166
166
|
websocket-extensions (>= 0.1.0)
|
167
167
|
websocket-extensions (0.1.5)
|
168
168
|
zeitwerk (2.6.7)
|
data/lib/camille/controller.rb
CHANGED
@@ -17,7 +17,8 @@ module Camille
|
|
17
17
|
render_options = args.last
|
18
18
|
intended_status = render_options[:status] || 200
|
19
19
|
if intended_status == 200 || intended_status == :ok
|
20
|
-
if
|
20
|
+
if render_options.has_key? :json
|
21
|
+
value = render_options[:json]
|
21
22
|
error, transformed = endpoint.response_type.transform_and_check(value)
|
22
23
|
if error
|
23
24
|
string_io = StringIO.new
|
data/lib/camille/types/object.rb
CHANGED
data/lib/camille/types/omit.rb
CHANGED
@@ -12,6 +12,13 @@ module Camille
|
|
12
12
|
|
13
13
|
def processed_object
|
14
14
|
fields = @target_object.fields.reject{|k, _| @keys.include?(k)}
|
15
|
+
fields.transform_keys! do |k,_|
|
16
|
+
if @target_object.optional_keys.include?(k)
|
17
|
+
"#{k}?".to_sym
|
18
|
+
else
|
19
|
+
k
|
20
|
+
end
|
21
|
+
end
|
15
22
|
Camille::Types::Object.new(fields)
|
16
23
|
end
|
17
24
|
|
data/lib/camille/types/pick.rb
CHANGED
@@ -12,6 +12,13 @@ module Camille
|
|
12
12
|
|
13
13
|
def processed_object
|
14
14
|
fields = @target_object.fields.select{|k, _| @keys.include?(k)}
|
15
|
+
fields.transform_keys! do |k,_|
|
16
|
+
if @target_object.optional_keys.include?(k)
|
17
|
+
"#{k}?".to_sym
|
18
|
+
else
|
19
|
+
k
|
20
|
+
end
|
21
|
+
end
|
15
22
|
Camille::Types::Object.new(fields)
|
16
23
|
end
|
17
24
|
|
data/lib/camille/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: camille
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Alyssa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '8'
|
33
33
|
description: ''
|
34
34
|
email:
|
35
|
-
-
|
35
|
+
- git@alyssa.fm
|
36
36
|
executables: []
|
37
37
|
extensions: []
|
38
38
|
extra_rdoc_files: []
|