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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76f73e69326310a705d85a4cf620d82d3f42dd57
4
- data.tar.gz: 5a580846c3ea5e4326f00cbf76040c3ec7d35227
3
+ metadata.gz: ec596be7982f93f9c33fc6028b85dc723eaf3a75
4
+ data.tar.gz: a1fa7d89e0b92ffc0ce3280a26d3fc7bf2c661ce
5
5
  SHA512:
6
- metadata.gz: 6a9bc0d720eef3f93b4936bf159120e54ce44ea00f13030acd71a8c18a25c569e739b496dae9ed7f97b32c1c43fe62a98f3fa5186172cd1f99d3b0f3ada294a2
7
- data.tar.gz: 5dc7a2ad68b069be8a36f7d9304fe1bb7f0184ba23212f7d0db0f6d269afb254e6aad79b8a5a69ef439ae4c63f37154a3bf58c8e1caa7d0df486c0852d9421d3
6
+ metadata.gz: 83c9072bc10cbe696c5c2ce9d0aceacb2af1d57a548ba75008f2d09489f1c469c093075f6a16d80336357d242cf94203e2af7f9cd709c33cfc6c5bb547254302
7
+ data.tar.gz: 187a6e29567dfec02cb11468224224bec4399bd7821945da44dbe8323d6821ac68a7d46da6bb32fed05b3d4349dc8d0422e5c8b70ed67b99b203eab742bd5701
@@ -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
- @db = Sequel.connect("#{ENV['S_ADAPTER']}://#{ENV['S_HOST']}/#{ENV['S_DB']}?user=#{ENV['S_USER']}&password=#{ENV['S_PASSWORD']}&zeroDateTimeBehavior=convertToNull")
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
@@ -1,3 +1,3 @@
1
1
  module Schild
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.1"
3
3
  end
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.0
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-09-06 00:00:00.000000000 Z
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.11
153
+ rubygems_version: 2.6.13
154
154
  signing_key:
155
155
  specification_version: 4
156
156
  summary: Schild-API