mysql_framework 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db86d4f46bfac72057d5b95d706229b5ce43824f2e585ce690d9e71d64564322
|
4
|
+
data.tar.gz: ce5cf833871398172c4d401185671b94f5226f0384ada8aa956926e2d7024753
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53b60798e62bc6d5febfe8a4f670c3bb448b43440811bc4b3f832098ba9aa40f68c8eefc4346b496acdbed551e57afa19efa37c933651ab19b4ce3faf40dbfb1
|
7
|
+
data.tar.gz: c4518d98cbca222d2e0031d9559871633e650807b4c75c3d36012914738e08fb403401d01ecb7e118f237379b31f96b9f7aec6f4a2c0b193a874329e0afe31bd
|
@@ -118,7 +118,9 @@ module MysqlFramework
|
|
118
118
|
database: ENV.fetch('MYSQL_DATABASE'),
|
119
119
|
username: ENV.fetch('MYSQL_USERNAME'),
|
120
120
|
password: ENV.fetch('MYSQL_PASSWORD'),
|
121
|
-
reconnect: true
|
121
|
+
reconnect: true,
|
122
|
+
read_timeout: Integer(ENV.fetch('MYSQL_READ_TIMEOUT', 30)),
|
123
|
+
write_timeout: Integer(ENV.fetch('MYSQL_WRITE_TIMEOUT', 10))
|
122
124
|
}
|
123
125
|
end
|
124
126
|
|
@@ -10,7 +10,9 @@ describe MysqlFramework::Connector do
|
|
10
10
|
database: ENV.fetch('MYSQL_DATABASE'),
|
11
11
|
username: ENV.fetch('MYSQL_USERNAME'),
|
12
12
|
password: ENV.fetch('MYSQL_PASSWORD'),
|
13
|
-
reconnect: true
|
13
|
+
reconnect: true,
|
14
|
+
read_timeout: ENV.fetch('MYSQL_READ_TIMEOUT', 30),
|
15
|
+
write_timeout: ENV.fetch('MYSQL_WRITE_TIMEOUT', 10)
|
14
16
|
}
|
15
17
|
end
|
16
18
|
let(:options) do
|
@@ -43,7 +45,18 @@ describe MysqlFramework::Connector do
|
|
43
45
|
subject { described_class.new(options) }
|
44
46
|
|
45
47
|
it 'allows the default options to be overridden' do
|
46
|
-
|
48
|
+
expected = {
|
49
|
+
host: ENV.fetch('MYSQL_HOST'),
|
50
|
+
port: ENV.fetch('MYSQL_PORT'),
|
51
|
+
database: "#{ENV.fetch('MYSQL_DATABASE')}_2",
|
52
|
+
username: ENV.fetch('MYSQL_USERNAME'),
|
53
|
+
password: ENV.fetch('MYSQL_PASSWORD'),
|
54
|
+
reconnect: false,
|
55
|
+
read_timeout: ENV.fetch('MYSQL_READ_TIMEOUT', 30),
|
56
|
+
write_timeout: ENV.fetch('MYSQL_WRITE_TIMEOUT', 10)
|
57
|
+
}
|
58
|
+
|
59
|
+
expect(subject.instance_variable_get(:@options)).to eq(expected)
|
47
60
|
end
|
48
61
|
end
|
49
62
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mysql_framework
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sage
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|