showoff 0.7.0 → 0.9.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +7 -0
  2. data/README.rdoc +53 -475
  3. data/Rakefile +17 -18
  4. data/bin/showoff +29 -7
  5. data/lib/commandline_parser.rb +1 -1
  6. data/lib/showoff/version.rb +3 -0
  7. data/lib/showoff.rb +600 -91
  8. data/lib/showoff_utils.rb +110 -4
  9. data/public/css/disconnected-large.png +0 -0
  10. data/public/css/disconnected.png +0 -0
  11. data/public/css/fast.png +0 -0
  12. data/public/css/grippy-close.png +0 -0
  13. data/public/css/grippy.png +0 -0
  14. data/public/css/onepage.css +6 -0
  15. data/public/css/pace.png +0 -0
  16. data/public/css/paceMarker.png +0 -0
  17. data/public/css/presenter.css +333 -43
  18. data/public/css/sh_style.css +15 -0
  19. data/public/css/showoff.css +373 -48
  20. data/public/css/slow.png +0 -0
  21. data/public/css/spinner.gif +0 -0
  22. data/public/css/tipsy.css +26 -0
  23. data/public/favicon.ico +0 -0
  24. data/public/js/jquery.parsequery.min.js +2 -0
  25. data/public/js/jquery.tipsy.js +260 -0
  26. data/public/js/onepage.js +2 -3
  27. data/public/js/presenter.js +384 -33
  28. data/public/js/sh_lang/sh_gherkin.js +112 -0
  29. data/public/js/sh_lang/sh_gherkin.min.js +1 -0
  30. data/public/js/sh_lang/sh_ini.js +87 -0
  31. data/public/js/sh_lang/sh_ini.min.js +87 -0
  32. data/public/js/sh_lang/sh_puppet.js +182 -0
  33. data/public/js/sh_lang/sh_puppet.min.js +182 -0
  34. data/public/js/sh_lang/sh_puppet_output.js +22 -0
  35. data/public/js/sh_lang/sh_puppet_output.min.js +22 -0
  36. data/public/js/sh_lang/sh_shell.min.js +1 -0
  37. data/public/js/showoff.js +423 -51
  38. data/views/404.erb +19 -0
  39. data/views/download.erb +36 -0
  40. data/views/header.erb +35 -25
  41. data/views/header_mini.erb +22 -0
  42. data/views/index.erb +46 -1
  43. data/views/onepage.erb +35 -14
  44. data/views/presenter.erb +63 -21
  45. data/views/stats.erb +73 -0
  46. metadata +170 -131
  47. data/public/css/960.css +0 -653
  48. data/public/css/pdf.css +0 -12
@@ -0,0 +1,87 @@
1
+ if (! this.sh_languages) {
2
+ this.sh_languages = {};
3
+ }
4
+ sh_languages['ini'] = [
5
+ [
6
+ [
7
+ /\[[A-Za-z0-9]+\]/g,
8
+ 'sh_param',
9
+ -1
10
+ ],
11
+ [
12
+ /\b[A-Za-z0-9]+(?=\s*=)/g,
13
+ 'sh_attribute',
14
+ -1
15
+ ],
16
+ [
17
+ /(?:^\=begin)/g,
18
+ 'sh_comment',
19
+ 4
20
+ ],
21
+ [
22
+ /#/g,
23
+ 'sh_comment',
24
+ 1
25
+ ]
26
+ ],
27
+ [
28
+ [
29
+ /$/g,
30
+ null,
31
+ -2
32
+ ],
33
+ [
34
+ /\\(?:\\|")/g,
35
+ null,
36
+ -1
37
+ ],
38
+ [
39
+ /"/g,
40
+ 'sh_string',
41
+ -2
42
+ ]
43
+ ],
44
+ [
45
+ [
46
+ /$/g,
47
+ null,
48
+ -2
49
+ ],
50
+ [
51
+ /\\(?:\\|')/g,
52
+ null,
53
+ -1
54
+ ],
55
+ [
56
+ /'/g,
57
+ 'sh_string',
58
+ -2
59
+ ]
60
+ ],
61
+ [
62
+ [
63
+ /$/g,
64
+ null,
65
+ -2
66
+ ],
67
+ [
68
+ />/g,
69
+ 'sh_string',
70
+ -2
71
+ ]
72
+ ],
73
+ [
74
+ [
75
+ /^(?:\=end)/g,
76
+ 'sh_comment',
77
+ 5
78
+ ]
79
+ ],
80
+ [
81
+ [
82
+ /$/g,
83
+ null,
84
+ -2
85
+ ]
86
+ ]
87
+ ];
@@ -0,0 +1,182 @@
1
+ if (! this.sh_languages) {
2
+ this.sh_languages = {};
3
+ }
4
+ sh_languages['puppet'] = [
5
+ [
6
+ [
7
+ /\b(?:require)\b/g,
8
+ 'sh_preproc',
9
+ -1
10
+ ],
11
+ [
12
+ /'?puppet:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)'?/g,
13
+ 'sh_puppet_uri',
14
+ -1
15
+ ],
16
+ [
17
+ /\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g,
18
+ 'sh_number',
19
+ -1
20
+ ],
21
+ [
22
+ /"/g,
23
+ 'sh_string',
24
+ 1
25
+ ],
26
+ [
27
+ /'/g,
28
+ 'sh_string',
29
+ 2
30
+ ],
31
+ [
32
+ /</g,
33
+ 'sh_string',
34
+ 3
35
+ ],
36
+ [
37
+ /\/[^\n]*\//g,
38
+ 'sh_regexp',
39
+ -1
40
+ ],
41
+ [
42
+ /(%r)(\{(?:\\\}|#\{[A-Za-z0-9]+\}|[^}])*\})/g,
43
+ ['sh_symbol', 'sh_regexp'],
44
+ -1
45
+ ],
46
+ [
47
+ /\b[A-Za-z0-9]+(?=\s*[=|\+]>)/g,
48
+ 'sh_attribute',
49
+ -1
50
+ ],
51
+ [
52
+ /=>|\+>/g,
53
+ 'sh_hashrocket',
54
+ -1
55
+ ],
56
+ [
57
+ /\b(?:class|define|node)\b/g,
58
+ 'sh_param',
59
+ -1
60
+ ],
61
+ [
62
+ /\b(?:present|absent|purged|latest|installed|running|stopped|mounted|unmounted|role|configured|file|directory|link)\b/g,
63
+ 'sh_ensure',
64
+ -1
65
+ ],
66
+ [
67
+ /[A-Z][A-Za-z0-9]+\[.*\]/g,
68
+ 'sh_reference',
69
+ -1
70
+ ],
71
+ [
72
+ /\b(?:alert|crit|debug|emerg|err|fail|include|info|notice|realize|require|search|tag|warning)\b/g,
73
+ 'sh_function',
74
+ -1
75
+ ],
76
+ [
77
+ /\b(?:defined|file|fqdn_rand|generate|inline_template|regsubst|sha1|shellquote|split|sprintf|tagged|template|versioncmp)\b/g,
78
+ 'sh_function',
79
+ -1
80
+ ],
81
+ [
82
+ /\b(?:true|false|undef|import|inherits|include|case|default|if|else|elsif)\b/g,
83
+ 'sh_keyword',
84
+ -1
85
+ ],
86
+ [
87
+ /(?:^\=begin)/g,
88
+ 'sh_comment',
89
+ 4
90
+ ],
91
+ [
92
+ /(?:\$[#]?|@@|@)(?:[A-Za-z0-9_]+|'|\"|\/)/g,
93
+ 'sh_type',
94
+ -1
95
+ ],
96
+ [
97
+ /[A-Za-z0-9]+(?:\?|!)/g,
98
+ 'sh_normal',
99
+ -1
100
+ ],
101
+ [
102
+ /~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g,
103
+ 'sh_symbol',
104
+ -1
105
+ ],
106
+ [
107
+ /(#)(\{)/g,
108
+ ['sh_symbol', 'sh_cbracket'],
109
+ -1
110
+ ],
111
+ [
112
+ /#/g,
113
+ 'sh_comment',
114
+ 1
115
+ ],
116
+ [
117
+ /\{|\}/g,
118
+ 'sh_cbracket',
119
+ -1
120
+ ]
121
+ ],
122
+ [
123
+ [
124
+ /$/g,
125
+ null,
126
+ -2
127
+ ],
128
+ [
129
+ /\\(?:\\|")/g,
130
+ null,
131
+ -1
132
+ ],
133
+ [
134
+ /"/g,
135
+ 'sh_string',
136
+ -2
137
+ ]
138
+ ],
139
+ [
140
+ [
141
+ /$/g,
142
+ null,
143
+ -2
144
+ ],
145
+ [
146
+ /\\(?:\\|')/g,
147
+ null,
148
+ -1
149
+ ],
150
+ [
151
+ /'/g,
152
+ 'sh_string',
153
+ -2
154
+ ]
155
+ ],
156
+ [
157
+ [
158
+ /$/g,
159
+ null,
160
+ -2
161
+ ],
162
+ [
163
+ />/g,
164
+ 'sh_string',
165
+ -2
166
+ ]
167
+ ],
168
+ [
169
+ [
170
+ /^(?:\=end)/g,
171
+ 'sh_comment',
172
+ 5
173
+ ]
174
+ ],
175
+ [
176
+ [
177
+ /$/g,
178
+ null,
179
+ -2
180
+ ]
181
+ ]
182
+ ];
@@ -0,0 +1,182 @@
1
+ if (! this.sh_languages) {
2
+ this.sh_languages = {};
3
+ }
4
+ sh_languages['puppet'] = [
5
+ [
6
+ [
7
+ /\b(?:require)\b/g,
8
+ 'sh_preproc',
9
+ -1
10
+ ],
11
+ [
12
+ /'?puppet:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)'?/g,
13
+ 'sh_puppet_uri',
14
+ -1
15
+ ],
16
+ [
17
+ /\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g,
18
+ 'sh_number',
19
+ -1
20
+ ],
21
+ [
22
+ /"/g,
23
+ 'sh_string',
24
+ 1
25
+ ],
26
+ [
27
+ /'/g,
28
+ 'sh_string',
29
+ 2
30
+ ],
31
+ [
32
+ /</g,
33
+ 'sh_string',
34
+ 3
35
+ ],
36
+ [
37
+ /\/[^\n]*\//g,
38
+ 'sh_regexp',
39
+ -1
40
+ ],
41
+ [
42
+ /(%r)(\{(?:\\\}|#\{[A-Za-z0-9]+\}|[^}])*\})/g,
43
+ ['sh_symbol', 'sh_regexp'],
44
+ -1
45
+ ],
46
+ [
47
+ /\b[A-Za-z0-9]+(?=\s*[=|\+]>)/g,
48
+ 'sh_attribute',
49
+ -1
50
+ ],
51
+ [
52
+ /=>|\+>/g,
53
+ 'sh_hashrocket',
54
+ -1
55
+ ],
56
+ [
57
+ /\b(?:class|define|node)\b/g,
58
+ 'sh_param',
59
+ -1
60
+ ],
61
+ [
62
+ /\b(?:present|absent|purged|latest|installed|running|stopped|mounted|unmounted|role|configured|file|directory|link)\b/g,
63
+ 'sh_ensure',
64
+ -1
65
+ ],
66
+ [
67
+ /[A-Z][A-Za-z0-9]+\[.*\]/g,
68
+ 'sh_reference',
69
+ -1
70
+ ],
71
+ [
72
+ /\b(?:alert|crit|debug|emerg|err|fail|include|info|notice|realize|require|search|tag|warning)\b/g,
73
+ 'sh_function',
74
+ -1
75
+ ],
76
+ [
77
+ /\b(?:defined|file|fqdn_rand|generate|inline_template|regsubst|sha1|shellquote|split|sprintf|tagged|template|versioncmp)\b/g,
78
+ 'sh_function',
79
+ -1
80
+ ],
81
+ [
82
+ /\b(?:true|false|undef|import|inherits|include|case|default|if|else|elsif)\b/g,
83
+ 'sh_keyword',
84
+ -1
85
+ ],
86
+ [
87
+ /(?:^\=begin)/g,
88
+ 'sh_comment',
89
+ 4
90
+ ],
91
+ [
92
+ /(?:\$[#]?|@@|@)(?:[A-Za-z0-9_]+|'|\"|\/)/g,
93
+ 'sh_type',
94
+ -1
95
+ ],
96
+ [
97
+ /[A-Za-z0-9]+(?:\?|!)/g,
98
+ 'sh_normal',
99
+ -1
100
+ ],
101
+ [
102
+ /~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g,
103
+ 'sh_symbol',
104
+ -1
105
+ ],
106
+ [
107
+ /(#)(\{)/g,
108
+ ['sh_symbol', 'sh_cbracket'],
109
+ -1
110
+ ],
111
+ [
112
+ /#/g,
113
+ 'sh_comment',
114
+ 1
115
+ ],
116
+ [
117
+ /\{|\}/g,
118
+ 'sh_cbracket',
119
+ -1
120
+ ]
121
+ ],
122
+ [
123
+ [
124
+ /$/g,
125
+ null,
126
+ -2
127
+ ],
128
+ [
129
+ /\\(?:\\|")/g,
130
+ null,
131
+ -1
132
+ ],
133
+ [
134
+ /"/g,
135
+ 'sh_string',
136
+ -2
137
+ ]
138
+ ],
139
+ [
140
+ [
141
+ /$/g,
142
+ null,
143
+ -2
144
+ ],
145
+ [
146
+ /\\(?:\\|')/g,
147
+ null,
148
+ -1
149
+ ],
150
+ [
151
+ /'/g,
152
+ 'sh_string',
153
+ -2
154
+ ]
155
+ ],
156
+ [
157
+ [
158
+ /$/g,
159
+ null,
160
+ -2
161
+ ],
162
+ [
163
+ />/g,
164
+ 'sh_string',
165
+ -2
166
+ ]
167
+ ],
168
+ [
169
+ [
170
+ /^(?:\=end)/g,
171
+ 'sh_comment',
172
+ 5
173
+ ]
174
+ ],
175
+ [
176
+ [
177
+ /$/g,
178
+ null,
179
+ -2
180
+ ]
181
+ ]
182
+ ];
@@ -0,0 +1,22 @@
1
+ if (! this.sh_languages) {
2
+ this.sh_languages = {};
3
+ }
4
+ sh_languages['puppet_output'] = [
5
+ [
6
+ [
7
+ /^[iI]nfo:.*/g,
8
+ 'sh_info',
9
+ -1
10
+ ],
11
+ [
12
+ /^[nN]otice:.*/g,
13
+ 'sh_notice',
14
+ -1
15
+ ],
16
+ [
17
+ /^[wW]arning:.*/g,
18
+ 'sh_warning',
19
+ -1
20
+ ]
21
+ ]
22
+ ];
@@ -0,0 +1,22 @@
1
+ if (! this.sh_languages) {
2
+ this.sh_languages = {};
3
+ }
4
+ sh_languages['puppet_output'] = [
5
+ [
6
+ [
7
+ /^[iI]nfo:.*/g,
8
+ 'sh_info',
9
+ -1
10
+ ],
11
+ [
12
+ /^[nN]otice:.*/g,
13
+ 'sh_notice',
14
+ -1
15
+ ],
16
+ [
17
+ /^[wW]arning:.*/g,
18
+ 'sh_warning',
19
+ -1
20
+ ]
21
+ ]
22
+ ];
@@ -0,0 +1 @@
1
+ if(!this.sh_languages){this.sh_languages={}}sh_languages.sh=[[[/\b(?:import)\b/g,"sh_preproc",-1],[/\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g,"sh_number",-1],[/\\"|\\'/g,"sh_normal",-1],[/"/g,"sh_string",1],[/'/g,"sh_string",2],[/function[ \t]+(?:[A-Za-z]|_)[A-Za-z0-9_]*[ \t]*(?:\(\))?|(?:[A-Za-z]|_)[A-Za-z0-9_]*[ \t]*\(\)/g,"sh_function",-1],[/(?:[A-Za-z]*[-\/]+[A-Za-z]+)+/g,"sh_normal",-1],[/\b(?:alias|bg|bind|break|builtin|caller|case|command|compgen|complete|continue|declare|dirs|disown|do|done|elif|else|enable|esac|eval|exec|exit|export|false|fc|fg|fi|for|getopts|hash|help|history|if|in|jobs|let|local|logout|popd|printf|pushd|read|readonly|return|select|set|shift|shopt|source|suspend|test|then|times|trap|true|type|typeset|umask|unalias|unset|until|wait|while)\b/g,"sh_keyword",-1],[/(?:[A-Za-z]|_)[A-Za-z0-9_]*(?==)|\$\{(?:[^ \t]+)\}|\$\((?:[^ \t]+)\)|\$(?:[A-Za-z]|_)[A-Za-z0-9_]*|\$(?:[^ \t]{1})/g,"sh_variable",-1],[/~|!|%|\^|\*|\(|\)|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\||%%|(?:##){2}(?!#)/g,"sh_symbol",-1],[/#/g,"sh_comment",3]],[[/"/g,"sh_string",-2],[/\\./g,"sh_specialchar",-1]],[[/'/g,"sh_string",-2],[/\\./g,"sh_specialchar",-1]],[[/$/g,null,-2]]];