switchman 1.2.30 → 1.2.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/switchman/active_record/connection_pool.rb +2 -7
- data/lib/switchman/database_server.rb +1 -1
- data/lib/switchman/version.rb +1 -1
- data/spec/dummy/config/initializers/migrations_path.rb +5 -0
- data/spec/dummy/db/schema.rb +29 -32
- data/spec/dummy/db/shard_101.sqlite3 +0 -0
- data/spec/dummy/db/shard_19.sqlite3 +0 -0
- data/spec/dummy/db/shard_49.sqlite3 +0 -0
- data/spec/dummy/db/shard_74.sqlite3 +0 -0
- data/spec/dummy/log/development.log +1 -0
- data/spec/dummy/log/test.log +13795 -0
- data/spec/dummy/tmp/cache/316/980/shard%2F15 +1 -1
- data/spec/dummy/tmp/cache/{313/970/shard%2F30 → 319/A10/shard%2F72} +1 -1
- data/spec/dummy/tmp/cache/31A/A30/shard%2F82 +0 -0
- data/spec/dummy/tmp/cache/31B/A40/shard%2F83 +0 -0
- data/spec/dummy/tmp/cache/{317/9D0/shard%2F52 → 31C/A10/shard%2F48} +1 -1
- data/spec/dummy/tmp/cache/31C/{A40/shard%2F75 → A50/shard%2F84} +1 -1
- data/spec/dummy/tmp/cache/3A4/EA0/shard%2F10012 +1 -0
- data/spec/dummy/tmp/cache/3A7/F20/shard%2F10060 +1 -0
- data/spec/dummy/tmp/cache/3AA/F30/shard%2F10045 +1 -0
- data/spec/dummy/tmp/cache/3AC/F90/shard%2F10083 +1 -0
- metadata +30 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53cd4e7fcce2f4407fe0949804d90639a512c995
|
4
|
+
data.tar.gz: ce3c82b47b980fd7f6ec7cd6b5dfd11780b2c915
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5beda385f90fba2690e06f03c290721036fc6052f4606b660db51902ede7f6d6135c10309f50412abab80c6d91ce8a85943f2813c1add35812675a61d9246f6
|
7
|
+
data.tar.gz: 48f1fbb16e4ffa1a63bc07ed6d0faf83f4d3eba59d9a2361da775a351fd705b219bc9a638d89e96d030ca2f6b31a246ecd4b86630258612b1d460f47ec6222f4
|
@@ -36,13 +36,8 @@ module Switchman
|
|
36
36
|
conn
|
37
37
|
end
|
38
38
|
|
39
|
-
def release_connection_with_idle_timeout(
|
40
|
-
|
41
|
-
raise ArgumentError, "wrong number of arguments (1 for 0)" unless args.empty?
|
42
|
-
release_connection_without_idle_timeout
|
43
|
-
else
|
44
|
-
release_connection_without_idle_timeout(*args)
|
45
|
-
end
|
39
|
+
def release_connection_with_idle_timeout(with_id = current_connection_id)
|
40
|
+
release_connection_without_idle_timeout(with_id)
|
46
41
|
|
47
42
|
# TODO may need a synchronize (or to be included in a synchronize
|
48
43
|
# inside release_connection_without_idle_timeout) when we make
|
@@ -207,7 +207,7 @@ module Switchman
|
|
207
207
|
|
208
208
|
reset_column_information
|
209
209
|
unless create_schema == false
|
210
|
-
migrate = -> { ::ActiveRecord::Migrator.migrate(::
|
210
|
+
migrate = -> { ::ActiveRecord::Migrator.migrate(::ActiveRecord::Migrator.migrations_paths) }
|
211
211
|
if ::ActiveRecord::Base.connection.supports_ddl_transactions?
|
212
212
|
::ActiveRecord::Base.connection.transaction(requires_new: true, &migrate)
|
213
213
|
else
|
data/lib/switchman/version.rb
CHANGED
data/spec/dummy/db/schema.rb
CHANGED
@@ -9,59 +9,56 @@
|
|
9
9
|
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
10
|
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
11
|
#
|
12
|
-
# It's strongly recommended
|
12
|
+
# It's strongly recommended to check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(version
|
14
|
+
ActiveRecord::Schema.define(:version => 20140219183820) do
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
create_table "appendages", force: true do |t|
|
20
|
-
t.integer "user_id", limit: 8
|
16
|
+
create_table "appendages", :force => true do |t|
|
17
|
+
t.integer "user_id", :limit => 8
|
21
18
|
t.integer "value"
|
22
|
-
t.datetime "created_at"
|
23
|
-
t.datetime "updated_at"
|
19
|
+
t.datetime "created_at", :null => false
|
20
|
+
t.datetime "updated_at", :null => false
|
24
21
|
end
|
25
22
|
|
26
|
-
create_table "digits", force
|
27
|
-
t.integer "appendage_id", limit
|
23
|
+
create_table "digits", :force => true do |t|
|
24
|
+
t.integer "appendage_id", :limit => 8
|
28
25
|
t.integer "value"
|
29
|
-
t.datetime "created_at"
|
30
|
-
t.datetime "updated_at"
|
26
|
+
t.datetime "created_at", :null => false
|
27
|
+
t.datetime "updated_at", :null => false
|
31
28
|
end
|
32
29
|
|
33
|
-
create_table "features", force
|
34
|
-
t.integer "owner_id", limit
|
30
|
+
create_table "features", :force => true do |t|
|
31
|
+
t.integer "owner_id", :limit => 8
|
35
32
|
t.string "owner_type"
|
36
33
|
t.integer "value"
|
37
|
-
t.datetime "created_at"
|
38
|
-
t.datetime "updated_at"
|
34
|
+
t.datetime "created_at", :null => false
|
35
|
+
t.datetime "updated_at", :null => false
|
39
36
|
end
|
40
37
|
|
41
|
-
create_table "mirror_users", force
|
42
|
-
t.integer "user_id", limit
|
43
|
-
t.datetime "created_at"
|
44
|
-
t.datetime "updated_at"
|
38
|
+
create_table "mirror_users", :force => true do |t|
|
39
|
+
t.integer "user_id", :limit => 8
|
40
|
+
t.datetime "created_at", :null => false
|
41
|
+
t.datetime "updated_at", :null => false
|
45
42
|
end
|
46
43
|
|
47
|
-
create_table "roots", force
|
48
|
-
t.integer "user_id", limit
|
49
|
-
t.datetime "created_at"
|
50
|
-
t.datetime "updated_at"
|
44
|
+
create_table "roots", :force => true do |t|
|
45
|
+
t.integer "user_id", :limit => 8
|
46
|
+
t.datetime "created_at", :null => false
|
47
|
+
t.datetime "updated_at", :null => false
|
51
48
|
end
|
52
49
|
|
53
|
-
create_table "switchman_shards", force
|
50
|
+
create_table "switchman_shards", :force => true do |t|
|
54
51
|
t.string "name"
|
55
52
|
t.string "database_server_id"
|
56
|
-
t.boolean "default", default
|
53
|
+
t.boolean "default", :default => false, :null => false
|
57
54
|
end
|
58
55
|
|
59
|
-
create_table "users", force
|
56
|
+
create_table "users", :force => true do |t|
|
60
57
|
t.string "name"
|
61
|
-
t.integer "mirror_user_id", limit
|
62
|
-
t.datetime "created_at"
|
63
|
-
t.datetime "updated_at"
|
64
|
-
t.integer "parent_id", limit
|
58
|
+
t.integer "mirror_user_id", :limit => 8
|
59
|
+
t.datetime "created_at", :null => false
|
60
|
+
t.datetime "updated_at", :null => false
|
61
|
+
t.integer "parent_id", :limit => 8
|
65
62
|
end
|
66
63
|
|
67
64
|
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -148,3 +148,4 @@ Migrating to CreateRoots (20140219183820)
|
|
148
148
|
[1m[36mSQL (0.2ms)[0m [1mUPDATE "switchman_shards" SET "name" = $1 WHERE "switchman_shards"."id" = 2[0m [["name", "switchman_development_shard_2"]] [shard 1 master]
|
149
149
|
[1m[35m (0.4ms)[0m COMMIT [shard 1 master]
|
150
150
|
[1m[36m (0.4ms)[0m [1mselect current_user[0m [shard 1 master]
|
151
|
+
Connecting to database specified by database.yml
|