switchman 1.2.35 → 1.2.36

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/app/models/switchman/shard.rb +20 -11
  3. data/lib/switchman/active_record/attribute_methods.rb +16 -0
  4. data/lib/switchman/active_record/calculations.rb +12 -4
  5. data/lib/switchman/active_record/log_subscriber.rb +1 -1
  6. data/lib/switchman/active_record/postgresql_adapter.rb +24 -0
  7. data/lib/switchman/active_record/query_methods.rb +10 -8
  8. data/lib/switchman/active_record/spawn_methods.rb +1 -1
  9. data/lib/switchman/arel.rb +13 -0
  10. data/lib/switchman/engine.rb +3 -0
  11. data/lib/switchman/sharded_instrumenter.rb +1 -0
  12. data/lib/switchman/version.rb +1 -1
  13. data/spec/dummy/db/migrate/20150618035859_add_dummy_foreign_key.rb +5 -0
  14. data/spec/dummy/db/schema.rb +2 -1
  15. data/spec/dummy/db/shard_143.sqlite3 +0 -0
  16. data/spec/dummy/db/shard_170.sqlite3 +0 -0
  17. data/spec/dummy/db/shard_191.sqlite3 +0 -0
  18. data/spec/dummy/db/shard_206.sqlite3 +0 -0
  19. data/spec/dummy/db/shard_235.sqlite3 +0 -0
  20. data/spec/dummy/db/shard_248.sqlite3 +0 -0
  21. data/spec/dummy/db/shard_270.sqlite3 +0 -0
  22. data/spec/dummy/db/shard_304.sqlite3 +0 -0
  23. data/spec/dummy/db/shard_333.sqlite3 +0 -0
  24. data/spec/dummy/db/shard_347.sqlite3 +0 -0
  25. data/spec/dummy/db/shard_385.sqlite3 +0 -0
  26. data/spec/dummy/db/shard_405.sqlite3 +0 -0
  27. data/spec/dummy/db/shard_427.sqlite3 +0 -0
  28. data/spec/dummy/db/shard_441.sqlite3 +0 -0
  29. data/spec/dummy/log/development.log +2 -0
  30. data/spec/dummy/log/test.log +50383 -0
  31. data/spec/dummy/tmp/cache/344/DB0/shard%2F220 +0 -0
  32. data/spec/dummy/tmp/cache/345/DC0/shard%2F221 +0 -0
  33. data/spec/dummy/tmp/cache/346/{DF0/shard%2F321 → DE0/shard%2F231} +1 -1
  34. data/spec/dummy/tmp/cache/{34C/E80/shard%2F273 → 347/DE0/shard%2F142} +1 -1
  35. data/spec/dummy/tmp/cache/347/DF0/shard%2F151 +1 -0
  36. data/spec/dummy/tmp/cache/348/E30/shard%2F422 +1 -0
  37. data/spec/dummy/tmp/cache/349/E20/shard%2F243 +0 -0
  38. data/spec/dummy/tmp/cache/349/E40/shard%2F423 +1 -0
  39. data/spec/dummy/tmp/cache/34A/E00/shard%2F217 +1 -0
  40. data/spec/dummy/tmp/cache/34A/E20/shard%2F316 +1 -0
  41. data/spec/dummy/tmp/cache/34A/E30/shard%2F244 +0 -0
  42. data/spec/dummy/tmp/cache/{34C/E90/shard%2F444 → 34A/E30/shard%2F325} +1 -1
  43. data/spec/dummy/tmp/cache/34B/E40/shard%2F245 +0 -0
  44. data/spec/dummy/tmp/cache/34B/E60/shard%2F344 +1 -0
  45. data/spec/dummy/tmp/cache/34B/E70/shard%2F434 +1 -0
  46. data/spec/dummy/tmp/cache/34C/E40/shard%2F156 +1 -0
  47. data/spec/dummy/tmp/cache/34C/E80/shard%2F354 +1 -0
  48. data/spec/dummy/tmp/cache/34C/EA0/shard%2F453 +1 -0
  49. data/spec/dummy/tmp/cache/34D/E60/shard%2F409 +1 -0
  50. data/spec/dummy/tmp/cache/34D/EC0/shard%2F382 +1 -0
  51. data/spec/dummy/tmp/cache/34E/EA0/shard%2F437 +1 -0
  52. data/spec/dummy/tmp/cache/34F/EB0/shard%2F438 +1 -0
  53. data/spec/dummy/tmp/cache/34F/EC0/shard%2F285 +1 -0
  54. data/spec/dummy/tmp/cache/351/EC0/shard%2F188 +1 -0
  55. data/spec/dummy/tmp/cache/351/EE0/shard%2F368 +1 -0
  56. data/spec/dummy/tmp/cache/352/EF0/shard%2F369 +1 -0
  57. data/spec/dummy/tmp/cache/{34A/E40/shard%2F172 → 3A6/F10/shard%2F10221} +1 -1
  58. data/spec/dummy/tmp/cache/3A8/F50/shard%2F10322 +1 -0
  59. data/spec/dummy/tmp/cache/3A9/F50/shard%2F10152 +1 -0
  60. data/spec/dummy/tmp/cache/3AA/F90/shard%2F10423 +1 -0
  61. data/spec/dummy/tmp/cache/3AB/F80/shard%2F10244 +1 -0
  62. data/spec/dummy/tmp/cache/3AC/F60/shard%2F10137 +1 -0
  63. data/spec/dummy/tmp/cache/3AD/FC0/shard%2F10345 +1 -0
  64. data/spec/dummy/tmp/cache/3AE/FC0/shard%2F10175 +1 -0
  65. data/spec/dummy/tmp/cache/3AF/030/shard%2F10392 +1 -0
  66. data/spec/dummy/tmp/cache/3B0/000/shard%2F10438 +1 -0
  67. data/spec/dummy/tmp/cache/3B0/FF0/shard%2F10267 +1 -0
  68. data/spec/dummy/tmp/cache/3B3/030/shard%2F10198 +1 -0
  69. data/spec/dummy/tmp/cache/3B3/040/shard%2F10369 +1 -0
  70. data/spec/dummy/tmp/cache/3B5/070/shard%2F10299 +1 -0
  71. data/spec/lib/active_record/association_spec.rb +1 -1
  72. data/spec/lib/active_record/attribute_methods_spec.rb +8 -0
  73. data/spec/lib/active_record/calculations_spec.rb +16 -1
  74. data/spec/lib/active_record/postgresql_adapter_spec.rb +31 -0
  75. data/spec/lib/active_record/query_methods_spec.rb +1 -1
  76. data/spec/models/shard_spec.rb +12 -0
  77. metadata +112 -35
  78. data/spec/dummy/tmp/cache/349/E10/shard%2F153 +0 -0
  79. data/spec/dummy/tmp/cache/34A/E20/shard%2F154 +0 -0
  80. data/spec/dummy/tmp/cache/34C/E50/shard%2F246 +0 -0
  81. data/spec/dummy/tmp/cache/34C/E90/shard%2F363 +0 -0
  82. data/spec/dummy/tmp/cache/34D/E80/shard%2F265 +0 -1
  83. data/spec/dummy/tmp/cache/34D/ED0/shard%2F391 +0 -1
  84. data/spec/dummy/tmp/cache/34E/ED0/shard%2F383 +0 -1
  85. data/spec/dummy/tmp/cache/350/EA0/shard%2F178 +0 -1
  86. data/spec/dummy/tmp/cache/350/EB0/shard%2F349 +0 -1
  87. data/spec/dummy/tmp/cache/351/F00/shard%2F386 +0 -0
  88. data/spec/dummy/tmp/cache/352/F10/shard%2F387 +0 -0
  89. data/spec/dummy/tmp/cache/353/F10/shard%2F298 +0 -1
@@ -1 +0,0 @@
1
- o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1405710918.94204: @value" :nil
@@ -1 +0,0 @@
1
- o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1406056233.44187: @value" :nil
@@ -1 +0,0 @@
1
- o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1406056187.420893: @value" :nil
@@ -1 +0,0 @@
1
- o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1405710424.571912: @value" :nil
@@ -1 +0,0 @@
1
- o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1406056002.214963: @value" :nil
@@ -1 +0,0 @@
1
- o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1406054467.519041: @value" :nil