uber_login 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/uber_login/version.rb +1 -1
- data/lib/uber_login.rb +14 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MGE2Y2E2MzNjYTA2ODMxZDYwNmU0MGFlNjM2MmVkNTkxOTJkMWU3Mw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NDAzMDg0NGU2MmMyNDBkZDY4YmNhY2ZjYWEwODUwNjBjMjY2NjhmOA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTZjYTBkMzRhZTIyOGFlM2M2NjA0YjE3NmFjOGU1MzdkNzcxM2Q2OTMxYmU2
|
10
|
+
NmI3NjcwMGI5ZGE0NWMxN2U0ZDA5MGY5OWQxYzQ1Y2UxMWViNDE3MGNmNWEw
|
11
|
+
ZjE5ZDM3ZTZlZTliZTUzMjc3YTljMzdhMDk2NTc4Zjk4NTVmMDQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZDNmNjI3NWUyYWJiYWJiYTNjYThiZmM1YmFjNDMwYjljMDVhMGNmMmY1MGU1
|
14
|
+
YzdjZTYyYTlmNTZjY2NjY2Q3MGU1ZmVlMTQ0MDY4MDI5YmY4OWRmZGU2NzE1
|
15
|
+
OWI5ZjZiNGRhZGY0ZWFhZTE5MzI2ZWQwZDk5MGYzYzcxYzAyZGU=
|
data/lib/uber_login/version.rb
CHANGED
data/lib/uber_login.rb
CHANGED
@@ -145,11 +145,21 @@ module UberLogin
|
|
145
145
|
end
|
146
146
|
|
147
147
|
def set_user_data(row)
|
148
|
-
user_agent = UserAgent.parse(request.user_agent)
|
149
|
-
|
150
148
|
row.ip_address = request.remote_ip if row.respond_to? :ip_address=
|
151
|
-
row.os =
|
152
|
-
row.browser =
|
149
|
+
row.os = os_string if row.respond_to? :os=
|
150
|
+
row.browser = browser_string if row.respond_to? :browser=
|
151
|
+
end
|
152
|
+
|
153
|
+
def user_agent
|
154
|
+
@user_agent ||= UserAgent.parse(request.user_agent)
|
155
|
+
end
|
156
|
+
|
157
|
+
def os_string
|
158
|
+
user_agent.os || ''
|
159
|
+
end
|
160
|
+
|
161
|
+
def browser_string
|
162
|
+
(user_agent.browser || '') + ' ' + (user_agent.version || '')
|
153
163
|
end
|
154
164
|
|
155
165
|
def strong_sessions
|