userbin 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/userbin/authentication.rb +11 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b49115ba8bce94342e0738a96b33f6c95102e9b
|
4
|
+
data.tar.gz: 0b9596b630e74103533891606a1cdd96aa7214c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6c29ce4ffc880fa041f2c429427a4bcec59078ec2777b2d2b19d553721392e58561219c42edd533528cabe9454a1dd88f4fb4526739f0993ad3bda36d0c0623
|
7
|
+
data.tar.gz: e67479d5e41349e976d87f462afff529e5d0b2d11cdd2e2ded7e3f07093e69b30322b80760ea0129b638a2a5d0cbfd451251bc00501207f238cd1043b873b4c1
|
@@ -56,14 +56,14 @@ module Userbin
|
|
56
56
|
|
57
57
|
def link_tags(login_path)
|
58
58
|
<<-LINK_TAGS
|
59
|
-
<link rel="userbin:root" href="/"
|
60
|
-
<link rel="userbin:login" href="#{login_path}"
|
59
|
+
<link rel="userbin:root" href="/" />
|
60
|
+
<link rel="userbin:login" href="#{login_path}" />
|
61
61
|
LINK_TAGS
|
62
62
|
end
|
63
63
|
|
64
64
|
def meta_tag
|
65
65
|
<<-META_TAG
|
66
|
-
<meta property="userbin:events" content="/userbin"
|
66
|
+
<meta property="userbin:events" content="/userbin" />
|
67
67
|
META_TAG
|
68
68
|
end
|
69
69
|
|
@@ -109,11 +109,17 @@ module Userbin
|
|
109
109
|
def generate_response(env, signature, data)
|
110
110
|
status, headers, response = @app.call(env)
|
111
111
|
if headers['Content-Type'] && headers['Content-Type']['text/html']
|
112
|
-
|
112
|
+
if response.respond_to?(:body)
|
113
|
+
body = [*response.body]
|
114
|
+
else
|
115
|
+
body = response
|
116
|
+
end
|
117
|
+
|
118
|
+
body = body.each.map do |chunk|
|
113
119
|
inject_tags(chunk)
|
114
120
|
end
|
115
121
|
|
116
|
-
if response.
|
122
|
+
if response.respond_to?(:body)
|
117
123
|
response.body = body
|
118
124
|
else
|
119
125
|
response = body
|