forest_admin_agent 1.8.7 → 1.8.8

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: 2d25c2b519a49cdd5110d8611122af3ea0bcd57f80e009a2669d7102053a9cb5
4
- data.tar.gz: 357f0e2cbd33aa68ed598b85b0b83c8f600d555bf87c9b74cacb6ecf9d45ee3f
3
+ metadata.gz: c2aae6ff9fe9cca589c65b4fc6c66d5636a4fcce6221381c7cf1db88a5bc6c0f
4
+ data.tar.gz: 1181798a55291fb7178b86e398e3bf9571b2f299bd3678d02ea561d2b746b80c
5
5
  SHA512:
6
- metadata.gz: c295f5d048b9f506bd79a2ee38da994da4b5cef3d0b8f6640f78bee97fc06fe94774f8c7f05929d9d51e56be88c8ad40fc435c4bef1e38c7c469df5060df4d46
7
- data.tar.gz: 67583f70e8a69e8584f7c15865affd83aea0550219bd57a6ad9215b41912610199e1cf32de254a391687ba6be22804590773c95b439f0f231e66748b7f8a8caa
6
+ metadata.gz: 7feddf88c198be073a0a2abda768ed59eefee58cbc6e388798bb19915f6219ba73950d1fa77baeb8e56f9c7b89c6951c7d85906801c7cdb7c1e4c0dde1a80e2e
7
+ data.tar.gz: caa912666955fe5f18c056584da01fd7ba824f6d19fbe4144574269305c8343e09b79ca8e8bd90ca78cc0974051798722d3376149656ac0efcb964229605d308
@@ -11,8 +11,18 @@ module ForestAdminAgent
11
11
  return message if message
12
12
  end
13
13
 
14
+ return error.message if error.is_a?(ForestAdminDatasourceToolkit::Exceptions::ValidationError)
15
+
14
16
  'Unexpected error'
15
17
  end
18
+
19
+ def get_error_status(error)
20
+ return error.status if error.respond_to?(:status) && error.status
21
+
22
+ return 400 if error.is_a?(ForestAdminDatasourceToolkit::Exceptions::ValidationError)
23
+
24
+ 500
25
+ end
16
26
  end
17
27
  end
18
28
  end
@@ -11,7 +11,7 @@ module ForestAdminAgent
11
11
 
12
12
  def self.from_plain_object(collection, filters)
13
13
  if leaf?(filters)
14
- operator = filters[:operator].titleize.tr(' ', '_')
14
+ operator = filters[:operator].titleize.tr(' ', '_').downcase
15
15
  value = parse_value(collection, filters)
16
16
 
17
17
  return ConditionTreeLeaf.new(filters[:field], operator, value)
@@ -6,7 +6,7 @@ module ForestAdminAgent
6
6
  module Schema
7
7
  class SchemaEmitter
8
8
  LIANA_NAME = "agent-ruby"
9
- LIANA_VERSION = "1.8.7"
9
+ LIANA_VERSION = "1.8.8"
10
10
 
11
11
  def self.generate(datasource)
12
12
  datasource.collections
@@ -1,3 +1,3 @@
1
1
  module ForestAdminAgent
2
- VERSION = "1.8.7"
2
+ VERSION = "1.8.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forest_admin_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.7
4
+ version: 1.8.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthieu