forest_liana 1.5.10 → 1.5.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/forest_liana/adapter_helper.rb +8 -0
- data/app/services/forest_liana/intercom_attributes_getter.rb +1 -1
- data/app/services/forest_liana/intercom_conversations_getter.rb +1 -1
- data/app/services/forest_liana/operator_value_parser.rb +10 -1
- data/app/services/forest_liana/stripe_bank_accounts_getter.rb +1 -1
- data/app/services/forest_liana/stripe_cards_getter.rb +1 -1
- data/app/services/forest_liana/stripe_invoices_getter.rb +1 -1
- data/app/services/forest_liana/stripe_payments_getter.rb +1 -1
- data/app/services/forest_liana/stripe_subscriptions_getter.rb +1 -1
- 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: 9574e613f6f1afd99b25965e0745041cbaac82d7
|
4
|
+
data.tar.gz: c28a317cc3f85b4af970fbf7d0b5659c57ab7327
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e6a8bea49321d364e59b3900dceeff7c30b94e60e7d4df314e59746a8575ab7fc7c596aa6eb6f2686f3303942f6378087728cb0dcb3f91de46191c0e49ff13c
|
7
|
+
data.tar.gz: 7c6e55d47cb9ab5d4b4c33c8f5b82eac116fe0aba36ca6c0f9430e25968b3365f9bc370b49da9ce2dc7ba58aa0c25e7c9d80d4ec176832822c5d1a7b3e4ca054
|
@@ -5,5 +5,13 @@ module ForestLiana
|
|
5
5
|
quoted_column_name = ActiveRecord::Base.connection.quote_column_name(column_name)
|
6
6
|
"#{quoted_table_name}.#{quoted_column_name}"
|
7
7
|
end
|
8
|
+
|
9
|
+
def self.cast_boolean(value)
|
10
|
+
if ActiveRecord::Base.connection.adapter_name == 'MySQL'
|
11
|
+
value === 'true' ? 1 : 0;
|
12
|
+
else
|
13
|
+
value
|
14
|
+
end
|
15
|
+
end
|
8
16
|
end
|
9
17
|
end
|
@@ -49,7 +49,7 @@ module ForestLiana
|
|
49
49
|
end
|
50
50
|
|
51
51
|
where = "#{field_name} #{operator}"
|
52
|
-
where += "
|
52
|
+
where += " #{self.format_value(resource, field, value)}" if value
|
53
53
|
where
|
54
54
|
end
|
55
55
|
end
|
@@ -65,5 +65,14 @@ module ForestLiana
|
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
|
+
def self.format_value(resource, field, value)
|
69
|
+
column = resource.columns.find { |c| c.name == field }
|
70
|
+
if column.type == :boolean
|
71
|
+
ForestLiana::AdapterHelper.cast_boolean(value)
|
72
|
+
else
|
73
|
+
"'#{value}'"
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
68
77
|
end
|
69
78
|
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: 1.5.
|
4
|
+
version: 1.5.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sandro Munda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|