plezi 0.12.22 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/LICENSE.txt +17 -18
- data/README.md +54 -698
- data/Rakefile +7 -4
- data/bin/config.ru +22 -0
- data/{test → bin}/console +4 -6
- data/bin/hello_world +52 -0
- data/bin/setup +8 -0
- data/exe/plezi +145 -0
- data/lib/plezi.rb +24 -137
- data/lib/plezi/activation.rb +28 -0
- data/lib/plezi/api.rb +62 -0
- data/lib/plezi/controller/controller.rb +259 -0
- data/lib/plezi/controller/controller_class.rb +176 -0
- data/lib/plezi/controller/cookies.rb +40 -0
- data/lib/plezi/helpers.rb +60 -0
- data/lib/plezi/rake.rb +2 -24
- data/lib/plezi/render/erb.rb +34 -0
- data/lib/plezi/render/has_cache.rb +36 -0
- data/lib/plezi/render/markdown.rb +63 -0
- data/lib/plezi/render/render.rb +49 -0
- data/lib/plezi/render/sass.rb +55 -0
- data/lib/plezi/render/slim.rb +33 -0
- data/lib/plezi/router/adclient.rb +23 -0
- data/lib/plezi/router/assets.rb +67 -0
- data/lib/plezi/router/errors.rb +29 -0
- data/lib/plezi/router/route.rb +112 -0
- data/lib/plezi/router/router.rb +120 -0
- data/lib/plezi/version.rb +1 -1
- data/lib/plezi/websockets/message_dispatch.rb +91 -0
- data/lib/plezi/websockets/redis.rb +55 -0
- data/plezi.gemspec +25 -16
- data/resources/404.erb +5 -4
- data/resources/500.erb +5 -4
- data/resources/{500.html → 503.html} +8 -9
- data/resources/client.js +253 -0
- data/resources/config.ru +5 -36
- data/resources/ctrlr.rb +34 -0
- data/resources/gemfile +4 -0
- data/resources/mini_app.rb +28 -82
- data/resources/mini_exec +7 -0
- data/resources/mini_welcome_page.html +0 -0
- data/resources/procfile +3 -0
- data/resources/rakefile +4 -8
- data/resources/routes.rb +9 -26
- data/resources/{websockets.js → simple-client.js} +3 -3
- metadata +60 -85
- data/bin/plezi +0 -104
- data/docs/async_helpers.md +0 -245
- data/docs/controllers.md +0 -27
- data/docs/logging.md +0 -49
- data/docs/routes.md +0 -209
- data/docs/websockets.md +0 -213
- data/lib/plezi/builders/ac_model.rb +0 -59
- data/lib/plezi/builders/app_builder.rb +0 -137
- data/lib/plezi/builders/builder.rb +0 -43
- data/lib/plezi/builders/form_builder.rb +0 -27
- data/lib/plezi/common/api.rb +0 -92
- data/lib/plezi/common/cache.rb +0 -122
- data/lib/plezi/common/defer.rb +0 -21
- data/lib/plezi/common/dsl.rb +0 -94
- data/lib/plezi/common/redis.rb +0 -65
- data/lib/plezi/common/renderer.rb +0 -141
- data/lib/plezi/common/settings.rb +0 -52
- data/lib/plezi/handlers/controller_core.rb +0 -106
- data/lib/plezi/handlers/controller_magic.rb +0 -284
- data/lib/plezi/handlers/http_router.rb +0 -205
- data/lib/plezi/handlers/placebo.rb +0 -112
- data/lib/plezi/handlers/route.rb +0 -216
- data/lib/plezi/handlers/session.rb +0 -109
- data/lib/plezi/handlers/stubs.rb +0 -156
- data/lib/plezi/handlers/ws_identity.rb +0 -253
- data/lib/plezi/handlers/ws_object.rb +0 -308
- data/lib/plezi/helpers/http_sender.rb +0 -84
- data/lib/plezi/helpers/magic_helpers.rb +0 -104
- data/lib/plezi/helpers/mime_types.rb +0 -1995
- data/lib/plezi/oauth.rb +0 -5
- data/lib/plezi/oauth/auth_controller.rb +0 -229
- data/logo/dark.png +0 -0
- data/logo/light.png +0 -0
- data/logo/sign.png +0 -0
- data/resources/404.haml +0 -121
- data/resources/404.html +0 -124
- data/resources/404.slim +0 -120
- data/resources/500.haml +0 -120
- data/resources/500.slim +0 -120
- data/resources/Gemfile +0 -86
- data/resources/code.rb +0 -8
- data/resources/controller.rb +0 -142
- data/resources/database.yml +0 -33
- data/resources/db_ac_config.rb +0 -59
- data/resources/db_dm_config.rb +0 -51
- data/resources/db_sequel_config.rb +0 -33
- data/resources/en.yml +0 -204
- data/resources/haml_config.rb +0 -6
- data/resources/i18n_config.rb +0 -14
- data/resources/initialize.rb +0 -49
- data/resources/mini_exec.rb +0 -7
- data/resources/oauth_config.rb +0 -24
- data/resources/plezi_client.js +0 -198
- data/resources/plezi_websockets.html +0 -47
- data/resources/redis_config.rb +0 -42
- data/resources/slim_config.rb +0 -11
- data/resources/welcome_page.html +0 -272
- data/test/dispatch +0 -58
- data/test/hello_world +0 -13
- data/test/plezi_tests.rb +0 -581
data/resources/404.slim
DELETED
@@ -1,120 +0,0 @@
|
|
1
|
-
doctype html
|
2
|
-
head
|
3
|
-
css:
|
4
|
-
/*
|
5
|
-
med-blue: #44518E
|
6
|
-
dark-gray: #424A70
|
7
|
-
blue: #1B2864
|
8
|
-
light-blue: #818ECE
|
9
|
-
light-gray: #99A3CE
|
10
|
-
*/
|
11
|
-
body, html
|
12
|
-
{
|
13
|
-
background-color: #99A3CE;
|
14
|
-
padding: 0; margin: 0;
|
15
|
-
width: 100%;
|
16
|
-
font-size: 1em;
|
17
|
-
}
|
18
|
-
|
19
|
-
h1
|
20
|
-
{
|
21
|
-
font-family: 'Shadows Into Light', cursive;
|
22
|
-
background-color: #1B2864;
|
23
|
-
color: #99A3CE;
|
24
|
-
text-align: center;
|
25
|
-
border-bottom: 4px solid #424A70;
|
26
|
-
margin: 0 0 1em 0;
|
27
|
-
padding: 0.4em 0;
|
28
|
-
width: 100%;
|
29
|
-
}
|
30
|
-
h2
|
31
|
-
{
|
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;
|
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;
|
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;
|
89
|
-
}
|
90
|
-
#wrapper
|
91
|
-
{
|
92
|
-
background-color: #fff;
|
93
|
-
margin: 1em 5%;
|
94
|
-
padding: 0 0 2%;
|
95
|
-
border-radius: 20px;
|
96
|
-
min-height: 50%;
|
97
|
-
color: #007;
|
98
|
-
}
|
99
|
-
|
100
|
-
#wrapper p{ padding: 0 2%;}
|
101
|
-
.bold { font-weight: bold; }
|
102
|
-
#wrapper ol li{ padding: 0 2%;}
|
103
|
-
pre
|
104
|
-
{
|
105
|
-
border-radius: 20px;
|
106
|
-
padding: 0.5em 0;
|
107
|
-
background-color: #444;
|
108
|
-
color: #ddd;
|
109
|
-
}
|
110
|
-
@media screen and (max-width: 680px)
|
111
|
-
{
|
112
|
-
}
|
113
|
-
body
|
114
|
-
h1 Plezi 404 error code (missing, not broken)...
|
115
|
-
#wrapper
|
116
|
-
h2#missing
|
117
|
-
| couldn't find
|
118
|
-
=< defined?(request) ? request.path : "what you're looking for..."
|
119
|
-
p Sorry, we couldn't find what you're looking for...
|
120
|
-
p ... but we can always bring you something nice from another location, right?
|
data/resources/500.haml
DELETED
@@ -1,120 +0,0 @@
|
|
1
|
-
!!!5
|
2
|
-
%head
|
3
|
-
:css
|
4
|
-
/*
|
5
|
-
med-blue: #44518E
|
6
|
-
dark-gray: #424A70
|
7
|
-
blue: #1B2864
|
8
|
-
light-blue: #818ECE
|
9
|
-
light-gray: #99A3CE
|
10
|
-
*/
|
11
|
-
body, html
|
12
|
-
{
|
13
|
-
background-color: #99A3CE;
|
14
|
-
padding: 0; margin: 0;
|
15
|
-
width: 100%;
|
16
|
-
font-size: 1em;
|
17
|
-
}
|
18
|
-
|
19
|
-
h1
|
20
|
-
{
|
21
|
-
font-family: 'Shadows Into Light', cursive;
|
22
|
-
background-color: #1B2864;
|
23
|
-
color: #99A3CE;
|
24
|
-
text-align: center;
|
25
|
-
border-bottom: 4px solid #424A70;
|
26
|
-
margin: 0 0 1em 0;
|
27
|
-
padding: 0.4em 0;
|
28
|
-
width: 100%;
|
29
|
-
}
|
30
|
-
h2
|
31
|
-
{
|
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;
|
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;
|
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;
|
89
|
-
}
|
90
|
-
#wrapper
|
91
|
-
{
|
92
|
-
background-color: #fff;
|
93
|
-
margin: 1em 5%;
|
94
|
-
padding: 0 0 2%;
|
95
|
-
border-radius: 20px;
|
96
|
-
min-height: 50%;
|
97
|
-
color: #007;
|
98
|
-
}
|
99
|
-
|
100
|
-
#wrapper p{ padding: 0 2%;}
|
101
|
-
.bold { font-weight: bold; }
|
102
|
-
#wrapper ol li{ padding: 0 2%;}
|
103
|
-
pre
|
104
|
-
{
|
105
|
-
border-radius: 20px;
|
106
|
-
padding: 0.5em 0;
|
107
|
-
background-color: #444;
|
108
|
-
color: #ddd;
|
109
|
-
}
|
110
|
-
@media screen and (max-width: 680px)
|
111
|
-
{
|
112
|
-
}
|
113
|
-
%body
|
114
|
-
%h1< Plezi 500 error code (broken?!)...
|
115
|
-
#wrapper
|
116
|
-
%h2#missing
|
117
|
-
something went wrong with:
|
118
|
-
= defined?(request) ? request.path : "what you're looking for..."
|
119
|
-
%p Sorry, something went wrong trying to process your request...
|
120
|
-
%p ... Please try again soon and if this issue persists, please let us know.
|
data/resources/500.slim
DELETED
@@ -1,120 +0,0 @@
|
|
1
|
-
doctype html
|
2
|
-
head
|
3
|
-
css:
|
4
|
-
/*
|
5
|
-
med-blue: #44518E
|
6
|
-
dark-gray: #424A70
|
7
|
-
blue: #1B2864
|
8
|
-
light-blue: #818ECE
|
9
|
-
light-gray: #99A3CE
|
10
|
-
*/
|
11
|
-
body, html
|
12
|
-
{
|
13
|
-
background-color: #99A3CE;
|
14
|
-
padding: 0; margin: 0;
|
15
|
-
width: 100%;
|
16
|
-
font-size: 1em;
|
17
|
-
}
|
18
|
-
|
19
|
-
h1
|
20
|
-
{
|
21
|
-
font-family: 'Shadows Into Light', cursive;
|
22
|
-
background-color: #1B2864;
|
23
|
-
color: #99A3CE;
|
24
|
-
text-align: center;
|
25
|
-
border-bottom: 4px solid #424A70;
|
26
|
-
margin: 0 0 1em 0;
|
27
|
-
padding: 0.4em 0;
|
28
|
-
width: 100%;
|
29
|
-
}
|
30
|
-
h2
|
31
|
-
{
|
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;
|
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;
|
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;
|
89
|
-
}
|
90
|
-
#wrapper
|
91
|
-
{
|
92
|
-
background-color: #fff;
|
93
|
-
margin: 1em 5%;
|
94
|
-
padding: 0 0 2%;
|
95
|
-
border-radius: 20px;
|
96
|
-
min-height: 50%;
|
97
|
-
color: #007;
|
98
|
-
}
|
99
|
-
|
100
|
-
#wrapper p{ padding: 0 2%;}
|
101
|
-
.bold { font-weight: bold; }
|
102
|
-
#wrapper ol li{ padding: 0 2%;}
|
103
|
-
pre
|
104
|
-
{
|
105
|
-
border-radius: 20px;
|
106
|
-
padding: 0.5em 0;
|
107
|
-
background-color: #444;
|
108
|
-
color: #ddd;
|
109
|
-
}
|
110
|
-
@media screen and (max-width: 680px)
|
111
|
-
{
|
112
|
-
}
|
113
|
-
body
|
114
|
-
h1 Plezi 500 error code (broken?!)...
|
115
|
-
#wrapper
|
116
|
-
h2#missing
|
117
|
-
| something went wrong with:
|
118
|
-
=< defined?(request) ? request.path : "what you're looking for..."
|
119
|
-
p Sorry, something went wrong trying to process your request...
|
120
|
-
p ... Please try again soon and if this issue persists, please let us know.
|
data/resources/Gemfile
DELETED
@@ -1,86 +0,0 @@
|
|
1
|
-
|
2
|
-
####################
|
3
|
-
# development gems
|
4
|
-
|
5
|
-
## use pry gem for basic debug ( put `binding.pry` at breake point )?
|
6
|
-
# gem 'pry'
|
7
|
-
|
8
|
-
## use rake tasks with bundle exec?
|
9
|
-
# gem 'rake'
|
10
|
-
|
11
|
-
####################
|
12
|
-
# gems for easy markup
|
13
|
-
|
14
|
-
## Slim is very recommended for HTML markup, it's both easy and fast. We LOVE it.
|
15
|
-
# gem 'slim'
|
16
|
-
|
17
|
-
## Sass makes CSS easy
|
18
|
-
# gem "sass"
|
19
|
-
|
20
|
-
## we love Haml, even though it can be slow:
|
21
|
-
# gem 'haml'
|
22
|
-
|
23
|
-
## Coffee Script makes Javascript more fun to code.
|
24
|
-
# gem "coffee-script"
|
25
|
-
|
26
|
-
## Markdown
|
27
|
-
# gem 'redcarpet'
|
28
|
-
## syntax highlighting
|
29
|
-
# gem 'rouge'
|
30
|
-
|
31
|
-
####################
|
32
|
-
# Internationalization
|
33
|
-
|
34
|
-
# gem 'i18n'
|
35
|
-
|
36
|
-
####################
|
37
|
-
# WebSocket Scaling
|
38
|
-
|
39
|
-
## Redis servers are used to allow websocket scaling.
|
40
|
-
## Plezi can be configured to automatically use Redis for easy scaling.
|
41
|
-
|
42
|
-
# gem 'redis'
|
43
|
-
|
44
|
-
####################
|
45
|
-
# gems for databases and models
|
46
|
-
|
47
|
-
## if you want to use a database, here are a few common enough options:
|
48
|
-
# gem 'mysql2'
|
49
|
-
# gem 'sqlite3'
|
50
|
-
# gem 'pg'
|
51
|
-
|
52
|
-
## MongoDB is a very well known NoSQL DB
|
53
|
-
## https://github.com/mongodb/mongo-ruby-driver
|
54
|
-
#
|
55
|
-
# gem 'mongo'
|
56
|
-
#
|
57
|
-
## for a performance boost, the C extentions can be used (NOT JRuby - bson_ext isn't used with JRuby).
|
58
|
-
#
|
59
|
-
# gem 'bson_ext'
|
60
|
-
#
|
61
|
-
## you can also have a look at the Mongo Mapper ORM
|
62
|
-
## http://mongomapper.com
|
63
|
-
#
|
64
|
-
# gem 'mongo_mapper'
|
65
|
-
|
66
|
-
## Sequel:
|
67
|
-
## http://sequel.jeremyevans.net/rdoc/files/README_rdoc.html
|
68
|
-
## http://sequel.jeremyevans.net/rdoc/files/doc/cheat_sheet_rdoc.html
|
69
|
-
## this seems greate, but we left out any auto-config for this one... seems to work out of the box.
|
70
|
-
#
|
71
|
-
# gem 'sequel'
|
72
|
-
|
73
|
-
## if you want to use ActiveRecord, uncomment the following line(s)...
|
74
|
-
## but first, please remember that AcriveRecord needs extra attention when multi-threading
|
75
|
-
# gem 'activerecord', :require => 'active_record'
|
76
|
-
# gem 'bcrypt', '~> 3.1.7'
|
77
|
-
# gem 'standalone_migrations' # will more rake tasks support for ActiveRecord
|
78
|
-
|
79
|
-
## active support can run without rails and extends the Ruby language.
|
80
|
-
## it could be heavy, be warned.
|
81
|
-
## see: http://guides.rubyonrails.org/active_support_core_extensions.html
|
82
|
-
#
|
83
|
-
# gem 'activesupport', :require => ['active_support', 'active_support/core_ext']
|
84
|
-
## or:
|
85
|
-
# gem 'activesupport', :require => ['active_support', 'active_support/all']
|
86
|
-
|