forest_liana 2.3.5 → 2.4.0
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a488df7bcdc24a9fb36272473b3b81b14a134dd3
|
4
|
+
data.tar.gz: b6031a9db5015d4fb2454db567b5bc986f5981f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2abe6d5a5ebf7e943ff80f36ed1fcb20a72df5d129f482644c88338d67d831201383c13ccc89167edb8af9dfb622b8298a2f73337038de053573a1f4f12bd3c1
|
7
|
+
data.tar.gz: 68f3418e4c4cfefbf234cb5e1321d3749f73ab247a415d423deb9ed1588c200252d6d60a9e2cda86c9234161a7879e16f018c14413bd1a416933bfec69d2c436
|
@@ -128,8 +128,11 @@ module ForestLiana
|
|
128
128
|
if relation_name == model.name
|
129
129
|
fields[relation_name] = relation_fields
|
130
130
|
else
|
131
|
-
|
132
|
-
|
131
|
+
model_association = model.reflect_on_association(relation_name.to_sym)
|
132
|
+
if model_association
|
133
|
+
model_name = model_association.class_name
|
134
|
+
fields[model_name] = relation_fields
|
135
|
+
end
|
133
136
|
end
|
134
137
|
fields
|
135
138
|
end
|
@@ -4,8 +4,9 @@ class ForestLiana::Model::Action
|
|
4
4
|
include ActiveModel::Serialization
|
5
5
|
extend ActiveModel::Naming
|
6
6
|
|
7
|
+
# TODO: Remove :global option when we remove the deprecation warning.
|
7
8
|
attr_accessor :id, :name, :endpoint, :http_method, :fields, :redirect,
|
8
|
-
:global, :download
|
9
|
+
:global, :type, :download
|
9
10
|
|
10
11
|
def initialize(attributes = {})
|
11
12
|
attributes.each do |name, value|
|
@@ -26,7 +26,7 @@ module ForestLiana
|
|
26
26
|
if ForestLiana.env_secret
|
27
27
|
create_apimap
|
28
28
|
require_lib_forest_liana
|
29
|
-
|
29
|
+
format_and_validate_smart_actions
|
30
30
|
|
31
31
|
send_apimap
|
32
32
|
end
|
@@ -158,10 +158,22 @@ module ForestLiana
|
|
158
158
|
end
|
159
159
|
end
|
160
160
|
|
161
|
-
def
|
161
|
+
def format_and_validate_smart_actions
|
162
162
|
ForestLiana.apimap.each do |collection|
|
163
163
|
collection.actions.each do |action|
|
164
|
+
if action.global
|
165
|
+
FOREST_LOGGER.warn "DEPRECATION WARNING: Smart Action \"global\" option is now " \
|
166
|
+
"deprecated. Please set \"type: 'global'\" instead of \"global: true\" for the " \
|
167
|
+
"\"#{action.name}\" Smart Action."
|
168
|
+
end
|
169
|
+
|
170
|
+
if action.type && !['bulk', 'global', 'single'].include?(action.type)
|
171
|
+
FOREST_LOGGER.warn "Please set a valid Smart Action type (\"bulk\", \"global\" or " \
|
172
|
+
"\"single\") for the \"#{action.name}\" Smart Action."
|
173
|
+
end
|
174
|
+
|
164
175
|
if action.fields
|
176
|
+
# NOTICE: Set a position to the Smart Actions fields.
|
165
177
|
action.fields.each_with_index do |field, index|
|
166
178
|
field[:position] = index
|
167
179
|
end
|
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: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sandro Munda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|