schild 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/schild.rb +4 -5
- data/lib/schild/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec596be7982f93f9c33fc6028b85dc723eaf3a75
|
4
|
+
data.tar.gz: a1fa7d89e0b92ffc0ce3280a26d3fc7bf2c661ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83c9072bc10cbe696c5c2ce9d0aceacb2af1d57a548ba75008f2d09489f1c469c093075f6a16d80336357d242cf94203e2af7f9cd709c33cfc6c5bb547254302
|
7
|
+
data.tar.gz: 187a6e29567dfec02cb11468224224bec4399bd7821945da44dbe8323d6821ac68a7d46da6bb32fed05b3d4349dc8d0422e5c8b70ed67b99b203eab742bd5701
|
data/lib/schild.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'schild/version'
|
2
2
|
require 'sequel'
|
3
|
+
require 'mysql2'
|
3
4
|
|
4
5
|
# Das Schild Modul, das alle Klassen für die Datenbankanbindung bereitstellt
|
5
6
|
module Schild
|
@@ -7,7 +8,9 @@ module Schild
|
|
7
8
|
|
8
9
|
# @db ist die Datenbank-Verbindung. Alle Daten können über diese Konstante abgerufen werden
|
9
10
|
|
10
|
-
|
11
|
+
mysql_compression = Mysql2::Client::COMPRESS if ENV["S_MYSQL_COMPRESSION"] == "true"
|
12
|
+
@db = Sequel.connect("#{ENV['S_ADAPTER']}://#{ENV['S_HOST']}/#{ENV['S_DB']}?user=#{ENV['S_USER']}&password=#{ENV['S_PASSWORD']}&zeroDateTimeBehavior=convertToNull",
|
13
|
+
:flags => mysql_compression)
|
11
14
|
begin
|
12
15
|
retries ||= 0
|
13
16
|
@db.test_connection
|
@@ -21,10 +24,6 @@ module Schild
|
|
21
24
|
@db.extension(:freeze_datasets)
|
22
25
|
@db.extension(:connection_validator)
|
23
26
|
|
24
|
-
def self.connect
|
25
|
-
@db = Sequel.connect("#{ENV['S_ADAPTER']}://#{ENV['S_HOST']}/#{ENV['S_DB']}?user=#{ENV['S_USER']}&password=#{ENV['S_PASSWORD']}&zeroDateTimeBehavior=convertToNull")
|
26
|
-
end
|
27
|
-
|
28
27
|
def self.db
|
29
28
|
@db
|
30
29
|
end
|
data/lib/schild/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schild
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- HMT
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
150
|
version: '0'
|
151
151
|
requirements: []
|
152
152
|
rubyforge_project:
|
153
|
-
rubygems_version: 2.6.
|
153
|
+
rubygems_version: 2.6.13
|
154
154
|
signing_key:
|
155
155
|
specification_version: 4
|
156
156
|
summary: Schild-API
|