attr_similar 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/attr_similar.rb +7 -17
- data/lib/attr_similar/similarity_matching.rb +45 -2
- data/lib/attr_similar/version.rb +1 -1
- data/test/attr_similar_test.rb +18 -2
- data/test/dummy/app/models/manufacturer.rb +0 -1
- data/test/dummy/app/models/widget.rb +12 -0
- data/test/dummy/config/database.yml +3 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20131027192834_create_widgets.rb +5 -2
- data/test/dummy/db/schema.rb +7 -4
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +27 -0
- data/test/dummy/log/test.log +486 -0
- data/test/dummy/test/factories/widgets.rb +10 -0
- data/test/similarity_matching_test.rb +0 -7
- data/test/test_helper.rb +12 -0
- metadata +8 -2
data/lib/attr_similar.rb
CHANGED
@@ -5,24 +5,14 @@ module AttrSimilar
|
|
5
5
|
extend ActiveSupport::Concern
|
6
6
|
|
7
7
|
module ClassMethods
|
8
|
-
def attr_similar(attributes)
|
9
|
-
|
8
|
+
def attr_similar(threshold_or_thresholds, *attributes)
|
9
|
+
if threshold_or_thresholds.is_a?(Array) && threshold_or_thresholds.size != attributes.size
|
10
|
+
raise 'Threshold count must equal number of attributes'
|
11
|
+
end
|
12
|
+
define_method :find_first_similar do |scope|
|
13
|
+
AttrSimilar::SimilarityMatching.find_first_similar(scope, self, threshold_or_thresholds, attributes)
|
14
|
+
end
|
10
15
|
end
|
11
|
-
|
12
|
-
def similar_attributes
|
13
|
-
@@similar_attributes ||= []
|
14
|
-
end
|
15
|
-
|
16
|
-
def similar_attributes=(value)
|
17
|
-
@@similar_attributes = value
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
included do
|
22
|
-
end
|
23
|
-
|
24
|
-
def sample_method
|
25
|
-
AttrSimilar::SimilarityMatching.sample_method(self.class.similar_attributes)
|
26
16
|
end
|
27
17
|
end
|
28
18
|
|
@@ -1,7 +1,50 @@
|
|
1
1
|
module AttrSimilar
|
2
2
|
module SimilarityMatching
|
3
|
-
def self.
|
4
|
-
|
3
|
+
def self.find_first_similar(scope, entity, threshold_or_thresholds, attributes)
|
4
|
+
# Only consider attributes on entity with non-blank values
|
5
|
+
filtered_attributes = attributes.select { |attribute| !entity.send(attribute).blank? }
|
6
|
+
return nil if filtered_attributes.size == 0
|
7
|
+
|
8
|
+
# Use single threshold or threshold determined by number of filtered attributes
|
9
|
+
threshold = if threshold_or_thresholds.is_a?(Array)
|
10
|
+
threshold_or_thresholds[filtered_attributes.size - 1]
|
11
|
+
else
|
12
|
+
threshold_or_thresholds
|
13
|
+
end
|
14
|
+
|
15
|
+
scope = scope.where('id != ?', entity.id) if entity.id
|
16
|
+
|
17
|
+
# Build up per-attribute entity lists and candidate entity list
|
18
|
+
per_attribute_entity_lists, candidate_entities = filtered_attributes.inject([[], []]) do |memo, attribute|
|
19
|
+
entities = scope.where(attribute => entity.send(attribute))
|
20
|
+
if entities.size > 0
|
21
|
+
memo[0].concat([entities]) # Add to per_attribute_entity_lists
|
22
|
+
memo[1].concat(entities) # Add to candidate_entities
|
23
|
+
end
|
24
|
+
memo
|
25
|
+
end
|
26
|
+
|
27
|
+
# No similar entities if count of per-attribute entity lists is below threshold
|
28
|
+
return nil if per_attribute_entity_lists.size < threshold
|
29
|
+
|
30
|
+
per_attribute_entity_id_lists = per_attribute_entity_lists.map { |list| list.map(&:id) }
|
31
|
+
|
32
|
+
candidate_entity_map = candidate_entities.inject({}) do |map, candidate_entity|
|
33
|
+
map[candidate_entity.id] = candidate_entity
|
34
|
+
map
|
35
|
+
end
|
36
|
+
candidate_entity_ids = candidate_entity_map.keys
|
37
|
+
|
38
|
+
# Find entities that are in at least "threshold" lists
|
39
|
+
candidate_entity_ids.each do |candidate_entity_id|
|
40
|
+
count = per_attribute_entity_id_lists.reduce(0) do |count, list|
|
41
|
+
count += list.include?(candidate_entity_id) ? 1 : 0
|
42
|
+
end
|
43
|
+
return candidate_entity_map[candidate_entity_id] if count >= threshold
|
44
|
+
end
|
45
|
+
|
46
|
+
# No similar entities
|
47
|
+
nil
|
5
48
|
end
|
6
49
|
end
|
7
50
|
end
|
data/lib/attr_similar/version.rb
CHANGED
data/test/attr_similar_test.rb
CHANGED
@@ -1,8 +1,24 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
3
|
class AttrSimilarTest < ActiveSupport::TestCase
|
4
|
-
test '
|
5
|
-
|
4
|
+
test 'find_first_similar' do
|
5
|
+
w1 = create(
|
6
|
+
:widget,
|
7
|
+
:address => 'address',
|
8
|
+
:birthdate => '1970-01-01',
|
9
|
+
:first_name => 'first-name',
|
10
|
+
:last_name => 'last-name',
|
11
|
+
:preferred_name => 'preferred_name'
|
12
|
+
)
|
13
|
+
w2 = build(
|
14
|
+
:widget,
|
15
|
+
:address => 'address',
|
16
|
+
:birthdate => '1970-01-01',
|
17
|
+
:first_name => 'first-name',
|
18
|
+
:last_name => 'last-name',
|
19
|
+
:preferred_name => 'preferred_name'
|
20
|
+
)
|
21
|
+
assert_equal w1, w2.find_first_similar(Widget)
|
6
22
|
end
|
7
23
|
end
|
8
24
|
|
Binary file
|
@@ -1,8 +1,11 @@
|
|
1
1
|
class CreateWidgets < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :widgets do |t|
|
4
|
-
t.
|
5
|
-
t.
|
4
|
+
t.string :address
|
5
|
+
t.date :birthdate
|
6
|
+
t.string :first_name
|
7
|
+
t.string :last_name
|
8
|
+
t.string :preferred_name
|
6
9
|
|
7
10
|
t.timestamps
|
8
11
|
end
|
data/test/dummy/db/schema.rb
CHANGED
@@ -19,10 +19,13 @@ ActiveRecord::Schema.define(:version => 20131027192834) do
|
|
19
19
|
end
|
20
20
|
|
21
21
|
create_table "widgets", :force => true do |t|
|
22
|
-
t.
|
23
|
-
t.
|
24
|
-
t.
|
25
|
-
t.
|
22
|
+
t.string "address"
|
23
|
+
t.date "birthdate"
|
24
|
+
t.string "first_name"
|
25
|
+
t.string "last_name"
|
26
|
+
t.string "preferred_name"
|
27
|
+
t.datetime "created_at", :null => false
|
28
|
+
t.datetime "updated_at", :null => false
|
26
29
|
end
|
27
30
|
|
28
31
|
end
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -0,0 +1,27 @@
|
|
1
|
+
Connecting to database specified by database.yml
|
2
|
+
Connecting to database specified by database.yml
|
3
|
+
[1m[36m (30.5ms)[0m [1mselect sqlite_version(*)[0m
|
4
|
+
[1m[35m (174.8ms)[0m CREATE TABLE "manufacturers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
5
|
+
[1m[36m (187.1ms)[0m [1mCREATE TABLE "widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "manufacturer_id" integer, "name" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
6
|
+
[1m[35m (199.4ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
7
|
+
[1m[36m (144.2ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
8
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
9
|
+
[1m[36m (187.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131027192834')[0m
|
10
|
+
[1m[35m (166.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131027192625')
|
11
|
+
[1m[36m (0.2ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
12
|
+
Connecting to database specified by database.yml
|
13
|
+
[1m[36m (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
14
|
+
[1m[35m (148.4ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
15
|
+
[1m[36m (144.3ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
16
|
+
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
17
|
+
Migrating to CreateManufacturers (20131027192625)
|
18
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
19
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "manufacturers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
20
|
+
[1m[36m (0.3ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20131027192625')[0m
|
21
|
+
[1m[35m (170.6ms)[0m commit transaction
|
22
|
+
Migrating to CreateWidgets (20131027192834)
|
23
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
24
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "address" varchar(255), "birthdate" date, "first_name" varchar(255), "last_name" varchar(255), "preferred_name" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
25
|
+
[1m[36m (0.3ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20131027192834')[0m
|
26
|
+
[1m[35m (161.1ms)[0m commit transaction
|
27
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
data/test/dummy/log/test.log
CHANGED
@@ -476,3 +476,489 @@ Connecting to database specified by database.yml
|
|
476
476
|
[1m[35m (0.0ms)[0m rollback transaction
|
477
477
|
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
478
478
|
[1m[35m (0.0ms)[0m rollback transaction
|
479
|
+
Connecting to database specified by database.yml
|
480
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
481
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
482
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
483
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
484
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
485
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
486
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
487
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
488
|
+
Connecting to database specified by database.yml
|
489
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
490
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
491
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
492
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
493
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
494
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
495
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
496
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
497
|
+
Connecting to database specified by database.yml
|
498
|
+
[1m[36m (0.6ms)[0m [1mbegin transaction[0m
|
499
|
+
[1m[35m (0.2ms)[0m rollback transaction
|
500
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
501
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
502
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
503
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
504
|
+
Connecting to database specified by database.yml
|
505
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
506
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
507
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
508
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
509
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
510
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
511
|
+
Connecting to database specified by database.yml
|
512
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
513
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
514
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
515
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
516
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
517
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
518
|
+
Connecting to database specified by database.yml
|
519
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
520
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
521
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
522
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
523
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
524
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
525
|
+
Connecting to database specified by database.yml
|
526
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
527
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
528
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
529
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
530
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
531
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
532
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
533
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
534
|
+
Connecting to database specified by database.yml
|
535
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
536
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
537
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
538
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
539
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
540
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
541
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
542
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
543
|
+
Connecting to database specified by database.yml
|
544
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
545
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
546
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
547
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
548
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
549
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
550
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
551
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
552
|
+
Connecting to database specified by database.yml
|
553
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
554
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
555
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
556
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
557
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
558
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
559
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
560
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
561
|
+
Connecting to database specified by database.yml
|
562
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
563
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
564
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
565
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
566
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
567
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
568
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
569
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
570
|
+
Connecting to database specified by database.yml
|
571
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
572
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
573
|
+
Connecting to database specified by database.yml
|
574
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
575
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
576
|
+
Connecting to database specified by database.yml
|
577
|
+
Connecting to database specified by database.yml
|
578
|
+
Connecting to database specified by database.yml
|
579
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
580
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
581
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
582
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
583
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
584
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
585
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
586
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
587
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
588
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
589
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
590
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
591
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
592
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
593
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
594
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
595
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
596
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
597
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
598
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
599
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
600
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
601
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
602
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
603
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
604
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
605
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
606
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
607
|
+
Connecting to database specified by database.yml
|
608
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
609
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
610
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
611
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
612
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
613
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
614
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
615
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
616
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
617
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
618
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
619
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
620
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
621
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
622
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
623
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
624
|
+
[1m[36mSQL (5.3ms)[0m [1mINSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 09 Nov 2013 20:47:54 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 20:47:54 UTC +00:00]]
|
625
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
626
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
627
|
+
[1m[35m (0.0ms)[0m begin transaction
|
628
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
629
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 09 Nov 2013 20:47:54 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 20:47:54 UTC +00:00]]
|
630
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
631
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
632
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 09 Nov 2013 20:47:54 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 20:47:54 UTC +00:00]]
|
633
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
634
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
635
|
+
[1m[35m (0.0ms)[0m begin transaction
|
636
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
637
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 09 Nov 2013 20:47:54 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 20:47:54 UTC +00:00]]
|
638
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
639
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
640
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 09 Nov 2013 20:47:54 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 20:47:54 UTC +00:00]]
|
641
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
642
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
643
|
+
[1m[35m (0.0ms)[0m begin transaction
|
644
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
645
|
+
[1m[35m (0.0ms)[0m begin transaction
|
646
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
647
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 09 Nov 2013 20:47:54 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 20:47:54 UTC +00:00]]
|
648
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
649
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
650
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
651
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
652
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 09 Nov 2013 20:47:54 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 20:47:54 UTC +00:00]]
|
653
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
654
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
655
|
+
[1m[35m (0.0ms)[0m begin transaction
|
656
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
657
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 09 Nov 2013 20:47:54 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 20:47:54 UTC +00:00]]
|
658
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
659
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
660
|
+
Connecting to database specified by database.yml
|
661
|
+
Connecting to database specified by database.yml
|
662
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
663
|
+
Migrating to CreateManufacturers (20131027192625)
|
664
|
+
Migrating to CreateWidgets (20131027192834)
|
665
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
666
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
667
|
+
Connecting to database specified by database.yml
|
668
|
+
[1m[36m (1.5ms)[0m [1mselect sqlite_version(*)[0m
|
669
|
+
[1m[35m (170.8ms)[0m CREATE TABLE "manufacturers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
670
|
+
[1m[36m (164.7ms)[0m [1mCREATE TABLE "widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "manufacturer_id" integer, "name" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
671
|
+
[1m[35m (166.1ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
672
|
+
[1m[36m (155.3ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
673
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
674
|
+
[1m[36m (188.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131027192834')[0m
|
675
|
+
[1m[35m (177.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131027192625')
|
676
|
+
[1m[36m (0.2ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
677
|
+
Connecting to database specified by database.yml
|
678
|
+
Connecting to database specified by database.yml
|
679
|
+
Connecting to database specified by database.yml
|
680
|
+
Connecting to database specified by database.yml
|
681
|
+
Connecting to database specified by database.yml
|
682
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
683
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
684
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
685
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
686
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
687
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
688
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
689
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
690
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
691
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
692
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
693
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
694
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
695
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
696
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
697
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
698
|
+
[1m[36mSQL (5.0ms)[0m [1mINSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 09 Nov 2013 20:59:17 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 20:59:17 UTC +00:00]]
|
699
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
700
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
701
|
+
[1m[35m (0.0ms)[0m begin transaction
|
702
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
703
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 09 Nov 2013 20:59:17 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 20:59:17 UTC +00:00]]
|
704
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
705
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
706
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 09 Nov 2013 20:59:17 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 20:59:17 UTC +00:00]]
|
707
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
708
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
709
|
+
[1m[35m (0.0ms)[0m begin transaction
|
710
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
711
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 09 Nov 2013 20:59:17 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 20:59:17 UTC +00:00]]
|
712
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
713
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
714
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 09 Nov 2013 20:59:17 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 20:59:17 UTC +00:00]]
|
715
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
716
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
717
|
+
[1m[35m (0.0ms)[0m begin transaction
|
718
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
719
|
+
[1m[35m (0.1ms)[0m begin transaction
|
720
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
721
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 09 Nov 2013 20:59:17 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 20:59:17 UTC +00:00]]
|
722
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
723
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
724
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
725
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
726
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 09 Nov 2013 20:59:17 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 20:59:17 UTC +00:00]]
|
727
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
728
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
729
|
+
[1m[35m (0.0ms)[0m begin transaction
|
730
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
731
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 09 Nov 2013 20:59:17 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 20:59:17 UTC +00:00]]
|
732
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
733
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
734
|
+
Connecting to database specified by database.yml
|
735
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
736
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
737
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
738
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
739
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
740
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
741
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
742
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
743
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
744
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
745
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
746
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
747
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
748
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
749
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
750
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
751
|
+
[1m[36mSQL (40.7ms)[0m [1mINSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 09 Nov 2013 21:00:54 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 21:00:54 UTC +00:00]]
|
752
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
753
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
754
|
+
[1m[35m (0.0ms)[0m begin transaction
|
755
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
756
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 09 Nov 2013 21:00:55 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 21:00:55 UTC +00:00]]
|
757
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
758
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
759
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 09 Nov 2013 21:00:55 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 21:00:55 UTC +00:00]]
|
760
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
761
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
762
|
+
[1m[35m (0.0ms)[0m begin transaction
|
763
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
764
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 09 Nov 2013 21:00:55 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 21:00:55 UTC +00:00]]
|
765
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
766
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
767
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 09 Nov 2013 21:00:55 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 21:00:55 UTC +00:00]]
|
768
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
769
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
770
|
+
[1m[35m (0.0ms)[0m begin transaction
|
771
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
772
|
+
[1m[35m (0.1ms)[0m begin transaction
|
773
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
774
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 09 Nov 2013 21:00:55 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 21:00:55 UTC +00:00]]
|
775
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
776
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
777
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
778
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
779
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 09 Nov 2013 21:00:55 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 21:00:55 UTC +00:00]]
|
780
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
781
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
782
|
+
[1m[35m (0.0ms)[0m begin transaction
|
783
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
784
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 09 Nov 2013 21:00:55 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 21:00:55 UTC +00:00]]
|
785
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
786
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
787
|
+
Connecting to database specified by database.yml
|
788
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
789
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
790
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
791
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
792
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
793
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
794
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
795
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
796
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
797
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
798
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
799
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
800
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
801
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
802
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
803
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
804
|
+
[1m[36mSQL (40.5ms)[0m [1mINSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 09 Nov 2013 21:01:45 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 21:01:45 UTC +00:00]]
|
805
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
806
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
807
|
+
[1m[35m (0.0ms)[0m begin transaction
|
808
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
809
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 09 Nov 2013 21:01:45 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 21:01:45 UTC +00:00]]
|
810
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
811
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
812
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 09 Nov 2013 21:01:45 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 21:01:45 UTC +00:00]]
|
813
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
814
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
815
|
+
[1m[35m (0.0ms)[0m begin transaction
|
816
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
817
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 09 Nov 2013 21:01:45 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 21:01:45 UTC +00:00]]
|
818
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
819
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
820
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 09 Nov 2013 21:01:45 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 21:01:45 UTC +00:00]]
|
821
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
822
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
823
|
+
[1m[35m (0.0ms)[0m begin transaction
|
824
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
825
|
+
[1m[35m (0.1ms)[0m begin transaction
|
826
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
827
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 09 Nov 2013 21:01:45 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 21:01:45 UTC +00:00]]
|
828
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
829
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
830
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
831
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
832
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Sat, 09 Nov 2013 21:01:45 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 21:01:45 UTC +00:00]]
|
833
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
834
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
835
|
+
[1m[35m (0.0ms)[0m begin transaction
|
836
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
837
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "widgets" ("created_at", "manufacturer_id", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 09 Nov 2013 21:01:45 UTC +00:00], ["manufacturer_id", nil], ["name", nil], ["updated_at", Sat, 09 Nov 2013 21:01:45 UTC +00:00]]
|
838
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
839
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
840
|
+
Connecting to database specified by database.yml
|
841
|
+
Connecting to database specified by database.yml
|
842
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
843
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
844
|
+
Connecting to database specified by database.yml
|
845
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
846
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
847
|
+
Connecting to database specified by database.yml
|
848
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
849
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
850
|
+
Connecting to database specified by database.yml
|
851
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
852
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
853
|
+
Connecting to database specified by database.yml
|
854
|
+
[1m[36m (1.7ms)[0m [1mselect sqlite_version(*)[0m
|
855
|
+
[1m[35m (177.8ms)[0m CREATE TABLE "manufacturers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
856
|
+
[1m[36m (176.0ms)[0m [1mCREATE TABLE "widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "manufacturer_id" integer, "name" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
857
|
+
[1m[35m (177.2ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
858
|
+
[1m[36m (144.2ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
859
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
860
|
+
[1m[36m (176.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131027192834')[0m
|
861
|
+
[1m[35m (155.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131027192625')
|
862
|
+
[1m[36m (0.2ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
863
|
+
Connecting to database specified by database.yml
|
864
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
865
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
866
|
+
Connecting to database specified by database.yml
|
867
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
868
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
869
|
+
Connecting to database specified by database.yml
|
870
|
+
Connecting to database specified by database.yml
|
871
|
+
[1m[36m (1.9ms)[0m [1mselect sqlite_version(*)[0m
|
872
|
+
[1m[35m (184.4ms)[0m CREATE TABLE "manufacturers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
873
|
+
[1m[36m (165.0ms)[0m [1mCREATE TABLE "widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "manufacturer_id" integer, "name" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
874
|
+
[1m[35m (188.3ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
875
|
+
[1m[36m (166.4ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
876
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
877
|
+
[1m[36m (187.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131027192834')[0m
|
878
|
+
[1m[35m (200.0ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131027192625')
|
879
|
+
[1m[36m (0.2ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
880
|
+
Connecting to database specified by database.yml
|
881
|
+
[1m[36m (1.9ms)[0m [1mselect sqlite_version(*)[0m
|
882
|
+
[1m[35m (189.1ms)[0m CREATE TABLE "manufacturers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
883
|
+
[1m[36m (197.9ms)[0m [1mCREATE TABLE "widgets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "address" varchar(255), "birthdate" date, "first_name" varchar(255), "last_name" varchar(255), "preferred_name" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
884
|
+
[1m[35m (199.4ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
885
|
+
[1m[36m (155.2ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
886
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
887
|
+
[1m[36m (165.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131027192834')[0m
|
888
|
+
[1m[35m (144.5ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131027192625')
|
889
|
+
[1m[36m (0.2ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
890
|
+
Connecting to database specified by database.yml
|
891
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
892
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
893
|
+
[1m[36mSQL (5.7ms)[0m [1mINSERT INTO "widgets" ("address", "birthdate", "created_at", "first_name", "last_name", "preferred_name", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["address", "address-00001"], ["birthdate", Thu, 01 Jan 1970], ["created_at", Sat, 09 Nov 2013 21:19:08 UTC +00:00], ["first_name", "first-name-00001"], ["last_name", "last-name-00001"], ["preferred_name", "preferred-name-00001"], ["updated_at", Sat, 09 Nov 2013 21:19:08 UTC +00:00]]
|
894
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
895
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
896
|
+
Connecting to database specified by database.yml
|
897
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
898
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
899
|
+
Connecting to database specified by database.yml
|
900
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
901
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
902
|
+
Connecting to database specified by database.yml
|
903
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
904
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
905
|
+
[1m[36mSQL (5.6ms)[0m [1mINSERT INTO "widgets" ("address", "birthdate", "created_at", "first_name", "last_name", "preferred_name", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["address", "address-00001"], ["birthdate", Thu, 08 Jun 1989], ["created_at", Sat, 09 Nov 2013 21:27:00 UTC +00:00], ["first_name", "first-name-00001"], ["last_name", "last-name-00001"], ["preferred_name", "preferred-name-00001"], ["updated_at", Sat, 09 Nov 2013 21:27:00 UTC +00:00]]
|
906
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
907
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
908
|
+
Connecting to database specified by database.yml
|
909
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
910
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
911
|
+
[1m[36mSQL (5.6ms)[0m [1mINSERT INTO "widgets" ("address", "birthdate", "created_at", "first_name", "last_name", "preferred_name", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["address", "address-00001"], ["birthdate", Mon, 15 Feb 1999], ["created_at", Sat, 09 Nov 2013 21:27:27 UTC +00:00], ["first_name", "first-name-00001"], ["last_name", "last-name-00001"], ["preferred_name", "preferred-name-00001"], ["updated_at", Sat, 09 Nov 2013 21:27:27 UTC +00:00]]
|
912
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
913
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
914
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "widgets" ("address", "birthdate", "created_at", "first_name", "last_name", "preferred_name", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["address", "address-00002"], ["birthdate", Wed, 21 Sep 2011], ["created_at", Sat, 09 Nov 2013 21:27:27 UTC +00:00], ["first_name", "first-name-00002"], ["last_name", "last-name-00002"], ["preferred_name", "preferred-name-00002"], ["updated_at", Sat, 09 Nov 2013 21:27:27 UTC +00:00]]
|
915
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
916
|
+
[1m[35m (0.2ms)[0m rollback transaction
|
917
|
+
Connecting to database specified by database.yml
|
918
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
919
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
920
|
+
[1m[36mSQL (5.6ms)[0m [1mINSERT INTO "widgets" ("address", "birthdate", "created_at", "first_name", "last_name", "preferred_name", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["address", "address"], ["birthdate", Thu, 01 Jan 1970], ["created_at", Sat, 09 Nov 2013 21:29:55 UTC +00:00], ["first_name", "first-name"], ["last_name", "last-name"], ["preferred_name", "preferred_name"], ["updated_at", Sat, 09 Nov 2013 21:29:55 UTC +00:00]]
|
921
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
922
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "widgets" WHERE "widgets"."address" = 'address'[0m
|
923
|
+
[1m[35mWidget Load (0.2ms)[0m SELECT "widgets".* FROM "widgets" WHERE "widgets"."address" = 'address'
|
924
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "widgets" WHERE "widgets"."birthdate" = '1970-01-01'[0m
|
925
|
+
[1m[35mWidget Load (0.2ms)[0m SELECT "widgets".* FROM "widgets" WHERE "widgets"."birthdate" = '1970-01-01'
|
926
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "widgets" WHERE "widgets"."first_name" = 'first-name'[0m
|
927
|
+
[1m[35mWidget Load (0.2ms)[0m SELECT "widgets".* FROM "widgets" WHERE "widgets"."first_name" = 'first-name'
|
928
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "widgets" WHERE "widgets"."last_name" = 'last-name'[0m
|
929
|
+
[1m[35mWidget Load (0.1ms)[0m SELECT "widgets".* FROM "widgets" WHERE "widgets"."last_name" = 'last-name'
|
930
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "widgets" WHERE "widgets"."preferred_name" = 'preferred_name'[0m
|
931
|
+
[1m[35mWidget Load (0.1ms)[0m SELECT "widgets".* FROM "widgets" WHERE "widgets"."preferred_name" = 'preferred_name'
|
932
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
933
|
+
Connecting to database specified by database.yml
|
934
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
935
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
936
|
+
[1m[36mSQL (5.6ms)[0m [1mINSERT INTO "widgets" ("address", "birthdate", "created_at", "first_name", "last_name", "preferred_name", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["address", "address"], ["birthdate", Thu, 01 Jan 1970], ["created_at", Sat, 09 Nov 2013 21:30:17 UTC +00:00], ["first_name", "first-name"], ["last_name", "last-name"], ["preferred_name", "preferred_name"], ["updated_at", Sat, 09 Nov 2013 21:30:17 UTC +00:00]]
|
937
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
938
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "widgets" WHERE "widgets"."address" = 'address'[0m
|
939
|
+
[1m[35mWidget Load (0.1ms)[0m SELECT "widgets".* FROM "widgets" WHERE "widgets"."address" = 'address'
|
940
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "widgets" WHERE "widgets"."birthdate" = '1970-01-01'[0m
|
941
|
+
[1m[35mWidget Load (0.1ms)[0m SELECT "widgets".* FROM "widgets" WHERE "widgets"."birthdate" = '1970-01-01'
|
942
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "widgets" WHERE "widgets"."first_name" = 'first-name'[0m
|
943
|
+
[1m[35mWidget Load (0.1ms)[0m SELECT "widgets".* FROM "widgets" WHERE "widgets"."first_name" = 'first-name'
|
944
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "widgets" WHERE "widgets"."last_name" = 'last-name'[0m
|
945
|
+
[1m[35mWidget Load (0.1ms)[0m SELECT "widgets".* FROM "widgets" WHERE "widgets"."last_name" = 'last-name'
|
946
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "widgets" WHERE "widgets"."preferred_name" = 'preferred_name'[0m
|
947
|
+
[1m[35mWidget Load (0.1ms)[0m SELECT "widgets".* FROM "widgets" WHERE "widgets"."preferred_name" = 'preferred_name'
|
948
|
+
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
|
949
|
+
Connecting to database specified by database.yml
|
950
|
+
[1m[36m (0.8ms)[0m [1mbegin transaction[0m
|
951
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
952
|
+
[1m[36mSQL (81.8ms)[0m [1mINSERT INTO "widgets" ("address", "birthdate", "created_at", "first_name", "last_name", "preferred_name", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)[0m [["address", "address"], ["birthdate", Thu, 01 Jan 1970], ["created_at", Sat, 09 Nov 2013 21:36:17 UTC +00:00], ["first_name", "first-name"], ["last_name", "last-name"], ["preferred_name", "preferred_name"], ["updated_at", Sat, 09 Nov 2013 21:36:17 UTC +00:00]]
|
953
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
954
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "widgets" WHERE "widgets"."address" = 'address'[0m
|
955
|
+
[1m[35mWidget Load (0.1ms)[0m SELECT "widgets".* FROM "widgets" WHERE "widgets"."address" = 'address'
|
956
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "widgets" WHERE "widgets"."birthdate" = '1970-01-01'[0m
|
957
|
+
[1m[35mWidget Load (0.1ms)[0m SELECT "widgets".* FROM "widgets" WHERE "widgets"."birthdate" = '1970-01-01'
|
958
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "widgets" WHERE "widgets"."first_name" = 'first-name'[0m
|
959
|
+
[1m[35mWidget Load (0.1ms)[0m SELECT "widgets".* FROM "widgets" WHERE "widgets"."first_name" = 'first-name'
|
960
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "widgets" WHERE "widgets"."last_name" = 'last-name'[0m
|
961
|
+
[1m[35mWidget Load (0.1ms)[0m SELECT "widgets".* FROM "widgets" WHERE "widgets"."last_name" = 'last-name'
|
962
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "widgets" WHERE "widgets"."preferred_name" = 'preferred_name'[0m
|
963
|
+
[1m[35mWidget Load (0.1ms)[0m SELECT "widgets".* FROM "widgets" WHERE "widgets"."preferred_name" = 'preferred_name'
|
964
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
@@ -0,0 +1,10 @@
|
|
1
|
+
FactoryGirl.define do
|
2
|
+
factory :widget do
|
3
|
+
sequence(:address) { |n| "address-#{'%05d' % n}" }
|
4
|
+
birthdate { TestHelper.random_date }
|
5
|
+
sequence(:first_name) { |n| "first-name-#{'%05d' % n}" }
|
6
|
+
sequence(:last_name) { |n| "last-name-#{'%05d' % n}" }
|
7
|
+
sequence(:preferred_name) { |n| "preferred-name-#{'%05d' % n}" }
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
@@ -1,12 +1,5 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
3
|
class SimilarityMatchingTest < ActiveSupport::TestCase
|
4
|
-
test 'sample_method true' do
|
5
|
-
assert AttrSimilar::SimilarityMatching.sample_method(true)
|
6
|
-
end
|
7
|
-
|
8
|
-
test 'sample_method false' do
|
9
|
-
assert !AttrSimilar::SimilarityMatching.sample_method(false)
|
10
|
-
end
|
11
4
|
end
|
12
5
|
|
data/test/test_helper.rb
CHANGED
@@ -16,3 +16,15 @@ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
|
16
16
|
if ActiveSupport::TestCase.method_defined?(:fixture_path=)
|
17
17
|
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
|
18
18
|
end
|
19
|
+
|
20
|
+
module TestHelper
|
21
|
+
def self.random_date
|
22
|
+
Date.today - 10000 * rand
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
class ActiveSupport::TestCase
|
27
|
+
include FactoryGirl::Syntax::Methods
|
28
|
+
include TestHelper
|
29
|
+
end
|
30
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: attr_similar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-11-
|
12
|
+
date: 2013-11-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -88,9 +88,12 @@ files:
|
|
88
88
|
- test/dummy/app/models/widget.rb
|
89
89
|
- test/dummy/app/models/manufacturer.rb
|
90
90
|
- test/dummy/app/helpers/application_helper.rb
|
91
|
+
- test/dummy/test/factories/widgets.rb
|
91
92
|
- test/dummy/config.ru
|
93
|
+
- test/dummy/log/development.log
|
92
94
|
- test/dummy/log/test.log
|
93
95
|
- test/dummy/Rakefile
|
96
|
+
- test/dummy/db/development.sqlite3
|
94
97
|
- test/dummy/db/schema.rb
|
95
98
|
- test/dummy/db/migrate/20131027192625_create_manufacturers.rb
|
96
99
|
- test/dummy/db/migrate/20131027192834_create_widgets.rb
|
@@ -152,9 +155,12 @@ test_files:
|
|
152
155
|
- test/dummy/app/models/widget.rb
|
153
156
|
- test/dummy/app/models/manufacturer.rb
|
154
157
|
- test/dummy/app/helpers/application_helper.rb
|
158
|
+
- test/dummy/test/factories/widgets.rb
|
155
159
|
- test/dummy/config.ru
|
160
|
+
- test/dummy/log/development.log
|
156
161
|
- test/dummy/log/test.log
|
157
162
|
- test/dummy/Rakefile
|
163
|
+
- test/dummy/db/development.sqlite3
|
158
164
|
- test/dummy/db/schema.rb
|
159
165
|
- test/dummy/db/migrate/20131027192625_create_manufacturers.rb
|
160
166
|
- test/dummy/db/migrate/20131027192834_create_widgets.rb
|