rails-sharding 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rails/sharding/connection_handler.rb +4 -2
- data/lib/rails/sharding/version.rb +1 -1
- data/rails-sharding.gemspec +3 -3
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df0b84c70f3bb5a6ffbae32bf7e88d300ee1384d
|
4
|
+
data.tar.gz: f4b684182bea6329ff0461f9916379dcad607eac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adf71599b681df7fbfa1c5b4e877e1b494cf95b92f90dffee8f3b2b765166d52674b0b81c5bad7987dd7189c3cd0a77b854116d4d244c1b98aede49c6f240df9
|
7
|
+
data.tar.gz: 896076aa074a03e5d0fcb5faba3fe47a1b25b5b03d2edc921dac96ef9a862725a63b6ee038bcebdf15bc4bdb0f168d969146aa4a2704cafebbc28fedf65acdb9
|
@@ -91,6 +91,8 @@ module Rails::Sharding
|
|
91
91
|
end
|
92
92
|
|
93
93
|
# Adds a shard tag to the log of all queries executed through this connection
|
94
|
+
# Obs: connection inherits from ActiveRecord::ConnectionAdapters::AbstractAdapter
|
95
|
+
# but its class depends on the database adapter used.
|
94
96
|
def self.add_shard_tag_to_connection_log(connection, shard_tag)
|
95
97
|
# avoids modifing connection twice
|
96
98
|
if connection.respond_to? :shard_tag
|
@@ -107,9 +109,9 @@ module Rails::Sharding
|
|
107
109
|
|
108
110
|
# defines a new #log that adds a tag to the log
|
109
111
|
class << connection
|
110
|
-
def log(sql, name="SQL", binds=[], statement_name=nil, &block)
|
112
|
+
def log(sql, name="SQL", binds=[], type_casted_binds=[], statement_name=nil, &block)
|
111
113
|
name = (name.to_s + " (#{shard_tag})").strip
|
112
|
-
self.original_log(sql, name, binds, statement_name, &block)
|
114
|
+
self.original_log(sql, name, binds, type_casted_binds, statement_name, &block)
|
113
115
|
end
|
114
116
|
end
|
115
117
|
|
data/rails-sharding.gemspec
CHANGED
@@ -23,14 +23,14 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
24
|
spec.require_paths = ["lib"]
|
25
25
|
|
26
|
-
spec.add_runtime_dependency 'rails', '5.0.
|
26
|
+
spec.add_runtime_dependency 'rails', '5.0.3'
|
27
27
|
|
28
28
|
spec.add_development_dependency "bundler", "~> 1.15"
|
29
29
|
spec.add_development_dependency "rake", "~> 12.0"
|
30
30
|
spec.add_development_dependency "rspec", "~> 3.0"
|
31
31
|
spec.add_development_dependency "byebug", '~> 9'
|
32
32
|
spec.add_development_dependency "mysql2", '~> 0'
|
33
|
-
spec.add_development_dependency "pg" # postgres driver
|
33
|
+
spec.add_development_dependency "pg", '~> 0' # postgres driver
|
34
34
|
spec.add_development_dependency "codeclimate-test-reporter", '~> 1'
|
35
|
-
spec.add_development_dependency "simplecov"
|
35
|
+
spec.add_development_dependency "simplecov", '~> 0'
|
36
36
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-sharding
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henrique Gubert
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 5.0.
|
19
|
+
version: 5.0.3
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 5.0.
|
26
|
+
version: 5.0.3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,14 +98,14 @@ dependencies:
|
|
98
98
|
name: pg
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - "
|
101
|
+
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - "
|
108
|
+
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
@@ -126,14 +126,14 @@ dependencies:
|
|
126
126
|
name: simplecov
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- - "
|
129
|
+
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- - "
|
136
|
+
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
description: |-
|