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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 87d31c97612fa757fa73b7a87ab6d9372dfa1261
4
- data.tar.gz: feb0b94762924d848198740056a29c896fc2dbd5
3
+ metadata.gz: df0b84c70f3bb5a6ffbae32bf7e88d300ee1384d
4
+ data.tar.gz: f4b684182bea6329ff0461f9916379dcad607eac
5
5
  SHA512:
6
- metadata.gz: 495288c321b9aa8b2f6d77cd3b6c7028d3b1096a364346cc0473d81a8f4cb1e7a281210c6a8931187ec03a5b0ad03647999be5d101694ae548740af7f9742dce
7
- data.tar.gz: 7a7424667f0a053b83c18a22222df330dbbbb0ce8eca8cc3557493705d3b9860d309535e3ecf30de6fb89c1690bca5691b0eef9dbcc292c3ea54fd667e8b0940
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
 
@@ -1,5 +1,5 @@
1
1
  module Rails
2
2
  module Sharding
3
- VERSION = "1.0.3"
3
+ VERSION = "1.0.4"
4
4
  end
5
5
  end
@@ -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.2'
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.3
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.2
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.2
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: |-