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 +4 -4
- data/lib/dns_one/backend/db.rb +3 -4
- data/lib/dns_one/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: f6d9b8c5bc88e5515580d820944a757efcb4e89c
|
4
|
+
data.tar.gz: c23c698a4da7c599e879a2fdd9a1e3e1260900f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdf38a98b59259886be51d89a2507cfb27d3fb0db4b065448447a501282fea0e58bdf03257920ad5d9f4c1dfa98ad99114310cad35c0dbf99f35f7155a16747b
|
7
|
+
data.tar.gz: '0946a808e96a9e15773f23c4a7744d1528b7deaba46502b4a7af1c6cfe2b3882d4785bfcd3ca208ef89c1cda1fd6801634db26192f4e2587c513ca1921c558c2'
|
data/lib/dns_one/backend/db.rb
CHANGED
@@ -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
|
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',
|
38
|
+
@query.sub "'$domain'",
|
39
|
+
ActiveRecord::Base.connection.quote(dom_name)
|
41
40
|
end
|
42
41
|
|
43
42
|
def setup_db
|
data/lib/dns_one/version.rb
CHANGED
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.
|
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.
|
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.
|