forest_liana 5.2.2 → 5.2.3
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c4f5dd198db274bc38945cb0f30878d6636154086fbceed39b9f392c4cf2d9c7
|
|
4
|
+
data.tar.gz: 07c78e436df2aa66b9dbeaa776ad9125d3ffc04f1b60531b96848a84a56dfda4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2f9023a07c00e560f87e04184b88d6c6294e076bf29900c03d07eaa5f564308843e17456b09469777209d953b695085ef5650dbcdea029c0c4f3c1ddbb9c1d32
|
|
7
|
+
data.tar.gz: 0f1cdf525dedff5ec0d39f34952396263b3fe73ad25926eb47eef43641bd72835eb9ff87bde88d6864181cdab4fec7d654b5a4c8c9c1b9583ba34a9e262e419e
|
|
@@ -81,11 +81,15 @@ module ForestLiana
|
|
|
81
81
|
parsed_field = parse_field_name(field)
|
|
82
82
|
parsed_operator = parse_operator(operator)
|
|
83
83
|
parsed_value = parse_value(operator, value)
|
|
84
|
+
field_and_operator = "#{parsed_field} #{parsed_operator}"
|
|
84
85
|
|
|
85
|
-
if Rails::VERSION::MAJOR
|
|
86
|
-
|
|
86
|
+
if Rails::VERSION::MAJOR < 5
|
|
87
|
+
"#{field_and_operator} #{ActiveRecord::Base.sanitize(parsed_value)}"
|
|
88
|
+
# NOTICE: sanitize method as been removed in Rails 5.1 and sanitize_sql introduced in Rails 5.2.
|
|
89
|
+
elsif Rails::VERSION::MAJOR == 5 && Rails::VERSION::MINOR == 1
|
|
90
|
+
"#{field_and_operator} #{ActiveRecord::Base.connection.quote(parsed_value)}"
|
|
87
91
|
else
|
|
88
|
-
"#{
|
|
92
|
+
ActiveRecord::Base.sanitize_sql(["#{field_and_operator} ?", parsed_value])
|
|
89
93
|
end
|
|
90
94
|
end
|
|
91
95
|
|
|
@@ -175,7 +175,6 @@ module ForestLiana
|
|
|
175
175
|
def setup_forest_liana_meta
|
|
176
176
|
ForestLiana.meta = {
|
|
177
177
|
database_type: database_type,
|
|
178
|
-
framework_version: Gem.loaded_specs["rails"].version.version,
|
|
179
178
|
liana: 'forest-rails',
|
|
180
179
|
liana_version: ForestLiana::VERSION,
|
|
181
180
|
orm_version: Gem.loaded_specs["activerecord"].version.version
|
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: 5.2.
|
|
4
|
+
version: 5.2.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sandro Munda
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-12-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|