after_commit_queue 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,24 +6,24 @@ module AfterCommitQueue
6
6
  after_rollback :_clear_after_commit_queue
7
7
  end
8
8
 
9
+ # Public: Add method to after commit queue
10
+ def run_after_commit(method = nil, &block)
11
+ _after_commit_queue << Proc.new { self.send(method) } if method
12
+ _after_commit_queue << block if block
13
+ true
14
+ end
15
+
9
16
  protected
10
17
 
11
18
  # Protected: Is called as after_commit callback
12
19
  # runs methods from the queue and clears the queue afterwards
13
20
  def _run_after_commit_queue
14
21
  _after_commit_queue.each do |action|
15
- action.call
22
+ self.instance_eval &action
16
23
  end
17
24
  @after_commit_queue.clear
18
25
  end
19
26
 
20
- # Protected: Add method to after commit queue
21
- def run_after_commit(method = nil, &block)
22
- _after_commit_queue << Proc.new { self.send(method) } if method
23
- _after_commit_queue << block if block
24
- true
25
- end
26
-
27
27
  # Protected: Return after commit queue
28
28
  # Returns: Array with methods to run
29
29
  def _after_commit_queue
@@ -31,6 +31,6 @@ module AfterCommitQueue
31
31
  end
32
32
 
33
33
  def _clear_after_commit_queue
34
- @after_commit_queue.clear
34
+ _after_commit_queue.clear
35
35
  end
36
36
  end
@@ -1,3 +1,3 @@
1
1
  module AfterCommitQueue
2
- VERSION = "1.0.1"
2
+ VERSION = "1.1.0"
3
3
  end
@@ -28,6 +28,19 @@ class AfterCommitQueueTest < ActiveSupport::TestCase
28
28
  assert @server.meditating
29
29
  end
30
30
 
31
+ test "external observer changes state" do
32
+ @server.start!
33
+ @server.stop!
34
+ assert !@server.uninstalled
35
+
36
+ @server.transaction do
37
+ @server.uninstall!
38
+ assert !@server.uninstalled
39
+ end
40
+
41
+ assert @server.uninstalled
42
+ end
43
+
31
44
  test "clear queue after methods from are called" do
32
45
  @server.start!
33
46
  @server.started = false
@@ -45,8 +58,12 @@ class AfterCommitQueueTest < ActiveSupport::TestCase
45
58
  assert !@server.started
46
59
  raise ActiveRecord::Rollback
47
60
  end
48
-
61
+
49
62
  assert @server.__send__(:_after_commit_queue).empty?
50
63
  assert !@server.started
51
64
  end
65
+
66
+ test "clears queue even when no callback was enqueued" do
67
+ @server.rolledback!(false)
68
+ end
52
69
  end
@@ -1,7 +1,7 @@
1
1
  class Server < ActiveRecord::Base
2
2
  include AfterCommitQueue
3
3
 
4
- attr_accessor :started, :stopped, :meditating
4
+ attr_accessor :started, :stopped, :meditating, :uninstalled
5
5
 
6
6
  state_machine :state, :initial => :pending do
7
7
  after_transition :pending => :running, :do => :schedule_start
@@ -11,6 +11,7 @@ class Server < ActiveRecord::Base
11
11
  event(:start) { transition :pending => :running }
12
12
  event(:stop) { transition :running => :turned_off }
13
13
  event(:crash) { transition :running => :crashed }
14
+ event(:uninstall) { transition :turned_off => :uninstalled }
14
15
  end
15
16
 
16
17
  def schedule_start
@@ -0,0 +1,5 @@
1
+ class ServerObserver < ActiveRecord::Observer
2
+ def after_transition_state_to_uninstalled(server, transition)
3
+ server.run_after_commit { @uninstalled = true }
4
+ end
5
+ end
@@ -19,7 +19,7 @@ module Dummy
19
19
  # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
20
20
 
21
21
  # Activate observers that should always be running.
22
- # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
22
+ config.active_record.observers = :server_observer
23
23
 
24
24
  # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
25
25
  # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
@@ -43,12 +43,6 @@ module Dummy
43
43
  # like if you have constraints or database-specific column types
44
44
  # config.active_record.schema_format = :sql
45
45
 
46
- # Enforce whitelist mode for mass assignment.
47
- # This will create an empty whitelist of attributes available for mass-assignment for all models
48
- # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
49
- # parameters by using an attr_accessible or attr_protected declaration.
50
- config.active_record.whitelist_attributes = true
51
-
52
46
  # Enable the asset pipeline
53
47
  config.assets.enabled = true
54
48
 
@@ -6,9 +6,6 @@ Dummy::Application.configure do
6
6
  # since you don't have to restart the web server when you make code changes.
7
7
  config.cache_classes = false
8
8
 
9
- # Log error messages when you accidentally call methods on nil.
10
- config.whiny_nils = true
11
-
12
9
  # Show full error reports and disable caching
13
10
  config.consider_all_requests_local = true
14
11
  config.action_controller.perform_caching = false
@@ -22,9 +19,6 @@ Dummy::Application.configure do
22
19
  # Only use best-standards-support built into browsers
23
20
  config.action_dispatch.best_standards_support = :builtin
24
21
 
25
- # Raise exception on mass assignment protection for Active Record models
26
- config.active_record.mass_assignment_sanitizer = :strict
27
-
28
22
  # Log the query plan for queries taking more than this (works
29
23
  # with SQLite, MySQL, and PostgreSQL)
30
24
  config.active_record.auto_explain_threshold_in_seconds = 0.5
@@ -34,4 +28,6 @@ Dummy::Application.configure do
34
28
 
35
29
  # Expands the lines which load the assets
36
30
  config.assets.debug = true
31
+
32
+ config.eager_load = false
37
33
  end
@@ -64,4 +64,5 @@ Dummy::Application.configure do
64
64
  # Log the query plan for queries taking more than this (works
65
65
  # with SQLite, MySQL, and PostgreSQL)
66
66
  # config.active_record.auto_explain_threshold_in_seconds = 0.5
67
+ config.eager_load = true
67
68
  end
@@ -11,9 +11,6 @@ Dummy::Application.configure do
11
11
  config.serve_static_assets = true
12
12
  config.static_cache_control = "public, max-age=3600"
13
13
 
14
- # Log error messages when you accidentally call methods on nil
15
- config.whiny_nils = true
16
-
17
14
  # Show full error reports and disable caching
18
15
  config.consider_all_requests_local = true
19
16
  config.action_controller.perform_caching = false
@@ -29,9 +26,8 @@ Dummy::Application.configure do
29
26
  # ActionMailer::Base.deliveries array.
30
27
  config.action_mailer.delivery_method = :test
31
28
 
32
- # Raise exception on mass assignment protection for Active Record models
33
- config.active_record.mass_assignment_sanitizer = :strict
34
-
35
29
  # Print deprecation notices to the stderr
36
30
  config.active_support.deprecation = :stderr
31
+
32
+ config.eager_load = false
37
33
  end
@@ -9,14 +9,14 @@
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 to check this file into your version control system.
12
+ # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(:version => 20120622135717) do
14
+ ActiveRecord::Schema.define(version: 20120622135717) do
15
15
 
16
- create_table "servers", :force => true do |t|
16
+ create_table "servers", force: true do |t|
17
17
  t.string "state"
18
- t.datetime "created_at", :null => false
19
- t.datetime "updated_at", :null => false
18
+ t.datetime "created_at"
19
+ t.datetime "updated_at"
20
20
  end
21
21
 
22
22
  end
Binary file
@@ -1,119 +1,55 @@
1
- Connecting to database specified by database.yml
2
- Connecting to database specified by database.yml
3
1
  Connecting to database specified by database.yml
4
2
   (0.1ms) select sqlite_version(*)
5
3
   (1.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
6
-  (0.0ms) PRAGMA index_list("schema_migrations")
7
-  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
8
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
9
- Migrating to CreateServers (20120622135717)
10
-  (0.0ms) begin transaction
11
-  (0.3ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
12
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120622135717')
13
-  (1.2ms) commit transaction
14
-  (0.2ms) select sqlite_version(*)
15
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
16
-  (0.0ms) PRAGMA index_list("servers")
17
- Connecting to database specified by database.yml
18
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
4
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5
+  (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
19
6
  Migrating to CreateServers (20120622135717)
20
-  (0.2ms) select sqlite_version(*)
21
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
22
-  (0.0ms) PRAGMA index_list("servers")
23
- Connecting to database specified by database.yml
24
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
25
-  (0.2ms) select sqlite_version(*)
26
-  (1.2ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
27
-  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
28
-  (0.0ms) PRAGMA index_list("schema_migrations")
29
-  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
30
-  (0.1ms) SELECT version FROM "schema_migrations"
31
-  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20120622135717')
32
- Connecting to database specified by database.yml
33
-  (0.1ms) select sqlite_version(*)
34
-  (1.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
35
-  (0.0ms) PRAGMA index_list("schema_migrations")
7
+  (0.0ms) begin transaction
8
+  (0.4ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
9
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120622135717')
10
+  (1.1ms) commit transaction
11
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
12
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
13
+  (0.2ms) select sqlite_version(*)
14
+  (0.9ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
15
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
36
16
   (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
37
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
38
- Migrating to CreateServers (20120622135717)
39
-  (0.0ms) begin transaction
40
-  (0.3ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
41
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120622135717')
42
-  (1.1ms) commit transaction
43
-  (0.3ms) select sqlite_version(*)
44
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
45
-  (0.0ms) PRAGMA index_list("servers")
46
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
47
-  (0.2ms) select sqlite_version(*)
48
-  (1.2ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
49
-  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
50
-  (0.0ms) PRAGMA index_list("schema_migrations")
51
-  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
52
17
   (0.1ms) SELECT version FROM "schema_migrations"
53
-  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120622135717')
18
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20120622135717')
54
19
  Connecting to database specified by database.yml
55
20
   (0.1ms) select sqlite_version(*)
56
-  (2.5ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
57
-  (0.0ms) PRAGMA index_list("schema_migrations")
58
-  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
59
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
21
+  (1.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
22
+  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
23
+  (1.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
60
24
  Migrating to CreateServers (20120622135717)
61
-  (0.0ms) begin transaction
62
-  (0.3ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
63
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120622135717')
64
-  (1.2ms) commit transaction
65
-  (0.2ms) select sqlite_version(*)
66
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
67
-  (0.0ms) PRAGMA index_list("servers")
68
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
69
-  (0.2ms) select sqlite_version(*)
70
-  (1.3ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
71
-  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
72
-  (0.0ms) PRAGMA index_list("schema_migrations")
25
+  (0.0ms) begin transaction
26
+  (0.3ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
27
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120622135717')
28
+  (1.2ms) commit transaction
29
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
30
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
31
+  (0.2ms) select sqlite_version(*)
32
+  (1.3ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
33
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
73
34
   (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
74
35
   (0.1ms) SELECT version FROM "schema_migrations"
75
-  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20120622135717')
36
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20120622135717')
76
37
  Connecting to database specified by database.yml
77
-  (0.6ms) select sqlite_version(*)
78
-  (1.5ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
79
-  (0.0ms) PRAGMA index_list("schema_migrations")
80
-  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
81
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
82
- Migrating to CreateServers (20120622135717)
83
-  (0.0ms) begin transaction
84
-  (0.4ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
85
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120622135717')
86
-  (1.0ms) commit transaction
87
-  (0.2ms) select sqlite_version(*)
88
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
89
-  (0.0ms) PRAGMA index_list("servers")
90
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
91
-  (0.2ms) select sqlite_version(*)
92
-  (1.3ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
93
-  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
94
-  (0.0ms) PRAGMA index_list("schema_migrations")
95
-  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
96
-  (0.1ms) SELECT version FROM "schema_migrations"
97
-  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20120622135717')
98
38
  Connecting to database specified by database.yml
99
-  (0.1ms) select sqlite_version(*)
100
-  (1.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
101
-  (0.0ms) PRAGMA index_list("schema_migrations")
102
-  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
103
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
39
+  (0.5ms) select sqlite_version(*)
40
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
41
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
42
+  (3.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
104
43
  Migrating to CreateServers (20120622135717)
105
-  (0.0ms) begin transaction
106
-  (0.4ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
107
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120622135717')
108
-  (1.0ms) commit transaction
109
-  (0.3ms) select sqlite_version(*)
110
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
111
-  (0.0ms) PRAGMA index_list("servers")
112
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
113
-  (0.2ms) select sqlite_version(*)
114
-  (1.3ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
115
-  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
116
-  (0.0ms) PRAGMA index_list("schema_migrations")
117
-  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
44
+  (0.0ms) begin transaction
45
+  (0.4ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
46
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120622135717')
47
+  (1.1ms) commit transaction
48
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
49
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
50
+  (0.2ms) select sqlite_version(*)
51
+  (1.2ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
52
+  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
53
+  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
118
54
   (0.1ms) SELECT version FROM "schema_migrations"
119
55
   (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20120622135717')
@@ -1,337 +1,625 @@
1
1
  Connecting to database specified by database.yml
2
-  (0.2ms) begin transaction
3
-  (0.0ms) rollback transaction
4
- Connecting to database specified by database.yml
5
- Connecting to database specified by database.yml
6
- Connecting to database specified by database.yml
7
-  (0.2ms) begin transaction
8
-  (0.0ms) rollback transaction
9
-  (0.0ms) begin transaction
10
-  (0.0ms) rollback transaction
11
- Connecting to database specified by database.yml
12
-  (0.3ms) begin transaction
13
-  (1.6ms) SAVEPOINT active_record_1
14
- SQL (5.6ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:26:15 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:26:15 UTC +00:00]]
15
-  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
16
-  (0.4ms) rollback transaction
17
-  (0.1ms) begin transaction
18
-  (0.0ms) SAVEPOINT active_record_1
19
- SQL (0.3ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:26:15 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:26:15 UTC +00:00]]
20
-  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
21
-  (0.4ms) rollback transaction
22
- Connecting to database specified by database.yml
23
-  (0.3ms) begin transaction
24
-  (0.1ms) SAVEPOINT active_record_1
25
- SQL (3.7ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:26:35 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:26:35 UTC +00:00]]
26
-  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
27
-  (1.6ms) rollback transaction
28
-  (0.1ms) begin transaction
29
-  (0.0ms) SAVEPOINT active_record_1
30
- SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:26:35 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:26:35 UTC +00:00]]
31
-  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
32
-  (0.4ms) rollback transaction
33
- Connecting to database specified by database.yml
34
-  (0.3ms) begin transaction
35
-  (0.0ms) SAVEPOINT active_record_1
36
- SQL (3.1ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:32:50 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:32:50 UTC +00:00]]
37
-  (0.0ms) RELEASE SAVEPOINT active_record_1
38
-  (0.0ms) SAVEPOINT active_record_1
39
-  (0.3ms) UPDATE "servers" SET "state" = 'stopped', "updated_at" = '2012-06-22 14:32:50.318470' WHERE "servers"."id" = 1
40
-  (0.0ms) RELEASE SAVEPOINT active_record_1
41
-  (1.6ms) rollback transaction
42
2
   (0.1ms) begin transaction
43
-  (0.0ms) SAVEPOINT active_record_1
44
- SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:32:50 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:32:50 UTC +00:00]]
45
-  (0.1ms) RELEASE SAVEPOINT active_record_1
46
-  (0.4ms) rollback transaction
47
- Connecting to database specified by database.yml
48
-  (0.3ms) begin transaction
49
-  (0.1ms) SAVEPOINT active_record_1
50
- SQL (4.3ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:33:50 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:33:50 UTC +00:00]]
51
-  (0.0ms) RELEASE SAVEPOINT active_record_1
52
-  (0.0ms) SAVEPOINT active_record_1
53
-  (0.4ms) UPDATE "servers" SET "state" = 'stopped', "updated_at" = '2012-06-22 14:33:50.364494' WHERE "servers"."id" = 1
54
-  (0.0ms) RELEASE SAVEPOINT active_record_1
55
-  (1.4ms) rollback transaction
3
+ SQL (10.2ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 01 Jun 2013 22:14:16 UTC +00:00], ["state", "running"], ["updated_at", Sat, 01 Jun 2013 22:14:16 UTC +00:00]]
4
+  (0.9ms) commit transaction
5
+  (0.1ms) begin transaction
6
+  (0.4ms) UPDATE "servers" SET "state" = 'turned_off', "updated_at" = '2013-06-01 22:14:16.525379' WHERE "servers"."id" = 1
7
+  (3.0ms) commit transaction
56
8
   (0.1ms) begin transaction
57
-  (0.1ms) SAVEPOINT active_record_1
58
- SQL (0.6ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:33:50 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:33:50 UTC +00:00]]
59
-  (0.1ms) RELEASE SAVEPOINT active_record_1
60
-  (0.0ms) SAVEPOINT active_record_1
61
-  (0.0ms) RELEASE SAVEPOINT active_record_1
9
+ SQL (0.6ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 01 Jun 2013 22:14:16 UTC +00:00], ["state", "running"], ["updated_at", Sat, 01 Jun 2013 22:14:16 UTC +00:00]]
62
10
   (0.6ms) rollback transaction
63
- Connecting to database specified by database.yml
64
-  (0.3ms) begin transaction
65
-  (0.1ms) SAVEPOINT active_record_1
66
- SQL (3.1ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:34:22 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:34:22 UTC +00:00]]
67
-  (0.0ms) RELEASE SAVEPOINT active_record_1
68
-  (0.0ms) SAVEPOINT active_record_1
69
-  (0.3ms) UPDATE "servers" SET "state" = 'stopped', "updated_at" = '2012-06-22 14:34:22.376388' WHERE "servers"."id" = 1
70
-  (0.0ms) RELEASE SAVEPOINT active_record_1
71
-  (1.6ms) rollback transaction
72
-  (0.1ms) begin transaction
73
-  (0.0ms) SAVEPOINT active_record_1
74
- SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:34:22 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:34:22 UTC +00:00]]
75
-  (0.0ms) RELEASE SAVEPOINT active_record_1
76
-  (0.3ms) rollback transaction
77
- Connecting to database specified by database.yml
78
-  (0.3ms) begin transaction
79
-  (0.0ms) SAVEPOINT active_record_1
80
- SQL (3.0ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:34:33 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:34:33 UTC +00:00]]
81
-  (0.0ms) RELEASE SAVEPOINT active_record_1
82
-  (0.0ms) SAVEPOINT active_record_1
83
-  (0.3ms) UPDATE "servers" SET "state" = 'stopped', "updated_at" = '2012-06-22 14:34:33.777347' WHERE "servers"."id" = 1
84
-  (0.0ms) RELEASE SAVEPOINT active_record_1
85
-  (0.5ms) rollback transaction
86
-  (0.0ms) begin transaction
87
-  (0.0ms) SAVEPOINT active_record_1
88
- SQL (0.3ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:34:33 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:34:33 UTC +00:00]]
89
-  (0.0ms) RELEASE SAVEPOINT active_record_1
90
-  (0.3ms) rollback transaction
91
- Connecting to database specified by database.yml
92
-  (0.3ms) begin transaction
93
-  (0.0ms) SAVEPOINT active_record_1
94
- SQL (3.0ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:34:50 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:34:50 UTC +00:00]]
95
-  (0.0ms) RELEASE SAVEPOINT active_record_1
96
-  (0.0ms) SAVEPOINT active_record_1
97
-  (0.3ms) UPDATE "servers" SET "state" = 'stopped', "updated_at" = '2012-06-22 14:34:50.157970' WHERE "servers"."id" = 1
98
-  (0.0ms) RELEASE SAVEPOINT active_record_1
99
-  (1.6ms) rollback transaction
100
-  (0.1ms) begin transaction
101
-  (0.0ms) SAVEPOINT active_record_1
102
- SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:34:50 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:34:50 UTC +00:00]]
103
-  (0.0ms) RELEASE SAVEPOINT active_record_1
104
-  (0.3ms) rollback transaction
105
- Connecting to database specified by database.yml
106
-  (0.3ms) begin transaction
107
-  (0.0ms) SAVEPOINT active_record_1
108
- SQL (4.1ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:34:58 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:34:58 UTC +00:00]]
109
-  (0.0ms) RELEASE SAVEPOINT active_record_1
110
-  (0.0ms) SAVEPOINT active_record_1
111
-  (0.3ms) UPDATE "servers" SET "state" = 'stopped', "updated_at" = '2012-06-22 14:34:58.016351' WHERE "servers"."id" = 1
112
-  (0.0ms) RELEASE SAVEPOINT active_record_1
113
-  (1.4ms) rollback transaction
11
+  (0.1ms) begin transaction
12
+ SQL (0.5ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 01 Jun 2013 22:14:16 UTC +00:00], ["state", "running"], ["updated_at", Sat, 01 Jun 2013 22:14:16 UTC +00:00]]
13
+  (6.4ms) commit transaction
114
14
   (0.1ms) begin transaction
115
-  (0.0ms) SAVEPOINT active_record_1
116
- SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:34:58 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:34:58 UTC +00:00]]
117
-  (0.0ms) RELEASE SAVEPOINT active_record_1
118
-  (0.4ms) rollback transaction
15
+  (0.4ms) UPDATE "servers" SET "state" = 'crashed', "updated_at" = '2013-06-01 22:14:16.547687' WHERE "servers"."id" = 2
16
+  (0.8ms) commit transaction
17
+  (0.1ms) begin transaction
18
+ SQL (0.5ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 01 Jun 2013 22:14:16 UTC +00:00], ["state", "running"], ["updated_at", Sat, 01 Jun 2013 22:14:16 UTC +00:00]]
19
+  (0.8ms) commit transaction
119
20
  Connecting to database specified by database.yml
120
-  (0.4ms) begin transaction
121
-  (0.0ms) SAVEPOINT active_record_1
122
- SQL (3.0ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:36:42 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:36:42 UTC +00:00]]
123
-  (0.0ms) RELEASE SAVEPOINT active_record_1
124
-  (0.0ms) SAVEPOINT active_record_1
125
-  (0.3ms) UPDATE "servers" SET "state" = 'stopped', "updated_at" = '2012-06-22 14:36:42.874011' WHERE "servers"."id" = 1
126
-  (0.0ms) RELEASE SAVEPOINT active_record_1
127
-  (0.5ms) rollback transaction
128
21
   (0.0ms) begin transaction
129
-  (0.0ms) SAVEPOINT active_record_1
130
- SQL (0.3ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:36:42 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:36:42 UTC +00:00]]
131
-  (0.1ms) RELEASE SAVEPOINT active_record_1
132
-  (0.3ms) rollback transaction
133
- Connecting to database specified by database.yml
134
-  (0.1ms) begin transaction
135
- SQL (3.2ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:37:40 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:37:40 UTC +00:00]]
22
+ SQL (3.2ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 01 Jun 2013 22:14:26 UTC +00:00], ["state", "running"], ["updated_at", Sat, 01 Jun 2013 22:14:26 UTC +00:00]]
136
23
   (2.1ms) commit transaction
137
-  (0.1ms) begin transaction
138
-  (0.3ms) UPDATE "servers" SET "state" = 'stopped', "updated_at" = '2012-06-22 14:37:40.555853' WHERE "servers"."id" = 1
139
-  (0.8ms) commit transaction
24
+  (0.0ms) begin transaction
25
+  (0.3ms) UPDATE "servers" SET "state" = 'turned_off', "updated_at" = '2013-06-01 22:14:26.675346' WHERE "servers"."id" = 1
26
+  (0.9ms) commit transaction
140
27
   (0.0ms) begin transaction
141
- SQL (0.5ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:37:40 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:37:40 UTC +00:00]]
142
-  (0.6ms) commit transaction
28
+ SQL (0.3ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 01 Jun 2013 22:14:26 UTC +00:00], ["state", "running"], ["updated_at", Sat, 01 Jun 2013 22:14:26 UTC +00:00]]
29
+  (0.4ms) rollback transaction
30
+  (0.0ms) begin transaction
31
+ SQL (0.3ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 01 Jun 2013 22:14:26 UTC +00:00], ["state", "running"], ["updated_at", Sat, 01 Jun 2013 22:14:26 UTC +00:00]]
32
+  (1.4ms) commit transaction
33
+  (0.1ms) begin transaction
34
+  (0.5ms) UPDATE "servers" SET "state" = 'crashed', "updated_at" = '2013-06-01 22:14:26.684702' WHERE "servers"."id" = 2
35
+  (0.5ms) commit transaction
36
+  (0.0ms) begin transaction
37
+ SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Sat, 01 Jun 2013 22:14:26 UTC +00:00], ["state", "running"], ["updated_at", Sat, 01 Jun 2013 22:14:26 UTC +00:00]]
38
+  (0.6ms) commit transaction
143
39
  Connecting to database specified by database.yml
144
40
   (0.0ms) begin transaction
145
- SQL (3.1ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:37:52 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:37:52 UTC +00:00]]
146
-  (2.3ms) commit transaction
147
-  (0.1ms) begin transaction
148
-  (0.3ms) UPDATE "servers" SET "state" = 'stopped', "updated_at" = '2012-06-22 14:37:52.895872' WHERE "servers"."id" = 3
149
-  (1.0ms) commit transaction
41
+ SQL (5.8ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:43:51 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:43:51 UTC +00:00]]
42
+  (1.0ms) commit transaction
43
+  (0.0ms) begin transaction
44
+  (0.2ms) UPDATE "servers" SET "state" = 'turned_off', "updated_at" = '2013-07-24 06:43:51.699293' WHERE "servers"."id" = 1
45
+  (0.9ms) commit transaction
150
46
   (0.0ms) begin transaction
151
- SQL (0.5ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:37:52 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:37:52 UTC +00:00]]
152
-  (0.8ms) commit transaction
153
- Connecting to database specified by database.yml
47
+ SQL (0.5ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:43:51 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:43:51 UTC +00:00]]
48
+  (0.7ms) rollback transaction
49
+  (0.2ms) begin transaction
50
+ SQL (0.5ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:43:51 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:43:51 UTC +00:00]]
51
+  (0.6ms) commit transaction
154
52
   (0.0ms) begin transaction
155
- SQL (3.5ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:38:31 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:38:31 UTC +00:00]]
156
-  (2.3ms) commit transaction
157
-  (0.1ms) begin transaction
158
-  (0.2ms) UPDATE "servers" SET "state" = 'stopped', "updated_at" = '2012-06-22 14:38:31.039058' WHERE "servers"."id" = 5
159
-  (1.0ms) commit transaction
53
+  (0.2ms) UPDATE "servers" SET "state" = 'turned_off', "updated_at" = '2013-07-24 06:43:51.711309' WHERE "servers"."id" = 2
54
+  (0.5ms) commit transaction
55
+  (0.0ms) begin transaction
56
+  (0.2ms) UPDATE "servers" SET "state" = 'uninstalled', "updated_at" = '2013-07-24 06:43:51.713271' WHERE "servers"."id" = 2
57
+  (0.5ms) commit transaction
160
58
   (0.0ms) begin transaction
161
- SQL (0.6ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:38:31 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:38:31 UTC +00:00]]
162
-  (1.0ms) commit transaction
163
- Connecting to database specified by database.yml
59
+ SQL (0.3ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:43:51 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:43:51 UTC +00:00]]
60
+  (0.5ms) commit transaction
61
+  (0.0ms) begin transaction
62
+  (0.3ms) UPDATE "servers" SET "state" = 'crashed', "updated_at" = '2013-07-24 06:43:51.717490' WHERE "servers"."id" = 3
63
+  (0.5ms) commit transaction
164
64
   (0.0ms) begin transaction
165
- SQL (5.5ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:46:01 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:46:01 UTC +00:00]]
65
+ SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:43:51 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:43:51 UTC +00:00]]
166
66
   (0.6ms) commit transaction
67
+  (1.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
68
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
69
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
70
+ Migrating to CreateServers (20120622135717)
167
71
   (0.0ms) begin transaction
168
-  (0.2ms) UPDATE "servers" SET "state" = 'stopped', "updated_at" = '2012-06-22 14:46:02.001583' WHERE "servers"."id" = 7
169
-  (0.8ms) commit transaction
170
-  (0.1ms) begin transaction
171
- SQL (0.5ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:46:02 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:46:02 UTC +00:00]]
72
+  (0.3ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime, "updated_at" datetime) 
73
+ SQL (1.0ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120622135717"]]
74
+  (0.8ms) commit transaction
75
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
76
+  (1.2ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime, "updated_at" datetime) 
77
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
78
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
79
+  (0.1ms) SELECT version FROM "schema_migrations"
80
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20120622135717')
81
+  (2.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
82
+  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
83
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
84
+ Migrating to CreateServers (20120622135717)
85
+  (0.0ms) begin transaction
86
+  (0.3ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime, "updated_at" datetime) 
87
+ SQL (1.6ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120622135717"]]
88
+  (0.8ms) commit transaction
89
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
90
+  (1.0ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime, "updated_at" datetime) 
91
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
92
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
93
+  (0.1ms) SELECT version FROM "schema_migrations"
94
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20120622135717')
95
+  (1.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
96
+  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
97
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
98
+ Migrating to CreateServers (20120622135717)
99
+  (0.0ms) begin transaction
100
+  (0.4ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime, "updated_at" datetime) 
101
+ SQL (0.9ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120622135717"]]
172
102
   (1.0ms) commit transaction
173
- Connecting to database specified by database.yml
103
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
104
+  (1.1ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime, "updated_at" datetime) 
105
+  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
106
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
107
+  (0.1ms) SELECT version FROM "schema_migrations"
108
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120622135717')
109
+ --------------------------------------------------------------------
110
+ AfterCommitQueueTest: test_clear_queue_after_methods_from_are_called
111
+ --------------------------------------------------------------------
174
112
   (0.1ms) begin transaction
175
- SQL (3.3ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:46:44 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:46:44 UTC +00:00]]
176
-  (1.7ms) commit transaction
177
-  (0.0ms) begin transaction
178
-  (0.3ms) UPDATE "servers" SET "state" = 'stopped', "updated_at" = '2012-06-22 14:46:44.233785' WHERE "servers"."id" = 9
179
-  (0.8ms) commit transaction
180
-  (0.0ms) begin transaction
181
- SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:46:44 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:46:44 UTC +00:00]]
113
+ SQL (3.0ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:49:16 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:49:16 UTC +00:00]]
182
114
   (1.1ms) commit transaction
183
- Connecting to database specified by database.yml
115
+  (0.1ms) begin transaction
116
+ SQL (0.4ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 1 [["state", "turned_off"], ["updated_at", Wed, 24 Jul 2013 06:49:16 UTC +00:00]]
117
+  (0.9ms) commit transaction
118
+ ------------------------------------------------------
119
+ AfterCommitQueueTest: test_clears_queue_after_rollback
120
+ ------------------------------------------------------
121
+  (0.1ms) begin transaction
122
+ SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:49:16 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:49:16 UTC +00:00]]
123
+  (0.4ms) rollback transaction
124
+ --------------------------------------------------------------------------
125
+ AfterCommitQueueTest: test_clears_queue_even_when_no_callback_was_enqueued
126
+ --------------------------------------------------------------------------
127
+ ----------------------------------------------------------
128
+ AfterCommitQueueTest: test_external_observer_changes_state
129
+ ----------------------------------------------------------
130
+  (0.1ms) begin transaction
131
+ SQL (0.5ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:49:16 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:49:16 UTC +00:00]]
132
+  (0.6ms) commit transaction
184
133
   (0.0ms) begin transaction
185
- SQL (3.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:48:42 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:48:42 UTC +00:00]]
186
-  (2.0ms) commit transaction
134
+ SQL (0.6ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 2 [["state", "turned_off"], ["updated_at", Wed, 24 Jul 2013 06:49:16 UTC +00:00]]
135
+  (0.7ms) commit transaction
187
136
   (0.0ms) begin transaction
188
-  (0.2ms) UPDATE "servers" SET "state" = 'turned_off', "updated_at" = '2012-06-22 14:48:42.577921' WHERE "servers"."id" = 11
189
-  (0.6ms) commit transaction
137
+ SQL (0.3ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 2 [["state", "uninstalled"], ["updated_at", Wed, 24 Jul 2013 06:49:16 UTC +00:00]]
138
+  (0.7ms) commit transaction
139
+ --------------------------------------------------------------------
140
+ AfterCommitQueueTest: test_run_blocks_after_transaction_is_committed
141
+ --------------------------------------------------------------------
190
142
   (0.1ms) begin transaction
191
- SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:48:42 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:48:42 UTC +00:00]]
192
-  (0.8ms) commit transaction
193
- Connecting to database specified by database.yml
143
+ SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:49:16 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:49:16 UTC +00:00]]
144
+  (1.1ms) commit transaction
145
+  (0.0ms) begin transaction
146
+ SQL (0.3ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 3 [["state", "crashed"], ["updated_at", Wed, 24 Jul 2013 06:49:16 UTC +00:00]]
147
+  (1.0ms) commit transaction
148
+ ---------------------------------------------------------------------
149
+ AfterCommitQueueTest: test_run_methods_after_transaction_is_committed
150
+ ---------------------------------------------------------------------
194
151
   (0.1ms) begin transaction
195
- SQL (3.2ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:49:15 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:49:15 UTC +00:00]]
196
-  (1.7ms) commit transaction
152
+ SQL (0.3ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:49:16 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:49:16 UTC +00:00]]
153
+  (1.1ms) commit transaction
154
+  (3.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
155
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
156
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
157
+ Migrating to CreateServers (20120622135717)
197
158
   (0.0ms) begin transaction
198
-  (0.2ms) UPDATE "servers" SET "state" = 'turned_off', "updated_at" = '2012-06-22 14:49:15.132299' WHERE "servers"."id" = 13
199
-  (1.1ms) commit transaction
200
-  (0.0ms) begin transaction
201
- SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:49:15 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 14:49:15 UTC +00:00]]
159
+  (0.4ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime, "updated_at" datetime) 
160
+ SQL (1.0ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120622135717"]]
202
161
   (0.7ms) commit transaction
203
- Connecting to database specified by database.yml
204
-  (0.0ms) begin transaction
205
- SQL (3.9ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:49:22 UTC +00:00], ["state", "pending"], ["updated_at", Fri, 22 Jun 2012 14:49:22 UTC +00:00]]
206
-  (2.0ms) commit transaction
162
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
163
+  (1.3ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime, "updated_at" datetime) 
164
+  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
165
+  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
166
+  (0.1ms) SELECT version FROM "schema_migrations"
167
+  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20120622135717')
168
+ --------------------------------------------------------------------
169
+ AfterCommitQueueTest: test_clear_queue_after_methods_from_are_called
170
+ --------------------------------------------------------------------
171
+  (0.1ms) begin transaction
172
+ SQL (3.1ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:50:04 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:50:04 UTC +00:00]]
173
+  (2.1ms) commit transaction
207
174
   (0.0ms) begin transaction
208
-  (0.3ms) UPDATE "servers" SET "state" = 'running', "updated_at" = '2012-06-22 14:49:22.969116' WHERE "servers"."id" = 15
175
+ SQL (0.4ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 1 [["state", "turned_off"], ["updated_at", Wed, 24 Jul 2013 06:50:04 UTC +00:00]]
176
+  (0.6ms) commit transaction
177
+ ------------------------------------------------------
178
+ AfterCommitQueueTest: test_clears_queue_after_rollback
179
+ ------------------------------------------------------
180
+  (0.1ms) begin transaction
181
+ SQL (0.3ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:50:04 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:50:04 UTC +00:00]]
182
+  (0.4ms) rollback transaction
183
+ --------------------------------------------------------------------------
184
+ AfterCommitQueueTest: test_clears_queue_even_when_no_callback_was_enqueued
185
+ --------------------------------------------------------------------------
186
+ ----------------------------------------------------------
187
+ AfterCommitQueueTest: test_external_observer_changes_state
188
+ ----------------------------------------------------------
189
+  (0.1ms) begin transaction
190
+ SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:50:04 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:50:04 UTC +00:00]]
209
191
   (1.0ms) commit transaction
210
192
   (0.0ms) begin transaction
211
-  (0.2ms) UPDATE "servers" SET "state" = 'turned_off', "updated_at" = '2012-06-22 14:49:22.972534' WHERE "servers"."id" = 15
212
-  (0.9ms) commit transaction
193
+ SQL (0.4ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 2 [["state", "turned_off"], ["updated_at", Wed, 24 Jul 2013 06:50:04 UTC +00:00]]
194
+  (0.8ms) commit transaction
213
195
   (0.0ms) begin transaction
214
- SQL (0.3ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 14:49:22 UTC +00:00], ["state", "pending"], ["updated_at", Fri, 22 Jun 2012 14:49:22 UTC +00:00]]
196
+ SQL (0.3ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 2 [["state", "uninstalled"], ["updated_at", Wed, 24 Jul 2013 06:50:04 UTC +00:00]]
215
197
   (0.9ms) commit transaction
198
+ --------------------------------------------------------------------
199
+ AfterCommitQueueTest: test_run_blocks_after_transaction_is_committed
200
+ --------------------------------------------------------------------
201
+  (0.1ms) begin transaction
202
+ SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:50:04 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:50:04 UTC +00:00]]
203
+  (0.9ms) commit transaction
204
+  (0.1ms) begin transaction
205
+ SQL (0.4ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 3 [["state", "crashed"], ["updated_at", Wed, 24 Jul 2013 06:50:04 UTC +00:00]]
206
+  (1.0ms) commit transaction
207
+ ---------------------------------------------------------------------
208
+ AfterCommitQueueTest: test_run_methods_after_transaction_is_committed
209
+ ---------------------------------------------------------------------
216
210
   (0.0ms) begin transaction
217
-  (0.3ms) UPDATE "servers" SET "state" = 'running', "updated_at" = '2012-06-22 14:49:22.977939' WHERE "servers"."id" = 16
218
-  (0.7ms) commit transaction
219
- Connecting to database specified by database.yml
220
-  (0.0ms) begin transaction
221
- SQL (6.1ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 15:18:36 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 15:18:36 UTC +00:00]]
211
+ SQL (0.5ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:50:04 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:50:04 UTC +00:00]]
222
212
   (1.1ms) commit transaction
213
+  (3.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
214
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
215
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
216
+ Migrating to CreateServers (20120622135717)
223
217
   (0.0ms) begin transaction
224
-  (0.3ms) UPDATE "servers" SET "state" = 'turned_off', "updated_at" = '2012-06-22 15:18:36.399920' WHERE "servers"."id" = 17
218
+  (0.3ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime, "updated_at" datetime) 
219
+ SQL (1.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120622135717"]]
220
+  (1.3ms) commit transaction
221
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
222
+  (1.3ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime, "updated_at" datetime) 
223
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
224
+  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
225
+  (0.3ms) SELECT version FROM "schema_migrations"
226
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20120622135717')
227
+ --------------------------------------------------------------------
228
+ AfterCommitQueueTest: test_clear_queue_after_methods_from_are_called
229
+ --------------------------------------------------------------------
230
+  (0.1ms) begin transaction
231
+ SQL (3.0ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:50:54 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:50:54 UTC +00:00]]
232
+  (2.2ms) commit transaction
233
+  (0.1ms) begin transaction
234
+ SQL (0.3ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 1 [["state", "turned_off"], ["updated_at", Wed, 24 Jul 2013 06:50:54 UTC +00:00]]
225
235
   (0.6ms) commit transaction
236
+ ------------------------------------------------------
237
+ AfterCommitQueueTest: test_clears_queue_after_rollback
238
+ ------------------------------------------------------
226
239
   (0.1ms) begin transaction
227
- SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 15:18:36 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 15:18:36 UTC +00:00]]
228
-  (0.6ms) commit transaction
229
- Connecting to database specified by database.yml
240
+ SQL (0.6ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:50:54 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:50:54 UTC +00:00]]
241
+  (0.4ms) rollback transaction
242
+ --------------------------------------------------------------------------
243
+ AfterCommitQueueTest: test_clears_queue_even_when_no_callback_was_enqueued
244
+ --------------------------------------------------------------------------
245
+ ----------------------------------------------------------
246
+ AfterCommitQueueTest: test_external_observer_changes_state
247
+ ----------------------------------------------------------
248
+  (0.1ms) begin transaction
249
+ SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:50:54 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:50:54 UTC +00:00]]
250
+  (0.5ms) commit transaction
230
251
   (0.0ms) begin transaction
231
- SQL (2.8ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 15:19:07 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 15:19:07 UTC +00:00]]
232
-  (2.2ms) commit transaction
233
-  (0.0ms) begin transaction
234
-  (0.2ms) UPDATE "servers" SET "state" = 'turned_off', "updated_at" = '2012-06-22 15:19:07.087702' WHERE "servers"."id" = 19
235
-  (0.9ms) commit transaction
252
+ SQL (0.5ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 2 [["state", "turned_off"], ["updated_at", Wed, 24 Jul 2013 06:50:54 UTC +00:00]]
253
+  (1.0ms) commit transaction
254
+  (0.1ms) begin transaction
255
+ SQL (0.6ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 2 [["state", "uninstalled"], ["updated_at", Wed, 24 Jul 2013 06:50:54 UTC +00:00]]
256
+  (1.2ms) commit transaction
257
+ --------------------------------------------------------------------
258
+ AfterCommitQueueTest: test_run_blocks_after_transaction_is_committed
259
+ --------------------------------------------------------------------
236
260
   (0.1ms) begin transaction
237
- SQL (0.3ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 15:19:07 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 15:19:07 UTC +00:00]]
261
+ SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:50:54 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:50:54 UTC +00:00]]
238
262
   (1.2ms) commit transaction
239
- Connecting to database specified by database.yml
240
-  (0.1ms) begin transaction
241
- SQL (10.0ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 15:21:33 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 15:21:33 UTC +00:00]]
242
-  (3.3ms) commit transaction
243
263
   (0.0ms) begin transaction
244
-  (0.3ms) UPDATE "servers" SET "state" = 'turned_off', "updated_at" = '2012-06-22 15:21:33.954780' WHERE "servers"."id" = 21
264
+ SQL (0.4ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 3 [["state", "crashed"], ["updated_at", Wed, 24 Jul 2013 06:50:54 UTC +00:00]]
245
265
   (1.1ms) commit transaction
266
+ ---------------------------------------------------------------------
267
+ AfterCommitQueueTest: test_run_methods_after_transaction_is_committed
268
+ ---------------------------------------------------------------------
246
269
   (0.1ms) begin transaction
247
- SQL (0.3ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 15:21:33 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 15:21:33 UTC +00:00]]
248
-  (0.7ms) commit transaction
249
- Connecting to database specified by database.yml
250
-  (0.3ms) begin transaction
251
-  (0.0ms) SAVEPOINT active_record_1
252
- SQL (5.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 15:21:45 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 15:21:45 UTC +00:00]]
253
-  (0.0ms) RELEASE SAVEPOINT active_record_1
254
-  (0.0ms) SAVEPOINT active_record_1
255
-  (0.5ms) UPDATE "servers" SET "state" = 'turned_off', "updated_at" = '2012-06-22 15:21:45.041318' WHERE "servers"."id" = 23
256
-  (0.0ms) RELEASE SAVEPOINT active_record_1
257
-  (0.5ms) rollback transaction
258
-  (0.0ms) begin transaction
259
-  (0.0ms) SAVEPOINT active_record_1
260
- SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 15:21:45 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 15:21:45 UTC +00:00]]
261
-  (0.0ms) RELEASE SAVEPOINT active_record_1
262
-  (0.3ms) rollback transaction
263
- Connecting to database specified by database.yml
264
-  (0.1ms) begin transaction
265
- SQL (7.5ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 15:35:43 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 15:35:43 UTC +00:00]]
266
-  (1.2ms) commit transaction
270
+ SQL (0.5ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:50:54 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:50:54 UTC +00:00]]
271
+  (0.9ms) commit transaction
272
+  (2.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
273
+  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
274
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
275
+ Migrating to CreateServers (20120622135717)
267
276
   (0.0ms) begin transaction
268
-  (0.3ms) UPDATE "servers" SET "state" = 'turned_off', "updated_at" = '2012-06-22 15:35:43.917293' WHERE "servers"."id" = 23
269
-  (0.6ms) commit transaction
270
-  (0.1ms) begin transaction
271
- SQL (0.5ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 15:35:43 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 15:35:43 UTC +00:00]]
272
-  (0.7ms) commit transaction
273
- Connecting to database specified by database.yml
274
-  (0.0ms) begin transaction
275
- SQL (5.1ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 15:58:05 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 15:58:05 UTC +00:00]]
277
+  (0.3ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime, "updated_at" datetime) 
278
+ SQL (1.5ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120622135717"]]
276
279
   (0.8ms) commit transaction
277
-  (0.1ms) begin transaction
278
-  (0.3ms) UPDATE "servers" SET "state" = 'turned_off', "updated_at" = '2012-06-22 15:58:05.778522' WHERE "servers"."id" = 25
279
-  (0.7ms) commit transaction
280
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
281
+  (1.3ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime, "updated_at" datetime) 
282
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
283
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
284
+  (0.1ms) SELECT version FROM "schema_migrations"
285
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20120622135717')
286
+ --------------------------------------------------------------------
287
+ AfterCommitQueueTest: test_clear_queue_after_methods_from_are_called
288
+ --------------------------------------------------------------------
280
289
   (0.1ms) begin transaction
281
- SQL (0.5ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Jun 2012 15:58:05 UTC +00:00], ["state", "running"], ["updated_at", Fri, 22 Jun 2012 15:58:05 UTC +00:00]]
282
-  (0.7ms) commit transaction
283
- Connecting to database specified by database.yml
284
-  (0.1ms) begin transaction
285
- SQL (5.1ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 18 Jul 2012 21:11:10 UTC +00:00], ["state", "running"], ["updated_at", Wed, 18 Jul 2012 21:11:10 UTC +00:00]]
286
-  (1.1ms) commit transaction
290
+ SQL (3.1ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:51:12 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:51:12 UTC +00:00]]
291
+  (2.2ms) commit transaction
287
292
   (0.0ms) begin transaction
288
-  (0.2ms) UPDATE "servers" SET "state" = 'turned_off', "updated_at" = '2012-07-18 21:11:10.161801' WHERE "servers"."id" = 1
289
-  (0.6ms) commit transaction
293
+ SQL (0.3ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 1 [["state", "turned_off"], ["updated_at", Wed, 24 Jul 2013 06:51:12 UTC +00:00]]
294
+  (1.1ms) commit transaction
295
+ ------------------------------------------------------
296
+ AfterCommitQueueTest: test_clears_queue_after_rollback
297
+ ------------------------------------------------------
290
298
   (0.1ms) begin transaction
291
- SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 18 Jul 2012 21:11:10 UTC +00:00], ["state", "running"], ["updated_at", Wed, 18 Jul 2012 21:11:10 UTC +00:00]]
292
-  (0.6ms) commit transaction
293
- Connecting to database specified by database.yml
294
-  (0.0ms) begin transaction
295
- SQL (2.6ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 18 Jul 2012 21:16:29 UTC +00:00], ["state", "running"], ["updated_at", Wed, 18 Jul 2012 21:16:29 UTC +00:00]]
296
-  (1.1ms) commit transaction
297
-  (0.0ms) begin transaction
298
-  (0.2ms) UPDATE "servers" SET "state" = 'turned_off', "updated_at" = '2012-07-18 21:16:29.689270' WHERE "servers"."id" = 1
299
+ SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:51:12 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:51:12 UTC +00:00]]
300
+  (0.4ms) rollback transaction
301
+ --------------------------------------------------------------------------
302
+ AfterCommitQueueTest: test_clears_queue_even_when_no_callback_was_enqueued
303
+ --------------------------------------------------------------------------
304
+ ----------------------------------------------------------
305
+ AfterCommitQueueTest: test_external_observer_changes_state
306
+ ----------------------------------------------------------
307
+  (0.1ms) begin transaction
308
+ SQL (0.5ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:51:12 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:51:12 UTC +00:00]]
299
309
   (1.1ms) commit transaction
300
310
   (0.0ms) begin transaction
301
- SQL (0.3ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 18 Jul 2012 21:16:29 UTC +00:00], ["state", "running"], ["updated_at", Wed, 18 Jul 2012 21:16:29 UTC +00:00]]
311
+ SQL (0.4ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 2 [["state", "turned_off"], ["updated_at", Wed, 24 Jul 2013 06:51:12 UTC +00:00]]
302
312
   (0.9ms) commit transaction
303
- Connecting to database specified by database.yml
313
+  (0.0ms) begin transaction
314
+ SQL (0.4ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 2 [["state", "uninstalled"], ["updated_at", Wed, 24 Jul 2013 06:51:12 UTC +00:00]]
315
+  (1.2ms) commit transaction
316
+ --------------------------------------------------------------------
317
+ AfterCommitQueueTest: test_run_blocks_after_transaction_is_committed
318
+ --------------------------------------------------------------------
304
319
   (0.0ms) begin transaction
305
- SQL (5.2ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Aug 2012 10:44:49 UTC +00:00], ["state", "running"], ["updated_at", Wed, 01 Aug 2012 10:44:49 UTC +00:00]]
320
+ SQL (0.5ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:51:12 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:51:12 UTC +00:00]]
306
321
   (1.0ms) commit transaction
307
322
   (0.0ms) begin transaction
308
-  (0.3ms) UPDATE "servers" SET "state" = 'turned_off', "updated_at" = '2012-08-01 10:44:49.378234' WHERE "servers"."id" = 1
323
+ SQL (0.4ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 3 [["state", "crashed"], ["updated_at", Wed, 24 Jul 2013 06:51:12 UTC +00:00]]
309
324
   (0.9ms) commit transaction
325
+ ---------------------------------------------------------------------
326
+ AfterCommitQueueTest: test_run_methods_after_transaction_is_committed
327
+ ---------------------------------------------------------------------
328
+  (0.0ms) begin transaction
329
+ SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:51:12 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:51:12 UTC +00:00]]
330
+  (1.1ms) commit transaction
331
+  (2.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
332
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
333
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
334
+ Migrating to CreateServers (20120622135717)
335
+  (0.0ms) begin transaction
336
+  (0.4ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime, "updated_at" datetime) 
337
+ SQL (0.9ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120622135717"]]
338
+  (0.7ms) commit transaction
339
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
340
+  (1.2ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime, "updated_at" datetime) 
341
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
342
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
343
+  (0.1ms) SELECT version FROM "schema_migrations"
344
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20120622135717')
345
+ --------------------------------------------------------------------
346
+ AfterCommitQueueTest: test_clear_queue_after_methods_from_are_called
347
+ --------------------------------------------------------------------
310
348
   (0.1ms) begin transaction
311
- SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Aug 2012 10:44:49 UTC +00:00], ["state", "running"], ["updated_at", Wed, 01 Aug 2012 10:44:49 UTC +00:00]]
349
+ SQL (3.0ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:51:40 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:51:40 UTC +00:00]]
350
+  (2.2ms) commit transaction
351
+  (0.1ms) begin transaction
352
+ SQL (0.3ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 1 [["state", "turned_off"], ["updated_at", Wed, 24 Jul 2013 06:51:40 UTC +00:00]]
353
+  (1.0ms) commit transaction
354
+ ------------------------------------------------------
355
+ AfterCommitQueueTest: test_clears_queue_after_rollback
356
+ ------------------------------------------------------
357
+  (0.0ms) begin transaction
358
+ SQL (0.5ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:51:40 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:51:40 UTC +00:00]]
359
+  (0.4ms) rollback transaction
360
+ --------------------------------------------------------------------------
361
+ AfterCommitQueueTest: test_clears_queue_even_when_no_callback_was_enqueued
362
+ --------------------------------------------------------------------------
363
+ ----------------------------------------------------------
364
+ AfterCommitQueueTest: test_external_observer_changes_state
365
+ ----------------------------------------------------------
366
+  (0.1ms) begin transaction
367
+ SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:51:40 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:51:40 UTC +00:00]]
368
+  (1.0ms) commit transaction
369
+  (0.0ms) begin transaction
370
+ SQL (0.3ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 2 [["state", "turned_off"], ["updated_at", Wed, 24 Jul 2013 06:51:40 UTC +00:00]]
312
371
   (1.0ms) commit transaction
313
372
   (0.0ms) begin transaction
314
-  (0.2ms) UPDATE "servers" SET "state" = 'crashed', "updated_at" = '2012-08-01 10:44:49.384841' WHERE "servers"."id" = 2
315
-  (0.7ms) commit transaction
373
+ SQL (0.6ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 2 [["state", "uninstalled"], ["updated_at", Wed, 24 Jul 2013 06:51:40 UTC +00:00]]
374
+  (1.0ms) commit transaction
375
+ --------------------------------------------------------------------
376
+ AfterCommitQueueTest: test_run_blocks_after_transaction_is_committed
377
+ --------------------------------------------------------------------
316
378
   (0.1ms) begin transaction
317
- SQL (0.3ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Aug 2012 10:44:49 UTC +00:00], ["state", "running"], ["updated_at", Wed, 01 Aug 2012 10:44:49 UTC +00:00]]
318
-  (1.0ms) commit transaction
319
- Connecting to database specified by database.yml
379
+ SQL (0.7ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:51:40 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:51:40 UTC +00:00]]
380
+  (1.1ms) commit transaction
381
+  (0.0ms) begin transaction
382
+ SQL (0.4ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 3 [["state", "crashed"], ["updated_at", Wed, 24 Jul 2013 06:51:40 UTC +00:00]]
383
+  (1.0ms) commit transaction
384
+ ---------------------------------------------------------------------
385
+ AfterCommitQueueTest: test_run_methods_after_transaction_is_committed
386
+ ---------------------------------------------------------------------
320
387
   (0.0ms) begin transaction
321
- SQL (8.9ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Oct 2012 13:26:25 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Oct 2012 13:26:25 UTC +00:00]]
322
-  (0.6ms) commit transaction
388
+ SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:51:40 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:51:40 UTC +00:00]]
389
+  (0.7ms) commit transaction
390
+  (2.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
391
+  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
392
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
393
+ Migrating to CreateServers (20120622135717)
323
394
   (0.0ms) begin transaction
324
-  (0.3ms) UPDATE "servers" SET "state" = 'turned_off', "updated_at" = '2012-10-24 13:26:25.609680' WHERE "servers"."id" = 1
395
+  (0.3ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime, "updated_at" datetime) 
396
+ SQL (1.5ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120622135717"]]
397
+  (0.9ms) commit transaction
398
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
399
+  (1.2ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime, "updated_at" datetime) 
400
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
401
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
402
+  (0.1ms) SELECT version FROM "schema_migrations"
403
+  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20120622135717')
404
+ --------------------------------------------------------------------
405
+ AfterCommitQueueTest: test_clear_queue_after_methods_from_are_called
406
+ --------------------------------------------------------------------
407
+  (0.1ms) begin transaction
408
+ SQL (3.0ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:52:03 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:52:03 UTC +00:00]]
409
+  (2.1ms) commit transaction
410
+  (0.1ms) begin transaction
411
+ SQL (0.4ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 1 [["state", "turned_off"], ["updated_at", Wed, 24 Jul 2013 06:52:03 UTC +00:00]]
325
412
   (0.9ms) commit transaction
413
+ ------------------------------------------------------
414
+ AfterCommitQueueTest: test_clears_queue_after_rollback
415
+ ------------------------------------------------------
416
+  (0.1ms) begin transaction
417
+ SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:52:03 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:52:03 UTC +00:00]]
418
+  (0.4ms) rollback transaction
419
+ --------------------------------------------------------------------------
420
+ AfterCommitQueueTest: test_clears_queue_even_when_no_callback_was_enqueued
421
+ --------------------------------------------------------------------------
422
+ ----------------------------------------------------------
423
+ AfterCommitQueueTest: test_external_observer_changes_state
424
+ ----------------------------------------------------------
425
+  (0.1ms) begin transaction
426
+ SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:52:03 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:52:03 UTC +00:00]]
427
+  (0.6ms) commit transaction
326
428
   (0.0ms) begin transaction
327
- SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Oct 2012 13:26:25 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Oct 2012 13:26:25 UTC +00:00]]
328
-  (0.9ms) rollback transaction
429
+ SQL (0.5ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 2 [["state", "turned_off"], ["updated_at", Wed, 24 Jul 2013 06:52:03 UTC +00:00]]
430
+  (0.6ms) commit transaction
431
+  (0.0ms) begin transaction
432
+ SQL (0.4ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 2 [["state", "uninstalled"], ["updated_at", Wed, 24 Jul 2013 06:52:03 UTC +00:00]]
433
+  (0.9ms) commit transaction
434
+ --------------------------------------------------------------------
435
+ AfterCommitQueueTest: test_run_blocks_after_transaction_is_committed
436
+ --------------------------------------------------------------------
437
+  (0.1ms) begin transaction
438
+ SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:52:03 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:52:03 UTC +00:00]]
439
+  (0.7ms) commit transaction
329
440
   (0.0ms) begin transaction
330
- SQL (0.3ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Oct 2012 13:26:25 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Oct 2012 13:26:25 UTC +00:00]]
441
+ SQL (0.5ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 3 [["state", "crashed"], ["updated_at", Wed, 24 Jul 2013 06:52:03 UTC +00:00]]
442
+  (0.9ms) commit transaction
443
+ ---------------------------------------------------------------------
444
+ AfterCommitQueueTest: test_run_methods_after_transaction_is_committed
445
+ ---------------------------------------------------------------------
446
+  (0.0ms) begin transaction
447
+ SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:52:03 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:52:03 UTC +00:00]]
448
+  (1.1ms) commit transaction
449
+  (3.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
450
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
451
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
452
+ Migrating to CreateServers (20120622135717)
453
+  (0.1ms) begin transaction
454
+  (0.6ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime, "updated_at" datetime) 
455
+ SQL (1.0ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120622135717"]]
456
+  (1.3ms) commit transaction
457
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
458
+  (1.2ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime, "updated_at" datetime) 
459
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
460
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
461
+  (0.1ms) SELECT version FROM "schema_migrations"
462
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20120622135717')
463
+ --------------------------------------------------------------------
464
+ AfterCommitQueueTest: test_clear_queue_after_methods_from_are_called
465
+ --------------------------------------------------------------------
466
+  (0.1ms) begin transaction
467
+ SQL (3.5ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:52:44 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:52:44 UTC +00:00]]
468
+  (2.2ms) commit transaction
469
+  (0.1ms) begin transaction
470
+ SQL (0.4ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 1 [["state", "turned_off"], ["updated_at", Wed, 24 Jul 2013 06:52:44 UTC +00:00]]
331
471
   (0.7ms) commit transaction
472
+ ------------------------------------------------------
473
+ AfterCommitQueueTest: test_clears_queue_after_rollback
474
+ ------------------------------------------------------
475
+  (0.1ms) begin transaction
476
+ SQL (0.5ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:52:44 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:52:44 UTC +00:00]]
477
+  (0.4ms) rollback transaction
478
+ --------------------------------------------------------------------------
479
+ AfterCommitQueueTest: test_clears_queue_even_when_no_callback_was_enqueued
480
+ --------------------------------------------------------------------------
481
+ ----------------------------------------------------------
482
+ AfterCommitQueueTest: test_external_observer_changes_state
483
+ ----------------------------------------------------------
484
+  (0.1ms) begin transaction
485
+ SQL (0.5ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:52:44 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:52:44 UTC +00:00]]
486
+  (0.6ms) commit transaction
332
487
   (0.0ms) begin transaction
333
-  (0.4ms) UPDATE "servers" SET "state" = 'crashed', "updated_at" = '2012-10-24 13:26:25.619583' WHERE "servers"."id" = 2
488
+ SQL (0.4ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 2 [["state", "turned_off"], ["updated_at", Wed, 24 Jul 2013 06:52:44 UTC +00:00]]
334
489
   (0.8ms) commit transaction
490
+  (0.1ms) begin transaction
491
+ SQL (0.5ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 2 [["state", "uninstalled"], ["updated_at", Wed, 24 Jul 2013 06:52:44 UTC +00:00]]
492
+  (0.9ms) commit transaction
493
+ --------------------------------------------------------------------
494
+ AfterCommitQueueTest: test_run_blocks_after_transaction_is_committed
495
+ --------------------------------------------------------------------
496
+  (0.1ms) begin transaction
497
+ SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:52:44 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:52:44 UTC +00:00]]
498
+  (1.2ms) commit transaction
335
499
   (0.0ms) begin transaction
336
- SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Oct 2012 13:26:25 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Oct 2012 13:26:25 UTC +00:00]]
500
+ SQL (0.3ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 3 [["state", "crashed"], ["updated_at", Wed, 24 Jul 2013 06:52:44 UTC +00:00]]
501
+  (1.0ms) commit transaction
502
+ ---------------------------------------------------------------------
503
+ AfterCommitQueueTest: test_run_methods_after_transaction_is_committed
504
+ ---------------------------------------------------------------------
505
+  (0.0ms) begin transaction
506
+ SQL (0.5ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:52:44 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:52:44 UTC +00:00]]
507
+  (1.1ms) commit transaction
508
+  (2.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
509
+  (1.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
510
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
511
+ Migrating to CreateServers (20120622135717)
512
+  (0.1ms) begin transaction
513
+  (0.4ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime, "updated_at" datetime) 
514
+ SQL (1.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120622135717"]]
515
+  (1.3ms) commit transaction
516
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
517
+  (1.3ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime, "updated_at" datetime) 
518
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
519
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
520
+  (0.1ms) SELECT version FROM "schema_migrations"
521
+  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20120622135717')
522
+ --------------------------------------------------------------------
523
+ AfterCommitQueueTest: test_clear_queue_after_methods_from_are_called
524
+ --------------------------------------------------------------------
525
+  (0.1ms) begin transaction
526
+ SQL (3.0ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:52:53 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:52:53 UTC +00:00]]
527
+  (2.3ms) commit transaction
528
+  (0.1ms) begin transaction
529
+ SQL (0.4ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 1 [["state", "turned_off"], ["updated_at", Wed, 24 Jul 2013 06:52:53 UTC +00:00]]
530
+  (0.6ms) commit transaction
531
+ ------------------------------------------------------
532
+ AfterCommitQueueTest: test_clears_queue_after_rollback
533
+ ------------------------------------------------------
534
+  (0.1ms) begin transaction
535
+ SQL (0.7ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:52:53 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:52:53 UTC +00:00]]
536
+  (0.4ms) rollback transaction
537
+ --------------------------------------------------------------------------
538
+ AfterCommitQueueTest: test_clears_queue_even_when_no_callback_was_enqueued
539
+ --------------------------------------------------------------------------
540
+ ----------------------------------------------------------
541
+ AfterCommitQueueTest: test_external_observer_changes_state
542
+ ----------------------------------------------------------
543
+  (0.1ms) begin transaction
544
+ SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:52:53 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:52:53 UTC +00:00]]
545
+  (0.7ms) commit transaction
546
+  (0.1ms) begin transaction
547
+ SQL (0.4ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 2 [["state", "turned_off"], ["updated_at", Wed, 24 Jul 2013 06:52:53 UTC +00:00]]
548
+  (1.2ms) commit transaction
549
+  (0.1ms) begin transaction
550
+ SQL (0.4ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 2 [["state", "uninstalled"], ["updated_at", Wed, 24 Jul 2013 06:52:53 UTC +00:00]]
551
+  (1.1ms) commit transaction
552
+ --------------------------------------------------------------------
553
+ AfterCommitQueueTest: test_run_blocks_after_transaction_is_committed
554
+ --------------------------------------------------------------------
555
+  (0.0ms) begin transaction
556
+ SQL (0.3ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:52:53 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:52:53 UTC +00:00]]
557
+  (0.7ms) commit transaction
558
+  (0.1ms) begin transaction
559
+ SQL (0.4ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 3 [["state", "crashed"], ["updated_at", Wed, 24 Jul 2013 06:52:53 UTC +00:00]]
560
+  (1.1ms) commit transaction
561
+ ---------------------------------------------------------------------
562
+ AfterCommitQueueTest: test_run_methods_after_transaction_is_committed
563
+ ---------------------------------------------------------------------
564
+  (0.0ms) begin transaction
565
+ SQL (0.5ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:52:53 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:52:53 UTC +00:00]]
566
+  (1.1ms) commit transaction
567
+  (2.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
568
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
569
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
570
+ Migrating to CreateServers (20120622135717)
571
+  (0.1ms) begin transaction
572
+  (0.4ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime, "updated_at" datetime) 
573
+ SQL (1.4ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20120622135717"]]
574
+  (0.8ms) commit transaction
575
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
576
+  (0.8ms) CREATE TABLE "servers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "state" varchar(255), "created_at" datetime, "updated_at" datetime) 
577
+  (1.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
578
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
579
+  (0.1ms) SELECT version FROM "schema_migrations"
580
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20120622135717')
581
+ --------------------------------------------------------------------
582
+ AfterCommitQueueTest: test_clear_queue_after_methods_from_are_called
583
+ --------------------------------------------------------------------
584
+  (0.1ms) begin transaction
585
+ SQL (3.0ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:53:11 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:53:11 UTC +00:00]]
586
+  (2.3ms) commit transaction
587
+  (0.1ms) begin transaction
588
+ SQL (0.4ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 1 [["state", "turned_off"], ["updated_at", Wed, 24 Jul 2013 06:53:11 UTC +00:00]]
589
+  (1.1ms) commit transaction
590
+ ------------------------------------------------------
591
+ AfterCommitQueueTest: test_clears_queue_after_rollback
592
+ ------------------------------------------------------
593
+  (0.0ms) begin transaction
594
+ SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:53:11 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:53:11 UTC +00:00]]
595
+  (0.4ms) rollback transaction
596
+ --------------------------------------------------------------------------
597
+ AfterCommitQueueTest: test_clears_queue_even_when_no_callback_was_enqueued
598
+ --------------------------------------------------------------------------
599
+ ----------------------------------------------------------
600
+ AfterCommitQueueTest: test_external_observer_changes_state
601
+ ----------------------------------------------------------
602
+  (0.1ms) begin transaction
603
+ SQL (0.4ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:53:11 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:53:11 UTC +00:00]]
337
604
   (1.0ms) commit transaction
605
+  (0.0ms) begin transaction
606
+ SQL (0.4ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 2 [["state", "turned_off"], ["updated_at", Wed, 24 Jul 2013 06:53:11 UTC +00:00]]
607
+  (1.1ms) commit transaction
608
+  (0.1ms) begin transaction
609
+ SQL (0.3ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 2 [["state", "uninstalled"], ["updated_at", Wed, 24 Jul 2013 06:53:11 UTC +00:00]]
610
+  (0.8ms) commit transaction
611
+ --------------------------------------------------------------------
612
+ AfterCommitQueueTest: test_run_blocks_after_transaction_is_committed
613
+ --------------------------------------------------------------------
614
+  (0.0ms) begin transaction
615
+ SQL (0.3ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:53:11 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:53:11 UTC +00:00]]
616
+  (1.0ms) commit transaction
617
+  (0.0ms) begin transaction
618
+ SQL (0.5ms) UPDATE "servers" SET "state" = ?, "updated_at" = ? WHERE "servers"."id" = 3 [["state", "crashed"], ["updated_at", Wed, 24 Jul 2013 06:53:11 UTC +00:00]]
619
+  (0.8ms) commit transaction
620
+ ---------------------------------------------------------------------
621
+ AfterCommitQueueTest: test_run_methods_after_transaction_is_committed
622
+ ---------------------------------------------------------------------
623
+  (0.1ms) begin transaction
624
+ SQL (0.5ms) INSERT INTO "servers" ("created_at", "state", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 24 Jul 2013 06:53:11 UTC +00:00], ["state", "running"], ["updated_at", Wed, 24 Jul 2013 06:53:11 UTC +00:00]]
625
+  (1.0ms) commit transaction