devise_wind 0.2.1 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,6 @@
1
+ require 'warden'
1
2
  require 'devise'
2
-
3
+ require 'nokogiri'
3
4
  require 'devise_wind/engine'
4
5
  require 'devise_wind/mixins/urls'
5
6
  require 'devise_wind/model'
@@ -55,7 +55,7 @@ module Devise
55
55
  def find_or_create_by_wind_login_field(login)
56
56
  # we should create a user here if login was valid but record is missing
57
57
  mname = ("find_or_create_by_" + wind_login_field.to_s)
58
- logger.debug "#{self.name}.#{mname}(#{login})"
58
+ Rails.logger.debug "#{self.name}.#{mname}(#{login})"
59
59
  self.send mname.to_sym, login
60
60
  end
61
61
 
@@ -1,3 +1,4 @@
1
+ require 'net/http'
1
2
  class Devise::Strategies::WindAuthenticatable < Devise::Strategies::Authenticatable
2
3
  include Warden::Mixins::Urls
3
4
  # :stopdoc:
@@ -64,7 +65,7 @@ class Devise::Strategies::WindAuthenticatable < Devise::Strategies::Authenticata
64
65
  end
65
66
 
66
67
  def authenticate!
67
- logger.debug("Authenticating with WIND for mapping #{mapping.to}")
68
+ Rails.logger.debug("Authenticating with WIND for mapping #{mapping.to}")
68
69
 
69
70
  if wind_response
70
71
  handle_response!
@@ -94,7 +95,7 @@ class Devise::Strategies::WindAuthenticatable < Devise::Strategies::Authenticata
94
95
  wind_data = {}
95
96
  wind_data[:uni] = _user[0].content
96
97
  wind_data[:affils] = authdoc.xpath('//wind:authenticationSuccess/wind:affiliations/wind:affil',ns).collect {|x| x.content}
97
- logger.debug wind_data.inspect
98
+ Rails.logger.debug wind_data.inspect
98
99
  _resource = mapping.to.find_or_create_by_wind_login_field(wind_data[:uni])
99
100
  _resource.affiliations= wind_data[:affils]
100
101
  _resource.save!
@@ -1,3 +1,3 @@
1
1
  module DeviseWind
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.4'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise_wind
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 1
10
- version: 0.2.1
9
+ - 4
10
+ version: 0.2.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Benjamin Armintor, James Stuart
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-05-17 00:00:00 Z
18
+ date: 2012-05-18 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rails
@@ -49,9 +49,38 @@ dependencies:
49
49
  type: :runtime
50
50
  version_requirements: *id002
51
51
  - !ruby/object:Gem::Dependency
52
- name: yard
52
+ name: warden
53
53
  prerelease: false
54
54
  requirement: &id003 !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ~>
58
+ - !ruby/object:Gem::Version
59
+ hash: 13
60
+ segments:
61
+ - 1
62
+ - 1
63
+ version: "1.1"
64
+ type: :runtime
65
+ version_requirements: *id003
66
+ - !ruby/object:Gem::Dependency
67
+ name: nokogiri
68
+ prerelease: false
69
+ requirement: &id004 !ruby/object:Gem::Requirement
70
+ none: false
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ hash: 3
75
+ segments:
76
+ - 0
77
+ version: "0"
78
+ type: :runtime
79
+ version_requirements: *id004
80
+ - !ruby/object:Gem::Dependency
81
+ name: yard
82
+ prerelease: false
83
+ requirement: &id005 !ruby/object:Gem::Requirement
55
84
  none: false
56
85
  requirements:
57
86
  - - ">="
@@ -61,11 +90,11 @@ dependencies:
61
90
  - 0
62
91
  version: "0"
63
92
  type: :development
64
- version_requirements: *id003
93
+ version_requirements: *id005
65
94
  - !ruby/object:Gem::Dependency
66
95
  name: ruby-debug
67
96
  prerelease: false
68
- requirement: &id004 !ruby/object:Gem::Requirement
97
+ requirement: &id006 !ruby/object:Gem::Requirement
69
98
  none: false
70
99
  requirements:
71
100
  - - ">="
@@ -75,11 +104,11 @@ dependencies:
75
104
  - 0
76
105
  version: "0"
77
106
  type: :development
78
- version_requirements: *id004
107
+ version_requirements: *id006
79
108
  - !ruby/object:Gem::Dependency
80
109
  name: ruby-debug-base
81
110
  prerelease: false
82
- requirement: &id005 !ruby/object:Gem::Requirement
111
+ requirement: &id007 !ruby/object:Gem::Requirement
83
112
  none: false
84
113
  requirements:
85
114
  - - ">="
@@ -89,11 +118,11 @@ dependencies:
89
118
  - 0
90
119
  version: "0"
91
120
  type: :development
92
- version_requirements: *id005
121
+ version_requirements: *id007
93
122
  - !ruby/object:Gem::Dependency
94
123
  name: rspec-rails
95
124
  prerelease: false
96
- requirement: &id006 !ruby/object:Gem::Requirement
125
+ requirement: &id008 !ruby/object:Gem::Requirement
97
126
  none: false
98
127
  requirements:
99
128
  - - ">="
@@ -105,11 +134,11 @@ dependencies:
105
134
  - 0
106
135
  version: 2.10.0
107
136
  type: :development
108
- version_requirements: *id006
137
+ version_requirements: *id008
109
138
  - !ruby/object:Gem::Dependency
110
139
  name: mocha
111
140
  prerelease: false
112
- requirement: &id007 !ruby/object:Gem::Requirement
141
+ requirement: &id009 !ruby/object:Gem::Requirement
113
142
  none: false
114
143
  requirements:
115
144
  - - ">="
@@ -119,11 +148,11 @@ dependencies:
119
148
  - 0
120
149
  version: "0"
121
150
  type: :development
122
- version_requirements: *id007
151
+ version_requirements: *id009
123
152
  - !ruby/object:Gem::Dependency
124
153
  name: cucumber
125
154
  prerelease: false
126
- requirement: &id008 !ruby/object:Gem::Requirement
155
+ requirement: &id010 !ruby/object:Gem::Requirement
127
156
  none: false
128
157
  requirements:
129
158
  - - ">="
@@ -135,11 +164,11 @@ dependencies:
135
164
  - 5
136
165
  version: 0.8.5
137
166
  type: :development
138
- version_requirements: *id008
167
+ version_requirements: *id010
139
168
  - !ruby/object:Gem::Dependency
140
169
  name: cucumber-rails
141
170
  prerelease: false
142
- requirement: &id009 !ruby/object:Gem::Requirement
171
+ requirement: &id011 !ruby/object:Gem::Requirement
143
172
  none: false
144
173
  requirements:
145
174
  - - ">="
@@ -151,11 +180,11 @@ dependencies:
151
180
  - 0
152
181
  version: 1.0.0
153
182
  type: :development
154
- version_requirements: *id009
183
+ version_requirements: *id011
155
184
  - !ruby/object:Gem::Dependency
156
185
  name: gherkin
157
186
  prerelease: false
158
- requirement: &id010 !ruby/object:Gem::Requirement
187
+ requirement: &id012 !ruby/object:Gem::Requirement
159
188
  none: false
160
189
  requirements:
161
190
  - - ">="
@@ -165,11 +194,11 @@ dependencies:
165
194
  - 0
166
195
  version: "0"
167
196
  type: :development
168
- version_requirements: *id010
197
+ version_requirements: *id012
169
198
  - !ruby/object:Gem::Dependency
170
199
  name: factory_girl
171
200
  prerelease: false
172
- requirement: &id011 !ruby/object:Gem::Requirement
201
+ requirement: &id013 !ruby/object:Gem::Requirement
173
202
  none: false
174
203
  requirements:
175
204
  - - ">="
@@ -179,11 +208,11 @@ dependencies:
179
208
  - 0
180
209
  version: "0"
181
210
  type: :development
182
- version_requirements: *id011
211
+ version_requirements: *id013
183
212
  - !ruby/object:Gem::Dependency
184
213
  name: rake
185
214
  prerelease: false
186
- requirement: &id012 !ruby/object:Gem::Requirement
215
+ requirement: &id014 !ruby/object:Gem::Requirement
187
216
  none: false
188
217
  requirements:
189
218
  - - ">="
@@ -193,7 +222,7 @@ dependencies:
193
222
  - 0
194
223
  version: "0"
195
224
  type: :development
196
- version_requirements: *id012
225
+ version_requirements: *id014
197
226
  description: some stuff
198
227
  email:
199
228
  - armintor@gmail.com
@@ -254,7 +283,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
254
283
  requirements: []
255
284
 
256
285
  rubyforge_project:
257
- rubygems_version: 1.8.15
286
+ rubygems_version: 1.8.24
258
287
  signing_key:
259
288
  specification_version: 3
260
289
  summary: Devise/WIND Rails Engine (requires Rails3)