active_merge 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.rdoc +16 -0
  3. data/{MIT-LICENSE → LICENSE} +1 -1
  4. data/README.rdoc +1 -1
  5. data/Rakefile +13 -1
  6. data/lib/active_merge/service.rb +57 -72
  7. data/lib/active_merge/simple_service.rb +36 -39
  8. data/lib/active_merge/version.rb +1 -2
  9. data/lib/active_merge.rb +9 -9
  10. data/spec/active_merge/service_spec.rb +205 -0
  11. data/spec/active_merge/simple_service_spec.rb +127 -0
  12. data/spec/active_merge_spec.rb +21 -0
  13. data/spec/dummy/README.rdoc +28 -0
  14. data/spec/dummy/Rakefile +6 -0
  15. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  16. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  17. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  18. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  19. data/spec/dummy/app/models/domain.rb +3 -0
  20. data/spec/dummy/app/models/lord.rb +4 -0
  21. data/spec/dummy/app/models/man.rb +3 -0
  22. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  23. data/spec/dummy/bin/bundle +3 -0
  24. data/spec/dummy/bin/rails +4 -0
  25. data/spec/dummy/bin/rake +4 -0
  26. data/spec/dummy/config/application.rb +30 -0
  27. data/spec/dummy/config/boot.rb +5 -0
  28. data/spec/dummy/config/database.yml +25 -0
  29. data/spec/dummy/config/environment.rb +5 -0
  30. data/spec/dummy/config/environments/development.rb +29 -0
  31. data/spec/dummy/config/environments/production.rb +80 -0
  32. data/spec/dummy/config/environments/test.rb +36 -0
  33. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  34. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  35. data/spec/dummy/config/initializers/inflections.rb +16 -0
  36. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  37. data/spec/dummy/config/initializers/secret_token.rb +12 -0
  38. data/spec/dummy/config/initializers/session_store.rb +3 -0
  39. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  40. data/spec/dummy/config/locales/ru.yml +7 -0
  41. data/spec/dummy/config/routes.rb +56 -0
  42. data/spec/dummy/config.ru +4 -0
  43. data/spec/dummy/db/migrate/20140416183029_create_lords.rb +6 -0
  44. data/spec/dummy/db/migrate/20140416183043_create_men.rb +8 -0
  45. data/spec/dummy/db/migrate/20140416183059_create_domains.rb +8 -0
  46. data/spec/dummy/db/schema.rb +31 -0
  47. data/spec/dummy/db/test.sqlite3 +0 -0
  48. data/spec/dummy/log/development.log +38 -0
  49. data/spec/dummy/log/test.log +25184 -0
  50. data/spec/dummy/public/404.html +58 -0
  51. data/spec/dummy/public/422.html +58 -0
  52. data/spec/dummy/public/500.html +57 -0
  53. data/spec/dummy/public/favicon.ico +0 -0
  54. data/spec/spec_helper.rb +53 -0
  55. data/spec/support/errors.rb +17 -0
  56. metadata +125 -15
@@ -0,0 +1,8 @@
1
+ class CreateDomains < ActiveRecord::Migration
2
+ def change
3
+ create_table :domains do |t|
4
+ t.integer :lord_id
5
+ end
6
+ add_index :domains, :lord_id
7
+ end
8
+ end
@@ -0,0 +1,31 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended that you check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(version: 20140416183059) do
15
+
16
+ create_table "domains", force: true do |t|
17
+ t.integer "lord_id"
18
+ end
19
+
20
+ add_index "domains", ["lord_id"], name: "index_domains_on_lord_id"
21
+
22
+ create_table "lords", force: true do |t|
23
+ end
24
+
25
+ create_table "men", force: true do |t|
26
+ t.integer "lord_id"
27
+ end
28
+
29
+ add_index "men", ["lord_id"], name: "index_men_on_lord_id"
30
+
31
+ end
Binary file
@@ -0,0 +1,38 @@
1
+  (5.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
2
+  (0.1ms) select sqlite_version(*)
3
+  (2.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
4
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5
+ Migrating to CreateLords (20140416183029)
6
+  (0.0ms) begin transaction
7
+  (0.3ms) CREATE TABLE "lords" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)
8
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140416183029"]]
9
+  (2.5ms) commit transaction
10
+ Migrating to CreateMen (20140416183043)
11
+  (0.0ms) begin transaction
12
+  (0.3ms) CREATE TABLE "men" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "lord_id" integer, "created_at" datetime, "updated_at" datetime)
13
+  (0.1ms) CREATE INDEX "index_men_on_lord_id" ON "men" ("lord_id")
14
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140416183043"]]
15
+  (3.0ms) commit transaction
16
+ Migrating to CreateDomains (20140416183059)
17
+  (0.1ms) begin transaction
18
+  (0.7ms) CREATE TABLE "domains" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "lord_id" integer, "created_at" datetime, "updated_at" datetime) 
19
+  (0.3ms) CREATE INDEX "index_domains_on_lord_id" ON "domains" ("lord_id")
20
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140416183059"]]
21
+  (2.8ms) commit transaction
22
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
23
+  (0.2ms) SELECT sql
24
+ FROM sqlite_master
25
+ WHERE name='index_domains_on_lord_id' AND type='index'
26
+ UNION ALL
27
+ SELECT sql
28
+ FROM sqlite_temp_master
29
+ WHERE name='index_domains_on_lord_id' AND type='index'
30
+
31
+  (0.1ms)  SELECT sql
32
+ FROM sqlite_master
33
+ WHERE name='index_men_on_lord_id' AND type='index'
34
+ UNION ALL
35
+ SELECT sql
36
+ FROM sqlite_temp_master
37
+ WHERE name='index_men_on_lord_id' AND type='index'
38
+