casino 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/Gemfile.lock +34 -32
- data/app/assets/javascripts/casino/application.js.coffee +5 -0
- data/app/assets/stylesheets/casino.scss +26 -3
- data/app/controllers/casino/application_controller.rb +18 -2
- data/app/views/casino/application/_footer.html.erb +2 -2
- data/app/views/casino/sessions/index.html.erb +1 -1
- data/app/views/casino/sessions/new.html.erb +1 -1
- data/app/views/casino/sessions/validate_otp.html.erb +1 -1
- data/app/views/casino/two_factor_authenticators/new.html.erb +1 -1
- data/casino.gemspec +1 -0
- data/config/locales/de.yml +83 -0
- data/config/locales/en.yml +2 -3
- data/lib/casino/version.rb +1 -1
- data/lib/generators/casino/templates/casino_and_overrides.scss +1 -0
- metadata +22 -4
- metadata.gz.sig +5 -1
data.tar.gz.sig
CHANGED
Binary file
|
data/Gemfile.lock
CHANGED
@@ -1,45 +1,46 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
casino (1.
|
4
|
+
casino (1.2.0)
|
5
5
|
casino_core (~> 1.3.0)
|
6
|
+
http_accept_language (~> 2.0.0.pre)
|
6
7
|
jquery-rails (~> 2.1)
|
7
8
|
rails (~> 3.2.9)
|
8
9
|
|
9
10
|
GEM
|
10
11
|
remote: https://rubygems.org/
|
11
12
|
specs:
|
12
|
-
actionmailer (3.2.
|
13
|
-
actionpack (= 3.2.
|
13
|
+
actionmailer (3.2.12)
|
14
|
+
actionpack (= 3.2.12)
|
14
15
|
mail (~> 2.4.4)
|
15
|
-
actionpack (3.2.
|
16
|
-
activemodel (= 3.2.
|
17
|
-
activesupport (= 3.2.
|
16
|
+
actionpack (3.2.12)
|
17
|
+
activemodel (= 3.2.12)
|
18
|
+
activesupport (= 3.2.12)
|
18
19
|
builder (~> 3.0.0)
|
19
20
|
erubis (~> 2.7.0)
|
20
21
|
journey (~> 1.0.4)
|
21
|
-
rack (~> 1.4.
|
22
|
+
rack (~> 1.4.5)
|
22
23
|
rack-cache (~> 1.2)
|
23
24
|
rack-test (~> 0.6.1)
|
24
25
|
sprockets (~> 2.2.1)
|
25
|
-
activemodel (3.2.
|
26
|
-
activesupport (= 3.2.
|
26
|
+
activemodel (3.2.12)
|
27
|
+
activesupport (= 3.2.12)
|
27
28
|
builder (~> 3.0.0)
|
28
|
-
activerecord (3.2.
|
29
|
-
activemodel (= 3.2.
|
30
|
-
activesupport (= 3.2.
|
29
|
+
activerecord (3.2.12)
|
30
|
+
activemodel (= 3.2.12)
|
31
|
+
activesupport (= 3.2.12)
|
31
32
|
arel (~> 3.0.2)
|
32
33
|
tzinfo (~> 0.3.29)
|
33
|
-
activeresource (3.2.
|
34
|
-
activemodel (= 3.2.
|
35
|
-
activesupport (= 3.2.
|
36
|
-
activesupport (3.2.
|
34
|
+
activeresource (3.2.12)
|
35
|
+
activemodel (= 3.2.12)
|
36
|
+
activesupport (= 3.2.12)
|
37
|
+
activesupport (3.2.12)
|
37
38
|
i18n (~> 0.6)
|
38
39
|
multi_json (~> 1.0)
|
39
40
|
addressable (2.3.2)
|
40
41
|
arel (3.0.2)
|
41
42
|
builder (3.0.4)
|
42
|
-
casino_core (1.3.
|
43
|
+
casino_core (1.3.1)
|
43
44
|
activerecord (~> 3.2.9)
|
44
45
|
addressable (~> 2.3)
|
45
46
|
faraday (~> 0.8)
|
@@ -51,44 +52,45 @@ GEM
|
|
51
52
|
faraday (0.8.5)
|
52
53
|
multipart-post (~> 1.1)
|
53
54
|
hike (1.2.1)
|
55
|
+
http_accept_language (2.0.0.pre)
|
54
56
|
i18n (0.6.1)
|
55
57
|
journey (1.0.4)
|
56
58
|
jquery-rails (2.2.1)
|
57
59
|
railties (>= 3.0, < 5.0)
|
58
60
|
thor (>= 0.14, < 2.0)
|
59
|
-
json (1.7.
|
61
|
+
json (1.7.7)
|
60
62
|
mail (2.4.4)
|
61
63
|
i18n (>= 0.4.0)
|
62
64
|
mime-types (~> 1.16)
|
63
65
|
treetop (~> 1.4.8)
|
64
|
-
mime-types (1.
|
65
|
-
multi_json (1.
|
66
|
+
mime-types (1.21)
|
67
|
+
multi_json (1.6.1)
|
66
68
|
multipart-post (1.1.5)
|
67
69
|
polyglot (0.3.3)
|
68
|
-
rack (1.4.
|
70
|
+
rack (1.4.5)
|
69
71
|
rack-cache (1.2)
|
70
72
|
rack (>= 0.4)
|
71
73
|
rack-ssl (1.3.3)
|
72
74
|
rack
|
73
75
|
rack-test (0.6.2)
|
74
76
|
rack (>= 1.0)
|
75
|
-
rails (3.2.
|
76
|
-
actionmailer (= 3.2.
|
77
|
-
actionpack (= 3.2.
|
78
|
-
activerecord (= 3.2.
|
79
|
-
activeresource (= 3.2.
|
80
|
-
activesupport (= 3.2.
|
77
|
+
rails (3.2.12)
|
78
|
+
actionmailer (= 3.2.12)
|
79
|
+
actionpack (= 3.2.12)
|
80
|
+
activerecord (= 3.2.12)
|
81
|
+
activeresource (= 3.2.12)
|
82
|
+
activesupport (= 3.2.12)
|
81
83
|
bundler (~> 1.0)
|
82
|
-
railties (= 3.2.
|
83
|
-
railties (3.2.
|
84
|
-
actionpack (= 3.2.
|
85
|
-
activesupport (= 3.2.
|
84
|
+
railties (= 3.2.12)
|
85
|
+
railties (3.2.12)
|
86
|
+
actionpack (= 3.2.12)
|
87
|
+
activesupport (= 3.2.12)
|
86
88
|
rack-ssl (~> 1.3.2)
|
87
89
|
rake (>= 0.8.7)
|
88
90
|
rdoc (~> 3.4)
|
89
91
|
thor (>= 0.14.6, < 2.0)
|
90
92
|
rake (10.0.3)
|
91
|
-
rdoc (3.12)
|
93
|
+
rdoc (3.12.1)
|
92
94
|
json (~> 1.4)
|
93
95
|
rotp (1.4.1)
|
94
96
|
rspec (2.12.0)
|
@@ -0,0 +1,5 @@
|
|
1
|
+
# Place all the behaviors and hooks related to the matching controller here.
|
2
|
+
# All this logic will automatically be available in application.js.
|
3
|
+
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
|
4
|
+
jQuery ->
|
5
|
+
$("input[type='text']:first", document.forms[0]).focus()
|
@@ -5,6 +5,8 @@
|
|
5
5
|
$buttonColor: #0074ad !default;
|
6
6
|
$buttonSecondaryColor: #c2c2c2 !default;
|
7
7
|
|
8
|
+
$linkColor: #0074ad !default;
|
9
|
+
|
8
10
|
$logo: "logo.png" !default;
|
9
11
|
$logoRetina: "logo@2x.png" !default;
|
10
12
|
$logoWidth: 146px !default;
|
@@ -15,6 +17,7 @@ $logoHeight: 34px !default;
|
|
15
17
|
/// GLOBAL STUFF ///
|
16
18
|
* {
|
17
19
|
box-sizing: border-box;
|
20
|
+
-moz-box-sizing: border-box;
|
18
21
|
}
|
19
22
|
|
20
23
|
body {
|
@@ -25,6 +28,21 @@ body {
|
|
25
28
|
font-weight: 300;
|
26
29
|
}
|
27
30
|
|
31
|
+
a {
|
32
|
+
color: $linkColor;
|
33
|
+
font-weight: 600;
|
34
|
+
text-decoration: none;
|
35
|
+
-moz-transition: all 0.15s ease-in-out;
|
36
|
+
-o-transition: all 0.15s ease-in-out;
|
37
|
+
-webkit-transition: all 0.15s ease-in-out;
|
38
|
+
transition: all 0.15s ease-in-out;
|
39
|
+
|
40
|
+
&:hover {
|
41
|
+
text-decoration: underline;
|
42
|
+
color: darken($buttonColor, 8%);
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
28
46
|
label {
|
29
47
|
color: #4d4d4d;
|
30
48
|
display: block;
|
@@ -53,7 +71,7 @@ input[type=password] {
|
|
53
71
|
}
|
54
72
|
}
|
55
73
|
|
56
|
-
|
74
|
+
.button {
|
57
75
|
background: $buttonColor;
|
58
76
|
border: none;
|
59
77
|
border: 1px solid darken($buttonColor, 3%);
|
@@ -160,7 +178,8 @@ table {
|
|
160
178
|
}
|
161
179
|
}
|
162
180
|
|
163
|
-
footer {
|
181
|
+
#footer {
|
182
|
+
width: 100%;
|
164
183
|
color: #949494;
|
165
184
|
font-size: 80%;
|
166
185
|
font-weight: 200;
|
@@ -294,6 +313,10 @@ footer {
|
|
294
313
|
}
|
295
314
|
|
296
315
|
.login {
|
316
|
+
.logo {
|
317
|
+
width: 100%;
|
318
|
+
}
|
319
|
+
|
297
320
|
.form {
|
298
321
|
border-left: none;
|
299
322
|
padding-bottom: 0;
|
@@ -349,7 +372,7 @@ footer {
|
|
349
372
|
|
350
373
|
td:before {
|
351
374
|
content: attr(data-label);
|
352
|
-
font-weight:
|
375
|
+
font-weight: 600;
|
353
376
|
left: 0;
|
354
377
|
padding-right: 10px;
|
355
378
|
position: absolute;
|
@@ -1,11 +1,13 @@
|
|
1
1
|
require 'casino'
|
2
2
|
require 'casino_core'
|
3
|
+
require 'http_accept_language'
|
3
4
|
|
4
5
|
class CASino::ApplicationController < ::ApplicationController
|
5
|
-
layout 'application'
|
6
|
-
|
7
6
|
include ApplicationHelper
|
8
7
|
|
8
|
+
layout 'application'
|
9
|
+
before_filter :set_locale
|
10
|
+
|
9
11
|
def cookies
|
10
12
|
super
|
11
13
|
end
|
@@ -16,4 +18,18 @@ class CASino::ApplicationController < ::ApplicationController
|
|
16
18
|
listener = CASino::Listener.const_get(listener_name).new(self)
|
17
19
|
@processor = CASinoCore::Processor.const_get(processor_name).new(listener)
|
18
20
|
end
|
21
|
+
|
22
|
+
def set_locale
|
23
|
+
I18n.locale = extract_locale_from_accept_language_header || I18n.default_locale
|
24
|
+
end
|
25
|
+
|
26
|
+
def extract_locale_from_accept_language_header
|
27
|
+
if request.env['HTTP_ACCEPT_LANGUAGE']
|
28
|
+
http_accept_language.preferred_language_from(I18n.available_locales)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def http_accept_language
|
33
|
+
HttpAcceptLanguage::Parser.new request.env['HTTP_ACCEPT_LANGUAGE']
|
34
|
+
end
|
19
35
|
end
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<footer>
|
1
|
+
<div id="footer">
|
2
2
|
Powered by CASino
|
3
|
-
</
|
3
|
+
</div>
|
@@ -43,7 +43,7 @@
|
|
43
43
|
<%= ticket_granting_ticket.service_tickets.size %>
|
44
44
|
</td>
|
45
45
|
<td data-label="<%= t('sessions.table.column_activity') %>">
|
46
|
-
<%= distance_of_time_in_words_to_now(ticket_granting_ticket.updated_at) %>
|
46
|
+
<%= t 'datetime.ago', datetime: distance_of_time_in_words_to_now(ticket_granting_ticket.updated_at) %>
|
47
47
|
</td>
|
48
48
|
<td>
|
49
49
|
<% if current_ticket_granting_ticket?(ticket_granting_ticket) %>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<%= text_field_tag :username, params[:username] %>
|
14
14
|
<%= label_tag :password, t('login.label_password') %>
|
15
15
|
<%= password_field_tag :password %>
|
16
|
-
<%=
|
16
|
+
<%= button_tag t('login.label_button'), :class => 'button' %>
|
17
17
|
<% end %>
|
18
18
|
</div>
|
19
19
|
</div>
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<%= hidden_field_tag :service, params[:service] %>
|
10
10
|
<%= label_tag :code, t('validate_otp.code') %>
|
11
11
|
<%= text_field_tag :otp, nil, maxlength: 6 %>
|
12
|
-
<%=
|
12
|
+
<%= button_tag t('validate_otp.submit'), :class => 'button' %>
|
13
13
|
<% end %>
|
14
14
|
</div>
|
15
15
|
</div>
|
@@ -24,7 +24,7 @@
|
|
24
24
|
<%= label_tag :code, t('two_factor_authenticators.code') %>
|
25
25
|
<%= text_field_tag :otp, nil, maxlength: 6 %>
|
26
26
|
<%= link_to t('two_factor_authenticators.cancel'), sessions_path, :class => 'secondary button' %>
|
27
|
-
<%=
|
27
|
+
<%= button_tag t('two_factor_authenticators.submit'), :class => 'button' %>
|
28
28
|
<% end %>
|
29
29
|
</div>
|
30
30
|
</div>
|
data/casino.gemspec
CHANGED
@@ -0,0 +1,83 @@
|
|
1
|
+
de:
|
2
|
+
login_credential_acceptor:
|
3
|
+
invalid_login_ticket: "Ihre Anfrage enthielt kein gültiges Login-Ticket."
|
4
|
+
invalid_login_credentials: "Benutzername oder Passwort falsch."
|
5
|
+
login:
|
6
|
+
label_username: "Benutzername"
|
7
|
+
label_password: "Passwort"
|
8
|
+
label_button: "Login"
|
9
|
+
validate_otp:
|
10
|
+
title: "Zwei-Faktor-Authentifizierung"
|
11
|
+
description: "Bitte geben Sie ein gültiges Einmalkennwort an."
|
12
|
+
code: "Code"
|
13
|
+
submit: "Fortfahren"
|
14
|
+
invalid_otp: "Das eingegebene Einmalkennwort ist ungültigt."
|
15
|
+
logout:
|
16
|
+
title: "Auf Wiedersehen."
|
17
|
+
logged_out_without_url: "Sie haben sich erfolgreich ausgeloggt."
|
18
|
+
logged_out_with_url: "Die Applikation, aus welcher Sie sich soeben ausgeloggt haben, möchte dass Sie dem folgenden Link folgen:"
|
19
|
+
sessions:
|
20
|
+
title: "Hallo!"
|
21
|
+
currently_logged_in_as: "Sie sind eingeloggt als <strong>%{username}</strong>."
|
22
|
+
label_logout_button: "Logout"
|
23
|
+
your_active_sessions: "Ihre aktiven Sessions"
|
24
|
+
table:
|
25
|
+
column_browser: "Browser"
|
26
|
+
column_services: "Services"
|
27
|
+
column_activity: "Letzte Aktivität"
|
28
|
+
current_session: "Aktive Session"
|
29
|
+
end_session: "Session beenden"
|
30
|
+
two_factor_authenticators:
|
31
|
+
title: "Zwei-Faktor-Authentifizierung"
|
32
|
+
setup: "Zwei-Faktor-Authentifizierung einrichten"
|
33
|
+
description: "Zwei-Faktor-Authentifizierung fordert Sie beim Login zur Eingabe eines Einmalkennworts auf. Ein Einmalkennwort kann mit Applikationen wie dem <a href='http://support.google.com/accounts/bin/answer.py?hl=de&answer=1066447'>Google Authenticator</a> auf Ihrem Smartphone erstellt werden."
|
34
|
+
instructions: "Falls Sie den Google Authenticator einsetzen, scannen Sie den untenstehenden QR-Code mit der Applikation. Geben Sie das generierte Kennwort danach im untenstehenden Textfeld ein."
|
35
|
+
disabled: "Derzeit deaktiviert"
|
36
|
+
enable: "Aktivieren"
|
37
|
+
enabled: "Derzeit aktiviert"
|
38
|
+
disable: "Deaktivieren"
|
39
|
+
cancel: "Abbrechen"
|
40
|
+
secret: "Secret"
|
41
|
+
code: "Bestätigungs-Code"
|
42
|
+
submit: "Verifizieren und aktivieren"
|
43
|
+
invalid_one_time_password: "Das eingegebene Einmalkennwort ist ungültig."
|
44
|
+
invalid_two_factor_authenticator: "Der Zwei-Faktor-Authentifizierer ist abgelaufen. Bitte folgen Sie den untenstehenden Schritten."
|
45
|
+
successfully_activated: "Der Zwei-Faktor-Authentifizierer ist jetzt mit Ihrem Account verknüpft."
|
46
|
+
successfully_deleted: "Der Zwei-Faktor-Authentifizierer wurde erfolgreich gelöscht."
|
47
|
+
datetime:
|
48
|
+
ago: "%{datetime} her"
|
49
|
+
distance_in_words:
|
50
|
+
about_x_hours:
|
51
|
+
one: etwa eine Stunde
|
52
|
+
other: etwa %{count} Stunden
|
53
|
+
about_x_months:
|
54
|
+
one: etwa ein Monat
|
55
|
+
other: etwa %{count} Monate
|
56
|
+
about_x_years:
|
57
|
+
one: etwa ein Jahr
|
58
|
+
other: etwa %{count} Jahre
|
59
|
+
almost_x_years:
|
60
|
+
one: fast ein Jahr
|
61
|
+
other: fast %{count} Jahre
|
62
|
+
half_a_minute: eine halbe Minute
|
63
|
+
less_than_x_minutes:
|
64
|
+
one: weniger als eine Minute
|
65
|
+
other: weniger als %{count} Minuten
|
66
|
+
less_than_x_seconds:
|
67
|
+
one: weniger als eine Sekunde
|
68
|
+
other: weniger als %{count} Sekunden
|
69
|
+
over_x_years:
|
70
|
+
one: mehr als ein Jahr
|
71
|
+
other: mehr als %{count} Jahre
|
72
|
+
x_days:
|
73
|
+
one: ein Tag
|
74
|
+
other: ! '%{count} Tage'
|
75
|
+
x_minutes:
|
76
|
+
one: eine Minute
|
77
|
+
other: ! '%{count} Minuten'
|
78
|
+
x_months:
|
79
|
+
one: ein Monat
|
80
|
+
other: ! '%{count} Monate'
|
81
|
+
x_seconds:
|
82
|
+
one: eine Sekunde
|
83
|
+
other: ! '%{count} Sekunden'
|
data/config/locales/en.yml
CHANGED
@@ -1,6 +1,3 @@
|
|
1
|
-
# Sample localization file for English. Add more files in this directory for other locales.
|
2
|
-
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
|
3
|
-
|
4
1
|
en:
|
5
2
|
login_credential_acceptor:
|
6
3
|
invalid_login_ticket: "Your login request did not include a valid login ticket."
|
@@ -47,3 +44,5 @@ en:
|
|
47
44
|
invalid_two_factor_authenticator: "The two-factor authenticator expired. Please follow the instructions below."
|
48
45
|
successfully_activated: "The two-factor authenticator is now linked to this account."
|
49
46
|
successfully_deleted: "The two-factor authenticator was successfully deleted."
|
47
|
+
datetime:
|
48
|
+
ago: "%{datetime} ago"
|
data/lib/casino/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: casino
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -38,7 +38,7 @@ cert_chain:
|
|
38
38
|
b1VSdnUwRzgvWXlIVUFtSVUvV0tyanIxYmdjZjFWUnYKUjRLRDFNblVWL3Y1
|
39
39
|
MDJwaU1sWG1qeE9XZGJLOHl2UUVIa3N1L3pqYkNqU3UrTTJrd0ZtV0dzeDVu
|
40
40
|
eCtWZHc9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
|
41
|
-
date: 2013-02-
|
41
|
+
date: 2013-02-17 00:00:00.000000000 Z
|
42
42
|
dependencies:
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: rake
|
@@ -152,6 +152,22 @@ dependencies:
|
|
152
152
|
- - ~>
|
153
153
|
- !ruby/object:Gem::Version
|
154
154
|
version: '2.1'
|
155
|
+
- !ruby/object:Gem::Dependency
|
156
|
+
name: http_accept_language
|
157
|
+
requirement: !ruby/object:Gem::Requirement
|
158
|
+
none: false
|
159
|
+
requirements:
|
160
|
+
- - ~>
|
161
|
+
- !ruby/object:Gem::Version
|
162
|
+
version: 2.0.0.pre
|
163
|
+
type: :runtime
|
164
|
+
prerelease: false
|
165
|
+
version_requirements: !ruby/object:Gem::Requirement
|
166
|
+
none: false
|
167
|
+
requirements:
|
168
|
+
- - ~>
|
169
|
+
- !ruby/object:Gem::Version
|
170
|
+
version: 2.0.0.pre
|
155
171
|
- !ruby/object:Gem::Dependency
|
156
172
|
name: casino_core
|
157
173
|
requirement: !ruby/object:Gem::Requirement
|
@@ -191,6 +207,7 @@ files:
|
|
191
207
|
- app/assets/images/logo.png
|
192
208
|
- app/assets/images/logo@2x.png
|
193
209
|
- app/assets/images/rails.png
|
210
|
+
- app/assets/javascripts/casino/application.js.coffee
|
194
211
|
- app/assets/javascripts/casino/index.js
|
195
212
|
- app/assets/javascripts/casino/sessions.js.coffee
|
196
213
|
- app/assets/stylesheets/casino.scss
|
@@ -221,6 +238,7 @@ files:
|
|
221
238
|
- config/initializers/mime_types.rb
|
222
239
|
- config/initializers/wrap_parameters.rb
|
223
240
|
- config/initializers/yaml.rb
|
241
|
+
- config/locales/de.yml
|
224
242
|
- config/locales/en.yml
|
225
243
|
- config/routes.rb
|
226
244
|
- lib/assets/.gitkeep
|
@@ -328,7 +346,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
328
346
|
version: '0'
|
329
347
|
segments:
|
330
348
|
- 0
|
331
|
-
hash:
|
349
|
+
hash: -115436971097524055
|
332
350
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
333
351
|
none: false
|
334
352
|
requirements:
|
@@ -337,7 +355,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
337
355
|
version: '0'
|
338
356
|
segments:
|
339
357
|
- 0
|
340
|
-
hash:
|
358
|
+
hash: -115436971097524055
|
341
359
|
requirements: []
|
342
360
|
rubyforge_project:
|
343
361
|
rubygems_version: 1.8.24
|
metadata.gz.sig
CHANGED