forest_liana 1.3.9 → 1.3.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/forest_liana/application_controller.rb +1 -1
- data/app/controllers/forest_liana/associations_controller.rb +6 -6
- data/app/controllers/forest_liana/intercom_controller.rb +4 -2
- data/app/controllers/forest_liana/resources_controller.rb +11 -8
- data/app/controllers/forest_liana/sessions_controller.rb +1 -1
- data/app/controllers/forest_liana/stats_controller.rb +3 -3
- data/app/controllers/forest_liana/stripe_controller.rb +5 -5
- data/lib/forest_liana/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abcf61ac2e539e94f9aa5039c5819921a48b688b
|
4
|
+
data.tar.gz: 7c053dd7579561fc685ba5af697bb15bf742f5b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 439361ffdf4942c8c86e199885f9046c5c3d149b9c63fda96b35d004bc72aeedb366a284ac460fd50be58e57ba27d1df4d93d3c0389c1c730ce2d0d53d0ec3a6
|
7
|
+
data.tar.gz: 526e26ad8daf48e7f71d659a824f23b5699b23cd858f947e399c76acb824cceec6a83ea9cd8fc55541e436bb213592bcb4736bf4420d9e690d24d884991da033
|
@@ -39,7 +39,7 @@ module ForestLiana
|
|
39
39
|
leeway: 30
|
40
40
|
}).try(:first)
|
41
41
|
rescue JWT::ExpiredSignature, JWT::VerificationError
|
42
|
-
render json: { error: 'expired_token' }, status: 401
|
42
|
+
render json: { error: 'expired_token' }, status: 401, serializer: nil
|
43
43
|
end
|
44
44
|
else
|
45
45
|
render nothing: true, status: 401
|
@@ -8,10 +8,10 @@ module ForestLiana
|
|
8
8
|
getter = HasManyGetter.new(@resource, @association, params)
|
9
9
|
getter.perform
|
10
10
|
|
11
|
-
render json: serialize_models(getter.records,
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
render serializer: nil, json: serialize_models(getter.records,
|
12
|
+
include: includes,
|
13
|
+
count: getter.count,
|
14
|
+
params: params)
|
15
15
|
end
|
16
16
|
|
17
17
|
private
|
@@ -20,7 +20,7 @@ module ForestLiana
|
|
20
20
|
@resource = SchemaUtils.find_model_from_table_name(params[:collection])
|
21
21
|
|
22
22
|
if @resource.nil? || !@resource.ancestors.include?(ActiveRecord::Base)
|
23
|
-
render json: {status: 404}, status: :not_found
|
23
|
+
render serializer: nil, json: {status: 404}, status: :not_found
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
@@ -32,7 +32,7 @@ module ForestLiana
|
|
32
32
|
# Only accept "many" associations
|
33
33
|
if @association.nil? ||
|
34
34
|
[:belongs_to, :has_one].include?(@association.macro)
|
35
|
-
render json: {status: 404}, status: :not_found
|
35
|
+
render serializer: nil, json: {status: 404}, status: :not_found
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
@@ -4,14 +4,16 @@ module ForestLiana
|
|
4
4
|
getter = IntercomConversationsGetter.new(params)
|
5
5
|
getter.perform
|
6
6
|
|
7
|
-
render json: serialize_models(getter.records, {
|
7
|
+
render serializer: nil, json: serialize_models(getter.records, {
|
8
|
+
count: getter.count
|
9
|
+
})
|
8
10
|
end
|
9
11
|
|
10
12
|
def attributes
|
11
13
|
getter = IntercomAttributesGetter.new(params)
|
12
14
|
getter.perform
|
13
15
|
|
14
|
-
render json: serialize_model(getter.records)
|
16
|
+
render json: serialize_model(getter.records), serializer: nil
|
15
17
|
end
|
16
18
|
end
|
17
19
|
end
|
@@ -11,17 +11,18 @@ module ForestLiana
|
|
11
11
|
getter = ResourcesGetter.new(@resource, params)
|
12
12
|
getter.perform
|
13
13
|
|
14
|
-
render json: serialize_models(getter.records,
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
render serializer: nil, json: serialize_models(getter.records,
|
15
|
+
include: includes,
|
16
|
+
count: getter.count,
|
17
|
+
params: params)
|
18
18
|
end
|
19
19
|
|
20
20
|
def show
|
21
21
|
getter = ResourceGetter.new(@resource, params)
|
22
22
|
getter.perform
|
23
23
|
|
24
|
-
render
|
24
|
+
render serializer: nil, json:
|
25
|
+
serialize_model(getter.record, include: includes)
|
25
26
|
end
|
26
27
|
|
27
28
|
def create
|
@@ -31,7 +32,8 @@ module ForestLiana
|
|
31
32
|
ActivityLogger.new.perform(current_user, 'created', params[:collection],
|
32
33
|
getter.record.id)
|
33
34
|
|
34
|
-
render
|
35
|
+
render serializer: nil,
|
36
|
+
json: serialize_model(getter.record, include: includes)
|
35
37
|
end
|
36
38
|
|
37
39
|
def update
|
@@ -41,7 +43,8 @@ module ForestLiana
|
|
41
43
|
ActivityLogger.new.perform(current_user, 'updated', params[:collection],
|
42
44
|
getter.record.id)
|
43
45
|
|
44
|
-
render
|
46
|
+
render serializer: nil,
|
47
|
+
json: serialize_model(getter.record, include: includes)
|
45
48
|
end
|
46
49
|
|
47
50
|
def destroy
|
@@ -57,7 +60,7 @@ module ForestLiana
|
|
57
60
|
@resource = SchemaUtils.find_model_from_table_name(params[:collection])
|
58
61
|
|
59
62
|
if @resource.nil? || !@resource.ancestors.include?(ActiveRecord::Base)
|
60
|
-
render json: {status: 404}, status: :not_found
|
63
|
+
render serializer: nil, json: {status: 404}, status: :not_found
|
61
64
|
end
|
62
65
|
end
|
63
66
|
|
@@ -14,9 +14,9 @@ module ForestLiana
|
|
14
14
|
|
15
15
|
stat.perform
|
16
16
|
if stat.record
|
17
|
-
render json: serialize_model(stat.record)
|
17
|
+
render json: serialize_model(stat.record), serializer: nil
|
18
18
|
else
|
19
|
-
render json: {status: 404}, status: :not_found
|
19
|
+
render json: {status: 404}, status: :not_found, serializer: nil
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
@@ -26,7 +26,7 @@ module ForestLiana
|
|
26
26
|
@resource = SchemaUtils.find_model_from_table_name(params[:collection])
|
27
27
|
|
28
28
|
if @resource.nil? || !@resource.ancestors.include?(ActiveRecord::Base)
|
29
|
-
render json: {status: 404}, status: :not_found
|
29
|
+
render json: {status: 404}, status: :not_found, serializer: nil
|
30
30
|
end
|
31
31
|
end
|
32
32
|
end
|
@@ -7,7 +7,7 @@ module ForestLiana
|
|
7
7
|
request.headers['Stripe-Reference'])
|
8
8
|
getter.perform
|
9
9
|
|
10
|
-
render json: serialize_models(getter.records, {
|
10
|
+
render serializer: nil, json: serialize_models(getter.records, {
|
11
11
|
count: getter.count,
|
12
12
|
include: ['customer']
|
13
13
|
})
|
@@ -18,9 +18,9 @@ module ForestLiana
|
|
18
18
|
refunder = StripePaymentRefunder.new(params)
|
19
19
|
refunder.perform
|
20
20
|
|
21
|
-
render json: {}
|
21
|
+
render serializer: nil, json: {}
|
22
22
|
rescue Stripe::InvalidRequestError => err
|
23
|
-
render json: { error: err.message }, status: 400
|
23
|
+
render serializer: nil, json: { error: err.message }, status: 400
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
@@ -30,7 +30,7 @@ module ForestLiana
|
|
30
30
|
request.headers['Stripe-Reference'])
|
31
31
|
getter.perform
|
32
32
|
|
33
|
-
render json: serialize_models(getter.records, {
|
33
|
+
render serializer: nil, json: serialize_models(getter.records, {
|
34
34
|
count: getter.count,
|
35
35
|
include: ['customer']
|
36
36
|
})
|
@@ -42,7 +42,7 @@ module ForestLiana
|
|
42
42
|
request.headers['Stripe-Reference'])
|
43
43
|
getter.perform
|
44
44
|
|
45
|
-
render json: serialize_models(getter.records, {
|
45
|
+
render serializer: nil, json: serialize_models(getter.records, {
|
46
46
|
count: getter.count,
|
47
47
|
include: ['customer']
|
48
48
|
})
|
data/lib/forest_liana/version.rb
CHANGED
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: 1.3.
|
4
|
+
version: 1.3.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sandro Munda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|