forest_liana 6.4.0 → 7.0.0.beta.1

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: 13952d2e70b5b32f326839ad76067ec236adda426152fd116e4836141d92efc7
4
- data.tar.gz: '026179b31057b1ce2bb8b60f6bae5a529467941d27a57c12a897028f4ce8d7bc'
3
+ metadata.gz: 69b23785cf391fb245efbf6488e58fb19bbbc010e9dac0a91574412684e89129
4
+ data.tar.gz: 26d9dd7b466009b8a09182dec02778b729e58b83c7b717811c45dca5ce6cc032
5
5
  SHA512:
6
- metadata.gz: '04698769547e0fd18c1720bf247365e6631ac8ef1715967932ab65d01dc9baef9086d017d5623c080cef6b11b72c4e50d4163584b3e6c89538b2fc85bb77cffe'
7
- data.tar.gz: 021f90c8f6ec1962d7761503554e92274d4eb48c6071ab00127cd5fb44ec7243a66d44069d3eafface9ac09b81a5f545fe93b0bb7f92ac2bfeb857622ec688fc
6
+ metadata.gz: e216bb8280e6adc87f2ab5f4c0d1a2937306ba1237aedcc9b80375a742227bcdf2187e74b573691324f55d9ef13843b397c25348d442a3e211eda2d8c20cb06c
7
+ data.tar.gz: a3e736ae280744d93d65f9592ff9b9475f1f2b22b24790ee37b202ad361f0f192ff0a2bf87dd2669327492b24d2afee3000130af925d38788879512e086da24e
@@ -34,14 +34,14 @@ module ForestLiana
34
34
 
35
35
  def serialize_model(record, options = {})
36
36
  options[:is_collection] = false
37
- json = JSONAPI::Serializer.serialize(record, options)
37
+ json = ForestAdmin::JSONAPI::Serializer.serialize(record, options)
38
38
 
39
39
  force_utf8_encoding(json)
40
40
  end
41
41
 
42
42
  def serialize_models(records, options = {}, fields_searched = [])
43
43
  options[:is_collection] = true
44
- json = JSONAPI::Serializer.serialize(records, options)
44
+ json = ForestAdmin::JSONAPI::Serializer.serialize(records, options)
45
45
 
46
46
  if options[:params] && options[:params][:search]
47
47
  # NOTICE: Add the Smart Fields with a 'String' type.
@@ -41,7 +41,7 @@ module ForestLiana
41
41
  updater.perform
42
42
 
43
43
  if updater.errors
44
- render serializer: nil, json: JSONAPI::Serializer.serialize_errors(
44
+ render serializer: nil, json: ForestAdmin::JSONAPI::Serializer.serialize_errors(
45
45
  updater.errors), status: 422
46
46
  else
47
47
  head :no_content
@@ -24,7 +24,7 @@ module ForestLiana
24
24
  end
25
25
  end
26
26
  rescue ForestLiana::Errors::ExpectedError => exception
27
- error_data = JSONAPI::Serializer.serialize_errors([{
27
+ error_data = ForestAdmin::JSONAPI::Serializer.serialize_errors([{
28
28
  status: exception.error_code,
29
29
  detail: exception.message
30
30
  }])
@@ -41,7 +41,7 @@ module ForestLiana
41
41
  status: :unprocessable_entity, serializer: nil
42
42
  rescue ForestLiana::Errors::ExpectedError => error
43
43
  error.display_error
44
- error_data = JSONAPI::Serializer.serialize_errors([{
44
+ error_data = ForestAdmin::JSONAPI::Serializer.serialize_errors([{
45
45
  status: error.error_code,
46
46
  detail: error.message
47
47
  }])
@@ -73,7 +73,7 @@ module ForestLiana
73
73
  status: :unprocessable_entity, serializer: nil
74
74
  rescue ForestLiana::Errors::ExpectedError => error
75
75
  error.display_error
76
- error_data = JSONAPI::Serializer.serialize_errors([{
76
+ error_data = ForestAdmin::JSONAPI::Serializer.serialize_errors([{
77
77
  status: error.error_code,
78
78
  detail: error.message
79
79
  }])
@@ -108,12 +108,12 @@ module ForestLiana
108
108
  creator.perform
109
109
 
110
110
  if creator.errors
111
- render serializer: nil, json: JSONAPI::Serializer.serialize_errors(
111
+ render serializer: nil, json: ForestAdmin::JSONAPI::Serializer.serialize_errors(
112
112
  creator.errors), status: 400
113
113
  elsif creator.record.valid?
114
114
  render serializer: nil, json: render_record_jsonapi(creator.record)
115
115
  else
116
- render serializer: nil, json: JSONAPI::Serializer.serialize_errors(
116
+ render serializer: nil, json: ForestAdmin::JSONAPI::Serializer.serialize_errors(
117
117
  creator.record.errors), status: 400
118
118
  end
119
119
  rescue => error
@@ -131,12 +131,12 @@ module ForestLiana
131
131
  updater.perform
132
132
 
133
133
  if updater.errors
134
- render serializer: nil, json: JSONAPI::Serializer.serialize_errors(
134
+ render serializer: nil, json: ForestAdmin::JSONAPI::Serializer.serialize_errors(
135
135
  updater.errors), status: 400
136
136
  elsif updater.record.valid?
137
137
  render serializer: nil, json: render_record_jsonapi(updater.record)
138
138
  else
139
- render serializer: nil, json: JSONAPI::Serializer.serialize_errors(
139
+ render serializer: nil, json: ForestAdmin::JSONAPI::Serializer.serialize_errors(
140
140
  updater.record.errors), status: 400
141
141
  end
142
142
  rescue => error
@@ -1,6 +1,6 @@
1
1
  module ForestLiana
2
2
  class IntercomAttributeSerializer
3
- include JSONAPI::Serializer
3
+ include ForestAdmin::JSONAPI::Serializer
4
4
 
5
5
  attribute :session_count
6
6
  attribute :last_seen_ip
@@ -1,6 +1,6 @@
1
1
  module ForestLiana
2
2
  class IntercomConversationSerializer
3
- include JSONAPI::Serializer
3
+ include ForestAdmin::JSONAPI::Serializer
4
4
 
5
5
  attribute :created_at
6
6
  attribute :updated_at
@@ -1,6 +1,6 @@
1
1
  module ForestLiana
2
2
  class MixpanelEventSerializer
3
- include JSONAPI::Serializer
3
+ include ForestAdmin::JSONAPI::Serializer
4
4
 
5
5
  attribute :id
6
6
  attribute :event
@@ -53,7 +53,7 @@ module ForestLiana
53
53
 
54
54
  def serializer_for(active_record_class)
55
55
  serializer = Class.new {
56
- include JSONAPI::Serializer
56
+ include ForestAdmin::JSONAPI::Serializer
57
57
 
58
58
  def self_link
59
59
  "/forest#{super.underscore}"
@@ -1,6 +1,6 @@
1
1
  module ForestLiana
2
2
  class StatSerializer
3
- include JSONAPI::Serializer
3
+ include ForestAdmin::JSONAPI::Serializer
4
4
 
5
5
  attribute :value
6
6
 
@@ -1,6 +1,6 @@
1
1
  module ForestLiana
2
2
  class StripeBankAccountSerializer
3
- include JSONAPI::Serializer
3
+ include ForestAdmin::JSONAPI::Serializer
4
4
 
5
5
  attribute :account_holder_name
6
6
  attribute :account_holder_type
@@ -1,6 +1,6 @@
1
1
  module ForestLiana
2
2
  class StripeCardSerializer
3
- include JSONAPI::Serializer
3
+ include ForestAdmin::JSONAPI::Serializer
4
4
 
5
5
  attribute :last4
6
6
  attribute :brand
@@ -1,6 +1,6 @@
1
1
  module ForestLiana
2
2
  class StripeInvoiceSerializer
3
- include JSONAPI::Serializer
3
+ include ForestAdmin::JSONAPI::Serializer
4
4
 
5
5
  attribute :amount_due
6
6
  attribute :amount_paid
@@ -1,6 +1,6 @@
1
1
  module ForestLiana
2
2
  class StripePaymentSerializer
3
- include JSONAPI::Serializer
3
+ include ForestAdmin::JSONAPI::Serializer
4
4
 
5
5
  attribute :description
6
6
  attribute :refunded
@@ -1,6 +1,6 @@
1
1
  module ForestLiana
2
2
  class StripeSubscriptionSerializer
3
- include JSONAPI::Serializer
3
+ include ForestAdmin::JSONAPI::Serializer
4
4
 
5
5
  attribute :cancel_at_period_end
6
6
  attribute :canceled_at
@@ -139,7 +139,7 @@ module ForestLiana
139
139
 
140
140
  # Monkey patch the find_serializer_class_name method to specify the
141
141
  # good serializer to use.
142
- ::JSONAPI::Serializer.class_eval do
142
+ ::ForestAdmin::JSONAPI::Serializer.class_eval do
143
143
  def self.find_serializer_class_name(record, options)
144
144
  if record.respond_to?(:jsonapi_serializer_class_name)
145
145
  record.jsonapi_serializer_class_name.to_s
@@ -1,3 +1,3 @@
1
1
  module ForestLiana
2
- VERSION = "6.4.0"
2
+ VERSION = "7.0.0.beta.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forest_liana
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.4.0
4
+ version: 7.0.0.beta.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sandro Munda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-26 00:00:00.000000000 Z
11
+ date: 2021-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '4.0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: jsonapi-serializers
28
+ name: forestadmin-jsonapi-serializers
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -495,9 +495,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
495
495
  version: '0'
496
496
  required_rubygems_version: !ruby/object:Gem::Requirement
497
497
  requirements:
498
- - - ">="
498
+ - - ">"
499
499
  - !ruby/object:Gem::Version
500
- version: '0'
500
+ version: 1.3.1
501
501
  requirements: []
502
502
  rubygems_version: 3.1.2
503
503
  signing_key: