dns_one 0.4.25 → 0.4.26

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: 61b79c877f92aa27ce0f2a934564dbb6dfd5081e
4
- data.tar.gz: d1a5fa9cf4fe59d40d94a0d37a94467781a5644a
3
+ metadata.gz: f6d9b8c5bc88e5515580d820944a757efcb4e89c
4
+ data.tar.gz: c23c698a4da7c599e879a2fdd9a1e3e1260900f6
5
5
  SHA512:
6
- metadata.gz: 0ba44dc2194fab4f8dda31969947e5589e4ea09f564df940f0548a3d6b41dc47d0cb55638f9e7ff20f5e2086e57eb0d2fa10943a1fc3d8b043e38fdf4b1112c9
7
- data.tar.gz: a87d1bae6b44a3be9c79914aa4de83c0a09f86287a01a4b2db99cdf721ae30f4d5a356269f72207f541f5a570433f7662859fcaea34a8c11507b74d9935fbbd8
6
+ metadata.gz: bdf38a98b59259886be51d89a2507cfb27d3fb0db4b065448447a501282fea0e58bdf03257920ad5d9f4c1dfa98ad99114310cad35c0dbf99f35f7155a16747b
7
+ data.tar.gz: '0946a808e96a9e15773f23c4a7744d1528b7deaba46502b4a7af1c6cfe2b3882d4785bfcd3ca208ef89c1cda1fd6801634db26192f4e2587c513ca1921c558c2'
@@ -10,11 +10,9 @@ module DnsOne; module Backend; class DB
10
10
  def find dom_name, tries = 1
11
11
  return if tries > 3
12
12
 
13
- sql = build_query dom_name
14
-
15
13
  # http://jakeyesbeck.com/2016/02/14/ruby-threads-and-active-record-connections/
16
14
  res = ActiveRecord::Base.connection_pool.with_connection do
17
- ActiveRecord::Base.connection.execute sql
15
+ ActiveRecord::Base.connection.execute build_query(dom_name)
18
16
  end
19
17
 
20
18
  first_record = res&.first
@@ -37,7 +35,8 @@ module DnsOne; module Backend; class DB
37
35
  private
38
36
 
39
37
  def build_query dom_name
40
- @query.sub '$domain', dom_name
38
+ @query.sub "'$domain'",
39
+ ActiveRecord::Base.connection.quote(dom_name)
41
40
  end
42
41
 
43
42
  def setup_db
@@ -1,3 +1,3 @@
1
1
  module DnsOne
2
- VERSION = "0.4.25"
2
+ VERSION = "0.4.26"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dns_one
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.25
4
+ version: 0.4.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Lobato
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
155
  version: '0'
156
156
  requirements: []
157
157
  rubyforge_project:
158
- rubygems_version: 2.5.1
158
+ rubygems_version: 2.5.2
159
159
  signing_key:
160
160
  specification_version: 4
161
161
  summary: DNS server for many zones sharing only one or few records, written in Ruby.