mysql_framework 0.0.9 → 0.0.10

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
  SHA256:
3
- metadata.gz: 94c25e3c9a25a0ecd4c51807bb1c5906b44ac526af023445e4c6411d057b764a
4
- data.tar.gz: 428bf47cf5598c9c5c14593447e329685f3c52af39a45e45e92b18215bdc5323
3
+ metadata.gz: db86d4f46bfac72057d5b95d706229b5ce43824f2e585ce690d9e71d64564322
4
+ data.tar.gz: ce5cf833871398172c4d401185671b94f5226f0384ada8aa956926e2d7024753
5
5
  SHA512:
6
- metadata.gz: 9c3d58636754dfb8414caf2860b1c02c50d866a32d2c4610a2ff6e3779222bf567bb0779cbc4809555303b4477331f27e967f3b3dc80d0e7e86a1277256e7b82
7
- data.tar.gz: 82d72de51ec32da66e77f793a813af8f8da1f074916c77fc40d30f2cda9dfac6e1756669668595405e89ff92091ef87cb1765a9f72259613b03c167f19eecbda
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MysqlFramework
4
- VERSION = '0.0.9'
4
+ VERSION = '0.0.10'
5
5
  end
@@ -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
- expect(subject.instance_variable_get(:@options)).to eq(options)
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.9
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-03 00:00:00.000000000 Z
11
+ date: 2018-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler