activerecord-simple-slave 1.0.2 → 1.0.3

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: 7323496abbfea9ec9c02ec6df888f370fec0bb03aa3b5bb59acd2b32f66f338e
4
- data.tar.gz: 06214a36ab488d5fb8092e97e17b3be527f5b7c3eacdbc72a43acdce02e948a7
3
+ metadata.gz: c7fb8702f25a57870aad780e17a508b64d6fe5ff8a99267f10ab4217501811e1
4
+ data.tar.gz: 6c01a3bb3b46627cf8b960108b70811ae0ae90250e2f304661fb4f9181b839ad
5
5
  SHA512:
6
- metadata.gz: 615b62d0383052d3b5d61a03700ea1937cdae9c7440ecaa78749e8c66ae83389b8c051925a4f8c2d61e624fb19866e06a3df65f535913d2fc535409fdfee226a
7
- data.tar.gz: fbd166c04b1f01fa4d00219881438b6ae2ead2b5174dce853e7b155fee0a476f6d98d9e7fbf08381cfb70afbbb7864560531acde552c2c63cd8e1ea396402931
6
+ metadata.gz: 1ea08c2da89eaab786bde137e09406b44395168ba29d3034ff11da089b0f63e296d0fd42aa874755641330a03857d9304b6ca265c4a60d954d886dc5e9b3e201
7
+ data.tar.gz: 14bbe1a2fcc70b851d2077dece03359015a0d66b8231d5b009e76af35eb660de7be484958bdbb0ba48582afa0d3127bb0bb2b2d3b33592f8d35410bc89d45956
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- activerecord-simple-slave (1.0.2)
4
+ activerecord-simple-slave (1.0.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -32,4 +32,4 @@ DEPENDENCIES
32
32
  rspec (~> 3.0)
33
33
 
34
34
  BUNDLED WITH
35
- 1.16.3
35
+ 1.17.2
data/README.md CHANGED
@@ -30,18 +30,18 @@ development:
30
30
  port: 3306
31
31
  username: root
32
32
  password: root
33
- simple_slave_url: mysql2://slave.localhost:3306/ # port is optional
33
+ simple_slave_url: mysql2://slave.localhost:3306 # port is optional
34
34
  ```
35
35
 
36
36
  You can also use the environment variable `DATABASE_SIMPLE_SLAVE` to declare
37
37
  your slave server address.
38
38
  ```shell
39
39
  # EXPORT ENV VAR GLOBALLY
40
- export DATABASE_SIMPLE_SLAVE=slave.localhost:3306
40
+ export DATABASE_SIMPLE_SLAVE=mysql2://slave.localhost:3306
41
41
  bundle exec rails server
42
42
 
43
43
  # OR PER COMMAND :)
44
- DATABASE_SIMPLE_SLAVE=slave.localhost:3306 bundle exec rails server
44
+ DATABASE_SIMPLE_SLAVE=mysql2://slave.localhost:3306 bundle exec rails server
45
45
  ```
46
46
 
47
47
  Extend your model with ActiveRecord::SimpleSlave module, then use :
@@ -9,7 +9,10 @@ module ActiveRecord
9
9
  def simple_slave_configuration
10
10
  @simple_slave_configuration ||= connection_config.dup.tap do |config|
11
11
  if simple_slave_url.nil?
12
- Rails.logger.warn 'simple slave disabled (no configuration provided)'
12
+ if defined?(::Rails)
13
+ ::Rails.logger.warn \
14
+ 'simple slave disabled (no configuration provided)'
15
+ end
13
16
  next
14
17
  end
15
18
 
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module SimpleSlave
3
- VERSION = '1.0.2'
3
+ VERSION = '1.0.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-simple-slave
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien D.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-11-05 00:00:00.000000000 Z
11
+ date: 2019-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -94,8 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  - !ruby/object:Gem::Version
95
95
  version: '0'
96
96
  requirements: []
97
- rubyforge_project:
98
- rubygems_version: 2.7.6
97
+ rubygems_version: 3.0.3
99
98
  signing_key:
100
99
  specification_version: 4
101
100
  summary: ActiveRecord SimpleSlave gem