parade 0.8.2 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,26 @@
1
+ require 'redcarpet'
2
+ require 'rouge'
3
+ require 'rouge/plugins/redcarpet'
4
+
5
+ module Parade
6
+ module Renderers
7
+ class HTMLWithRouge < Redcarpet::Render::XHTML
8
+ include Rouge::Plugins::Redcarpet
9
+
10
+ def self.render(content)
11
+ markdown = Redcarpet::Markdown.new(Renderers::HTMLWithRouge,
12
+ :fenced_code_blocks => true,
13
+ :no_intra_emphasis => true,
14
+ :autolink => true,
15
+ :strikethrough => true,
16
+ :lax_html_blocks => true,
17
+ :superscript => true,
18
+ :hard_wrap => true,
19
+ :tables => true,
20
+ :xhtml => true)
21
+ markdown.render(content)
22
+ end
23
+
24
+ end
25
+ end
26
+ end
@@ -1,4 +1,4 @@
1
- require_relative 'renderers/html_with_pygments'
1
+ require_relative 'renderers/html_with_rouge'
2
2
 
3
3
  module Parade
4
4
 
@@ -14,6 +14,6 @@ module Parade
14
14
  end
15
15
  end
16
16
 
17
- SlidePreRenderers.register Renderers::HTMLwithPygments
17
+ SlidePreRenderers.register Renderers::HTMLWithRouge
18
18
 
19
19
  end
@@ -1,3 +1,3 @@
1
1
  module Parade
2
- VERSION = '0.8.2'
2
+ VERSION = '0.9.0'
3
3
  end
@@ -4,7 +4,7 @@ pre, code {
4
4
  color: black;
5
5
  }
6
6
 
7
- .highlight pre, pre {
7
+ pre.highlight pre, pre.highlight, pre {
8
8
  background-color:#f8f8f8;
9
9
  /* border:1px solid #ccc;*/
10
10
  font-size:20px;
@@ -16,7 +16,7 @@ pre, code {
16
16
  padding:6px 10px;
17
17
  }
18
18
 
19
- .highlight pre pre.command, .highlight pre pre.result {
19
+ pre.highlight pre.command, pre.highlight pre.result {
20
20
  margin: 0px;
21
21
  border-radius:0px;
22
22
  -moz-border-radius:0px;
@@ -25,7 +25,7 @@ pre, code {
25
25
  border:0px solid #ccc;
26
26
  }
27
27
 
28
- .highlight pre pre.result {
28
+ pre.highlight pre.result {
29
29
  color: #444;
30
30
  }
31
31
 
@@ -111,70 +111,70 @@ ul li, ol li
111
111
  .shadow {
112
112
  -webkit-box-shadow:0 5px 15px #000;
113
113
  -moz-box-shadow:0 5px 15px #000;
114
- box-shadow:0 5px 15px #000;
114
+ box-shadow:0 5px 15px #000;
115
115
  }
116
116
 
117
117
 
118
118
 
119
119
  /* Pygments coloring */
120
- .highlight .c{color:#998;font-style:italic;}
121
- .highlight .err{color:#a61717;background-color:#e3d2d2;}
122
- .highlight .k{font-weight:bold;}
123
- .highlight .o{font-weight:bold;}
124
- .highlight .cm{color:#998;font-style:italic;}
125
- .highlight .cp{color:#999;font-weight:bold;}
126
- .highlight .c1{color:#998;font-style:italic;}
127
- .highlight .cs{color:#999;font-weight:bold;font-style:italic;}
128
- .highlight .gd{color:#000;background-color:#fdd;}
129
- .highlight .gd .x{color:#000;background-color:#faa;}
130
- .highlight .ge{font-style:italic;}
131
- .highlight .gr{color:#a00;}
132
- .highlight .gh{color:#999;}
133
- .highlight .gi{color:#000;background-color:#dfd;}
134
- .highlight .gi .x{color:#000;background-color:#afa;}
135
- .highlight .go{color:#888;}
136
- .highlight .gp{color:#555;}
137
- .highlight .gs{font-weight:bold;}
138
- .highlight .gu{color:#800080;font-weight:bold;}
139
- .highlight .gt{color:#a00;}
140
- .highlight .kc{font-weight:bold;}
141
- .highlight .kd{font-weight:bold;}
142
- .highlight .kn{font-weight:bold;}
143
- .highlight .kp{font-weight:bold;}
144
- .highlight .kr{font-weight:bold;}
145
- .highlight .kt{color:#458;font-weight:bold;}
146
- .highlight .m{color:#099;}
147
- .highlight .s{color:#d14;}
148
- .highlight .na{color:#008080;}
149
- .highlight .nb{color:#0086B3;}
150
- .highlight .nc{color:#458;font-weight:bold;}
151
- .highlight .no{color:#008080;}
152
- .highlight .ni{color:#800080;}
153
- .highlight .ne{color:#900;font-weight:bold;}
154
- .highlight .nf{color:#900;font-weight:bold;}
155
- .highlight .nn{color:#555;}
156
- .highlight .nt{color:#000080;}
157
- .highlight .nv{color:#008080;}
158
- .highlight .ow{font-weight:bold;}
159
- .highlight .w{color:#bbb;}
160
- .highlight .mf{color:#099;}
161
- .highlight .mh{color:#099;}
162
- .highlight .mi{color:#099;}
163
- .highlight .mo{color:#099;}
164
- .highlight .sb{color:#d14;}
165
- .highlight .sc{color:#d14;}
166
- .highlight .sd{color:#d14;}
167
- .highlight .s2{color:#d14;}
168
- .highlight .se{color:#d14;}
169
- .highlight .sh{color:#d14;}
170
- .highlight .si{color:#d14;}
171
- .highlight .sx{color:#d14;}
172
- .highlight .sr{color:#009926;}
173
- .highlight .s1{color:#d14;}
174
- .highlight .ss{color:#990073;}
175
- .highlight .bp{color:#999;}
176
- .highlight .vc{color:#008080;}
177
- .highlight .vg{color:#008080;}
178
- .highlight .vi{color:#008080;}
179
- .highlight .il{color:#099;}
120
+ pre.highlight .c{color:#998;font-style:italic;}
121
+ pre.highlight .err{color:#a61717;background-color:#e3d2d2;}
122
+ pre.highlight .k{font-weight:bold;}
123
+ pre.highlight .o{font-weight:bold;}
124
+ pre.highlight .cm{color:#998;font-style:italic;}
125
+ pre.highlight .cp{color:#999;font-weight:bold;}
126
+ pre.highlight .c1{color:#998;font-style:italic;}
127
+ pre.highlight .cs{color:#999;font-weight:bold;font-style:italic;}
128
+ pre.highlight .gd{color:#000;background-color:#fdd;}
129
+ pre.highlight .gd .x{color:#000;background-color:#faa;}
130
+ pre.highlight .ge{font-style:italic;}
131
+ pre.highlight .gr{color:#a00;}
132
+ pre.highlight .gh{color:#999;}
133
+ pre.highlight .gi{color:#000;background-color:#dfd;}
134
+ pre.highlight .gi .x{color:#000;background-color:#afa;}
135
+ pre.highlight .go{color:#888;}
136
+ pre.highlight .gp{color:#555;}
137
+ pre.highlight .gs{font-weight:bold;}
138
+ pre.highlight .gu{color:#800080;font-weight:bold;}
139
+ pre.highlight .gt{color:#a00;}
140
+ pre.highlight .kc{font-weight:bold;}
141
+ pre.highlight .kd{font-weight:bold;}
142
+ pre.highlight .kn{font-weight:bold;}
143
+ pre.highlight .kp{font-weight:bold;}
144
+ pre.highlight .kr{font-weight:bold;}
145
+ pre.highlight .kt{color:#458;font-weight:bold;}
146
+ pre.highlight .m{color:#099;}
147
+ pre.highlight .s{color:#d14;}
148
+ pre.highlight .na{color:#008080;}
149
+ pre.highlight .nb{color:#0086B3;}
150
+ pre.highlight .nc{color:#458;font-weight:bold;}
151
+ pre.highlight .no{color:#008080;}
152
+ pre.highlight .ni{color:#800080;}
153
+ pre.highlight .ne{color:#900;font-weight:bold;}
154
+ pre.highlight .nf{color:#900;font-weight:bold;}
155
+ pre.highlight .nn{color:#555;}
156
+ pre.highlight .nt{color:#000080;}
157
+ pre.highlight .nv{color:#008080;}
158
+ pre.highlight .ow{font-weight:bold;}
159
+ pre.highlight .w{color:#bbb;}
160
+ pre.highlight .mf{color:#099;}
161
+ pre.highlight .mh{color:#099;}
162
+ pre.highlight .mi{color:#099;}
163
+ pre.highlight .mo{color:#099;}
164
+ pre.highlight .sb{color:#d14;}
165
+ pre.highlight .sc{color:#d14;}
166
+ pre.highlight .sd{color:#d14;}
167
+ pre.highlight .s2{color:#d14;}
168
+ pre.highlight .se{color:#d14;}
169
+ pre.highlight .sh{color:#d14;}
170
+ pre.highlight .si{color:#d14;}
171
+ pre.highlight .sx{color:#d14;}
172
+ pre.highlight .sr{color:#009926;}
173
+ pre.highlight .s1{color:#d14;}
174
+ pre.highlight .ss{color:#990073;}
175
+ pre.highlight .bp{color:#999;}
176
+ pre.highlight .vc{color:#008080;}
177
+ pre.highlight .vg{color:#008080;}
178
+ pre.highlight .vi{color:#008080;}
179
+ pre.highlight .il{color:#099;}
180
180
 
@@ -8,9 +8,9 @@ window.CodeExecutor = Spine.Class.create({
8
8
  },this));
9
9
  },
10
10
  visibleCodeBlocks: function() {
11
- return { ruby : $('.execute .sh_ruby pre:visible'),
12
- js : $('.execute .sh_javascript pre:visible'),
13
- coffee : $('.execute .sh_coffeescript pre:visible') }
11
+ return { ruby : $('.execute .ruby pre:visible'),
12
+ js : $('.execute .javascript pre:visible'),
13
+ coffee : $('.execute .coffeescript pre:visible') }
14
14
  },
15
15
  executeVisibleCode: function() {
16
16
 
@@ -104,17 +104,17 @@ $(document).ready(function() {
104
104
  codeExecutor = new CodeExecutor;
105
105
  codeViewer = new CodeViewer;
106
106
 
107
- $('.execute .sh_javascript pre').live("click", function() {
107
+ $('.execute pre.javascript').live("click", function() {
108
108
  var code = $(this).text();
109
109
  $.publish('code:execute',{ lang: 'js', code: code, elem: $(this) });
110
110
  });
111
111
 
112
- $('.execute .sh_ruby pre').live("click", function() {
112
+ $('.execute pre.ruby').live("click", function() {
113
113
  var code = $(this).text();
114
114
  $.publish('code:execute',{ lang: 'ruby', code: code, elem: $(this) });
115
115
  });
116
116
 
117
- $('.execute .sh_coffeescript pre').live("click", function() {
117
+ $('.execute pre.coffeescript').live("click", function() {
118
118
  var code = $(this).text();
119
119
  $.publish('code:execute',{ lang: 'coffee', code: code, elem: $(this) });
120
120
  });
@@ -1,4 +1,2 @@
1
1
  require "parade"
2
- require 'rubypython'
3
- RubyPython.configure :python_exe => 'python2.6'
4
2
  run Parade::Server.new
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parade
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.9.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -125,37 +125,21 @@ dependencies:
125
125
  - !ruby/object:Gem::Version
126
126
  version: 1.4.0
127
127
  - !ruby/object:Gem::Dependency
128
- name: rubypython
128
+ name: rouge
129
129
  requirement: !ruby/object:Gem::Requirement
130
130
  none: false
131
131
  requirements:
132
- - - '='
133
- - !ruby/object:Gem::Version
134
- version: 0.5.1
135
- type: :runtime
136
- prerelease: false
137
- version_requirements: !ruby/object:Gem::Requirement
138
- none: false
139
- requirements:
140
- - - '='
141
- - !ruby/object:Gem::Version
142
- version: 0.5.1
143
- - !ruby/object:Gem::Dependency
144
- name: pygments.rb
145
- requirement: !ruby/object:Gem::Requirement
146
- none: false
147
- requirements:
148
- - - '='
132
+ - - ~>
149
133
  - !ruby/object:Gem::Version
150
- version: 0.2.3
134
+ version: 0.2.15
151
135
  type: :runtime
152
136
  prerelease: false
153
137
  version_requirements: !ruby/object:Gem::Requirement
154
138
  none: false
155
139
  requirements:
156
- - - '='
140
+ - - ~>
157
141
  - !ruby/object:Gem::Version
158
- version: 0.2.3
142
+ version: 0.2.15
159
143
  - !ruby/object:Gem::Dependency
160
144
  name: css_parser
161
145
  requirement: !ruby/object:Gem::Requirement
@@ -235,7 +219,7 @@ files:
235
219
  - lib/parade/parsers/slides_file_content_parser.rb
236
220
  - lib/parade/renderers/columns_renderer.rb
237
221
  - lib/parade/renderers/command_line_renderer.rb
238
- - lib/parade/renderers/html_with_pygments.rb
222
+ - lib/parade/renderers/html_with_rouge.rb
239
223
  - lib/parade/renderers/inline_images.rb
240
224
  - lib/parade/renderers/special_paragraph_renderer.rb
241
225
  - lib/parade/renderers/update_image_paths.rb
@@ -329,7 +313,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
329
313
  version: '0'
330
314
  requirements: []
331
315
  rubyforge_project:
332
- rubygems_version: 1.8.24
316
+ rubygems_version: 1.8.25
333
317
  signing_key:
334
318
  specification_version: 3
335
319
  summary: The best damn presentation software a developer could ever love.
@@ -1,42 +0,0 @@
1
- require 'redcarpet'
2
- require 'pygments.rb'
3
-
4
- module Parade
5
- module Renderers
6
- class HTMLwithPygments < Redcarpet::Render::XHTML
7
-
8
- #
9
- # When rendering the markdown, the code should be rendered using the
10
- # Pygments highlight which corresponds to the ghf_marked.css
11
- #
12
- # Additionally a class `sh_javascript` or `sh_ruby` is added that will
13
- # assist in providing a system to provide live interactive elements
14
- # through the javascript defined in `parade.js`.
15
- #
16
- # @param [String] code the fenced code to be highlighted
17
- # @param [String] language the name of the fenced code
18
- #
19
- def block_code(code, language)
20
- syntax_highlighted_html = Pygments.highlight code, :lexer => language,
21
- :options => {:encoding => 'utf-8'}
22
-
23
- syntax_highlighted_html.gsub('class="highlight"',"class=\"highlight sh_#{language}\"")
24
- end
25
-
26
- def self.render(content)
27
- markdown = Redcarpet::Markdown.new(Renderers::HTMLwithPygments,
28
- :fenced_code_blocks => true,
29
- :no_intra_emphasis => true,
30
- :autolink => true,
31
- :strikethrough => true,
32
- :lax_html_blocks => true,
33
- :superscript => true,
34
- :hard_wrap => true,
35
- :tables => true,
36
- :xhtml => true)
37
- markdown.render(content)
38
- end
39
-
40
- end
41
- end
42
- end