devise_oam 0.0.1 → 0.0.2

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.
@@ -3,7 +3,7 @@ module DeviseOam
3
3
  attr_accessor :login, :ldap_roles
4
4
 
5
5
  def initialize(login, ldap_roles = nil)
6
- @login = login.strip.downcase
6
+ @login = login
7
7
  @ldap_roles = parse_ldap_roles(ldap_roles) if ldap_roles
8
8
  end
9
9
 
@@ -1,3 +1,3 @@
1
1
  module DeviseOam
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -93,4 +93,12 @@ class DeviseOamTest < ActiveSupport::TestCase
93
93
  assert_equal strategy.authenticatable.ldap_roles, roles
94
94
  assert_equal user.reload.roles, roles
95
95
  end
96
+
97
+ test "AuthenticatableEntity login is case sensitive" do
98
+ auth1 = DeviseOam::AuthenticatableEntity.new("Login")
99
+ auth2 = DeviseOam::AuthenticatableEntity.new("loGin")
100
+
101
+ assert_equal auth1.login, "Login"
102
+ assert_equal auth2.login, "loGin"
103
+ end
96
104
  end
@@ -63,3 +63,137 @@ Migrating to AddRolesMaskToUsers (20120521064519)
63
63
   (0.0ms) RELEASE SAVEPOINT active_record_1
64
64
  User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
65
65
   (0.0ms) rollback transaction
66
+ Connecting to database specified by database.yml
67
+  (0.1ms) select sqlite_version(*)
68
+  (0.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
69
+  (0.0ms) PRAGMA index_list("schema_migrations")
70
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
71
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
72
+ Migrating to DeviseCreateUsers (20120514070218)
73
+  (0.0ms) begin transaction
74
+  (0.3ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
75
+  (0.1ms) PRAGMA index_list("users")
76
+  (0.1ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
77
+  (0.1ms) PRAGMA index_list("users")
78
+  (0.0ms) PRAGMA index_info('index_users_on_email')
79
+  (0.1ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
80
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120514070218')
81
+  (0.0ms) commit transaction
82
+ Migrating to AddRolesMaskToUsers (20120521064519)
83
+  (0.0ms) begin transaction
84
+  (0.3ms) ALTER TABLE "users" ADD "roles_mask" integer
85
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120521064519')
86
+  (0.0ms) commit transaction
87
+  (0.1ms) begin transaction
88
+  (0.0ms) rollback transaction
89
+  (0.0ms) begin transaction
90
+  (0.0ms) rollback transaction
91
+  (0.0ms) begin transaction
92
+  (0.1ms) SAVEPOINT active_record_1
93
+ SQL (1.8ms) INSERT INTO "users" ("created_at", "current_sign_in_at", "current_sign_in_ip", "email", "encrypted_password", "last_sign_in_at", "last_sign_in_ip", "remember_created_at", "reset_password_sent_at", "reset_password_token", "roles_mask", "sign_in_count", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 06 Jul 2012 08:01:23 UTC +00:00], ["current_sign_in_at", nil], ["current_sign_in_ip", nil], ["email", "foo"], ["encrypted_password", ""], ["last_sign_in_at", nil], ["last_sign_in_ip", nil], ["remember_created_at", nil], ["reset_password_sent_at", nil], ["reset_password_token", nil], ["roles_mask", nil], ["sign_in_count", 0], ["updated_at", Fri, 06 Jul 2012 08:01:23 UTC +00:00]]
94
+  (0.0ms) RELEASE SAVEPOINT active_record_1
95
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'foo' LIMIT 1
96
+  (0.0ms) SAVEPOINT active_record_1
97
+  (0.1ms) UPDATE "users" SET "roles_mask" = 0, "updated_at" = '2012-07-06 08:01:23.870156' WHERE "users"."id" = 1
98
+  (0.0ms) RELEASE SAVEPOINT active_record_1
99
+  (0.0ms) rollback transaction
100
+  (0.0ms) begin transaction
101
+  (0.0ms) rollback transaction
102
+  (0.0ms) begin transaction
103
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'foo' LIMIT 1
104
+  (0.0ms) SAVEPOINT active_record_1
105
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "current_sign_in_at", "current_sign_in_ip", "email", "encrypted_password", "last_sign_in_at", "last_sign_in_ip", "remember_created_at", "reset_password_sent_at", "reset_password_token", "roles_mask", "sign_in_count", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 06 Jul 2012 08:01:23 UTC +00:00], ["current_sign_in_at", nil], ["current_sign_in_ip", nil], ["email", "foo"], ["encrypted_password", ""], ["last_sign_in_at", nil], ["last_sign_in_ip", nil], ["remember_created_at", nil], ["reset_password_sent_at", nil], ["reset_password_token", nil], ["roles_mask", 0], ["sign_in_count", 0], ["updated_at", Fri, 06 Jul 2012 08:01:23 UTC +00:00]]
106
+  (0.0ms) RELEASE SAVEPOINT active_record_1
107
+  (0.1ms) rollback transaction
108
+  (0.0ms) begin transaction
109
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'foo' LIMIT 1
110
+  (0.0ms) SAVEPOINT active_record_1
111
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "current_sign_in_at", "current_sign_in_ip", "email", "encrypted_password", "last_sign_in_at", "last_sign_in_ip", "remember_created_at", "reset_password_sent_at", "reset_password_token", "roles_mask", "sign_in_count", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 06 Jul 2012 08:01:23 UTC +00:00], ["current_sign_in_at", nil], ["current_sign_in_ip", nil], ["email", "foo"], ["encrypted_password", ""], ["last_sign_in_at", nil], ["last_sign_in_ip", nil], ["remember_created_at", nil], ["reset_password_sent_at", nil], ["reset_password_token", nil], ["roles_mask", 6], ["sign_in_count", 0], ["updated_at", Fri, 06 Jul 2012 08:01:23 UTC +00:00]]
112
+  (0.0ms) RELEASE SAVEPOINT active_record_1
113
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'foo' LIMIT 1
114
+  (0.0ms) rollback transaction
115
+  (0.0ms) begin transaction
116
+  (0.0ms) rollback transaction
117
+  (0.0ms) begin transaction
118
+  (0.0ms) rollback transaction
119
+  (0.0ms) begin transaction
120
+  (0.0ms) rollback transaction
121
+  (0.0ms) begin transaction
122
+  (0.0ms) rollback transaction
123
+  (0.0ms) begin transaction
124
+  (0.0ms) SAVEPOINT active_record_1
125
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "current_sign_in_at", "current_sign_in_ip", "email", "encrypted_password", "last_sign_in_at", "last_sign_in_ip", "remember_created_at", "reset_password_sent_at", "reset_password_token", "roles_mask", "sign_in_count", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 06 Jul 2012 08:01:23 UTC +00:00], ["current_sign_in_at", nil], ["current_sign_in_ip", nil], ["email", "foo"], ["encrypted_password", ""], ["last_sign_in_at", nil], ["last_sign_in_ip", nil], ["remember_created_at", nil], ["reset_password_sent_at", nil], ["reset_password_token", nil], ["roles_mask", 6], ["sign_in_count", 0], ["updated_at", Fri, 06 Jul 2012 08:01:23 UTC +00:00]]
126
+  (0.0ms) RELEASE SAVEPOINT active_record_1
127
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'foo' LIMIT 1
128
+  (0.0ms) SAVEPOINT active_record_1
129
+  (0.1ms) UPDATE "users" SET "roles_mask" = 12, "updated_at" = '2012-07-06 08:01:23.881059' WHERE "users"."id" = 1
130
+  (0.0ms) RELEASE SAVEPOINT active_record_1
131
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
132
+  (0.1ms) rollback transaction
133
+ Connecting to database specified by database.yml
134
+  (0.1ms) select sqlite_version(*)
135
+  (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
136
+  (0.0ms) PRAGMA index_list("schema_migrations")
137
+  (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
138
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
139
+ Migrating to DeviseCreateUsers (20120514070218)
140
+  (0.0ms) begin transaction
141
+  (0.3ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer DEFAULT 0, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
142
+  (0.0ms) PRAGMA index_list("users")
143
+  (0.1ms) CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
144
+  (0.0ms) PRAGMA index_list("users")
145
+  (0.0ms) PRAGMA index_info('index_users_on_email')
146
+  (0.1ms) CREATE UNIQUE INDEX "index_users_on_reset_password_token" ON "users" ("reset_password_token")
147
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120514070218')
148
+  (0.0ms) commit transaction
149
+ Migrating to AddRolesMaskToUsers (20120521064519)
150
+  (0.0ms) begin transaction
151
+  (0.2ms) ALTER TABLE "users" ADD "roles_mask" integer
152
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120521064519')
153
+  (0.0ms) commit transaction
154
+  (0.1ms) begin transaction
155
+  (0.0ms) rollback transaction
156
+  (0.0ms) begin transaction
157
+  (0.0ms) rollback transaction
158
+  (0.0ms) begin transaction
159
+  (0.1ms) SAVEPOINT active_record_1
160
+ SQL (2.8ms) INSERT INTO "users" ("created_at", "current_sign_in_at", "current_sign_in_ip", "email", "encrypted_password", "last_sign_in_at", "last_sign_in_ip", "remember_created_at", "reset_password_sent_at", "reset_password_token", "roles_mask", "sign_in_count", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 06 Jul 2012 08:02:08 UTC +00:00], ["current_sign_in_at", nil], ["current_sign_in_ip", nil], ["email", "foo"], ["encrypted_password", ""], ["last_sign_in_at", nil], ["last_sign_in_ip", nil], ["remember_created_at", nil], ["reset_password_sent_at", nil], ["reset_password_token", nil], ["roles_mask", nil], ["sign_in_count", 0], ["updated_at", Fri, 06 Jul 2012 08:02:08 UTC +00:00]]
161
+  (0.0ms) RELEASE SAVEPOINT active_record_1
162
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'foo' LIMIT 1
163
+  (0.0ms) SAVEPOINT active_record_1
164
+  (0.1ms) UPDATE "users" SET "roles_mask" = 0, "updated_at" = '2012-07-06 08:02:08.059077' WHERE "users"."id" = 1
165
+  (0.0ms) RELEASE SAVEPOINT active_record_1
166
+  (0.1ms) rollback transaction
167
+  (0.0ms) begin transaction
168
+  (0.0ms) rollback transaction
169
+  (0.0ms) begin transaction
170
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'foo' LIMIT 1
171
+  (0.0ms) SAVEPOINT active_record_1
172
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "current_sign_in_at", "current_sign_in_ip", "email", "encrypted_password", "last_sign_in_at", "last_sign_in_ip", "remember_created_at", "reset_password_sent_at", "reset_password_token", "roles_mask", "sign_in_count", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 06 Jul 2012 08:02:08 UTC +00:00], ["current_sign_in_at", nil], ["current_sign_in_ip", nil], ["email", "foo"], ["encrypted_password", ""], ["last_sign_in_at", nil], ["last_sign_in_ip", nil], ["remember_created_at", nil], ["reset_password_sent_at", nil], ["reset_password_token", nil], ["roles_mask", 0], ["sign_in_count", 0], ["updated_at", Fri, 06 Jul 2012 08:02:08 UTC +00:00]]
173
+  (0.0ms) RELEASE SAVEPOINT active_record_1
174
+  (0.0ms) rollback transaction
175
+  (0.0ms) begin transaction
176
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'foo' LIMIT 1
177
+  (0.0ms) SAVEPOINT active_record_1
178
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "current_sign_in_at", "current_sign_in_ip", "email", "encrypted_password", "last_sign_in_at", "last_sign_in_ip", "remember_created_at", "reset_password_sent_at", "reset_password_token", "roles_mask", "sign_in_count", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 06 Jul 2012 08:02:08 UTC +00:00], ["current_sign_in_at", nil], ["current_sign_in_ip", nil], ["email", "foo"], ["encrypted_password", ""], ["last_sign_in_at", nil], ["last_sign_in_ip", nil], ["remember_created_at", nil], ["reset_password_sent_at", nil], ["reset_password_token", nil], ["roles_mask", 6], ["sign_in_count", 0], ["updated_at", Fri, 06 Jul 2012 08:02:08 UTC +00:00]]
179
+  (0.0ms) RELEASE SAVEPOINT active_record_1
180
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'foo' LIMIT 1
181
+  (0.0ms) rollback transaction
182
+  (0.0ms) begin transaction
183
+  (0.0ms) rollback transaction
184
+  (0.0ms) begin transaction
185
+  (0.0ms) rollback transaction
186
+  (0.0ms) begin transaction
187
+  (0.0ms) rollback transaction
188
+  (0.0ms) begin transaction
189
+  (0.0ms) rollback transaction
190
+  (0.0ms) begin transaction
191
+  (0.0ms) SAVEPOINT active_record_1
192
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "current_sign_in_at", "current_sign_in_ip", "email", "encrypted_password", "last_sign_in_at", "last_sign_in_ip", "remember_created_at", "reset_password_sent_at", "reset_password_token", "roles_mask", "sign_in_count", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 06 Jul 2012 08:02:08 UTC +00:00], ["current_sign_in_at", nil], ["current_sign_in_ip", nil], ["email", "foo"], ["encrypted_password", ""], ["last_sign_in_at", nil], ["last_sign_in_ip", nil], ["remember_created_at", nil], ["reset_password_sent_at", nil], ["reset_password_token", nil], ["roles_mask", 6], ["sign_in_count", 0], ["updated_at", Fri, 06 Jul 2012 08:02:08 UTC +00:00]]
193
+  (0.0ms) RELEASE SAVEPOINT active_record_1
194
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = 'foo' LIMIT 1
195
+  (0.0ms) SAVEPOINT active_record_1
196
+  (0.1ms) UPDATE "users" SET "roles_mask" = 12, "updated_at" = '2012-07-06 08:02:08.069794' WHERE "users"."id" = 1
197
+  (0.0ms) RELEASE SAVEPOINT active_record_1
198
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
199
+  (0.0ms) rollback transaction
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise_oam
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -132,7 +132,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
132
132
  version: '0'
133
133
  segments:
134
134
  - 0
135
- hash: -265183574716958172
135
+ hash: -1938997045647313263
136
136
  required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  none: false
138
138
  requirements:
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  version: '0'
142
142
  segments:
143
143
  - 0
144
- hash: -265183574716958172
144
+ hash: -1938997045647313263
145
145
  requirements: []
146
146
  rubyforge_project:
147
147
  rubygems_version: 1.8.24