plezi 0.10.12 → 0.10.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/README.md +15 -19
- data/lib/plezi.rb +1 -0
- data/lib/plezi/common/api.rb +9 -5
- data/lib/plezi/common/redis.rb +1 -1
- data/lib/plezi/common/settings.rb +1 -1
- data/lib/plezi/handlers/controller_core.rb +2 -38
- data/lib/plezi/handlers/controller_magic.rb +1 -119
- data/lib/plezi/handlers/placebo old.rb +161 -0
- data/lib/plezi/handlers/placebo.rb +8 -45
- data/lib/plezi/handlers/ws_object.rb +204 -0
- data/lib/plezi/helpers/http_sender.rb +1 -1
- data/lib/plezi/version.rb +1 -1
- data/plezi.gemspec +3 -3
- data/resources/404.erb +93 -36
- data/resources/404.haml +91 -34
- data/resources/404.html +83 -26
- data/resources/404.slim +83 -26
- data/resources/500.erb +109 -52
- data/resources/500.haml +84 -27
- data/resources/500.html +109 -51
- data/resources/500.slim +83 -26
- data/resources/controller.rb +2 -1
- data/resources/mini_app.rb +8 -5
- data/resources/welcome_page.html +4 -4
- data/test/plezi_tests.rb +82 -38
- metadata +10 -8
data/resources/500.haml
CHANGED
@@ -1,57 +1,114 @@
|
|
1
1
|
!!!5
|
2
2
|
%head
|
3
3
|
:css
|
4
|
+
/*
|
5
|
+
med-blue: #44518E
|
6
|
+
dark-gray: #424A70
|
7
|
+
blue: #1B2864
|
8
|
+
light-blue: #818ECE
|
9
|
+
light-gray: #99A3CE
|
10
|
+
*/
|
4
11
|
body, html
|
5
12
|
{
|
6
|
-
background-color: #
|
13
|
+
background-color: #99A3CE;
|
7
14
|
padding: 0; margin: 0;
|
8
15
|
width: 100%;
|
16
|
+
font-size: 1em;
|
9
17
|
}
|
18
|
+
|
10
19
|
h1
|
11
20
|
{
|
12
|
-
|
13
|
-
color: #
|
21
|
+
font-family: 'Shadows Into Light', cursive;
|
22
|
+
background-color: #1B2864;
|
23
|
+
color: #99A3CE;
|
14
24
|
text-align: center;
|
15
|
-
border-bottom:
|
16
|
-
margin: 0;
|
17
|
-
padding: 0.
|
18
|
-
width:
|
25
|
+
border-bottom: 4px solid #424A70;
|
26
|
+
margin: 0 0 1em 0;
|
27
|
+
padding: 0.4em 0;
|
28
|
+
width: 100%;
|
19
29
|
}
|
20
|
-
|
30
|
+
h2
|
21
31
|
{
|
22
|
-
color
|
32
|
+
background-color: #44518E;
|
33
|
+
color: #C6CCE7;
|
34
|
+
text-align: left;
|
35
|
+
margin: 0 0 1em 0;
|
36
|
+
padding: 0.5em 5%;
|
37
|
+
border-radius: 20px 20px 0 0;
|
38
|
+
font-family: 'Architects Daughter', cursive;
|
39
|
+
border-bottom: 3px solid #424A70;
|
23
40
|
font-size: 1.2em;
|
24
|
-
|
41
|
+
}
|
42
|
+
h3
|
43
|
+
{
|
44
|
+
font-family: 'Architects Daughter', cursive;
|
45
|
+
background-color: #44518E;
|
46
|
+
color: #C6CCE7;
|
47
|
+
text-align: left;
|
48
|
+
margin: 0 0 1em 0;
|
49
|
+
padding: 0.5em 5%;
|
50
|
+
border-radius: 1em 1em 0 0;
|
51
|
+
border-bottom: 2px solid #424A70;
|
52
|
+
font-size: 1.1em;
|
53
|
+
}
|
54
|
+
h2:before {
|
55
|
+
content: "|||";
|
56
|
+
color: #99A3CE;
|
57
|
+
padding-right: 0.3em;
|
58
|
+
margin-left: -0.5em;
|
59
|
+
}
|
60
|
+
h3:before {
|
61
|
+
content: "|||||";
|
62
|
+
color: #99A3CE;
|
63
|
+
padding-right: 0.3em;
|
64
|
+
margin-left: -1em;
|
65
|
+
}
|
66
|
+
h1 a, h2 a, h3 a
|
67
|
+
{
|
68
|
+
color: #EBCD86;
|
69
|
+
}
|
70
|
+
h1 a:hover, h2 a:hover, h3 a:hover
|
71
|
+
{
|
72
|
+
color: #EBD7A6;
|
73
|
+
}
|
74
|
+
p
|
75
|
+
{
|
76
|
+
font-size: 1em;
|
77
|
+
padding: 0 1em;
|
78
|
+
margin: 0.5em 0;
|
79
|
+
}
|
80
|
+
a
|
81
|
+
{
|
82
|
+
color: #D0AC54;
|
83
|
+
text-decoration: none;
|
84
|
+
}
|
85
|
+
a:hover
|
86
|
+
{
|
87
|
+
color: #927121;
|
88
|
+
text-decoration: underline;
|
25
89
|
}
|
26
90
|
#wrapper
|
27
91
|
{
|
28
92
|
background-color: #fff;
|
29
93
|
margin: 1em 5%;
|
30
|
-
padding: 0 0 2
|
94
|
+
padding: 0 0 2%;
|
31
95
|
border-radius: 20px;
|
32
96
|
min-height: 50%;
|
33
97
|
color: #007;
|
34
98
|
}
|
35
|
-
|
99
|
+
|
100
|
+
#wrapper p{ padding: 0 2%;}
|
101
|
+
.bold { font-weight: bold; }
|
102
|
+
#wrapper ol li{ padding: 0 2%;}
|
103
|
+
pre
|
36
104
|
{
|
37
|
-
background-color: #ddd;
|
38
|
-
color: #008;
|
39
|
-
text-align: center;
|
40
|
-
margin: 0 0 1em 0;
|
41
|
-
padding: 0.5em 0;
|
42
|
-
width: 100%;
|
43
105
|
border-radius: 20px;
|
106
|
+
padding: 0.5em 0;
|
107
|
+
background-color: #444;
|
108
|
+
color: #ddd;
|
44
109
|
}
|
45
|
-
|
46
|
-
#wrapper #missing
|
110
|
+
@media screen and (max-width: 680px)
|
47
111
|
{
|
48
|
-
color:#904;
|
49
|
-
font-size: 1.4em;
|
50
|
-
padding: 0.5em 0;
|
51
|
-
text-align: center;
|
52
|
-
background-color: #fee;
|
53
|
-
border-bottom: 1px solid #800;
|
54
|
-
margin: 0;
|
55
112
|
}
|
56
113
|
%body
|
57
114
|
%h1< Plezi 500 error code (broken?!)...
|
data/resources/500.html
CHANGED
@@ -2,57 +2,115 @@
|
|
2
2
|
<head>
|
3
3
|
<style>
|
4
4
|
body, html
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
5
|
+
/*
|
6
|
+
med-blue: #44518E
|
7
|
+
dark-gray: #424A70
|
8
|
+
blue: #1B2864
|
9
|
+
light-blue: #818ECE
|
10
|
+
light-gray: #99A3CE
|
11
|
+
*/
|
12
|
+
body, html
|
13
|
+
{
|
14
|
+
background-color: #99A3CE;
|
15
|
+
padding: 0; margin: 0;
|
16
|
+
width: 100%;
|
17
|
+
font-size: 1em;
|
18
|
+
}
|
19
|
+
|
20
|
+
h1
|
21
|
+
{
|
22
|
+
font-family: 'Shadows Into Light', cursive;
|
23
|
+
background-color: #1B2864;
|
24
|
+
color: #99A3CE;
|
25
|
+
text-align: center;
|
26
|
+
border-bottom: 4px solid #424A70;
|
27
|
+
margin: 0 0 1em 0;
|
28
|
+
padding: 0.4em 0;
|
29
|
+
width: 100%;
|
30
|
+
}
|
31
|
+
h2
|
32
|
+
{
|
33
|
+
background-color: #44518E;
|
34
|
+
color: #C6CCE7;
|
35
|
+
text-align: left;
|
36
|
+
margin: 0 0 1em 0;
|
37
|
+
padding: 0.5em 5%;
|
38
|
+
border-radius: 20px 20px 0 0;
|
39
|
+
font-family: 'Architects Daughter', cursive;
|
40
|
+
border-bottom: 3px solid #424A70;
|
41
|
+
font-size: 1.2em;
|
42
|
+
}
|
43
|
+
h3
|
44
|
+
{
|
45
|
+
font-family: 'Architects Daughter', cursive;
|
46
|
+
background-color: #44518E;
|
47
|
+
color: #C6CCE7;
|
48
|
+
text-align: left;
|
49
|
+
margin: 0 0 1em 0;
|
50
|
+
padding: 0.5em 5%;
|
51
|
+
border-radius: 1em 1em 0 0;
|
52
|
+
border-bottom: 2px solid #424A70;
|
53
|
+
font-size: 1.1em;
|
54
|
+
}
|
55
|
+
h2:before {
|
56
|
+
content: "|||";
|
57
|
+
color: #99A3CE;
|
58
|
+
padding-right: 0.3em;
|
59
|
+
margin-left: -0.5em;
|
60
|
+
}
|
61
|
+
h3:before {
|
62
|
+
content: "|||||";
|
63
|
+
color: #99A3CE;
|
64
|
+
padding-right: 0.3em;
|
65
|
+
margin-left: -1em;
|
66
|
+
}
|
67
|
+
h1 a, h2 a, h3 a
|
68
|
+
{
|
69
|
+
color: #EBCD86;
|
70
|
+
}
|
71
|
+
h1 a:hover, h2 a:hover, h3 a:hover
|
72
|
+
{
|
73
|
+
color: #EBD7A6;
|
74
|
+
}
|
75
|
+
p
|
76
|
+
{
|
77
|
+
font-size: 1em;
|
78
|
+
padding: 0 1em;
|
79
|
+
margin: 0.5em 0;
|
80
|
+
}
|
81
|
+
a
|
82
|
+
{
|
83
|
+
color: #D0AC54;
|
84
|
+
text-decoration: none;
|
85
|
+
}
|
86
|
+
a:hover
|
87
|
+
{
|
88
|
+
color: #927121;
|
89
|
+
text-decoration: underline;
|
90
|
+
}
|
91
|
+
#wrapper
|
92
|
+
{
|
93
|
+
background-color: #fff;
|
94
|
+
margin: 1em 5%;
|
95
|
+
padding: 0 0 2%;
|
96
|
+
border-radius: 20px;
|
97
|
+
min-height: 50%;
|
98
|
+
color: #007;
|
99
|
+
}
|
100
|
+
|
101
|
+
#wrapper p{ padding: 0 2%;}
|
102
|
+
.bold { font-weight: bold; }
|
103
|
+
#wrapper ol li{ padding: 0 2%;}
|
104
|
+
pre
|
105
|
+
{
|
106
|
+
border-radius: 20px;
|
107
|
+
padding: 0.5em 0;
|
108
|
+
background-color: #444;
|
109
|
+
color: #ddd;
|
110
|
+
}
|
111
|
+
@media screen and (max-width: 680px)
|
112
|
+
{
|
113
|
+
}
|
56
114
|
</style>
|
57
115
|
</head>
|
58
116
|
<body>
|
data/resources/500.slim
CHANGED
@@ -1,57 +1,114 @@
|
|
1
1
|
doctype html
|
2
2
|
head
|
3
3
|
css:
|
4
|
+
/*
|
5
|
+
med-blue: #44518E
|
6
|
+
dark-gray: #424A70
|
7
|
+
blue: #1B2864
|
8
|
+
light-blue: #818ECE
|
9
|
+
light-gray: #99A3CE
|
10
|
+
*/
|
4
11
|
body, html
|
5
12
|
{
|
6
|
-
background-color: #
|
13
|
+
background-color: #99A3CE;
|
7
14
|
padding: 0; margin: 0;
|
8
15
|
width: 100%;
|
16
|
+
font-size: 1em;
|
9
17
|
}
|
18
|
+
|
10
19
|
h1
|
11
20
|
{
|
12
|
-
|
13
|
-
color: #
|
21
|
+
font-family: 'Shadows Into Light', cursive;
|
22
|
+
background-color: #1B2864;
|
23
|
+
color: #99A3CE;
|
14
24
|
text-align: center;
|
15
|
-
border-bottom:
|
16
|
-
margin: 0;
|
17
|
-
padding: 0.
|
18
|
-
width:
|
25
|
+
border-bottom: 4px solid #424A70;
|
26
|
+
margin: 0 0 1em 0;
|
27
|
+
padding: 0.4em 0;
|
28
|
+
width: 100%;
|
19
29
|
}
|
20
|
-
|
30
|
+
h2
|
21
31
|
{
|
22
|
-
color
|
32
|
+
background-color: #44518E;
|
33
|
+
color: #C6CCE7;
|
34
|
+
text-align: left;
|
35
|
+
margin: 0 0 1em 0;
|
36
|
+
padding: 0.5em 5%;
|
37
|
+
border-radius: 20px 20px 0 0;
|
38
|
+
font-family: 'Architects Daughter', cursive;
|
39
|
+
border-bottom: 3px solid #424A70;
|
23
40
|
font-size: 1.2em;
|
41
|
+
}
|
42
|
+
h3
|
43
|
+
{
|
44
|
+
font-family: 'Architects Daughter', cursive;
|
45
|
+
background-color: #44518E;
|
46
|
+
color: #C6CCE7;
|
47
|
+
text-align: left;
|
48
|
+
margin: 0 0 1em 0;
|
49
|
+
padding: 0.5em 5%;
|
50
|
+
border-radius: 1em 1em 0 0;
|
51
|
+
border-bottom: 2px solid #424A70;
|
52
|
+
font-size: 1.1em;
|
53
|
+
}
|
54
|
+
h2:before {
|
55
|
+
content: "|||";
|
56
|
+
color: #99A3CE;
|
57
|
+
padding-right: 0.3em;
|
58
|
+
margin-left: -0.5em;
|
59
|
+
}
|
60
|
+
h3:before {
|
61
|
+
content: "|||||";
|
62
|
+
color: #99A3CE;
|
63
|
+
padding-right: 0.3em;
|
64
|
+
margin-left: -1em;
|
65
|
+
}
|
66
|
+
h1 a, h2 a, h3 a
|
67
|
+
{
|
68
|
+
color: #EBCD86;
|
69
|
+
}
|
70
|
+
h1 a:hover, h2 a:hover, h3 a:hover
|
71
|
+
{
|
72
|
+
color: #EBD7A6;
|
73
|
+
}
|
74
|
+
p
|
75
|
+
{
|
76
|
+
font-size: 1em;
|
24
77
|
padding: 0 1em;
|
78
|
+
margin: 0.5em 0;
|
79
|
+
}
|
80
|
+
a
|
81
|
+
{
|
82
|
+
color: #D0AC54;
|
83
|
+
text-decoration: none;
|
84
|
+
}
|
85
|
+
a:hover
|
86
|
+
{
|
87
|
+
color: #927121;
|
88
|
+
text-decoration: underline;
|
25
89
|
}
|
26
90
|
#wrapper
|
27
91
|
{
|
28
92
|
background-color: #fff;
|
29
93
|
margin: 1em 5%;
|
30
|
-
padding: 0 0 2
|
94
|
+
padding: 0 0 2%;
|
31
95
|
border-radius: 20px;
|
32
96
|
min-height: 50%;
|
33
97
|
color: #007;
|
34
98
|
}
|
35
|
-
|
99
|
+
|
100
|
+
#wrapper p{ padding: 0 2%;}
|
101
|
+
.bold { font-weight: bold; }
|
102
|
+
#wrapper ol li{ padding: 0 2%;}
|
103
|
+
pre
|
36
104
|
{
|
37
|
-
background-color: #ddd;
|
38
|
-
color: #008;
|
39
|
-
text-align: center;
|
40
|
-
margin: 0 0 1em 0;
|
41
|
-
padding: 0.5em 0;
|
42
|
-
width: 100%;
|
43
105
|
border-radius: 20px;
|
106
|
+
padding: 0.5em 0;
|
107
|
+
background-color: #444;
|
108
|
+
color: #ddd;
|
44
109
|
}
|
45
|
-
|
46
|
-
#wrapper #missing
|
110
|
+
@media screen and (max-width: 680px)
|
47
111
|
{
|
48
|
-
color:#904;
|
49
|
-
font-size: 1.4em;
|
50
|
-
padding: 0.5em 0;
|
51
|
-
text-align: center;
|
52
|
-
background-color: #fee;
|
53
|
-
border-bottom: 1px solid #800;
|
54
|
-
margin: 0;
|
55
112
|
}
|
56
113
|
body
|
57
114
|
h1 Plezi 500 error code (broken?!)...
|
data/resources/controller.rb
CHANGED
@@ -122,7 +122,8 @@ class SampleController
|
|
122
122
|
data = Plezi::HTTP.escape data
|
123
123
|
broadcast :_print_out, data
|
124
124
|
response << "You said: #{data}"
|
125
|
-
|
125
|
+
response << (request.ssl? ? "FYI: Yes, This is an SSL connection..." : "FYI: Nope, this isn't an SSL connection (clear text).") if data.match /ssl\?/i
|
126
|
+
end
|
126
127
|
|
127
128
|
# called when a disconnect packet has been recieved or the connection has been cut
|
128
129
|
# (ISN'T called after a disconnect message has been sent).
|