clearance_http_auth 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,7 +11,7 @@ module Clearance
11
11
  #
12
12
  # @return [User, nil]
13
13
  def current_user
14
- env['clearance.current_user'] || @_current_user || user_from_cookie
14
+ (env['clearance.current_user'] rescue nil) || @_current_user || user_from_cookie
15
15
  end
16
16
  end
17
17
 
@@ -1,5 +1,5 @@
1
1
  module Clearance
2
2
  module HttpAuth
3
- VERSION = "0.0.1"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
@@ -9429,3 +9429,131 @@ Started GET "/" for 127.0.0.1 at Sun Dec 26 10:30:36 +0100 2010
9429
9429
  #<User id: 1, email: "test@example.com", encrypted_password: "e1d7a7e6c9372c1931caca3c284090535979dff8", salt: "a00f12eb264ebc6536ce7b1eac8a2ae77c9d28e3", confirmation_token: "de646e9450c29c5598acee25942e96cfca7c0d91", remember_token: "c7454a991419472209f844a7c1983a92cef9c69c", email_confirmed: true, created_at: "2010-12-26 09:30:36", updated_at: "2010-12-26 09:30:36">
9430
9430
  Rendered text template (0.0ms)
9431
9431
  Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.6ms)
9432
+ SQL (0.5ms)  SELECT name
9433
+ FROM sqlite_master
9434
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
9435
+ 
9436
+ SQL (0.1ms) SELECT name
9437
+ FROM sqlite_master
9438
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
9439
+ SQL (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
9440
+ Migrating to ClearanceCreateUsers (20101221153914)
9441
+ User Load (0.5ms) SELECT "users"."id" FROM "users" WHERE (LOWER("users"."email") = LOWER('test@example.com')) LIMIT 1
9442
+ AREL (1.3ms) INSERT INTO "users" ("created_at", "email_confirmed", "confirmation_token", "updated_at", "salt", "encrypted_password", "email", "remember_token") VALUES ('2011-01-10 22:15:55.977783', 't', 'c327e9ad06d7d80651723d0e6fa96ac317b396aa', '2011-01-10 22:15:55.977783', 'd50651ae04d9834b28eae973e77a3de0b09f8d5e', '7cf972499f375c2557ed9afdc18d0f33bf032390', 'test@example.com', '1de02258ca32ae96a50b5358991b041ba83e5bc1')
9443
+
9444
+
9445
+ Started GET "/entrances.json" for 127.0.0.1 at Mon Jan 10 23:15:55 +0100 2011
9446
+ User Load (70.5ms) SELECT "users".* FROM "users" WHERE ("users"."email" = 'test@example.com') LIMIT 1
9447
+ User Load (0.2ms) SELECT "users"."id" FROM "users" WHERE (LOWER("users"."email") = LOWER('test@example.com')) LIMIT 1
9448
+ AREL (0.3ms) INSERT INTO "users" ("created_at", "email_confirmed", "confirmation_token", "updated_at", "salt", "encrypted_password", "email", "remember_token") VALUES ('2011-01-10 22:15:56.075980', 't', '01b69fb990740b2126de6dc1f6922a15381174d6', '2011-01-10 22:15:56.075980', 'c7ba1e3aaf036145bf77a47ccb1fb19b59e256cb', '1d20946d0aa6694611d1456f5d36f90bea48928f', 'test@example.com', 'a2a1e5a4bf4fcf94db4d1c3196df763fc87edcbe')
9449
+
9450
+
9451
+ Started GET "/entrances.json" for 127.0.0.1 at Mon Jan 10 23:15:56 +0100 2011
9452
+ User Load (0.1ms) SELECT "users"."id" FROM "users" WHERE (LOWER("users"."email") = LOWER('test@example.com')) LIMIT 1
9453
+ AREL (0.3ms) INSERT INTO "users" ("created_at", "email_confirmed", "confirmation_token", "updated_at", "salt", "encrypted_password", "email", "remember_token") VALUES ('2011-01-10 22:15:56.081259', 't', '16137802b15d31221d0c656aa0e6b2e33170c090', '2011-01-10 22:15:56.081259', '43c51c9dd4218c4d6c4de9b6dd35ad8322c608b7', '9dffb06b7451d9dc175e2681fc603b5fca9c318e', 'test@example.com', '56c87cbe2c76d88129e70d748a984e2b17fbc4c5')
9454
+
9455
+
9456
+ Started POST "/entrances.json" for 127.0.0.1 at Mon Jan 10 23:15:56 +0100 2011
9457
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE ("users"."email" = 'test@example.com') LIMIT 1
9458
+ Processing by EntrancesController#create as JSON
9459
+ Completed 201 Created in 10ms (Views: 8.9ms | ActiveRecord: 74.1ms)
9460
+ User Load (0.2ms) SELECT "users"."id" FROM "users" WHERE (LOWER("users"."email") = LOWER('test@example.com')) LIMIT 1
9461
+ AREL (0.3ms) INSERT INTO "users" ("created_at", "email_confirmed", "confirmation_token", "updated_at", "salt", "encrypted_password", "email", "remember_token") VALUES ('2011-01-10 22:15:56.105955', 't', '77ecde5d166d95ab30cfb25cec253a7305eb8817', '2011-01-10 22:15:56.105955', '41bead98cae1524d22fab758457b215a5cf7185d', 'ef2d041824f5cbce2da4473bcaf22fb3044a1ac9', 'test@example.com', 'ab3046097480190308b2bb0be0144b800b743538')
9462
+
9463
+
9464
+ Started GET "/entrances.json" for 127.0.0.1 at Mon Jan 10 23:15:56 +0100 2011
9465
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE ("users"."email" = 'test@example.com') LIMIT 1
9466
+ Processing by EntrancesController#index as JSON
9467
+ #<User id: 1, email: "test@example.com", encrypted_password: "ef2d041824f5cbce2da4473bcaf22fb3044a1ac9", salt: "41bead98cae1524d22fab758457b215a5cf7185d", confirmation_token: "77ecde5d166d95ab30cfb25cec253a7305eb8817", remember_token: "ab3046097480190308b2bb0be0144b800b743538", email_confirmed: true, created_at: "2011-01-10 22:15:56", updated_at: "2011-01-10 22:15:56">
9468
+ Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.7ms)
9469
+ User Load (0.1ms) SELECT "users"."id" FROM "users" WHERE (LOWER("users"."email") = LOWER('test@example.com')) LIMIT 1
9470
+ AREL (0.3ms) INSERT INTO "users" ("created_at", "email_confirmed", "confirmation_token", "updated_at", "salt", "encrypted_password", "email", "remember_token") VALUES ('2011-01-10 22:15:56.117238', 't', '2cd74f379ed25fc3805c730eaeeda11fe85100fb', '2011-01-10 22:15:56.117238', 'e62ea665fd66d26e74e2150718294a007d0763c1', 'e3542abdbbd4c83d6b011d06219d426e56b74020', 'test@example.com', 'b0a6d0103cad839a5d4203e00489da07172ddf69')
9471
+
9472
+
9473
+ Started GET "/entrances.csv" for 127.0.0.1 at Mon Jan 10 23:15:56 +0100 2011
9474
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE ("users"."email" = 'test@example.com') LIMIT 1
9475
+ Processing by EntrancesController#index as CSV
9476
+ #<User id: 1, email: "test@example.com", encrypted_password: "e3542abdbbd4c83d6b011d06219d426e56b74020", salt: "e62ea665fd66d26e74e2150718294a007d0763c1", confirmation_token: "2cd74f379ed25fc3805c730eaeeda11fe85100fb", remember_token: "b0a6d0103cad839a5d4203e00489da07172ddf69", email_confirmed: true, created_at: "2011-01-10 22:15:56", updated_at: "2011-01-10 22:15:56">
9477
+ Rendered text template (0.0ms)
9478
+ Completed 200 OK in 4ms (Views: 3.2ms | ActiveRecord: 0.6ms)
9479
+ User Load (0.2ms) SELECT "users"."id" FROM "users" WHERE (LOWER("users"."email") = LOWER('test@example.com')) LIMIT 1
9480
+ AREL (0.3ms) INSERT INTO "users" ("created_at", "email_confirmed", "confirmation_token", "updated_at", "salt", "encrypted_password", "email", "remember_token") VALUES ('2011-01-10 22:15:56.130857', 't', '8ecb23515e45fdeb3d8cf26a4354ee639567d029', '2011-01-10 22:15:56.130857', '1f8afbe388212d4fef0d3f0e13bb6b7b095ba772', '26e455ed3efc79c71d3f503cdf9fab7f44c12c3b', 'test@example.com', '345f2fac323930e41a53649f64218ef7fcb793d0')
9481
+
9482
+
9483
+ Started GET "/entrances.santa" for 127.0.0.1 at Mon Jan 10 23:15:56 +0100 2011
9484
+ Processing by EntrancesController#index as
9485
+ Redirected to http://example.org/sign_in
9486
+ Completed 302 Found in 1ms
9487
+
9488
+
9489
+ Started GET "/sign_in" for 127.0.0.1 at Mon Jan 10 23:15:56 +0100 2011
9490
+ Processing by Clearance::SessionsController#new as HTML
9491
+ Rendered /opt/local/lib/ruby/gems/1.8/gems/gems/clearance-0.9.1/app/views/sessions/new.html.erb within layouts/application (8.9ms)
9492
+ Completed 200 OK in 22ms (Views: 21.8ms | ActiveRecord: 0.5ms)
9493
+ User Load (0.2ms) SELECT "users"."id" FROM "users" WHERE (LOWER("users"."email") = LOWER('test@example.com')) LIMIT 1
9494
+ AREL (0.3ms) INSERT INTO "users" ("created_at", "email_confirmed", "confirmation_token", "updated_at", "salt", "encrypted_password", "email", "remember_token") VALUES ('2011-01-10 22:15:56.168026', 't', '3ef461d5c8368669c48706753b4c1a67a7f17222', '2011-01-10 22:15:56.168026', 'd1f3205c728884296990b39593a2b18d178d959b', 'ed690ce909f5ba3f6a3e1bd3bded1f558db0aa25', 'test@example.com', 'e43cb7a4ac6b9ae2ad8e1e50fe4fbb506e746952')
9495
+
9496
+
9497
+ Started GET "/" for 127.0.0.1 at Mon Jan 10 23:15:56 +0100 2011
9498
+ Processing by EntrancesController#index as HTML
9499
+ Redirected to http://www.example.com/sign_in
9500
+ Completed 302 Found in 1ms
9501
+
9502
+
9503
+ Started GET "/sign_in" for 127.0.0.1 at Mon Jan 10 23:15:56 +0100 2011
9504
+ Processing by Clearance::SessionsController#new as HTML
9505
+ Rendered /opt/local/lib/ruby/gems/1.8/gems/gems/clearance-0.9.1/app/views/sessions/new.html.erb within layouts/application (3.5ms)
9506
+ Completed 200 OK in 5ms (Views: 4.7ms | ActiveRecord: 0.5ms)
9507
+
9508
+
9509
+ Started POST "/session" for 127.0.0.1 at Mon Jan 10 23:15:56 +0100 2011
9510
+ Processing by Clearance::SessionsController#create as HTML
9511
+ Parameters: {"commit"=>"Sign in", "session"=>{"password"=>"[FILTERED]", "email"=>"test@example.com"}, "utf8"=>"✓"}
9512
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE ("users"."email" = 'test@example.com') LIMIT 1
9513
+ Rendered /opt/local/lib/ruby/gems/1.8/gems/gems/clearance-0.9.1/app/views/sessions/new.html.erb within layouts/application (3.5ms)
9514
+ Completed 401 Unauthorized in 6ms (Views: 4.8ms | ActiveRecord: 0.2ms)
9515
+ User Load (0.2ms) SELECT "users"."id" FROM "users" WHERE (LOWER("users"."email") = LOWER('test@example.com')) LIMIT 1
9516
+ AREL (0.4ms) INSERT INTO "users" ("created_at", "email_confirmed", "confirmation_token", "updated_at", "salt", "encrypted_password", "email", "remember_token") VALUES ('2011-01-10 22:15:56.227820', 't', '3afd7f01ad509e218bcbcc027781171df5baebaa', '2011-01-10 22:15:56.227820', '28847889880389f7a964f74d0e27ece4bb784bc7', '9b2a5438587984cf165b82724de1e3142c34f5bf', 'test@example.com', '04f4d3b437e4a4fa6516deaa384efea6375c315d')
9517
+
9518
+
9519
+ Started GET "/" for 127.0.0.1 at Mon Jan 10 23:15:56 +0100 2011
9520
+ Processing by EntrancesController#index as HTML
9521
+ Redirected to http://www.example.com/sign_in
9522
+ Completed 302 Found in 1ms
9523
+
9524
+
9525
+ Started GET "/sign_in" for 127.0.0.1 at Mon Jan 10 23:15:56 +0100 2011
9526
+ Processing by Clearance::SessionsController#new as HTML
9527
+ Rendered /opt/local/lib/ruby/gems/1.8/gems/gems/clearance-0.9.1/app/views/sessions/new.html.erb within layouts/application (3.9ms)
9528
+ Completed 200 OK in 5ms (Views: 4.6ms | ActiveRecord: 0.5ms)
9529
+ User Load (0.2ms) SELECT "users"."id" FROM "users" WHERE (LOWER("users"."email") = LOWER('test@example.com')) LIMIT 1
9530
+ AREL (0.3ms) INSERT INTO "users" ("created_at", "email_confirmed", "confirmation_token", "updated_at", "salt", "encrypted_password", "email", "remember_token") VALUES ('2011-01-10 22:15:56.245308', 't', '7c338fff176c3809d8c678f96534bb5da20c5010', '2011-01-10 22:15:56.245308', '7fe07f1f882e4f184b03b6ea49ae4d114b224925', '86a47619327e652b97e11d2644737e4f0b17bf17', 'test@example.com', '108007178bcb8cf8f949168e40bda18d4aa99350')
9531
+
9532
+
9533
+ Started GET "/" for 127.0.0.1 at Mon Jan 10 23:15:56 +0100 2011
9534
+ Processing by EntrancesController#index as HTML
9535
+ Redirected to http://www.example.com/sign_in
9536
+ Completed 302 Found in 1ms
9537
+
9538
+
9539
+ Started GET "/sign_in" for 127.0.0.1 at Mon Jan 10 23:15:56 +0100 2011
9540
+ Processing by Clearance::SessionsController#new as HTML
9541
+ Rendered /opt/local/lib/ruby/gems/1.8/gems/gems/clearance-0.9.1/app/views/sessions/new.html.erb within layouts/application (3.8ms)
9542
+ Completed 200 OK in 5ms (Views: 4.5ms | ActiveRecord: 0.5ms)
9543
+
9544
+
9545
+ Started POST "/session" for 127.0.0.1 at Mon Jan 10 23:15:56 +0100 2011
9546
+ Processing by Clearance::SessionsController#create as HTML
9547
+ Parameters: {"commit"=>"Sign in", "session"=>{"password"=>"[FILTERED]", "email"=>"test@example.com"}, "utf8"=>"✓"}
9548
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE ("users"."email" = 'test@example.com') LIMIT 1
9549
+ Redirected to http://www.example.com/
9550
+ Completed 302 Found in 6ms
9551
+
9552
+
9553
+ Started GET "/" for 127.0.0.1 at Mon Jan 10 23:15:56 +0100 2011
9554
+ Processing by EntrancesController#index as HTML
9555
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE ("users"."remember_token" = '108007178bcb8cf8f949168e40bda18d4aa99350') LIMIT 1
9556
+ CACHE (0.0ms) SELECT "users".* FROM "users" WHERE ("users"."remember_token" = '108007178bcb8cf8f949168e40bda18d4aa99350') LIMIT 1
9557
+ #<User id: 1, email: "test@example.com", encrypted_password: "86a47619327e652b97e11d2644737e4f0b17bf17", salt: "7fe07f1f882e4f184b03b6ea49ae4d114b224925", confirmation_token: "7c338fff176c3809d8c678f96534bb5da20c5010", remember_token: "108007178bcb8cf8f949168e40bda18d4aa99350", email_confirmed: true, created_at: "2011-01-10 22:15:56", updated_at: "2011-01-10 22:15:56">
9558
+ Rendered text template (0.0ms)
9559
+ Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.5ms)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clearance_http_auth
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 0
9
8
  - 1
10
- version: 0.0.1
9
+ - 0
10
+ version: 0.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Karel Minarik
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-26 00:00:00 +01:00
18
+ date: 2011-01-10 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -106,7 +106,7 @@ dependencies:
106
106
  requirement: *id006
107
107
  name: shoulda
108
108
  type: :development
109
- description: " Simple, instant HTTP Basic Authentication for applications\n using Clearance [https://github.com/thoughtbot/clearance].\n"
109
+ description: " Simple, instant HTTP Basic Authentication for applications using Clearance.\n"
110
110
  email: karmi@karmi.cz
111
111
  executables: []
112
112
 
@@ -170,7 +170,6 @@ files:
170
170
  - test/dummy/script/rails
171
171
  - test/dummy/test/factories/clearance.rb
172
172
  - test/dummy/tmp/capybara/capybara-20101221172010.html
173
- - test/dummy/tmp/pids/server.pid
174
173
  - test/integration/api_test.rb
175
174
  - test/integration/navigation_test.rb
176
175
  - test/support/integration_case.rb
@@ -1 +0,0 @@
1
- 18440