contour 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,9 +6,10 @@ valid:
6
6
  status: active
7
7
  deleted: false
8
8
  email: valid@example.com
9
- encrypted_password: MyString
9
+ # password: password
10
+ encrypted_password: "$2a$10$ZgXIxDCn.TjuCgsnS9iEp.Z1LlmQ71FGKgZe/kdCaVvgvnAAcUaz2"
10
11
  reset_password_token: ResetTokenOne
11
- remember_token: MyString
12
+ reset_password_sent_at: MyDate
12
13
  remember_created_at: MyDate
13
14
  sign_in_count: 0
14
15
  current_sign_in_at: MyDate
@@ -18,6 +19,7 @@ valid:
18
19
  # confirmation_token: ConfirmationTokenOne
19
20
  # confirmed_at: MyDate
20
21
  # confirmation_sent_at: MyDate
22
+ # unconfirmed_email: MyString
21
23
  # failed_attempts: 0
22
24
  # unlock_token: UnlockTokenOne
23
25
  # locked_at: MyDate
@@ -31,7 +33,7 @@ invalid:
31
33
  email: EmailTwo
32
34
  encrypted_password: MyString
33
35
  reset_password_token: ResetTokenTwo
34
- remember_token: MyString
36
+ reset_password_sent_at: MyDate
35
37
  remember_created_at: MyDate
36
38
  sign_in_count: 0
37
39
  current_sign_in_at: MyDate
@@ -41,6 +43,7 @@ invalid:
41
43
  # confirmation_token: ConfirmationTokenTwo
42
44
  # confirmed_at: MyDate
43
45
  # confirmation_sent_at: MyDate
46
+ # unconfirmed_email: MyString
44
47
  # failed_attempts: 0
45
48
  # unlock_token: UnlockTokenTwo
46
49
  # locked_at: MyDate
@@ -54,7 +57,7 @@ deleted:
54
57
  email: deleted@example.com
55
58
  encrypted_password: MyString
56
59
  reset_password_token: ResetTokenFive
57
- remember_token: MyString
60
+ reset_password_sent_at: MyDate
58
61
  remember_created_at: 2011-02-23
59
62
  sign_in_count: 0
60
63
  current_sign_in_at: 2011-02-23
@@ -64,6 +67,7 @@ deleted:
64
67
  # confirmation_token: ConfirmationTokenFive
65
68
  # confirmed_at: 2011-02-23
66
69
  # confirmation_sent_at: 2011-02-23
70
+ # unconfirmed_email: MyString
67
71
  # failed_attempts: 0
68
72
  # unlock_token: UnlockTokenFive
69
73
  # locked_at: 2011-02-23
@@ -77,7 +81,7 @@ pending:
77
81
  email: pending@example.com
78
82
  encrypted_password: MyString
79
83
  reset_password_token: ResetTokenFour
80
- remember_token: MyString
84
+ reset_password_sent_at: MyDate
81
85
  remember_created_at: 2011-02-23
82
86
  sign_in_count: 0
83
87
  current_sign_in_at: 2011-02-23
@@ -87,6 +91,7 @@ pending:
87
91
  # confirmation_token: ConfirmationTokenFour
88
92
  # confirmed_at: 2011-02-23
89
93
  # confirmation_sent_at: 2011-02-23
94
+ # unconfirmed_email: MyString
90
95
  # failed_attempts: 0
91
96
  # unlock_token: UnlockTokenFour
92
97
  # locked_at: 2011-02-23
@@ -43,4 +43,16 @@ class NavigationTest < ActionDispatch::IntegrationTest
43
43
  assert_equal '/logged_in_page', path
44
44
  assert_equal I18n.t('devise.sessions.signed_in'), flash[:notice]
45
45
  end
46
+
47
+ test "valid users should be able to login using basic http" do
48
+ get logged_in_page_path( format: :json ), {}, "HTTP_AUTHORIZATION" => "Basic #{Base64.encode64("#{users(:valid).email}:password")}"
49
+ assert_equal({ name: 'Name', count: 5 }.to_json, @response.body)
50
+ assert_response :success
51
+ end
52
+
53
+ test "valid users should not be able to login using basic http and wrong password" do
54
+ get logged_in_page_path( format: :json ), {}, "HTTP_AUTHORIZATION" => "Basic #{Base64.encode64("#{users(:valid).email}:wrongpassword")}"
55
+ assert_equal({ error: "Invalid email or password." }.to_json, @response.body)
56
+ assert_response 401
57
+ end
46
58
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contour
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-16 00:00:00.000000000 Z
12
+ date: 2012-01-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70227908990720 !ruby/object:Gem::Requirement
16
+ requirement: &70283478263460 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.2.0.rc2
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70227908990720
24
+ version_requirements: *70283478263460
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: jquery-rails
27
- requirement: &70227908990220 !ruby/object:Gem::Requirement
27
+ requirement: &70283478262960 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 2.0.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70227908990220
35
+ version_requirements: *70283478262960
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: devise
38
- requirement: &70227908989760 !ruby/object:Gem::Requirement
38
+ requirement: &70283478262500 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.5.3
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70227908989760
46
+ version_requirements: *70283478262500
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: omniauth
49
- requirement: &70227916803120 !ruby/object:Gem::Requirement
49
+ requirement: &70283478262040 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 1.0.1
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70227916803120
57
+ version_requirements: *70283478262040
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: omniauth-openid
60
- requirement: &70227916801980 !ruby/object:Gem::Requirement
60
+ requirement: &70283478261580 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 1.0.1
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70227916801980
68
+ version_requirements: *70283478261580
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: omniauth-ldap
71
- requirement: &70227916800480 !ruby/object:Gem::Requirement
71
+ requirement: &70283478261120 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 1.0.2
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *70227916800480
79
+ version_requirements: *70283478261120
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: omniauth-twitter
82
- requirement: &70227916798980 !ruby/object:Gem::Requirement
82
+ requirement: &70283478260660 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 0.0.7
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *70227916798980
90
+ version_requirements: *70283478260660
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: omniauth-facebook
93
- requirement: &70227916798060 !ruby/object:Gem::Requirement
93
+ requirement: &70283482788280 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: 1.2.0
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *70227916798060
101
+ version_requirements: *70283482788280
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: omniauth-linkedin
104
- requirement: &70227916797140 !ruby/object:Gem::Requirement
104
+ requirement: &70283482787000 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ~>
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: 0.0.6
110
110
  type: :runtime
111
111
  prerelease: false
112
- version_requirements: *70227916797140
112
+ version_requirements: *70283482787000
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: omniauth-cas
115
- requirement: &70227916796520 !ruby/object:Gem::Requirement
115
+ requirement: &70283482786300 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ~>
@@ -120,7 +120,7 @@ dependencies:
120
120
  version: 0.0.3
121
121
  type: :runtime
122
122
  prerelease: false
123
- version_requirements: *70227916796520
123
+ version_requirements: *70283482786300
124
124
  description: Basic Rails Framework files and assets for layout and authentication
125
125
  email: remosm@gmail.com
126
126
  executables: []
@@ -1120,6 +1120,7 @@ files:
1120
1120
  - test/dummy/config/locales/en.yml
1121
1121
  - test/dummy/config/routes.rb
1122
1122
  - test/dummy/config.ru
1123
+ - test/dummy/db/development.sqlite3
1123
1124
  - test/dummy/db/migrate/20111203203123_create_users.rb
1124
1125
  - test/dummy/db/migrate/20111203203307_create_authentications.rb
1125
1126
  - test/dummy/db/schema.rb
@@ -1193,6 +1194,7 @@ test_files:
1193
1194
  - test/dummy/config/locales/en.yml
1194
1195
  - test/dummy/config/routes.rb
1195
1196
  - test/dummy/config.ru
1197
+ - test/dummy/db/development.sqlite3
1196
1198
  - test/dummy/db/migrate/20111203203123_create_users.rb
1197
1199
  - test/dummy/db/migrate/20111203203307_create_authentications.rb
1198
1200
  - test/dummy/db/schema.rb