knock 1.0.0.rc1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/knock/version.rb +1 -1
- data/lib/tasks/knock_tasks.rake +1 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +186 -0
- data/test/knock_test.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46f1a22cb830cb7a64bedd8d620ce451eb3f6b47
|
4
|
+
data.tar.gz: a231975e3825cd248afd14f88f00c95f46fbc924
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c387fc4242247a9c8b5e93d1a4aa9d511c9465e5a7cb509e8ed1bc672a942db6068a32bc84f6fe3e1ce1b2233657dacd11974c402d1d5b15984b950c896beb7a
|
7
|
+
data.tar.gz: cf6e78431e45bf23db81b702466708ec36534c0714a798c26a546bb6670045d20f4f0de078b1fa91c8e02554f6f3ec0320153aea748bc78930472e07ed3d7f07
|
data/lib/knock/version.rb
CHANGED
data/lib/tasks/knock_tasks.rake
CHANGED
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
data/test/dummy/log/test.log
CHANGED
@@ -2851,3 +2851,189 @@ Processing by ProtectedResourcesController#index as HTML
|
|
2851
2851
|
[1m[36mUser Load (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 980190962]]
|
2852
2852
|
Completed 200 OK in 0ms (ActiveRecord: 0.0ms)
|
2853
2853
|
[1m[35m (0.0ms)[0m rollback transaction
|
2854
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2855
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2856
|
+
[1m[36mFixture Delete (0.4ms)[0m [1mDELETE FROM "users"[0m
|
2857
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "users" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('one@example.net', '$2a$04$xeqYVacU6DZGpUGS4W8eSe56/myGRKdpEcUAM4oE6DoiulRd/hnNy', '2015-07-14 14:23:38', '2015-07-14 14:23:38', 980190962)
|
2858
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "users" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('two@example.net', '$2a$04$i5FHY3VrtL3.jGf8is90UO5RfJ5GE3hwEny8nwfJN4avPYOk1s31q', '2015-07-14 14:23:38', '2015-07-14 14:23:38', 298486374)[0m
|
2859
|
+
[1m[35m (0.7ms)[0m commit transaction
|
2860
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2861
|
+
------------------------------------------------------
|
2862
|
+
Knock::AuthTokenControllerTest: test_responds_with_201
|
2863
|
+
------------------------------------------------------
|
2864
|
+
[1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
|
2865
|
+
Processing by Knock::AuthTokenController#create as HTML
|
2866
|
+
Parameters: {"auth"=>{"email"=>"one@example.net", "password"=>"[FILTERED]"}}
|
2867
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT 1[0m [["email", "one@example.net"]]
|
2868
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT 1 [["email", "one@example.net"]]
|
2869
|
+
Completed 201 Created in 14ms (Views: 0.2ms | ActiveRecord: 0.2ms)
|
2870
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2871
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2872
|
+
-----------------------------------------------------------------------------
|
2873
|
+
Knock::AuthTokenControllerTest: test_responds_with_404_if_password_is_invalid
|
2874
|
+
-----------------------------------------------------------------------------
|
2875
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 980190962]]
|
2876
|
+
Processing by Knock::AuthTokenController#create as HTML
|
2877
|
+
Parameters: {"auth"=>{"email"=>"one@example.net", "password"=>"[FILTERED]"}}
|
2878
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT 1 [["email", "one@example.net"]]
|
2879
|
+
Completed 404 Not Found in 2ms (ActiveRecord: 0.1ms)
|
2880
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2881
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2882
|
+
-----------------------------------------------------------------------------
|
2883
|
+
Knock::AuthTokenControllerTest: test_responds_with_404_if_user_does_not_exist
|
2884
|
+
-----------------------------------------------------------------------------
|
2885
|
+
Processing by Knock::AuthTokenController#create as HTML
|
2886
|
+
Parameters: {"auth"=>{"email"=>"wrong@example.net", "password"=>"[FILTERED]"}}
|
2887
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT 1[0m [["email", "wrong@example.net"]]
|
2888
|
+
Completed 404 Not Found in 0ms (ActiveRecord: 0.1ms)
|
2889
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
2890
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2891
|
+
------------------------------------------------------------------------------
|
2892
|
+
ProtectedResourcesControllerTest: test_has_a_current_user_after_authentication
|
2893
|
+
------------------------------------------------------------------------------
|
2894
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
|
2895
|
+
Processing by ProtectedResourcesController#index as HTML
|
2896
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 980190962]]
|
2897
|
+
Completed 200 OK in 1ms (ActiveRecord: 0.1ms)
|
2898
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
2899
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2900
|
+
-----------------------------------------------------------------
|
2901
|
+
ProtectedResourcesControllerTest: test_responds_with_unauthorized
|
2902
|
+
-----------------------------------------------------------------
|
2903
|
+
Processing by ProtectedResourcesController#index as HTML
|
2904
|
+
Filter chain halted as :authenticate rendered or redirected
|
2905
|
+
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
2906
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
2907
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2908
|
+
-----------------------------------------------------------------------------
|
2909
|
+
ProtectedResourcesControllerTest: test_responds_with_success_if_authenticated
|
2910
|
+
-----------------------------------------------------------------------------
|
2911
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
|
2912
|
+
Processing by ProtectedResourcesController#index as HTML
|
2913
|
+
[1m[36mUser Load (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 980190962]]
|
2914
|
+
Completed 200 OK in 0ms (ActiveRecord: 0.0ms)
|
2915
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
2916
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2917
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2918
|
+
[1m[36mFixture Delete (0.6ms)[0m [1mDELETE FROM "users"[0m
|
2919
|
+
[1m[35mFixture Insert (0.4ms)[0m INSERT INTO "users" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('one@example.net', '$2a$04$vZRgLS3hdyTV3Xbi/1Uknui9NWfu3dPa1rA3n566H1MeVwP1MNqii', '2015-07-14 18:00:54', '2015-07-14 18:00:54', 980190962)
|
2920
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "users" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('two@example.net', '$2a$04$X/v1FIv3dhUxDFIk9lxmoe4S8SGxPoTfT6TAXsFkarEfyKd5beGm2', '2015-07-14 18:00:54', '2015-07-14 18:00:54', 298486374)[0m
|
2921
|
+
[1m[35m (0.7ms)[0m commit transaction
|
2922
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2923
|
+
------------------------------------------------------------------------------
|
2924
|
+
ProtectedResourcesControllerTest: test_has_a_current_user_after_authentication
|
2925
|
+
------------------------------------------------------------------------------
|
2926
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
|
2927
|
+
Processing by ProtectedResourcesController#index as HTML
|
2928
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 980190962]]
|
2929
|
+
Completed 200 OK in 2ms (ActiveRecord: 0.1ms)
|
2930
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
2931
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2932
|
+
-----------------------------------------------------------------------------
|
2933
|
+
ProtectedResourcesControllerTest: test_responds_with_success_if_authenticated
|
2934
|
+
-----------------------------------------------------------------------------
|
2935
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
|
2936
|
+
Processing by ProtectedResourcesController#index as HTML
|
2937
|
+
[1m[36mUser Load (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 980190962]]
|
2938
|
+
Completed 200 OK in 0ms (ActiveRecord: 0.0ms)
|
2939
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2940
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2941
|
+
-----------------------------------------------------------------
|
2942
|
+
ProtectedResourcesControllerTest: test_responds_with_unauthorized
|
2943
|
+
-----------------------------------------------------------------
|
2944
|
+
Processing by ProtectedResourcesController#index as HTML
|
2945
|
+
Filter chain halted as :authenticate rendered or redirected
|
2946
|
+
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
2947
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2948
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2949
|
+
------------------------------------------------------
|
2950
|
+
Knock::AuthTokenControllerTest: test_responds_with_201
|
2951
|
+
------------------------------------------------------
|
2952
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
|
2953
|
+
Processing by Knock::AuthTokenController#create as HTML
|
2954
|
+
Parameters: {"auth"=>{"email"=>"one@example.net", "password"=>"[FILTERED]"}}
|
2955
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT 1[0m [["email", "one@example.net"]]
|
2956
|
+
[1m[35mUser Load (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT 1 [["email", "one@example.net"]]
|
2957
|
+
Completed 201 Created in 9ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
2958
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2959
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2960
|
+
-----------------------------------------------------------------------------
|
2961
|
+
Knock::AuthTokenControllerTest: test_responds_with_404_if_password_is_invalid
|
2962
|
+
-----------------------------------------------------------------------------
|
2963
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 980190962]]
|
2964
|
+
Processing by Knock::AuthTokenController#create as HTML
|
2965
|
+
Parameters: {"auth"=>{"email"=>"one@example.net", "password"=>"[FILTERED]"}}
|
2966
|
+
[1m[35mUser Load (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT 1 [["email", "one@example.net"]]
|
2967
|
+
Completed 404 Not Found in 2ms (ActiveRecord: 0.0ms)
|
2968
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2969
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2970
|
+
-----------------------------------------------------------------------------
|
2971
|
+
Knock::AuthTokenControllerTest: test_responds_with_404_if_user_does_not_exist
|
2972
|
+
-----------------------------------------------------------------------------
|
2973
|
+
Processing by Knock::AuthTokenController#create as HTML
|
2974
|
+
Parameters: {"auth"=>{"email"=>"wrong@example.net", "password"=>"[FILTERED]"}}
|
2975
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT 1[0m [["email", "wrong@example.net"]]
|
2976
|
+
Completed 404 Not Found in 0ms (ActiveRecord: 0.1ms)
|
2977
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2978
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2979
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2980
|
+
[1m[36mFixture Delete (0.3ms)[0m [1mDELETE FROM "users"[0m
|
2981
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "users" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('one@example.net', '$2a$04$SS8AMHiW7tBmfehI/pVa4.9w118Pg.DKsd0lUN5YupmUiKNDxTTgS', '2015-07-14 18:01:03', '2015-07-14 18:01:03', 980190962)
|
2982
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "users" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('two@example.net', '$2a$04$vZfauYBhtJW7l327FavUmu7FfJhteS/migbrwFOAsdZdv2UBfwnmy', '2015-07-14 18:01:03', '2015-07-14 18:01:03', 298486374)[0m
|
2983
|
+
[1m[35m (1.3ms)[0m commit transaction
|
2984
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2985
|
+
-----------------------------------------------------------------------------
|
2986
|
+
ProtectedResourcesControllerTest: test_responds_with_success_if_authenticated
|
2987
|
+
-----------------------------------------------------------------------------
|
2988
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
|
2989
|
+
Processing by ProtectedResourcesController#index as HTML
|
2990
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 980190962]]
|
2991
|
+
Completed 200 OK in 2ms (ActiveRecord: 0.1ms)
|
2992
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
2993
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2994
|
+
------------------------------------------------------------------------------
|
2995
|
+
ProtectedResourcesControllerTest: test_has_a_current_user_after_authentication
|
2996
|
+
------------------------------------------------------------------------------
|
2997
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
|
2998
|
+
Processing by ProtectedResourcesController#index as HTML
|
2999
|
+
[1m[36mUser Load (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 980190962]]
|
3000
|
+
Completed 200 OK in 0ms (ActiveRecord: 0.0ms)
|
3001
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
3002
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
3003
|
+
-----------------------------------------------------------------
|
3004
|
+
ProtectedResourcesControllerTest: test_responds_with_unauthorized
|
3005
|
+
-----------------------------------------------------------------
|
3006
|
+
Processing by ProtectedResourcesController#index as HTML
|
3007
|
+
Filter chain halted as :authenticate rendered or redirected
|
3008
|
+
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
3009
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
3010
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
3011
|
+
------------------------------------------------------
|
3012
|
+
Knock::AuthTokenControllerTest: test_responds_with_201
|
3013
|
+
------------------------------------------------------
|
3014
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
|
3015
|
+
Processing by Knock::AuthTokenController#create as HTML
|
3016
|
+
Parameters: {"auth"=>{"email"=>"one@example.net", "password"=>"[FILTERED]"}}
|
3017
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT 1[0m [["email", "one@example.net"]]
|
3018
|
+
[1m[35mUser Load (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT 1 [["email", "one@example.net"]]
|
3019
|
+
Completed 201 Created in 3ms (Views: 0.1ms | ActiveRecord: 0.2ms)
|
3020
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
3021
|
+
[1m[35m (0.0ms)[0m begin transaction
|
3022
|
+
-----------------------------------------------------------------------------
|
3023
|
+
Knock::AuthTokenControllerTest: test_responds_with_404_if_user_does_not_exist
|
3024
|
+
-----------------------------------------------------------------------------
|
3025
|
+
Processing by Knock::AuthTokenController#create as HTML
|
3026
|
+
Parameters: {"auth"=>{"email"=>"wrong@example.net", "password"=>"[FILTERED]"}}
|
3027
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT 1[0m [["email", "wrong@example.net"]]
|
3028
|
+
Completed 404 Not Found in 0ms (ActiveRecord: 0.1ms)
|
3029
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
3030
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
3031
|
+
-----------------------------------------------------------------------------
|
3032
|
+
Knock::AuthTokenControllerTest: test_responds_with_404_if_password_is_invalid
|
3033
|
+
-----------------------------------------------------------------------------
|
3034
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
|
3035
|
+
Processing by Knock::AuthTokenController#create as HTML
|
3036
|
+
Parameters: {"auth"=>{"email"=>"one@example.net", "password"=>"[FILTERED]"}}
|
3037
|
+
[1m[36mUser Load (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT 1[0m [["email", "one@example.net"]]
|
3038
|
+
Completed 404 Not Found in 2ms (ActiveRecord: 0.0ms)
|
3039
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
data/test/knock_test.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arnaud MESUREUR
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '1.3'
|
70
|
-
description: Authentication solution for Rails based on JWT
|
70
|
+
description: Authentication solution for Rails based on JWT
|
71
71
|
email:
|
72
72
|
- arnaud.mesureur@gmail.com
|
73
73
|
executables: []
|
@@ -147,9 +147,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
147
147
|
version: '0'
|
148
148
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- - "
|
150
|
+
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
152
|
+
version: '0'
|
153
153
|
requirements: []
|
154
154
|
rubyforge_project:
|
155
155
|
rubygems_version: 2.4.4
|