switchman 1.11.7 → 1.12.0

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
- SHA256:
3
- metadata.gz: 1226a18b3b4a82f0362cf1b706fd97c1f3ef84067781908421f7852c312e8d56
4
- data.tar.gz: 28acc935d4292c51a9ef0d4a1644b110c00fa414fb2e9e20b272848c66a4a9e3
2
+ SHA1:
3
+ metadata.gz: 4cbaba3af0fb2692fd3e75ec8ca0d76c2dfcc187
4
+ data.tar.gz: 1a6fd4d0e9b20174505d6421e819f46ab47e60aa
5
5
  SHA512:
6
- metadata.gz: 29ef4b1c6ed6daf73361622702ee5a27232ba8adfbc7049be660f3e6e3074204cf116e09d5388c2dfc927b8b073ff973f17d24c0824f472eb87c83f9d3057db0
7
- data.tar.gz: dadcf10f6ca9cee1c1acd5c0d15b342f8c143b3c7f1d31728aeefecc61fdc71f45ecf9b0e64b9db20618adc74277bcd6a9200bc3a6752d67ea187ba7b43b1fd3
6
+ metadata.gz: 2f7720c65be9c6dd30af6b8a21e6dad2b9ba6028d2ab743cd03a941cae96fb69c245b3935adc48e725e3361458052f2e28f2ac6bbc4c92a0641241c24b5a5ff5
7
+ data.tar.gz: a9f90607b3362d9f32530e99b17bded68cda2a5f4733c79916e0c1b0fa84a4f33ded8c43c3c9afefcb457e5a5fc4bb2a7e97e5b4e3b30e9d17ba81603050a7a5
@@ -429,6 +429,8 @@ module Switchman
429
429
  def integral_id_for(any_id)
430
430
  if any_id.is_a?(::Arel::Nodes::Casted)
431
431
  any_id = any_id.val
432
+ elsif any_id.is_a?(::Arel::Nodes::BindParam) && ::Rails.version >= "5.2"
433
+ any_id = any_id.value.value_before_type_cast
432
434
  end
433
435
 
434
436
  case any_id
File without changes
@@ -76,6 +76,15 @@ module Switchman
76
76
 
77
77
  module Preloader
78
78
  module Association
79
+ if ::Rails.version >= "5.2"
80
+ def run(preloader)
81
+ # TODO - can move associated_records_by_owner into this after 5.1 is gonzo
82
+ associated_records_by_owner(preloader).each do |owner, records|
83
+ associate_records_to_owner(owner, records)
84
+ end
85
+ end
86
+ end
87
+
79
88
  def associated_records_by_owner(preloader = nil)
80
89
  owners_map = owners_by_key
81
90
 
@@ -45,7 +45,9 @@ module Switchman
45
45
  conditions = conditions.id if ::ActiveRecord::Base === conditions
46
46
  return false if !conditions
47
47
 
48
- relation = apply_join_dependency(self, construct_join_dependency)
48
+ relation = ::Rails.version >= "5.2" ?
49
+ apply_join_dependency(eager_loading: false) :
50
+ apply_join_dependency(self, construct_join_dependency)
49
51
  return false if ::ActiveRecord::NullRelation === relation
50
52
 
51
53
  relation = relation.except(:select, :order).select("1 AS one").limit(1)
@@ -58,7 +60,9 @@ module Switchman
58
60
  end
59
61
 
60
62
  relation.activate do |shard_rel|
61
- return true if connection.select_value(shard_rel, "#{name} Exists", shard_rel.bound_attributes)
63
+ return true if ::Rails.version >= "5.2" ?
64
+ connection.select_value(shard_rel.arel, "#{name} Exists") :
65
+ connection.select_value(shard_rel, "#{name} Exists", shard_rel.bound_attributes)
62
66
  end
63
67
  false
64
68
  end
@@ -21,7 +21,8 @@ module Switchman
21
21
  if ::Rails.version < '5.0.3'
22
22
  binds = " " + payload[:binds].map { |attr| render_bind(attr) }.inspect
23
23
  else
24
- args = ::Rails.version < '5.1.5' ?
24
+ use_old_format = (::Rails.version < '5.1') ? (::Rails.version < '5.0.7') : (::Rails.version < '5.1.5')
25
+ args = use_old_format ?
25
26
  [payload[:binds], payload[:type_casted_binds]] :
26
27
  [payload[:type_casted_binds]]
27
28
  casted_params = type_casted_binds(*args)
@@ -135,7 +135,11 @@ module Switchman
135
135
  where = inddef.scan(/WHERE (.+)$/).flatten[0]
136
136
  using = inddef.scan(/USING (.+?) /).flatten[0].to_sym
137
137
 
138
- ::ActiveRecord::ConnectionAdapters::IndexDefinition.new(table_name, index_name, unique, column_names, [], orders, where, nil, using)
138
+ if ::Rails.version >= "5.2"
139
+ ::ActiveRecord::ConnectionAdapters::IndexDefinition.new(table_name, index_name, unique, column_names, orders: orders, where: where, using: using)
140
+ else
141
+ ::ActiveRecord::ConnectionAdapters::IndexDefinition.new(table_name, index_name, unique, column_names, [], orders, where, nil, using)
142
+ end
139
143
  end
140
144
  end.compact
141
145
  end
@@ -78,8 +78,9 @@ module Switchman
78
78
  sql = "#{self.shard.id}::#{sql}"
79
79
  result =
80
80
  if query_cache[sql].key?(binds)
81
- ::ActiveSupport::Notifications.instrument("sql.active_record",
82
- :sql => sql, :binds => binds, :name => "CACHE", :connection_id => object_id)
81
+ args = {:sql => sql, :binds => binds, :name => "CACHE", :connection_id => object_id}
82
+ args[:type_casted_binds] = -> { type_casted_binds(binds) } if ::Rails.version >= '5.0.7'
83
+ ::ActiveSupport::Notifications.instrument("sql.active_record", args)
83
84
  query_cache[sql][binds]
84
85
  else
85
86
  query_cache[sql][binds] = yield
@@ -78,26 +78,45 @@ module Switchman
78
78
 
79
79
  private
80
80
 
81
- [:where, :having].each do |type|
82
- class_eval <<-RUBY, __FILE__, __LINE__ + 1
83
- def transpose_#{type}_clauses(source_shard, target_shard, remove_nonlocal_primary_keys)
81
+ if ::Rails.version >= '5.2'
82
+ [:where, :having].each do |type|
83
+ class_eval <<-RUBY, __FILE__, __LINE__ + 1
84
+ def transpose_#{type}_clauses(source_shard, target_shard, remove_nonlocal_primary_keys)
84
85
  unless (predicates = #{type}_clause.send(:predicates)).empty?
85
- new_predicates, new_binds = transpose_predicates(predicates, source_shard,
86
- target_shard, remove_nonlocal_primary_keys,
87
- binds: #{type}_clause.binds,
88
- dup_binds_on_mutation: true)
89
- if new_predicates != predicates || !new_binds.equal?(#{type}_clause.binds)
86
+ new_predicates, _binds = transpose_predicates(predicates, source_shard,
87
+ target_shard, remove_nonlocal_primary_keys)
88
+ if new_predicates != predicates
90
89
  self.#{type}_clause = #{type}_clause.dup
91
90
  if new_predicates != predicates
92
91
  #{type}_clause.instance_variable_set(:@predicates, new_predicates)
93
92
  end
94
- if !new_binds.equal?(#{type}_clause.binds)
95
- #{type}_clause.instance_variable_set(:@binds, new_binds)
96
- end
97
93
  end
98
- end
94
+ end
99
95
  end
100
- RUBY
96
+ RUBY
97
+ end
98
+ else
99
+ [:where, :having].each do |type|
100
+ class_eval <<-RUBY, __FILE__, __LINE__ + 1
101
+ def transpose_#{type}_clauses(source_shard, target_shard, remove_nonlocal_primary_keys)
102
+ unless (predicates = #{type}_clause.send(:predicates)).empty?
103
+ new_predicates, new_binds = transpose_predicates(predicates, source_shard,
104
+ target_shard, remove_nonlocal_primary_keys,
105
+ binds: #{type}_clause.binds,
106
+ dup_binds_on_mutation: true)
107
+ if new_predicates != predicates || !new_binds.equal?(#{type}_clause.binds)
108
+ self.#{type}_clause = #{type}_clause.dup
109
+ if new_predicates != predicates
110
+ #{type}_clause.instance_variable_set(:@predicates, new_predicates)
111
+ end
112
+ if !new_binds.equal?(#{type}_clause.binds)
113
+ #{type}_clause.instance_variable_set(:@binds, new_binds)
114
+ end
115
+ end
116
+ end
117
+ end
118
+ RUBY
119
+ end
101
120
  end
102
121
 
103
122
  def transpose_clauses(source_shard, target_shard, remove_nonlocal_primary_keys = false)
@@ -138,17 +157,23 @@ module Switchman
138
157
  return
139
158
  end
140
159
  when ::Arel::Nodes::BindParam
141
- # look for a bind param with a matching column name
142
- if binds && bind = binds.detect{|b| b&.name.to_s == klass.primary_key.to_s}
143
- unless bind.value.is_a?(::ActiveRecord::StatementCache::Substitute)
144
- local_id, id_shard = Shard.local_id_for(bind.value)
145
- id_shard ||= Shard.current(klass.shard_category) if local_id
160
+ if ::Rails.version >= "5.2"
161
+ local_id, id_shard = Shard.local_id_for(primary_key.right.value.value_before_type_cast)
162
+ id_shard ||= Shard.current(klass.shard_category) if local_id
163
+ else
164
+ # look for a bind param with a matching column name
165
+ if binds && bind = binds.detect{|b| b&.name.to_s == klass.primary_key.to_s}
166
+ unless bind.value.is_a?(::ActiveRecord::StatementCache::Substitute)
167
+ local_id, id_shard = Shard.local_id_for(bind.value)
168
+ id_shard ||= Shard.current(klass.shard_category) if local_id
169
+ end
146
170
  end
147
171
  end
148
172
  else
149
173
  local_id, id_shard = Shard.local_id_for(primary_key.right)
150
174
  id_shard ||= Shard.current(klass.shard_category) if local_id
151
175
  end
176
+
152
177
  return if !id_shard || id_shard == primary_shard
153
178
  transpose_clauses(primary_shard, id_shard)
154
179
  self.shard_value = id_shard
@@ -242,50 +267,59 @@ module Switchman
242
267
  source_shard_for_foreign_key(relation, column)
243
268
  end
244
269
 
245
- new_right_value = case predicate.right
246
- when Array
247
- local_ids = []
248
- predicate.right.each do |value|
249
- local_id = Shard.relative_id_for(value, current_source_shard, target_shard)
250
- next unless local_id
251
- unless remove && local_id > Shard::IDS_PER_SHARD
252
- if value.is_a?(::Arel::Nodes::Casted)
253
- if local_id == value.val
254
- local_id = value
255
- elsif local_id != value
256
- local_id = value.class.new(local_id, value.attribute)
270
+ if ::Rails.version >= "5.2"
271
+ new_right_value =
272
+ case predicate.right
273
+ when Array
274
+ predicate.right.map {|val| transpose_predicate_value(val, current_source_shard, target_shard, type, remove) }
275
+ else
276
+ transpose_predicate_value(predicate.right, current_source_shard, target_shard, type, remove)
277
+ end
278
+ else
279
+ new_right_value = case predicate.right
280
+ when Array
281
+ local_ids = []
282
+ predicate.right.each do |value|
283
+ local_id = Shard.relative_id_for(value, current_source_shard, target_shard)
284
+ next unless local_id
285
+ unless remove && local_id > Shard::IDS_PER_SHARD
286
+ if value.is_a?(::Arel::Nodes::Casted)
287
+ if local_id == value.val
288
+ local_id = value
289
+ elsif local_id != value
290
+ local_id = value.class.new(local_id, value.attribute)
291
+ end
257
292
  end
293
+ local_ids << local_id
258
294
  end
259
- local_ids << local_id
260
295
  end
261
- end
262
- local_ids
263
- when ::Arel::Nodes::BindParam
264
- # look for a bind param with a matching column name
265
- if binds && bind = binds.detect{|b| b&.name.to_s == predicate.left.name.to_s}
266
- # before we mutate, dup
267
- if dup_binds_on_mutation
268
- binds = binds.map(&:dup)
269
- dup_binds_on_mutation = false
270
- bind = binds.find { |b| b&.name.to_s == predicate.left.name.to_s }
271
- end
272
- if bind.value.is_a?(::ActiveRecord::StatementCache::Substitute)
273
- bind.value.sharded = true # mark for transposition later
274
- bind.value.primary = true if type == :primary
275
- else
276
- local_id = Shard.relative_id_for(bind.value, current_source_shard, target_shard)
277
- local_id = [] if remove && local_id > Shard::IDS_PER_SHARD
278
- bind.instance_variable_set(:@value, local_id)
279
- bind.instance_variable_set(:@value_for_database, nil)
296
+ local_ids
297
+ when ::Arel::Nodes::BindParam
298
+ # look for a bind param with a matching column name
299
+ if binds && bind = binds.detect{|b| b&.name.to_s == predicate.left.name.to_s}
300
+ # before we mutate, dup
301
+ if dup_binds_on_mutation
302
+ binds = binds.map(&:dup)
303
+ dup_binds_on_mutation = false
304
+ bind = binds.find { |b| b&.name.to_s == predicate.left.name.to_s }
305
+ end
306
+ if bind.value.is_a?(::ActiveRecord::StatementCache::Substitute)
307
+ bind.value.sharded = true # mark for transposition later
308
+ bind.value.primary = true if type == :primary
309
+ else
310
+ local_id = Shard.relative_id_for(bind.value, current_source_shard, target_shard)
311
+ local_id = [] if remove && local_id > Shard::IDS_PER_SHARD
312
+ bind.instance_variable_set(:@value, local_id)
313
+ bind.instance_variable_set(:@value_for_database, nil)
314
+ end
280
315
  end
316
+ predicate.right
317
+ else
318
+ local_id = Shard.relative_id_for(predicate.right, current_source_shard, target_shard) || predicate.right
319
+ local_id = [] if remove && local_id.is_a?(Fixnum) && local_id > Shard::IDS_PER_SHARD
320
+ local_id
281
321
  end
282
- predicate.right
283
- else
284
- local_id = Shard.relative_id_for(predicate.right, current_source_shard, target_shard) || predicate.right
285
- local_id = [] if remove && local_id.is_a?(Fixnum) && local_id > Shard::IDS_PER_SHARD
286
- local_id
287
322
  end
288
-
289
323
  if new_right_value == predicate.right
290
324
  predicate
291
325
  elsif predicate.right.is_a?(::Arel::Nodes::Casted)
@@ -301,6 +335,31 @@ module Switchman
301
335
  result = [result, binds]
302
336
  result
303
337
  end
338
+
339
+ def transpose_predicate_value(value, current_shard, target_shard, attribute_type, remove_non_local_ids)
340
+ if value.is_a?(::Arel::Nodes::BindParam)
341
+ query_att = value.value
342
+ current_id = query_att.value_before_type_cast
343
+ if current_id.is_a?(::ActiveRecord::StatementCache::Substitute)
344
+ current_id.sharded = true # mark for transposition later
345
+ current_id.primary = true if attribute_type == :primary
346
+ value
347
+ else
348
+ local_id = Shard.relative_id_for(current_id, current_shard, target_shard) || current_id
349
+ local_id = [] if remove_non_local_ids && local_id.is_a?(Fixnum) && local_id > Shard::IDS_PER_SHARD
350
+ if current_id != local_id
351
+ # make a new bind param
352
+ ::Arel::Nodes::BindParam.new(query_att.class.new(query_att.name, local_id, query_att.type))
353
+ else
354
+ value
355
+ end
356
+ end
357
+ else
358
+ local_id = Shard.relative_id_for(value, current_shard, target_shard) || value
359
+ local_id = [] if remove_non_local_ids && local_id.is_a?(Fixnum) && local_id > Shard::IDS_PER_SHARD
360
+ local_id
361
+ end
362
+ end
304
363
  end
305
364
  end
306
365
  end
@@ -26,21 +26,21 @@ module Switchman
26
26
  # this technically belongs on AssociationReflection, but we put it on
27
27
  # ThroughReflection as well, instead of delegating to its internal
28
28
  # HasManyAssociation, losing its proper `klass`
29
- def association_scope_cache(conn, owner)
29
+ def association_scope_cache(conn, owner, &block)
30
30
  key = conn.prepared_statements
31
31
  if polymorphic?
32
32
  key = [key, owner._read_attribute(@foreign_type)]
33
33
  end
34
34
  key = [key, shard(owner).id].flatten
35
35
  @association_scope_cache[key] ||= @scope_lock.synchronize {
36
- @association_scope_cache[key] ||= yield
36
+ @association_scope_cache[key] ||= (::Rails.version >= "5.2" ? ::ActiveRecord::StatementCache.create(conn, &block) : block.call)
37
37
  }
38
38
  end
39
39
  end
40
40
 
41
41
  module AssociationReflection
42
42
  def join_id_for(owner)
43
- owner.send(active_record_primary_key) # use sharded id values in association binds
43
+ owner.send(::Rails.version >= "5.2" ? join_foreign_key : active_record_primary_key) # use sharded id values in association binds
44
44
  end
45
45
  end
46
46
  end
@@ -5,14 +5,21 @@ module Switchman
5
5
  def create(connection, block = Proc.new)
6
6
  relation = block.call ::ActiveRecord::StatementCache::Params.new
7
7
 
8
- bind_map = ::ActiveRecord::StatementCache::BindMap.new(relation.bound_attributes )
9
- new relation.arel, bind_map
8
+ if ::Rails.version >= "5.2"
9
+ query_builder, binds = connection.cacheable_query(self, relation.arel)
10
+ bind_map = ::ActiveRecord::StatementCache::BindMap.new(binds)
11
+ new(relation.arel, bind_map, relation.klass)
12
+ else
13
+ bind_map = ::ActiveRecord::StatementCache::BindMap.new(relation.bound_attributes)
14
+ new relation.arel, bind_map
15
+ end
10
16
  end
11
17
  end
12
18
 
13
- def initialize(arel, bind_map)
19
+ def initialize(arel, bind_map, klass=nil)
14
20
  @arel = arel
15
21
  @bind_map = bind_map
22
+ @klass = klass
16
23
  @qualified_query_builders = {}
17
24
  end
18
25
 
@@ -21,7 +28,13 @@ module Switchman
21
28
  # we can make some assumptions about the shard source
22
29
  # (e.g. infer from the primary key or use the current shard)
23
30
 
24
- def execute(params, klass, connection)
31
+ def execute(*args)
32
+ if ::Rails.version >= '5.2'
33
+ params, connection = args
34
+ klass = @klass
35
+ else
36
+ params, klass, connection = args
37
+ end
25
38
  target_shard = nil
26
39
  if primary_index = bind_map.primary_value_index
27
40
  primary_value = params[primary_index]
@@ -51,7 +64,7 @@ module Switchman
51
64
  def qualified_query_builder(shard, klass)
52
65
  @qualified_query_builders[shard.id] ||= klass.connection.cacheable_query(@arel)
53
66
  end
54
- else
67
+ elsif ::Rails.version < '5.2'
55
68
  def generic_query_builder(connection)
56
69
  @query_builder ||= connection.cacheable_query(self.class, @arel)
57
70
  end
@@ -59,6 +72,14 @@ module Switchman
59
72
  def qualified_query_builder(shard, klass)
60
73
  @qualified_query_builders[shard.id] ||= klass.connection.cacheable_query(self.class, @arel)
61
74
  end
75
+ else
76
+ def generic_query_builder(connection)
77
+ @query_builder ||= connection.cacheable_query(self.class, @arel).first
78
+ end
79
+
80
+ def qualified_query_builder(shard, klass)
81
+ @qualified_query_builders[shard.id] ||= klass.connection.cacheable_query(self.class, @arel).first
82
+ end
62
83
  end
63
84
 
64
85
  module BindMap
@@ -19,9 +19,10 @@ module Switchman
19
19
  super
20
20
  when Hash, ::Arel::Nodes::Node
21
21
  where_clause = super
22
+ binds = ::Rails.version >= "5.2" ? nil : where_clause.binds
22
23
  predicates = where_clause.send(:predicates)
23
- @scope.send(:infer_shards_from_primary_key, predicates, where_clause.binds) if @scope.shard_source_value == :implicit && @scope.shard_value.is_a?(Shard)
24
- predicates, _new_binds = @scope.transpose_predicates(predicates, nil, @scope.primary_shard, false, binds: where_clause.binds)
24
+ @scope.send(:infer_shards_from_primary_key, predicates, binds) if @scope.shard_source_value == :implicit && @scope.shard_value.is_a?(Shard)
25
+ predicates, _new_binds = @scope.transpose_predicates(predicates, nil, @scope.primary_shard, false, binds: binds)
25
26
  where_clause.instance_variable_set(:@predicates, predicates)
26
27
  where_clause
27
28
  else
@@ -71,7 +71,9 @@ module Switchman
71
71
  end
72
72
  end
73
73
 
74
- %w{release_connection disconnect!
74
+ %w{release_connection
75
+ disconnect!
76
+ flush!
75
77
  clear_reloadable_connections!
76
78
  verify_active_connections!
77
79
  clear_stale_cached_connections!
@@ -84,6 +86,10 @@ module Switchman
84
86
  RUBY
85
87
  end
86
88
 
89
+ def discard!
90
+ # this breaks everything if i try to pass it onto the pools and i'm not sure why
91
+ end
92
+
87
93
  def automatic_reconnect=(value)
88
94
  connection_pools.each { |pool| pool.automatic_reconnect = value }
89
95
  end
@@ -214,7 +214,10 @@ module Switchman
214
214
 
215
215
  unless create_schema == false
216
216
  reset_column_information
217
- migrate = -> { ::ActiveRecord::Migrator.migrate(::ActiveRecord::Migrator.migrations_paths) }
217
+
218
+ migrate = ::Rails.version >= '5.2' ?
219
+ -> { ::ActiveRecord::Base.connection.migration_context.migrate } :
220
+ -> { ::ActiveRecord::Migrator.migrate(::ActiveRecord::Migrator.migrations_paths) }
218
221
  if ::ActiveRecord::Base.connection.supports_ddl_transactions?
219
222
  ::ActiveRecord::Base.connection.transaction(requires_new: true, &migrate)
220
223
  else
@@ -1,3 +1,3 @@
1
1
  module Switchman
2
- VERSION = "1.11.7"
2
+ VERSION = "1.12.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: switchman
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.7
4
+ version: 1.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Cutrer
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-03-06 00:00:00.000000000 Z
13
+ date: 2018-04-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: railties
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '5.0'
22
22
  - - "<"
23
23
  - !ruby/object:Gem::Version
24
- version: '5.2'
24
+ version: '5.3'
25
25
  type: :runtime
26
26
  prerelease: false
27
27
  version_requirements: !ruby/object:Gem::Requirement
@@ -31,7 +31,7 @@ dependencies:
31
31
  version: '5.0'
32
32
  - - "<"
33
33
  - !ruby/object:Gem::Version
34
- version: '5.2'
34
+ version: '5.3'
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: activerecord
37
37
  requirement: !ruby/object:Gem::Requirement
@@ -41,7 +41,7 @@ dependencies:
41
41
  version: '5.0'
42
42
  - - "<"
43
43
  - !ruby/object:Gem::Version
44
- version: '5.2'
44
+ version: '5.3'
45
45
  type: :runtime
46
46
  prerelease: false
47
47
  version_requirements: !ruby/object:Gem::Requirement
@@ -51,7 +51,7 @@ dependencies:
51
51
  version: '5.0'
52
52
  - - "<"
53
53
  - !ruby/object:Gem::Version
54
- version: '5.2'
54
+ version: '5.3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: shackles
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -136,6 +136,20 @@ dependencies:
136
136
  - - '='
137
137
  - !ruby/object:Gem::Version
138
138
  version: 3.5.2
139
+ - !ruby/object:Gem::Dependency
140
+ name: simplecov
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '0.15'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '0.15'
139
153
  - !ruby/object:Gem::Dependency
140
154
  name: sqlite3
141
155
  requirement: !ruby/object:Gem::Requirement
@@ -177,6 +191,7 @@ files:
177
191
  - db/migrate/20130328212039_create_switchman_shards.rb
178
192
  - db/migrate/20130328224244_create_default_shard.rb
179
193
  - db/migrate/20161206323434_add_back_default_string_limits_switchman.rb
194
+ - db/shard_1708.sqlite3
180
195
  - lib/switchman.rb
181
196
  - lib/switchman/action_controller/caching.rb
182
197
  - lib/switchman/active_record/abstract_adapter.rb
@@ -243,7 +258,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
243
258
  version: '0'
244
259
  requirements: []
245
260
  rubyforge_project:
246
- rubygems_version: 2.7.3
261
+ rubygems_version: 2.6.10
247
262
  signing_key:
248
263
  specification_version: 4
249
264
  summary: Rails 4 sharding magic