human_urls 0.1.4.pre.alpha.0 → 0.1.5.pre.alpha.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/human_urls/sluggable.rb +1 -0
- data/lib/human_urls/version.rb +1 -1
- data/test/dummy/log/test.log +402 -0
- data/test/dummy/tmp/generators/db/migrate/20160701172813_add_slug_to_posts.rb +6 -0
- data/test/human_urls/sluggable_test.rb +6 -0
- metadata +3 -3
- data/test/dummy/tmp/generators/db/migrate/20160701154405_add_slug_to_posts.rb +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67c30966a0a04d55f1117a04239575b8d0b0815c
|
4
|
+
data.tar.gz: fdcab52d91dc699adf96cd67cda367119ece9468
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35f983e7d4c000fef4505f29982d2934dce32fce4629bbb54feb328e189e58f9d585ef9f19668aca11e32835ad8cb0b643f40356fef4c967f9bfca1304914f0d
|
7
|
+
data.tar.gz: bb75ff2865b665a51c69869b18ab2f19385de866a44ddd875e7e780c04ad12c5f7561c0c432ba23a795640f3c8de77c2c4a360b53c24418fbb43c2eb64a6fe17
|
data/lib/human_urls/sluggable.rb
CHANGED
data/lib/human_urls/version.rb
CHANGED
data/test/dummy/log/test.log
CHANGED
@@ -5816,3 +5816,405 @@ HumanUrls::SlugMigrationGeneratorTest: test_generator_creates_proper_migration_w
|
|
5816
5816
|
HumanUrls::SlugMigrationGeneratorTest: test_generator_creates_proper_migration
|
5817
5817
|
------------------------------------------------------------------------------
|
5818
5818
|
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
5819
|
+
[1m[36mActiveRecord::SchemaMigration Load (1.7ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5820
|
+
[1m[35m (0.4ms)[0m [1m[35mBEGIN[0m
|
5821
|
+
------------------------------------------------------------------------------
|
5822
|
+
HumanUrls::SlugMigrationGeneratorTest: test_generator_creates_proper_migration
|
5823
|
+
------------------------------------------------------------------------------
|
5824
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
5825
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
5826
|
+
------------------------------------------------------------------------------------------------------------
|
5827
|
+
HumanUrls::SlugMigrationGeneratorTest: test_generator_creates_proper_migration_when_using_custom_slug_column
|
5828
|
+
------------------------------------------------------------------------------------------------------------
|
5829
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
5830
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
5831
|
+
-------------------------
|
5832
|
+
HumanUrlsTest: test_truth
|
5833
|
+
-------------------------
|
5834
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
5835
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
5836
|
+
----------------------------------------------
|
5837
|
+
SluggableTest: test_#to_param_returns_the_slug
|
5838
|
+
----------------------------------------------
|
5839
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
5840
|
+
[1m[36mTaggable Exists (2.9ms)[0m [1m[34mSELECT 1 AS one FROM "taggables" WHERE "taggables"."slug" = $1 LIMIT $2[0m [["slug", "slug"], ["LIMIT", 1]]
|
5841
|
+
[1m[35mSQL (2.6ms)[0m [1m[32mINSERT INTO "taggables" ("slug", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["slug", "slug"], ["created_at", 2016-07-01 17:22:29 UTC], ["updated_at", 2016-07-01 17:22:29 UTC]]
|
5842
|
+
[1m[35m (0.4ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
5843
|
+
[1m[35m (0.5ms)[0m [1m[31mROLLBACK[0m
|
5844
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
5845
|
+
-----------------------------------------------------------------------------------
|
5846
|
+
SluggableTest: test_slug_does_not_update_an_existing_slug_when_source_field_changes
|
5847
|
+
-----------------------------------------------------------------------------------
|
5848
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
5849
|
+
[1m[36mTaggableWGeneratedSlug Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "taggable_w_generated_slugs" WHERE "taggable_w_generated_slugs"."slug" = $1 LIMIT $2[0m [["slug", "my-old-slug"], ["LIMIT", 1]]
|
5850
|
+
[1m[35mSQL (0.7ms)[0m [1m[32mINSERT INTO "taggable_w_generated_slugs" ("title", "slug", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["title", "my-title"], ["slug", "my-old-slug"], ["created_at", 2016-07-01 17:22:29 UTC], ["updated_at", 2016-07-01 17:22:29 UTC]]
|
5851
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
5852
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
5853
|
+
[1m[36mTaggableWGeneratedSlug Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "taggable_w_generated_slugs" WHERE "taggable_w_generated_slugs"."slug" = $1 AND ("taggable_w_generated_slugs"."id" != $2) LIMIT $3[0m [["slug", "my-old-slug"], ["id", 85], ["LIMIT", 1]]
|
5854
|
+
[1m[35mSQL (0.8ms)[0m [1m[33mUPDATE "taggable_w_generated_slugs" SET "title" = $1, "updated_at" = $2 WHERE "taggable_w_generated_slugs"."id" = $3[0m [["title", "Changed Title"], ["updated_at", 2016-07-01 17:22:29 UTC], ["id", 85]]
|
5855
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
5856
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
5857
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
5858
|
+
------------------------------------------------------------------------
|
5859
|
+
SluggableTest: test_slug_properly_formats_string_to_slug_friendly_format
|
5860
|
+
------------------------------------------------------------------------
|
5861
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
5862
|
+
[1m[36mTaggable Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "taggables" WHERE "taggables"."slug" = $1 LIMIT $2[0m [["slug", "this-i-my-slug"], ["LIMIT", 1]]
|
5863
|
+
[1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "taggables" ("slug", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["slug", "this-i-my-slug"], ["created_at", 2016-07-01 17:22:29 UTC], ["updated_at", 2016-07-01 17:22:29 UTC]]
|
5864
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
5865
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
5866
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
5867
|
+
--------------------------------------------------------------------
|
5868
|
+
SluggableTest: test_.sluggify_can_generate_slug_from_given_attribute
|
5869
|
+
--------------------------------------------------------------------
|
5870
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
5871
|
+
[1m[36mTaggableWGeneratedSlug Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "taggable_w_generated_slugs" WHERE "taggable_w_generated_slugs"."slug" = $1 LIMIT $2[0m [["slug", "my-title"], ["LIMIT", 1]]
|
5872
|
+
[1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "taggable_w_generated_slugs" ("title", "slug", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["title", "My Title"], ["slug", "my-title"], ["created_at", 2016-07-01 17:22:29 UTC], ["updated_at", 2016-07-01 17:22:29 UTC]]
|
5873
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
5874
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
5875
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
5876
|
+
------------------------------------------------------------------------------
|
5877
|
+
SluggableTest: test_slug_properly_updates_an_existing_slug_when_auto_generated
|
5878
|
+
------------------------------------------------------------------------------
|
5879
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
5880
|
+
[1m[36mTaggableWGeneratedSlug Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "taggable_w_generated_slugs" WHERE "taggable_w_generated_slugs"."slug" = $1 LIMIT $2[0m [["slug", "my-old-slug"], ["LIMIT", 1]]
|
5881
|
+
[1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "taggable_w_generated_slugs" ("title", "slug", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["title", "my-title"], ["slug", "my-old-slug"], ["created_at", 2016-07-01 17:22:29 UTC], ["updated_at", 2016-07-01 17:22:29 UTC]]
|
5882
|
+
[1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
5883
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
5884
|
+
[1m[36mTaggableWGeneratedSlug Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "taggable_w_generated_slugs" WHERE "taggable_w_generated_slugs"."slug" = $1 AND ("taggable_w_generated_slugs"."id" != $2) LIMIT $3[0m [["slug", "my-new-slug"], ["id", 87], ["LIMIT", 1]]
|
5885
|
+
[1m[35mSQL (0.8ms)[0m [1m[33mUPDATE "taggable_w_generated_slugs" SET "slug" = $1, "updated_at" = $2 WHERE "taggable_w_generated_slugs"."id" = $3[0m [["slug", "my-new-slug"], ["updated_at", 2016-07-01 17:22:29 UTC], ["id", 87]]
|
5886
|
+
[1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
5887
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
5888
|
+
[1m[36mTaggableWGeneratedSlug Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "taggable_w_generated_slugs" WHERE "taggable_w_generated_slugs"."slug" = $1 AND ("taggable_w_generated_slugs"."id" != $2) LIMIT $3[0m [["slug", "my-title"], ["id", 87], ["LIMIT", 1]]
|
5889
|
+
[1m[35mSQL (0.6ms)[0m [1m[33mUPDATE "taggable_w_generated_slugs" SET "slug" = $1, "updated_at" = $2 WHERE "taggable_w_generated_slugs"."id" = $3[0m [["slug", "my-title"], ["updated_at", 2016-07-01 17:22:29 UTC], ["id", 87]]
|
5890
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
5891
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
5892
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
5893
|
+
----------------------------------------------
|
5894
|
+
SluggableTest: test_validates_presence_of_slug
|
5895
|
+
----------------------------------------------
|
5896
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
5897
|
+
[1m[36mTaggable Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "taggables" WHERE "taggables"."slug" = $1 LIMIT $2[0m [["slug", ""], ["LIMIT", 1]]
|
5898
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
|
5899
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
5900
|
+
[1m[36mActiveRecord::SchemaMigration Load (1.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5901
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
5902
|
+
------------------------------------------------------------------------------
|
5903
|
+
HumanUrls::SlugMigrationGeneratorTest: test_generator_creates_proper_migration
|
5904
|
+
------------------------------------------------------------------------------
|
5905
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
5906
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
5907
|
+
------------------------------------------------------------------------------------------------------------
|
5908
|
+
HumanUrls::SlugMigrationGeneratorTest: test_generator_creates_proper_migration_when_using_custom_slug_column
|
5909
|
+
------------------------------------------------------------------------------------------------------------
|
5910
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
5911
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
5912
|
+
-------------------------
|
5913
|
+
HumanUrlsTest: test_truth
|
5914
|
+
-------------------------
|
5915
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
5916
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
5917
|
+
----------------------------------------------
|
5918
|
+
SluggableTest: test_#to_param_returns_the_slug
|
5919
|
+
----------------------------------------------
|
5920
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
5921
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
5922
|
+
--------------------------------------------------------------------
|
5923
|
+
SluggableTest: test_.sluggify_can_generate_slug_from_given_attribute
|
5924
|
+
--------------------------------------------------------------------
|
5925
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
5926
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
5927
|
+
------------------------------------------------------------------------
|
5928
|
+
SluggableTest: test_slug_properly_formats_string_to_slug_friendly_format
|
5929
|
+
------------------------------------------------------------------------
|
5930
|
+
[1m[35m (0.5ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
5931
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
|
5932
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
5933
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
5934
|
+
-----------------------------------------------------------------------------------
|
5935
|
+
SluggableTest: test_slug_does_not_update_an_existing_slug_when_source_field_changes
|
5936
|
+
-----------------------------------------------------------------------------------
|
5937
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
5938
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
|
5939
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
5940
|
+
[1m[35m (1.1ms)[0m [1m[35mBEGIN[0m
|
5941
|
+
------------------------------------------------------------------------------
|
5942
|
+
SluggableTest: test_slug_properly_updates_an_existing_slug_when_auto_generated
|
5943
|
+
------------------------------------------------------------------------------
|
5944
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
5945
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
|
5946
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
5947
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
5948
|
+
----------------------------------------------
|
5949
|
+
SluggableTest: test_validates_presence_of_slug
|
5950
|
+
----------------------------------------------
|
5951
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
5952
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
|
5953
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
5954
|
+
[1m[36mActiveRecord::SchemaMigration Load (1.0ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5955
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
5956
|
+
-------------------------
|
5957
|
+
HumanUrlsTest: test_truth
|
5958
|
+
-------------------------
|
5959
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
5960
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
5961
|
+
------------------------------------------------------------------------------------------------------------
|
5962
|
+
HumanUrls::SlugMigrationGeneratorTest: test_generator_creates_proper_migration_when_using_custom_slug_column
|
5963
|
+
------------------------------------------------------------------------------------------------------------
|
5964
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
5965
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
5966
|
+
------------------------------------------------------------------------------
|
5967
|
+
HumanUrls::SlugMigrationGeneratorTest: test_generator_creates_proper_migration
|
5968
|
+
------------------------------------------------------------------------------
|
5969
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
5970
|
+
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
5971
|
+
----------------------------------------------
|
5972
|
+
SluggableTest: test_#to_param_returns_the_slug
|
5973
|
+
----------------------------------------------
|
5974
|
+
[1m[35m (0.7ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
5975
|
+
[1m[36mTaggable Exists (1.6ms)[0m [1m[34mSELECT 1 AS one FROM "taggables" WHERE "taggables"."slug" = $1 LIMIT $2[0m [["slug", "slug"], ["LIMIT", 1]]
|
5976
|
+
[1m[35mSQL (0.8ms)[0m [1m[32mINSERT INTO "taggables" ("slug", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["slug", "slug"], ["created_at", 2016-07-01 17:23:51 UTC], ["updated_at", 2016-07-01 17:23:51 UTC]]
|
5977
|
+
[1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
5978
|
+
[1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
|
5979
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
5980
|
+
--------------------------------------------------------------------
|
5981
|
+
SluggableTest: test_.sluggify_can_generate_slug_from_given_attribute
|
5982
|
+
--------------------------------------------------------------------
|
5983
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
5984
|
+
[1m[36mTaggableWGeneratedSlug Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "taggable_w_generated_slugs" WHERE "taggable_w_generated_slugs"."slug" = $1 LIMIT $2[0m [["slug", "my-title"], ["LIMIT", 1]]
|
5985
|
+
[1m[35mSQL (0.7ms)[0m [1m[32mINSERT INTO "taggable_w_generated_slugs" ("title", "slug", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["title", "My Title"], ["slug", "my-title"], ["created_at", 2016-07-01 17:23:51 UTC], ["updated_at", 2016-07-01 17:23:51 UTC]]
|
5986
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
5987
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
5988
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
5989
|
+
----------------------------------------------
|
5990
|
+
SluggableTest: test_validates_presence_of_slug
|
5991
|
+
----------------------------------------------
|
5992
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
5993
|
+
[1m[36mTaggable Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "taggables" WHERE "taggables"."slug" = $1 LIMIT $2[0m [["slug", ""], ["LIMIT", 1]]
|
5994
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
|
5995
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
5996
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
5997
|
+
------------------------------------------------------------------------------
|
5998
|
+
SluggableTest: test_slug_properly_updates_an_existing_slug_when_auto_generated
|
5999
|
+
------------------------------------------------------------------------------
|
6000
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6001
|
+
[1m[36mTaggableWGeneratedSlug Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "taggable_w_generated_slugs" WHERE "taggable_w_generated_slugs"."slug" = $1 LIMIT $2[0m [["slug", "my-old-slug"], ["LIMIT", 1]]
|
6002
|
+
[1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "taggable_w_generated_slugs" ("title", "slug", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["title", "my-title"], ["slug", "my-old-slug"], ["created_at", 2016-07-01 17:23:51 UTC], ["updated_at", 2016-07-01 17:23:51 UTC]]
|
6003
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
6004
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6005
|
+
[1m[36mTaggableWGeneratedSlug Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "taggable_w_generated_slugs" WHERE "taggable_w_generated_slugs"."slug" = $1 AND ("taggable_w_generated_slugs"."id" != $2) LIMIT $3[0m [["slug", "my-new-slug"], ["id", 89], ["LIMIT", 1]]
|
6006
|
+
[1m[35mSQL (0.9ms)[0m [1m[33mUPDATE "taggable_w_generated_slugs" SET "slug" = $1, "updated_at" = $2 WHERE "taggable_w_generated_slugs"."id" = $3[0m [["slug", "my-new-slug"], ["updated_at", 2016-07-01 17:23:51 UTC], ["id", 89]]
|
6007
|
+
[1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
6008
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6009
|
+
[1m[36mTaggableWGeneratedSlug Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "taggable_w_generated_slugs" WHERE "taggable_w_generated_slugs"."slug" = $1 AND ("taggable_w_generated_slugs"."id" != $2) LIMIT $3[0m [["slug", "my-title"], ["id", 89], ["LIMIT", 1]]
|
6010
|
+
[1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "taggable_w_generated_slugs" SET "slug" = $1, "updated_at" = $2 WHERE "taggable_w_generated_slugs"."id" = $3[0m [["slug", "my-title"], ["updated_at", 2016-07-01 17:23:51 UTC], ["id", 89]]
|
6011
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
6012
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
6013
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
6014
|
+
-----------------------------------------------------------------------------------
|
6015
|
+
SluggableTest: test_slug_does_not_update_an_existing_slug_when_source_field_changes
|
6016
|
+
-----------------------------------------------------------------------------------
|
6017
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6018
|
+
[1m[36mTaggableWGeneratedSlug Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "taggable_w_generated_slugs" WHERE "taggable_w_generated_slugs"."slug" = $1 LIMIT $2[0m [["slug", "my-old-slug"], ["LIMIT", 1]]
|
6019
|
+
[1m[35mSQL (0.7ms)[0m [1m[32mINSERT INTO "taggable_w_generated_slugs" ("title", "slug", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["title", "my-title"], ["slug", "my-old-slug"], ["created_at", 2016-07-01 17:23:51 UTC], ["updated_at", 2016-07-01 17:23:51 UTC]]
|
6020
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
6021
|
+
[1m[35m (0.4ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6022
|
+
[1m[36mTaggableWGeneratedSlug Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "taggable_w_generated_slugs" WHERE "taggable_w_generated_slugs"."slug" = $1 AND ("taggable_w_generated_slugs"."id" != $2) LIMIT $3[0m [["slug", "my-old-slug"], ["id", 90], ["LIMIT", 1]]
|
6023
|
+
[1m[35mSQL (0.7ms)[0m [1m[33mUPDATE "taggable_w_generated_slugs" SET "title" = $1, "updated_at" = $2 WHERE "taggable_w_generated_slugs"."id" = $3[0m [["title", "Changed Title"], ["updated_at", 2016-07-01 17:23:51 UTC], ["id", 90]]
|
6024
|
+
[1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
6025
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
6026
|
+
[1m[35m (0.4ms)[0m [1m[35mBEGIN[0m
|
6027
|
+
------------------------------------------------------------------------
|
6028
|
+
SluggableTest: test_slug_properly_formats_string_to_slug_friendly_format
|
6029
|
+
------------------------------------------------------------------------
|
6030
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6031
|
+
[1m[36mTaggable Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "taggables" WHERE "taggables"."slug" = $1 LIMIT $2[0m [["slug", "this-i-my-slug"], ["LIMIT", 1]]
|
6032
|
+
[1m[35mSQL (0.7ms)[0m [1m[32mINSERT INTO "taggables" ("slug", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["slug", "this-i-my-slug"], ["created_at", 2016-07-01 17:23:51 UTC], ["updated_at", 2016-07-01 17:23:51 UTC]]
|
6033
|
+
[1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
6034
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
6035
|
+
[1m[36mActiveRecord::SchemaMigration Load (1.0ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6036
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
6037
|
+
-------------------------
|
6038
|
+
HumanUrlsTest: test_truth
|
6039
|
+
-------------------------
|
6040
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
6041
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
6042
|
+
-----------------------------------------------------------------------------------
|
6043
|
+
SluggableTest: test_slug_does_not_update_an_existing_slug_when_source_field_changes
|
6044
|
+
-----------------------------------------------------------------------------------
|
6045
|
+
[1m[35m (0.4ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6046
|
+
[1m[36mTaggableWGeneratedSlug Exists (1.6ms)[0m [1m[34mSELECT 1 AS one FROM "taggable_w_generated_slugs" WHERE "taggable_w_generated_slugs"."slug" = $1 LIMIT $2[0m [["slug", "my-old-slug"], ["LIMIT", 1]]
|
6047
|
+
[1m[35mSQL (2.1ms)[0m [1m[32mINSERT INTO "taggable_w_generated_slugs" ("title", "slug", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["title", "my-title"], ["slug", "my-old-slug"], ["created_at", 2016-07-01 17:27:29 UTC], ["updated_at", 2016-07-01 17:27:29 UTC]]
|
6048
|
+
[1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
6049
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6050
|
+
[1m[36mTaggableWGeneratedSlug Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "taggable_w_generated_slugs" WHERE "taggable_w_generated_slugs"."slug" = $1 AND ("taggable_w_generated_slugs"."id" != $2) LIMIT $3[0m [["slug", "my-old-slug"], ["id", 91], ["LIMIT", 1]]
|
6051
|
+
[1m[35mSQL (0.7ms)[0m [1m[33mUPDATE "taggable_w_generated_slugs" SET "title" = $1, "updated_at" = $2 WHERE "taggable_w_generated_slugs"."id" = $3[0m [["title", "Changed Title"], ["updated_at", 2016-07-01 17:27:29 UTC], ["id", 91]]
|
6052
|
+
[1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
6053
|
+
[1m[35m (0.5ms)[0m [1m[31mROLLBACK[0m
|
6054
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
6055
|
+
------------------------------------------------------------------------
|
6056
|
+
SluggableTest: test_slug_properly_formats_string_to_slug_friendly_format
|
6057
|
+
------------------------------------------------------------------------
|
6058
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6059
|
+
[1m[36mTaggable Exists (1.2ms)[0m [1m[34mSELECT 1 AS one FROM "taggables" WHERE "taggables"."slug" = $1 LIMIT $2[0m [["slug", "this-i-my-slug"], ["LIMIT", 1]]
|
6060
|
+
[1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "taggables" ("slug", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["slug", "this-i-my-slug"], ["created_at", 2016-07-01 17:27:29 UTC], ["updated_at", 2016-07-01 17:27:29 UTC]]
|
6061
|
+
[1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
6062
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
6063
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
6064
|
+
--------------------------------------------------------------------
|
6065
|
+
SluggableTest: test_.sluggify_can_generate_slug_from_given_attribute
|
6066
|
+
--------------------------------------------------------------------
|
6067
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6068
|
+
[1m[36mTaggableWGeneratedSlug Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "taggable_w_generated_slugs" WHERE "taggable_w_generated_slugs"."slug" = $1 LIMIT $2[0m [["slug", "my-title"], ["LIMIT", 1]]
|
6069
|
+
[1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "taggable_w_generated_slugs" ("title", "slug", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["title", "My Title"], ["slug", "my-title"], ["created_at", 2016-07-01 17:27:29 UTC], ["updated_at", 2016-07-01 17:27:29 UTC]]
|
6070
|
+
[1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
6071
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
6072
|
+
[1m[35m (0.4ms)[0m [1m[35mBEGIN[0m
|
6073
|
+
------------------------------------------------------------------------------
|
6074
|
+
SluggableTest: test_slug_properly_updates_an_existing_slug_when_auto_generated
|
6075
|
+
------------------------------------------------------------------------------
|
6076
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6077
|
+
[1m[36mTaggableWGeneratedSlug Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "taggable_w_generated_slugs" WHERE "taggable_w_generated_slugs"."slug" = $1 LIMIT $2[0m [["slug", "my-old-slug"], ["LIMIT", 1]]
|
6078
|
+
[1m[35mSQL (0.7ms)[0m [1m[32mINSERT INTO "taggable_w_generated_slugs" ("title", "slug", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["title", "my-title"], ["slug", "my-old-slug"], ["created_at", 2016-07-01 17:27:29 UTC], ["updated_at", 2016-07-01 17:27:29 UTC]]
|
6079
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
6080
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6081
|
+
[1m[36mTaggableWGeneratedSlug Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "taggable_w_generated_slugs" WHERE "taggable_w_generated_slugs"."slug" = $1 AND ("taggable_w_generated_slugs"."id" != $2) LIMIT $3[0m [["slug", "my-new-slug"], ["id", 93], ["LIMIT", 1]]
|
6082
|
+
[1m[35mSQL (0.7ms)[0m [1m[33mUPDATE "taggable_w_generated_slugs" SET "slug" = $1, "updated_at" = $2 WHERE "taggable_w_generated_slugs"."id" = $3[0m [["slug", "my-new-slug"], ["updated_at", 2016-07-01 17:27:29 UTC], ["id", 93]]
|
6083
|
+
[1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
6084
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6085
|
+
[1m[36mTaggableWGeneratedSlug Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "taggable_w_generated_slugs" WHERE "taggable_w_generated_slugs"."slug" = $1 AND ("taggable_w_generated_slugs"."id" != $2) LIMIT $3[0m [["slug", "my-title"], ["id", 93], ["LIMIT", 1]]
|
6086
|
+
[1m[35mSQL (0.6ms)[0m [1m[33mUPDATE "taggable_w_generated_slugs" SET "slug" = $1, "updated_at" = $2 WHERE "taggable_w_generated_slugs"."id" = $3[0m [["slug", "my-title"], ["updated_at", 2016-07-01 17:27:29 UTC], ["id", 93]]
|
6087
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
6088
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
6089
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
6090
|
+
------------------------------------------------
|
6091
|
+
SluggableTest: test_validates_uniqueness_of_slug
|
6092
|
+
------------------------------------------------
|
6093
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6094
|
+
[1m[36mTaggable Exists (0.9ms)[0m [1m[34mSELECT 1 AS one FROM "taggables" WHERE "taggables"."slug" = $1 LIMIT $2[0m [["slug", "test-slug"], ["LIMIT", 1]]
|
6095
|
+
[1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "taggables" ("slug", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["slug", "test-slug"], ["created_at", 2016-07-01 17:27:29 UTC], ["updated_at", 2016-07-01 17:27:29 UTC]]
|
6096
|
+
[1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
6097
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6098
|
+
[1m[36mTaggable Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "taggables" WHERE "taggables"."slug" = $1 LIMIT $2[0m [["slug", "test-slug"], ["LIMIT", 1]]
|
6099
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
|
6100
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
6101
|
+
[1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
|
6102
|
+
----------------------------------------------
|
6103
|
+
SluggableTest: test_validates_presence_of_slug
|
6104
|
+
----------------------------------------------
|
6105
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6106
|
+
[1m[36mTaggable Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "taggables" WHERE "taggables"."slug" = $1 LIMIT $2[0m [["slug", ""], ["LIMIT", 1]]
|
6107
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
|
6108
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
6109
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
6110
|
+
----------------------------------------------
|
6111
|
+
SluggableTest: test_#to_param_returns_the_slug
|
6112
|
+
----------------------------------------------
|
6113
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6114
|
+
[1m[36mTaggable Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "taggables" WHERE "taggables"."slug" = $1 LIMIT $2[0m [["slug", "slug"], ["LIMIT", 1]]
|
6115
|
+
[1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "taggables" ("slug", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["slug", "slug"], ["created_at", 2016-07-01 17:27:29 UTC], ["updated_at", 2016-07-01 17:27:29 UTC]]
|
6116
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
6117
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
6118
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
6119
|
+
------------------------------------------------------------------------------
|
6120
|
+
HumanUrls::SlugMigrationGeneratorTest: test_generator_creates_proper_migration
|
6121
|
+
------------------------------------------------------------------------------
|
6122
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
6123
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
6124
|
+
------------------------------------------------------------------------------------------------------------
|
6125
|
+
HumanUrls::SlugMigrationGeneratorTest: test_generator_creates_proper_migration_when_using_custom_slug_column
|
6126
|
+
------------------------------------------------------------------------------------------------------------
|
6127
|
+
[1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
|
6128
|
+
[1m[36mActiveRecord::SchemaMigration Load (1.0ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
6129
|
+
[1m[35m (0.4ms)[0m [1m[35mBEGIN[0m
|
6130
|
+
------------------------------------------------------------------------------
|
6131
|
+
HumanUrls::SlugMigrationGeneratorTest: test_generator_creates_proper_migration
|
6132
|
+
------------------------------------------------------------------------------
|
6133
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
6134
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
6135
|
+
------------------------------------------------------------------------------------------------------------
|
6136
|
+
HumanUrls::SlugMigrationGeneratorTest: test_generator_creates_proper_migration_when_using_custom_slug_column
|
6137
|
+
------------------------------------------------------------------------------------------------------------
|
6138
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
6139
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
6140
|
+
------------------------------------------------
|
6141
|
+
SluggableTest: test_validates_uniqueness_of_slug
|
6142
|
+
------------------------------------------------
|
6143
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6144
|
+
[1m[36mTaggable Exists (1.6ms)[0m [1m[34mSELECT 1 AS one FROM "taggables" WHERE "taggables"."slug" = $1 LIMIT $2[0m [["slug", "test-slug"], ["LIMIT", 1]]
|
6145
|
+
[1m[35mSQL (0.8ms)[0m [1m[32mINSERT INTO "taggables" ("slug", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["slug", "test-slug"], ["created_at", 2016-07-01 17:28:13 UTC], ["updated_at", 2016-07-01 17:28:13 UTC]]
|
6146
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
6147
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6148
|
+
[1m[36mTaggable Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "taggables" WHERE "taggables"."slug" = $1 LIMIT $2[0m [["slug", "test-slug"], ["LIMIT", 1]]
|
6149
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
|
6150
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
6151
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
6152
|
+
--------------------------------------------------------------------
|
6153
|
+
SluggableTest: test_.sluggify_can_generate_slug_from_given_attribute
|
6154
|
+
--------------------------------------------------------------------
|
6155
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6156
|
+
[1m[36mTaggableWGeneratedSlug Exists (1.4ms)[0m [1m[34mSELECT 1 AS one FROM "taggable_w_generated_slugs" WHERE "taggable_w_generated_slugs"."slug" = $1 LIMIT $2[0m [["slug", "my-title"], ["LIMIT", 1]]
|
6157
|
+
[1m[35mSQL (0.7ms)[0m [1m[32mINSERT INTO "taggable_w_generated_slugs" ("title", "slug", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["title", "My Title"], ["slug", "my-title"], ["created_at", 2016-07-01 17:28:13 UTC], ["updated_at", 2016-07-01 17:28:13 UTC]]
|
6158
|
+
[1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
6159
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
6160
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
6161
|
+
----------------------------------------------
|
6162
|
+
SluggableTest: test_validates_presence_of_slug
|
6163
|
+
----------------------------------------------
|
6164
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6165
|
+
[1m[36mTaggable Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "taggables" WHERE "taggables"."slug" = $1 LIMIT $2[0m [["slug", ""], ["LIMIT", 1]]
|
6166
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK TO SAVEPOINT active_record_1[0m
|
6167
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
6168
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
6169
|
+
------------------------------------------------------------------------------
|
6170
|
+
SluggableTest: test_slug_properly_updates_an_existing_slug_when_auto_generated
|
6171
|
+
------------------------------------------------------------------------------
|
6172
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6173
|
+
[1m[36mTaggableWGeneratedSlug Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "taggable_w_generated_slugs" WHERE "taggable_w_generated_slugs"."slug" = $1 LIMIT $2[0m [["slug", "my-old-slug"], ["LIMIT", 1]]
|
6174
|
+
[1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "taggable_w_generated_slugs" ("title", "slug", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["title", "my-title"], ["slug", "my-old-slug"], ["created_at", 2016-07-01 17:28:13 UTC], ["updated_at", 2016-07-01 17:28:13 UTC]]
|
6175
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
6176
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6177
|
+
[1m[36mTaggableWGeneratedSlug Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "taggable_w_generated_slugs" WHERE "taggable_w_generated_slugs"."slug" = $1 AND ("taggable_w_generated_slugs"."id" != $2) LIMIT $3[0m [["slug", "my-new-slug"], ["id", 95], ["LIMIT", 1]]
|
6178
|
+
[1m[35mSQL (0.9ms)[0m [1m[33mUPDATE "taggable_w_generated_slugs" SET "slug" = $1, "updated_at" = $2 WHERE "taggable_w_generated_slugs"."id" = $3[0m [["slug", "my-new-slug"], ["updated_at", 2016-07-01 17:28:13 UTC], ["id", 95]]
|
6179
|
+
[1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
6180
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6181
|
+
[1m[36mTaggableWGeneratedSlug Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "taggable_w_generated_slugs" WHERE "taggable_w_generated_slugs"."slug" = $1 AND ("taggable_w_generated_slugs"."id" != $2) LIMIT $3[0m [["slug", "my-title"], ["id", 95], ["LIMIT", 1]]
|
6182
|
+
[1m[35mSQL (0.6ms)[0m [1m[33mUPDATE "taggable_w_generated_slugs" SET "slug" = $1, "updated_at" = $2 WHERE "taggable_w_generated_slugs"."id" = $3[0m [["slug", "my-title"], ["updated_at", 2016-07-01 17:28:13 UTC], ["id", 95]]
|
6183
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
6184
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
6185
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
6186
|
+
------------------------------------------------------------------------
|
6187
|
+
SluggableTest: test_slug_properly_formats_string_to_slug_friendly_format
|
6188
|
+
------------------------------------------------------------------------
|
6189
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6190
|
+
[1m[36mTaggable Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "taggables" WHERE "taggables"."slug" = $1 LIMIT $2[0m [["slug", "this-i-my-slug"], ["LIMIT", 1]]
|
6191
|
+
[1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "taggables" ("slug", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["slug", "this-i-my-slug"], ["created_at", 2016-07-01 17:28:13 UTC], ["updated_at", 2016-07-01 17:28:13 UTC]]
|
6192
|
+
[1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
6193
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
6194
|
+
[1m[35m (0.3ms)[0m [1m[35mBEGIN[0m
|
6195
|
+
-----------------------------------------------------------------------------------
|
6196
|
+
SluggableTest: test_slug_does_not_update_an_existing_slug_when_source_field_changes
|
6197
|
+
-----------------------------------------------------------------------------------
|
6198
|
+
[1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6199
|
+
[1m[36mTaggableWGeneratedSlug Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "taggable_w_generated_slugs" WHERE "taggable_w_generated_slugs"."slug" = $1 LIMIT $2[0m [["slug", "my-old-slug"], ["LIMIT", 1]]
|
6200
|
+
[1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "taggable_w_generated_slugs" ("title", "slug", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["title", "my-title"], ["slug", "my-old-slug"], ["created_at", 2016-07-01 17:28:13 UTC], ["updated_at", 2016-07-01 17:28:13 UTC]]
|
6201
|
+
[1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
6202
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6203
|
+
[1m[36mTaggableWGeneratedSlug Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "taggable_w_generated_slugs" WHERE "taggable_w_generated_slugs"."slug" = $1 AND ("taggable_w_generated_slugs"."id" != $2) LIMIT $3[0m [["slug", "my-old-slug"], ["id", 96], ["LIMIT", 1]]
|
6204
|
+
[1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "taggable_w_generated_slugs" SET "title" = $1, "updated_at" = $2 WHERE "taggable_w_generated_slugs"."id" = $3[0m [["title", "Changed Title"], ["updated_at", 2016-07-01 17:28:13 UTC], ["id", 96]]
|
6205
|
+
[1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
6206
|
+
[1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
|
6207
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
6208
|
+
----------------------------------------------
|
6209
|
+
SluggableTest: test_#to_param_returns_the_slug
|
6210
|
+
----------------------------------------------
|
6211
|
+
[1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
6212
|
+
[1m[36mTaggable Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "taggables" WHERE "taggables"."slug" = $1 LIMIT $2[0m [["slug", "slug"], ["LIMIT", 1]]
|
6213
|
+
[1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "taggables" ("slug", "created_at", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["slug", "slug"], ["created_at", 2016-07-01 17:28:13 UTC], ["updated_at", 2016-07-01 17:28:13 UTC]]
|
6214
|
+
[1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
6215
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
6216
|
+
[1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
|
6217
|
+
-------------------------
|
6218
|
+
HumanUrlsTest: test_truth
|
6219
|
+
-------------------------
|
6220
|
+
[1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
|
@@ -20,6 +20,12 @@ class SluggableTest < ActiveSupport::TestCase
|
|
20
20
|
assert_match(/Validation failed: Slug can't be blank/, exp.message)
|
21
21
|
end
|
22
22
|
|
23
|
+
test "validates uniqueness of slug" do
|
24
|
+
Taggable.create!(slug: 'test-slug')
|
25
|
+
exp = assert_raises { Taggable.create!(slug: 'test-slug') }
|
26
|
+
assert_match(/Validation failed: Slug has already been taken/, exp.message)
|
27
|
+
end
|
28
|
+
|
23
29
|
test "slug properly formats string to slug friendly format" do
|
24
30
|
taggable = Taggable.create!(slug: "This i$ my SLUG")
|
25
31
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: human_urls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5.pre.alpha.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Klina
|
@@ -109,7 +109,7 @@ files:
|
|
109
109
|
- test/dummy/public/422.html
|
110
110
|
- test/dummy/public/500.html
|
111
111
|
- test/dummy/public/favicon.ico
|
112
|
-
- test/dummy/tmp/generators/db/migrate/
|
112
|
+
- test/dummy/tmp/generators/db/migrate/20160701172813_add_slug_to_posts.rb
|
113
113
|
- test/human_urls/sluggable_test.rb
|
114
114
|
- test/human_urls_test.rb
|
115
115
|
- test/lib/generators/human_urls/slug_migration_generator_test.rb
|
@@ -177,7 +177,7 @@ test_files:
|
|
177
177
|
- test/dummy/public/500.html
|
178
178
|
- test/dummy/public/favicon.ico
|
179
179
|
- test/dummy/Rakefile
|
180
|
-
- test/dummy/tmp/generators/db/migrate/
|
180
|
+
- test/dummy/tmp/generators/db/migrate/20160701172813_add_slug_to_posts.rb
|
181
181
|
- test/human_urls/sluggable_test.rb
|
182
182
|
- test/human_urls_test.rb
|
183
183
|
- test/lib/generators/human_urls/slug_migration_generator_test.rb
|