forest_liana 5.2.2 → 5.2.3

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
  SHA256:
3
- metadata.gz: 7cbeea2af710f9ca87cf5009df16da231a225ccc1770df2d32f3276ff40ad08c
4
- data.tar.gz: 631aca45492967c964a97b22e32bccb61bea281be954956a766df500c1556931
3
+ metadata.gz: c4f5dd198db274bc38945cb0f30878d6636154086fbceed39b9f392c4cf2d9c7
4
+ data.tar.gz: 07c78e436df2aa66b9dbeaa776ad9125d3ffc04f1b60531b96848a84a56dfda4
5
5
  SHA512:
6
- metadata.gz: 2b29604d71d4832141d2d5cc27efd79fb2c17471a0a75158e5100d220e4f4507b8f9e3494766a4de679900d1c62ff0cdb3cd5ac2d1c4e5c42b49aee2ad0d1e9e
7
- data.tar.gz: 4afdc7851315ca16ecf4fe9ddaf771f853ba1db33d70875155f656e00c643de452527ed8efaa1dda9112f09c384c8a230e453218910fe5a9dd055f76da458d3d
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 >= 5
86
- ActiveRecord::Base.sanitize_sql(["#{parsed_field} #{parsed_operator} ?", parsed_value])
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
- "#{parsed_field} #{parsed_operator} #{ActiveRecord::Base.sanitize(parsed_value)}"
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
@@ -1,3 +1,3 @@
1
1
  module ForestLiana
2
- VERSION = "5.2.2"
2
+ VERSION = "5.2.3"
3
3
  end
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.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-08-04 00:00:00.000000000 Z
11
+ date: 2020-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails