serializer 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. data/README.rdoc +8 -1
  2. data/lib/serializer/version.rb +1 -1
  3. data/lib/serializer.rb +4 -1
  4. data/test/dummy/app/models/user.rb +1 -0
  5. data/test/dummy/app/views/users/_form.html.erb +10 -0
  6. data/test/dummy/db/development.sqlite3 +0 -0
  7. data/test/dummy/db/test.sqlite3 +0 -0
  8. data/test/dummy/log/development.log +171 -0
  9. data/test/dummy/log/test.log +423 -0
  10. data/test/dummy/test/integration/user_create_test.rb +1 -1
  11. data/test/dummy/test/integration/user_update_test.rb +1 -1
  12. data/test/dummy/test/unit/user_test.rb +13 -2
  13. data/test/dummy/tmp/cache/assets/CAA/620/sprockets%2F87b209c0c9da28094a8d5581a21262c6 +0 -0
  14. data/test/dummy/tmp/cache/assets/CDF/070/sprockets%2F70e3c8a3916622c17858d520dcee0d92 +0 -0
  15. data/test/dummy/tmp/cache/assets/CF0/1D0/sprockets%2F6fc757c2c8329244ca95d6909865bbc2 +0 -0
  16. data/test/dummy/tmp/cache/assets/CF7/670/sprockets%2F00b214e322c484fcc1555dafaa240947 +9288 -0
  17. data/test/dummy/tmp/cache/assets/CFB/150/sprockets%2Ff5209763c82e66ecdff0f9583166f557 +378 -0
  18. data/test/dummy/tmp/cache/assets/D06/B40/sprockets%2F25fca4643219052b0d5c66cf2c71f72f +0 -0
  19. data/test/dummy/tmp/cache/assets/D11/430/sprockets%2F25ea8d6063b1eb98361b1196f2fce807 +10 -0
  20. data/test/dummy/tmp/cache/assets/D11/D20/sprockets%2Fcac21eac42152981882bf9e489316af4 +61 -0
  21. data/test/dummy/tmp/cache/assets/D24/5A0/sprockets%2F3a89b583dd80975d1e0968e730de5bc9 +0 -0
  22. data/test/dummy/tmp/cache/assets/D2F/290/sprockets%2Fd5c244ec777cb5719f86d085df9f8816 +394 -0
  23. data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  24. data/test/dummy/tmp/cache/assets/D46/650/sprockets%2Ff56253b5f374fff1a33fbbc9881c9124 +0 -0
  25. data/test/dummy/tmp/cache/assets/D54/ED0/sprockets%2F71c9fa01091d432b131da3bb73faf3d4 +86 -0
  26. data/test/dummy/tmp/cache/assets/D6B/5D0/sprockets%2F48da0deeef45ff0cac611596e0774114 +9272 -0
  27. data/test/dummy/tmp/cache/assets/D73/220/sprockets%2F3dbc0a37f98fb43ec819b85a64d32c55 +10 -0
  28. data/test/dummy/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384 +9645 -0
  29. data/test/dummy/tmp/cache/assets/DA7/530/sprockets%2Fe36b8fcf5914a3a6bf058abfe7367b19 +0 -0
  30. data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  31. metadata +43 -13
@@ -823,3 +823,426 @@ Completed 302 Found in 10ms
823
823
  Processing by MainController#index as HTML
824
824
  Rendered main/index.html.erb within layouts/application (17.0ms)
825
825
  Completed 200 OK in 114ms (Views: 99.0ms | ActiveRecord: 0.0ms)
826
+ Processing by MainController#index as HTML
827
+ Rendered main/index.html.erb within layouts/application (2.6ms)
828
+ Completed 200 OK in 17ms (Views: 16.4ms | ActiveRecord: 0.0ms)
829
+ Fixture Delete (0.6ms) DELETE FROM "users"
830
+ Fixture Insert (0.2ms) INSERT INTO "users" ("name", "email", "settings", "created_at", "updated_at", "id") VALUES ('Kevin', 'info@example.com', '---
831
+ :fb_share: true
832
+ :tw_share: true
833
+ ', '2011-12-03 01:52:33', '2011-12-03 01:52:33', 593363170)
834
+ Fixture Insert (0.0ms) INSERT INTO "users" ("name", "email", "created_at", "updated_at", "id") VALUES ('Kevin', 'info@example.com', '2011-12-03 01:52:33', '2011-12-03 01:52:33', 815823836)
835
+
836
+
837
+ Started GET "/users/new" for 127.0.0.1 at 2011-12-02 17:52:33 -0800
838
+ Processing by UsersController#new as HTML
839
+ Rendered users/_form.html.erb (11.7ms)
840
+ Completed 200 OK in 21ms (Views: 19.9ms | ActiveRecord: 0.0ms)
841
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 593363170]]
842
+
843
+
844
+ Started POST "/users" for 127.0.0.1 at 2011-12-02 17:52:33 -0800
845
+ Processing by UsersController#create as HTML
846
+ Parameters: {"name"=>"Kevin", "email"=>"info@example.com", "fb_share"=>"0", "tw_share"=>"0"}
847
+  (0.1ms) SAVEPOINT active_record_1
848
+ SQL (3.7ms) INSERT INTO "users" ("created_at", "email", "name", "settings", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Sat, 03 Dec 2011 01:52:33 UTC +00:00], ["email", nil], ["name", nil], ["settings", "--- {}\n"], ["updated_at", Sat, 03 Dec 2011 01:52:33 UTC +00:00]]
849
+  (0.1ms) RELEASE SAVEPOINT active_record_1
850
+ Redirected to http://www.example.com/users/815823837
851
+ Completed 302 Found in 15ms
852
+
853
+
854
+ Started GET "/users/815823837" for 127.0.0.1 at 2011-12-02 17:52:33 -0800
855
+ Processing by UsersController#show as HTML
856
+ Parameters: {"id"=>"815823837"}
857
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "815823837"]]
858
+ Completed 200 OK in 5ms (Views: 3.4ms | ActiveRecord: 0.1ms)
859
+  (0.0ms) SAVEPOINT active_record_1
860
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "name", "settings", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Sat, 03 Dec 2011 01:52:33 UTC +00:00], ["email", "kevin@ksylvest.com"], ["name", "Kevin"], ["settings", "--- {}\n"], ["updated_at", Sat, 03 Dec 2011 01:52:33 UTC +00:00]]
861
+  (0.0ms) RELEASE SAVEPOINT active_record_1
862
+  (0.0ms) SAVEPOINT active_record_1
863
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "name", "settings", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Sat, 03 Dec 2011 01:52:33 UTC +00:00], ["email", "kevin@ksylvest.com"], ["name", "Kevin"], ["settings", "---\n:fb_share: false\n:tw_share: false\n"], ["updated_at", Sat, 03 Dec 2011 01:52:33 UTC +00:00]]
864
+  (0.0ms) RELEASE SAVEPOINT active_record_1
865
+  (0.0ms) SAVEPOINT active_record_1
866
+  (0.3ms) UPDATE "users" SET "updated_at" = '2011-12-03 01:52:33.618061', "settings" = '---
867
+ :fb_share: true
868
+ :tw_share: true
869
+ ' WHERE "users"."id" = 815823837
870
+  (0.0ms) RELEASE SAVEPOINT active_record_1
871
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 815823836]]
872
+  (0.0ms) SAVEPOINT active_record_1
873
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "email", "name", "settings", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Sat, 03 Dec 2011 01:52:33 UTC +00:00], ["email", "kevin@ksylvest.com"], ["name", "Kevin"], ["settings", "---\n:fb_share: true\n:tw_share: true\n"], ["updated_at", Sat, 03 Dec 2011 01:52:33 UTC +00:00]]
874
+  (0.0ms) RELEASE SAVEPOINT active_record_1
875
+  (0.0ms) SAVEPOINT active_record_1
876
+  (0.3ms) UPDATE "users" SET "updated_at" = '2011-12-03 01:52:33.622720', "settings" = '---
877
+ :fb_share: false
878
+ :tw_share: false
879
+ ' WHERE "users"."id" = 815823837
880
+  (0.0ms) RELEASE SAVEPOINT active_record_1
881
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 593363170]]
882
+
883
+
884
+ Started GET "/users/593363170/edit" for 127.0.0.1 at 2011-12-02 17:52:33 -0800
885
+ Processing by UsersController#edit as HTML
886
+ Parameters: {"id"=>"593363170"}
887
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "593363170"]]
888
+ Rendered users/_form.html.erb (2.6ms)
889
+ Completed 200 OK in 7ms (Views: 6.0ms | ActiveRecord: 0.1ms)
890
+
891
+
892
+ Started POST "/users" for 127.0.0.1 at 2011-12-02 17:52:33 -0800
893
+ Processing by UsersController#create as HTML
894
+ Parameters: {"name"=>"Kevin", "email"=>"info@example.com", "fb_share"=>"0", "tw_share"=>"0"}
895
+  (0.1ms) SAVEPOINT active_record_1
896
+ SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "name", "settings", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Sat, 03 Dec 2011 01:52:33 UTC +00:00], ["email", nil], ["name", nil], ["settings", "--- {}\n"], ["updated_at", Sat, 03 Dec 2011 01:52:33 UTC +00:00]]
897
+  (0.0ms) RELEASE SAVEPOINT active_record_1
898
+ Redirected to http://www.example.com/users/815823837
899
+ Completed 302 Found in 4ms
900
+
901
+
902
+ Started GET "/users/815823837" for 127.0.0.1 at 2011-12-02 17:52:33 -0800
903
+ Processing by UsersController#show as HTML
904
+ Parameters: {"id"=>"815823837"}
905
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "815823837"]]
906
+ Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)
907
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 593363170]]
908
+  (0.1ms) SELECT COUNT(*) FROM "users"
909
+ Processing by UsersController#create as HTML
910
+ Parameters: {"user"=>{"id"=>"593363170", "name"=>"Kevin", "email"=>"info@example.com", "settings"=>{"fb_share"=>true, "tw_share"=>true}, "created_at"=>"2011-12-03 01:52:33 UTC", "updated_at"=>"2011-12-03 01:52:33 UTC"}}
911
+ WARNING: Can't mass-assign protected attributes: id
912
+  (0.1ms) SAVEPOINT active_record_1
913
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "name", "settings", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Sat, 03 Dec 2011 01:52:33 UTC +00:00], ["email", "info@example.com"], ["name", "Kevin"], ["settings", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nfb_share: true\ntw_share: true\n"], ["updated_at", Sat, 03 Dec 2011 01:52:33 UTC +00:00]]
914
+  (0.0ms) RELEASE SAVEPOINT active_record_1
915
+ Redirected to http://test.host/users/815823837
916
+ Completed 302 Found in 5ms
917
+  (0.1ms) SELECT COUNT(*) FROM "users"
918
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 593363170]]
919
+  (0.1ms) SELECT COUNT(*) FROM "users"
920
+ Processing by UsersController#destroy as HTML
921
+ Parameters: {"id"=>"593363170"}
922
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "593363170"]]
923
+  (0.0ms) SAVEPOINT active_record_1
924
+ SQL (0.2ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 593363170]]
925
+  (0.0ms) RELEASE SAVEPOINT active_record_1
926
+ Redirected to http://test.host/users
927
+ Completed 302 Found in 3ms
928
+  (0.1ms) SELECT COUNT(*) FROM "users" 
929
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 593363170]]
930
+ Processing by UsersController#edit as HTML
931
+ Parameters: {"id"=>"593363170"}
932
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "593363170"]]
933
+ Rendered users/_form.html.erb (2.9ms)
934
+ Completed 200 OK in 7ms (Views: 5.7ms | ActiveRecord: 0.1ms)
935
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 593363170]]
936
+ Processing by UsersController#index as HTML
937
+ User Load (0.1ms) SELECT "users".* FROM "users" 
938
+ Completed 200 OK in 7ms (Views: 6.2ms | ActiveRecord: 0.1ms)
939
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 593363170]]
940
+ Processing by UsersController#new as HTML
941
+ Rendered users/_form.html.erb (2.5ms)
942
+ Completed 200 OK in 4ms (Views: 4.0ms | ActiveRecord: 0.0ms)
943
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 593363170]]
944
+ Processing by UsersController#show as HTML
945
+ Parameters: {"id"=>"593363170"}
946
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "593363170"]]
947
+ Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)
948
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 593363170]]
949
+ Processing by UsersController#update as HTML
950
+ Parameters: {"user"=>{"id"=>"593363170", "name"=>"Kevin", "email"=>"info@example.com", "settings"=>{"fb_share"=>true, "tw_share"=>true}, "created_at"=>"2011-12-03 01:52:33 UTC", "updated_at"=>"2011-12-03 01:52:33 UTC"}, "id"=>"593363170"}
951
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "593363170"]]
952
+ WARNING: Can't mass-assign protected attributes: id
953
+  (0.1ms) SAVEPOINT active_record_1
954
+  (0.3ms) UPDATE "users" SET "settings" = '--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess
955
+ fb_share: true
956
+ tw_share: true
957
+ ', "updated_at" = '2011-12-03 01:52:33.736043' WHERE "users"."id" = 593363170
958
+  (0.0ms) RELEASE SAVEPOINT active_record_1
959
+ Redirected to http://test.host/users/593363170
960
+ Completed 302 Found in 5ms
961
+ Processing by MainController#index as HTML
962
+ Rendered main/index.html.erb within layouts/application (1.9ms)
963
+ Completed 200 OK in 10ms (Views: 10.1ms | ActiveRecord: 0.0ms)
964
+ Fixture Delete (0.3ms) DELETE FROM "users"
965
+ Fixture Insert (0.2ms) INSERT INTO "users" ("name", "email", "settings", "created_at", "updated_at", "id") VALUES ('Kevin', 'info@example.com', '---
966
+ :fb_share: true
967
+ :tw_share: true
968
+ ', '2011-12-03 02:00:33', '2011-12-03 02:00:33', 593363170)
969
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "email", "created_at", "updated_at", "id") VALUES ('Kevin', 'info@example.com', '2011-12-03 02:00:33', '2011-12-03 02:00:33', 815823836)
970
+
971
+
972
+ Started GET "/users/new" for 127.0.0.1 at 2011-12-02 18:00:33 -0800
973
+ Processing by UsersController#new as HTML
974
+ Rendered users/_form.html.erb (9.9ms)
975
+ Completed 200 OK in 17ms (Views: 16.1ms | ActiveRecord: 0.0ms)
976
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 593363170]]
977
+
978
+
979
+ Started POST "/users" for 127.0.0.1 at 2011-12-02 18:00:33 -0800
980
+ Processing by UsersController#create as HTML
981
+ Parameters: {"name"=>"Kevin", "email"=>"info@example.com", "fb_share"=>"0", "tw_share"=>"0", "tumblr_share"=>"false"}
982
+  (0.0ms) SAVEPOINT active_record_1
983
+ SQL (1.6ms) INSERT INTO "users" ("created_at", "email", "name", "settings", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Sat, 03 Dec 2011 02:00:33 UTC +00:00], ["email", nil], ["name", nil], ["settings", "--- {}\n"], ["updated_at", Sat, 03 Dec 2011 02:00:33 UTC +00:00]]
984
+  (0.0ms) RELEASE SAVEPOINT active_record_1
985
+ Redirected to http://www.example.com/users/815823837
986
+ Completed 302 Found in 9ms
987
+
988
+
989
+ Started GET "/users/815823837" for 127.0.0.1 at 2011-12-02 18:00:33 -0800
990
+ Processing by UsersController#show as HTML
991
+ Parameters: {"id"=>"815823837"}
992
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "815823837"]]
993
+ Completed 200 OK in 4ms (Views: 2.8ms | ActiveRecord: 0.1ms)
994
+  (0.0ms) SAVEPOINT active_record_1
995
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "name", "settings", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Sat, 03 Dec 2011 02:00:33 UTC +00:00], ["email", "kevin@ksylvest.com"], ["name", "Kevin"], ["settings", "--- {}\n"], ["updated_at", Sat, 03 Dec 2011 02:00:33 UTC +00:00]]
996
+  (0.0ms) RELEASE SAVEPOINT active_record_1
997
+  (0.0ms) SAVEPOINT active_record_1
998
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "email", "name", "settings", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Sat, 03 Dec 2011 02:00:33 UTC +00:00], ["email", "kevin@ksylvest.com"], ["name", "Kevin"], ["settings", "---\n:fb_share: false\n:tw_share: false\n:tumblr_share: false\n"], ["updated_at", Sat, 03 Dec 2011 02:00:33 UTC +00:00]]
999
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1000
+  (0.0ms) SAVEPOINT active_record_1
1001
+  (0.3ms) UPDATE "users" SET "updated_at" = '2011-12-03 02:00:33.142996', "settings" = '---
1002
+ :fb_share: true
1003
+ :tw_share: true
1004
+ :tumblr_share: true
1005
+ ' WHERE "users"."id" = 815823837
1006
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1007
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 815823836]]
1008
+  (0.0ms) SAVEPOINT active_record_1
1009
+  (0.2ms) UPDATE "users" SET "updated_at" = '2011-12-03 02:00:33.146161', "settings" = '---
1010
+ :fb_share: false
1011
+ :tw_share: false
1012
+ :tumblr_share: false
1013
+ ' WHERE "users"."id" = 815823836
1014
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1015
+  (0.0ms) SAVEPOINT active_record_1
1016
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "name", "settings", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Sat, 03 Dec 2011 02:00:33 UTC +00:00], ["email", "kevin@ksylvest.com"], ["name", "Kevin"], ["settings", "---\n:fb_share: true\n:tw_share: true\n:tumblr_share: true\n"], ["updated_at", Sat, 03 Dec 2011 02:00:33 UTC +00:00]]
1017
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1018
+  (0.0ms) SAVEPOINT active_record_1
1019
+  (0.3ms) UPDATE "users" SET "updated_at" = '2011-12-03 02:00:33.177415', "settings" = '---
1020
+ :fb_share: false
1021
+ :tw_share: false
1022
+ :tumblr_share: true
1023
+ ' WHERE "users"."id" = 815823837
1024
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1025
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 593363170]]
1026
+
1027
+
1028
+ Started GET "/users/593363170/edit" for 127.0.0.1 at 2011-12-02 18:00:33 -0800
1029
+ Processing by UsersController#edit as HTML
1030
+ Parameters: {"id"=>"593363170"}
1031
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "593363170"]]
1032
+ Rendered users/_form.html.erb (3.3ms)
1033
+ Completed 200 OK in 7ms (Views: 6.1ms | ActiveRecord: 0.1ms)
1034
+
1035
+
1036
+ Started POST "/users" for 127.0.0.1 at 2011-12-02 18:00:33 -0800
1037
+ Processing by UsersController#create as HTML
1038
+ Parameters: {"name"=>"Kevin", "email"=>"info@example.com", "fb_share"=>"0", "tw_share"=>"0", "tumblr_share"=>"true"}
1039
+  (0.1ms) SAVEPOINT active_record_1
1040
+ SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "name", "settings", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Sat, 03 Dec 2011 02:00:33 UTC +00:00], ["email", nil], ["name", nil], ["settings", "--- {}\n"], ["updated_at", Sat, 03 Dec 2011 02:00:33 UTC +00:00]]
1041
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1042
+ Redirected to http://www.example.com/users/815823837
1043
+ Completed 302 Found in 4ms
1044
+
1045
+
1046
+ Started GET "/users/815823837" for 127.0.0.1 at 2011-12-02 18:00:33 -0800
1047
+ Processing by UsersController#show as HTML
1048
+ Parameters: {"id"=>"815823837"}
1049
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "815823837"]]
1050
+ Completed 200 OK in 3ms (Views: 1.9ms | ActiveRecord: 0.1ms)
1051
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 593363170]]
1052
+  (0.1ms) SELECT COUNT(*) FROM "users" 
1053
+ Processing by UsersController#create as HTML
1054
+ Parameters: {"user"=>{"id"=>"593363170", "name"=>"Kevin", "email"=>"info@example.com", "settings"=>{"fb_share"=>true, "tw_share"=>true}, "created_at"=>"2011-12-03 02:00:33 UTC", "updated_at"=>"2011-12-03 02:00:33 UTC"}}
1055
+ WARNING: Can't mass-assign protected attributes: id
1056
+  (0.0ms) SAVEPOINT active_record_1
1057
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "name", "settings", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Sat, 03 Dec 2011 02:00:33 UTC +00:00], ["email", "info@example.com"], ["name", "Kevin"], ["settings", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nfb_share: true\ntw_share: true\n"], ["updated_at", Sat, 03 Dec 2011 02:00:33 UTC +00:00]]
1058
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1059
+ Redirected to http://test.host/users/815823837
1060
+ Completed 302 Found in 5ms
1061
+  (0.1ms) SELECT COUNT(*) FROM "users" 
1062
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 593363170]]
1063
+  (0.1ms) SELECT COUNT(*) FROM "users" 
1064
+ Processing by UsersController#destroy as HTML
1065
+ Parameters: {"id"=>"593363170"}
1066
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "593363170"]]
1067
+  (0.0ms) SAVEPOINT active_record_1
1068
+ SQL (0.2ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 593363170]]
1069
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1070
+ Redirected to http://test.host/users
1071
+ Completed 302 Found in 3ms
1072
+  (0.1ms) SELECT COUNT(*) FROM "users"
1073
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 593363170]]
1074
+ Processing by UsersController#edit as HTML
1075
+ Parameters: {"id"=>"593363170"}
1076
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "593363170"]]
1077
+ Rendered users/_form.html.erb (2.6ms)
1078
+ Completed 200 OK in 5ms (Views: 4.5ms | ActiveRecord: 0.0ms)
1079
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 593363170]]
1080
+ Processing by UsersController#index as HTML
1081
+ User Load (0.1ms) SELECT "users".* FROM "users"
1082
+ Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.1ms)
1083
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 593363170]]
1084
+ Processing by UsersController#new as HTML
1085
+ Rendered users/_form.html.erb (2.3ms)
1086
+ Completed 200 OK in 4ms (Views: 3.7ms | ActiveRecord: 0.0ms)
1087
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 593363170]]
1088
+ Processing by UsersController#show as HTML
1089
+ Parameters: {"id"=>"593363170"}
1090
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "593363170"]]
1091
+ Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)
1092
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 593363170]]
1093
+ Processing by UsersController#update as HTML
1094
+ Parameters: {"user"=>{"id"=>"593363170", "name"=>"Kevin", "email"=>"info@example.com", "settings"=>{"fb_share"=>true, "tw_share"=>true}, "created_at"=>"2011-12-03 02:00:33 UTC", "updated_at"=>"2011-12-03 02:00:33 UTC"}, "id"=>"593363170"}
1095
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "593363170"]]
1096
+ WARNING: Can't mass-assign protected attributes: id
1097
+  (0.1ms) SAVEPOINT active_record_1
1098
+  (0.3ms) UPDATE "users" SET "settings" = '--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess
1099
+ fb_share: true
1100
+ tw_share: true
1101
+ ', "updated_at" = '2011-12-03 02:00:33.257483' WHERE "users"."id" = 593363170
1102
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1103
+ Redirected to http://test.host/users/593363170
1104
+ Completed 302 Found in 5ms
1105
+ Processing by MainController#index as HTML
1106
+ Rendered main/index.html.erb within layouts/application (2.3ms)
1107
+ Completed 200 OK in 12ms (Views: 11.5ms | ActiveRecord: 0.0ms)
1108
+ Fixture Delete (0.8ms) DELETE FROM "users"
1109
+ Fixture Insert (0.1ms) INSERT INTO "users" ("name", "email", "settings", "created_at", "updated_at", "id") VALUES ('Kevin', 'info@example.com', '---
1110
+ :fb_share: true
1111
+ :tw_share: true
1112
+ ', '2011-12-03 02:01:05', '2011-12-03 02:01:05', 593363170)
1113
+ Fixture Insert (0.0ms) INSERT INTO "users" ("name", "email", "created_at", "updated_at", "id") VALUES ('Kevin', 'info@example.com', '2011-12-03 02:01:05', '2011-12-03 02:01:05', 815823836)
1114
+
1115
+
1116
+ Started GET "/users/new" for 127.0.0.1 at 2011-12-02 18:01:05 -0800
1117
+ Processing by UsersController#new as HTML
1118
+ Rendered users/_form.html.erb (9.2ms)
1119
+ Completed 200 OK in 16ms (Views: 14.9ms | ActiveRecord: 0.0ms)
1120
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 593363170]]
1121
+
1122
+
1123
+ Started POST "/users" for 127.0.0.1 at 2011-12-02 18:01:05 -0800
1124
+ Processing by UsersController#create as HTML
1125
+ Parameters: {"name"=>"Kevin", "email"=>"info@example.com", "fb_share"=>"0", "tw_share"=>"0", "tumblr_share"=>"false"}
1126
+  (0.1ms) SAVEPOINT active_record_1
1127
+ SQL (1.6ms) INSERT INTO "users" ("created_at", "email", "name", "settings", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Sat, 03 Dec 2011 02:01:05 UTC +00:00], ["email", nil], ["name", nil], ["settings", "--- {}\n"], ["updated_at", Sat, 03 Dec 2011 02:01:05 UTC +00:00]]
1128
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1129
+ Redirected to http://www.example.com/users/815823837
1130
+ Completed 302 Found in 9ms
1131
+
1132
+
1133
+ Started GET "/users/815823837" for 127.0.0.1 at 2011-12-02 18:01:05 -0800
1134
+ Processing by UsersController#show as HTML
1135
+ Parameters: {"id"=>"815823837"}
1136
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "815823837"]]
1137
+ Completed 200 OK in 4ms (Views: 2.8ms | ActiveRecord: 0.1ms)
1138
+  (0.0ms) SAVEPOINT active_record_1
1139
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "name", "settings", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Sat, 03 Dec 2011 02:01:05 UTC +00:00], ["email", "kevin@ksylvest.com"], ["name", "Kevin"], ["settings", "--- {}\n"], ["updated_at", Sat, 03 Dec 2011 02:01:05 UTC +00:00]]
1140
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1141
+  (0.0ms) SAVEPOINT active_record_1
1142
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "email", "name", "settings", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Sat, 03 Dec 2011 02:01:05 UTC +00:00], ["email", "kevin@ksylvest.com"], ["name", "Kevin"], ["settings", "---\n:fb_share: false\n:tw_share: false\n:tumblr_share: false\n"], ["updated_at", Sat, 03 Dec 2011 02:01:05 UTC +00:00]]
1143
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1144
+  (0.0ms) SAVEPOINT active_record_1
1145
+  (0.3ms) UPDATE "users" SET "updated_at" = '2011-12-03 02:01:05.256449', "settings" = '---
1146
+ :fb_share: true
1147
+ :tw_share: true
1148
+ :tumblr_share: true
1149
+ ' WHERE "users"."id" = 815823837
1150
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1151
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 815823836]]
1152
+  (0.0ms) SAVEPOINT active_record_1
1153
+  (0.2ms) UPDATE "users" SET "updated_at" = '2011-12-03 02:01:05.259616', "settings" = '---
1154
+ :fb_share: false
1155
+ :tw_share: false
1156
+ :tumblr_share: false
1157
+ ' WHERE "users"."id" = 815823836
1158
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1159
+  (0.0ms) SAVEPOINT active_record_1
1160
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "name", "settings", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Sat, 03 Dec 2011 02:01:05 UTC +00:00], ["email", "kevin@ksylvest.com"], ["name", "Kevin"], ["settings", "---\n:fb_share: true\n:tw_share: true\n:tumblr_share: true\n"], ["updated_at", Sat, 03 Dec 2011 02:01:05 UTC +00:00]]
1161
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1162
+  (0.0ms) SAVEPOINT active_record_1
1163
+  (0.3ms) UPDATE "users" SET "updated_at" = '2011-12-03 02:01:05.289168', "settings" = '---
1164
+ :fb_share: false
1165
+ :tw_share: false
1166
+ :tumblr_share: false
1167
+ ' WHERE "users"."id" = 815823837
1168
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1169
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 593363170]]
1170
+
1171
+
1172
+ Started GET "/users/593363170/edit" for 127.0.0.1 at 2011-12-02 18:01:05 -0800
1173
+ Processing by UsersController#edit as HTML
1174
+ Parameters: {"id"=>"593363170"}
1175
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "593363170"]]
1176
+ Rendered users/_form.html.erb (3.1ms)
1177
+ Completed 200 OK in 7ms (Views: 6.0ms | ActiveRecord: 0.1ms)
1178
+
1179
+
1180
+ Started POST "/users" for 127.0.0.1 at 2011-12-02 18:01:05 -0800
1181
+ Processing by UsersController#create as HTML
1182
+ Parameters: {"name"=>"Kevin", "email"=>"info@example.com", "fb_share"=>"0", "tw_share"=>"0", "tumblr_share"=>"true"}
1183
+  (0.1ms) SAVEPOINT active_record_1
1184
+ SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "name", "settings", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Sat, 03 Dec 2011 02:01:05 UTC +00:00], ["email", nil], ["name", nil], ["settings", "--- {}\n"], ["updated_at", Sat, 03 Dec 2011 02:01:05 UTC +00:00]]
1185
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1186
+ Redirected to http://www.example.com/users/815823837
1187
+ Completed 302 Found in 3ms
1188
+
1189
+
1190
+ Started GET "/users/815823837" for 127.0.0.1 at 2011-12-02 18:01:05 -0800
1191
+ Processing by UsersController#show as HTML
1192
+ Parameters: {"id"=>"815823837"}
1193
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "815823837"]]
1194
+ Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.0ms)
1195
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 593363170]]
1196
+  (0.1ms) SELECT COUNT(*) FROM "users" 
1197
+ Processing by UsersController#create as HTML
1198
+ Parameters: {"user"=>{"id"=>"593363170", "name"=>"Kevin", "email"=>"info@example.com", "settings"=>{"fb_share"=>true, "tw_share"=>true}, "created_at"=>"2011-12-03 02:01:05 UTC", "updated_at"=>"2011-12-03 02:01:05 UTC"}}
1199
+ WARNING: Can't mass-assign protected attributes: id
1200
+  (0.1ms) SAVEPOINT active_record_1
1201
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "name", "settings", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", Sat, 03 Dec 2011 02:01:05 UTC +00:00], ["email", "info@example.com"], ["name", "Kevin"], ["settings", "--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nfb_share: true\ntw_share: true\n"], ["updated_at", Sat, 03 Dec 2011 02:01:05 UTC +00:00]]
1202
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1203
+ Redirected to http://test.host/users/815823837
1204
+ Completed 302 Found in 5ms
1205
+  (0.1ms) SELECT COUNT(*) FROM "users" 
1206
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 593363170]]
1207
+  (0.1ms) SELECT COUNT(*) FROM "users" 
1208
+ Processing by UsersController#destroy as HTML
1209
+ Parameters: {"id"=>"593363170"}
1210
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "593363170"]]
1211
+  (0.0ms) SAVEPOINT active_record_1
1212
+ SQL (0.3ms) DELETE FROM "users" WHERE "users"."id" = ? [["id", 593363170]]
1213
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1214
+ Redirected to http://test.host/users
1215
+ Completed 302 Found in 3ms
1216
+  (0.1ms) SELECT COUNT(*) FROM "users"
1217
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 593363170]]
1218
+ Processing by UsersController#edit as HTML
1219
+ Parameters: {"id"=>"593363170"}
1220
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "593363170"]]
1221
+ Rendered users/_form.html.erb (3.8ms)
1222
+ Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.0ms)
1223
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 593363170]]
1224
+ Processing by UsersController#index as HTML
1225
+ User Load (0.1ms) SELECT "users".* FROM "users"
1226
+ Completed 200 OK in 6ms (Views: 4.8ms | ActiveRecord: 0.1ms)
1227
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 593363170]]
1228
+ Processing by UsersController#new as HTML
1229
+ Rendered users/_form.html.erb (2.2ms)
1230
+ Completed 200 OK in 4ms (Views: 3.5ms | ActiveRecord: 0.0ms)
1231
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 593363170]]
1232
+ Processing by UsersController#show as HTML
1233
+ Parameters: {"id"=>"593363170"}
1234
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "593363170"]]
1235
+ Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.1ms)
1236
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 593363170]]
1237
+ Processing by UsersController#update as HTML
1238
+ Parameters: {"user"=>{"id"=>"593363170", "name"=>"Kevin", "email"=>"info@example.com", "settings"=>{"fb_share"=>true, "tw_share"=>true}, "created_at"=>"2011-12-03 02:01:05 UTC", "updated_at"=>"2011-12-03 02:01:05 UTC"}, "id"=>"593363170"}
1239
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "593363170"]]
1240
+ WARNING: Can't mass-assign protected attributes: id
1241
+  (0.0ms) SAVEPOINT active_record_1
1242
+  (0.3ms) UPDATE "users" SET "settings" = '--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess
1243
+ fb_share: true
1244
+ tw_share: true
1245
+ ', "updated_at" = '2011-12-03 02:01:05.371751' WHERE "users"."id" = 593363170
1246
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1247
+ Redirected to http://test.host/users/593363170
1248
+ Completed 302 Found in 5ms
@@ -8,7 +8,7 @@ class UserCreateTest < ActionDispatch::IntegrationTest
8
8
  get new_user_path
9
9
  assert_response :success
10
10
 
11
- post users_path, { :name => users(:default).name, :email => users(:default).email, :fb_share => "0", :tw_share => "0" }
11
+ post users_path, { :name => users(:default).name, :email => users(:default).email, :fb_share => "0", :tw_share => "0", :tumblr_share => "false" }
12
12
  assert_response :redirect
13
13
 
14
14
  follow_redirect!
@@ -8,7 +8,7 @@ class UserUpdateTest < ActionDispatch::IntegrationTest
8
8
  get edit_user_path(users(:default))
9
9
  assert_response :success
10
10
 
11
- post users_path, { :name => users(:default).name, :email => users(:default).email, :fb_share => "0", :tw_share => "0" }
11
+ post users_path, { :name => users(:default).name, :email => users(:default).email, :fb_share => "0", :tw_share => "0", :tumblr_share => "true" }
12
12
  assert_response :redirect
13
13
 
14
14
  follow_redirect!
@@ -9,6 +9,7 @@ class UserTest < ActiveSupport::TestCase
9
9
 
10
10
  assert @user.fb_share?, "should have defaults"
11
11
  assert @user.tw_share?, "should have defaults"
12
+ assert @user.tumblr_share?, "should have defaults"
12
13
  end
13
14
 
14
15
  test "missing settings" do
@@ -16,40 +17,50 @@ class UserTest < ActiveSupport::TestCase
16
17
 
17
18
  assert @user.fb_share?, "should have defaults"
18
19
  assert @user.tw_share?, "should have defaults"
20
+ assert @user.tumblr_share?, "should have defaults"
19
21
 
20
22
  @user.fb_share = false
21
23
  @user.tw_share = false
24
+ @user.tumblr_share = "false"
25
+ @user.save
22
26
 
23
27
  assert !@user.fb_share?, "should change settings"
24
28
  assert !@user.tw_share?, "should change settings"
29
+ assert !@user.tumblr_share?, "should change settings"
25
30
  end
26
31
 
27
32
  test "falsify then truthify attributes" do
28
- @user = User.create(:name => "Kevin", :email => "kevin@ksylvest.com", :fb_share => false, :tw_share => false)
33
+ @user = User.create(:name => "Kevin", :email => "kevin@ksylvest.com", :fb_share => false, :tw_share => false, :tumblr_share => "false")
29
34
 
30
35
  assert !@user.fb_share?, "should not have FB sharing if false"
31
36
  assert !@user.tw_share?, "should not have TW sharing if false"
37
+ assert !@user.tumblr_share?, "should not have TW sharing if false"
32
38
 
33
39
  @user.fb_share = true
34
40
  @user.tw_share = true
41
+ @user.tumblr_share = "true"
35
42
  @user.save
36
43
 
37
44
  assert @user.fb_share?, "should have FB sharing if toggled to true"
38
45
  assert @user.tw_share?, "should have TW sharing if toggled to true"
46
+ assert @user.tumblr_share?, "should have Tumblr sharing if toggled to true"
39
47
  end
40
48
 
41
49
  test "truthify then falsify attributes" do
42
- @user = User.create(:name => "Kevin", :email => "kevin@ksylvest.com", :fb_share => true, :tw_share => true)
50
+ @user = User.create(:name => "Kevin", :email => "kevin@ksylvest.com", :fb_share => true, :tw_share => true, :tumblr_share => "true")
43
51
 
44
52
  assert @user.fb_share?, "should have FB sharing if true"
45
53
  assert @user.tw_share?, "should have TW sharing if true"
54
+ assert @user.tumblr_share?, "should have Tumblr sharing if toggled to true"
46
55
 
47
56
  @user.fb_share = false
48
57
  @user.tw_share = false
58
+ @user.tumblr_share = "false"
49
59
  @user.save
50
60
 
51
61
  assert !@user.fb_share?, "should not have FB sharing if toggled to false"
52
62
  assert !@user.tw_share?, "should not have TW sharing if toggled to false"
63
+ assert !@user.tumblr_share?, "should not have Tumblr sharing if toggled to false"
53
64
  end
54
65
 
55
66
  end