model_driven_api 3.7.3 → 3.7.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c1053d8f7e666ab9eb65f47714e9a02881028b261b10e4667b24ca8a4883eb45
|
|
4
|
+
data.tar.gz: d106be5cfe8eaff72ef75a9dfe910014af157f1726540197f97bc7d37b07993a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d970bb7e8bb28e5c04e03e35d2528b916d121741ee570c3fdd838f86b365f9a584147f5da9f7240e8e9444fe755632a09c452c1e3e25163746647f4d0d9c0f8b
|
|
7
|
+
data.tar.gz: 49d4d7cf759bc034dd48d43e006e277f356c0512e876843329bbf67856f82fbd19e26aa5b50633585c2548523123a007451fcd36364d379709350a314988356c
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
require 'concerns/model_driven_api_application_record'
|
|
2
2
|
require 'concerns/model_driven_api_user'
|
|
3
3
|
require 'concerns/model_driven_api_role'
|
|
4
|
+
require 'concerns/model_driven_api_push_subscriber'
|
|
5
|
+
require 'concerns/model_driven_api_push_message'
|
|
4
6
|
|
|
5
7
|
Rails.application.configure do
|
|
6
8
|
config.after_initialize do
|
|
@@ -8,5 +10,7 @@ Rails.application.configure do
|
|
|
8
10
|
ApplicationRecord.send(:include, ModelDrivenApiApplicationRecord)
|
|
9
11
|
User.send(:include, ModelDrivenApiUser)
|
|
10
12
|
Role.send(:include, ModelDrivenApiRole)
|
|
13
|
+
PushSubscriber.send(:include, ModelDrivenApiPushSubscriber)
|
|
14
|
+
PushMessage.send(:include, ModelDrivenApiPushMessage)
|
|
11
15
|
end
|
|
12
16
|
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
module ModelDrivenApiPushMessage
|
|
2
|
+
extend ActiveSupport::Concern
|
|
3
|
+
|
|
4
|
+
included do
|
|
5
|
+
cattr_accessor :json_attrs
|
|
6
|
+
self.json_attrs = ModelDrivenApi.smart_merge((json_attrs || {}), {
|
|
7
|
+
include: {
|
|
8
|
+
sender: {
|
|
9
|
+
only: %i[id email name surname]
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
})
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
module ModelDrivenApiPushSubscriber
|
|
2
|
+
extend ActiveSupport::Concern
|
|
3
|
+
|
|
4
|
+
included do
|
|
5
|
+
cattr_accessor :json_attrs
|
|
6
|
+
self.json_attrs = ModelDrivenApi.smart_merge((json_attrs || {}), {
|
|
7
|
+
include: {
|
|
8
|
+
user: {
|
|
9
|
+
only: %i[id email name surname]
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
})
|
|
13
|
+
end
|
|
14
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: model_driven_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.7.
|
|
4
|
+
version: 3.7.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Gabriele Tassoni
|
|
@@ -210,6 +210,8 @@ files:
|
|
|
210
210
|
- lib/api/v3/serializer_factory.rb
|
|
211
211
|
- lib/concerns/api_exception_management.rb
|
|
212
212
|
- lib/concerns/model_driven_api_application_record.rb
|
|
213
|
+
- lib/concerns/model_driven_api_push_message.rb
|
|
214
|
+
- lib/concerns/model_driven_api_push_subscriber.rb
|
|
213
215
|
- lib/concerns/model_driven_api_role.rb
|
|
214
216
|
- lib/concerns/model_driven_api_user.rb
|
|
215
217
|
- lib/endpoint_validation_error.rb
|