showoff 0.9.10 → 0.9.10.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: addc994cfd5492d9ca208490be1263930272cccd
4
- data.tar.gz: a615f934502ee5ba58767aabd025e0a8f4d9075d
3
+ metadata.gz: 1ca6556210914033c3c60fc2733190f985a8fe5e
4
+ data.tar.gz: 02236cdcbd78ab8343d9318d2e1fa69bb44d2802
5
5
  SHA512:
6
- metadata.gz: 667f49e11f8fb6bebc5576446874556e85e81abcf041ab94f7d4731dfd0ea9bc4db7ae203d756b24087326fd048b0d61a2d98fe9c0a13a3836a1c7dc22e6f285
7
- data.tar.gz: 1b30d26ad6cfa760e6fcb80e722bbc2422c3337027ca4bbe6893ad733dc599c059b7a9278705c4fb0a4b2cf57896131d160e73dc1089df662e204af79beb58bb
6
+ metadata.gz: 1347c2fef6fbc54585cb048e3778e288a370179a8fd81cd96cb8071d37dc80d7ea616a1e5c4cf82a9a275d4cdf6b1a579d1454a4ab20bb47a306fe3787a1ba5a
7
+ data.tar.gz: 6c1b0244161ca688dd3155023dab18f75a78bc050ae7d3cba7761ec2378c6dd6601cf4ba37448ffdbd7a44d03fd30df67b1f81fc68904f13f1b8196e09e2b123
data/bin/showoff CHANGED
@@ -137,7 +137,7 @@ command :serve do |c|
137
137
  c.action do |global_options,options,args|
138
138
 
139
139
  # This is gross. A serious revamp in config file parsing is due.
140
- config = JSON.parse(File.read(options[:f]))
140
+ config = JSON.parse(File.read(options[:f])) rescue {}
141
141
  if Gem::Version.new(config['version']) > Gem::Version.new(SHOWOFF_VERSION) then
142
142
  raise "This presentation requires Showoff version #{config['version']} or greater."
143
143
  end
@@ -156,6 +156,7 @@ To run it from presenter view, go to: [ #{url}/presenter ]
156
156
  -------------------------
157
157
 
158
158
  "
159
+
159
160
  ShowOff.run! :host => options[:h],
160
161
  :port => options[:p].to_i,
161
162
  :pres_file => options[:f],
@@ -206,7 +207,7 @@ arg_name 'name'
206
207
  long_desc 'Creates a static, one page version of the presentation as {name}.html'
207
208
  command [:static] do |c|
208
209
  c.action do |global_options,options,args|
209
- ShowOff.do_static(args[0])
210
+ ShowOff.do_static(args)
210
211
  end
211
212
  end
212
213
 
data/lib/showoff.rb CHANGED
@@ -640,7 +640,7 @@ class ShowOff < Sinatra::Application
640
640
  end
641
641
 
642
642
  def update_commandline_code(slide)
643
- html = Nokogiri::HTML.parse(slide)
643
+ html = Nokogiri::HTML::DocumentFragment.parse(slide)
644
644
  parser = CommandlineParser.new
645
645
 
646
646
  html.css('pre').each do |pre|
@@ -682,7 +682,7 @@ class ShowOff < Sinatra::Application
682
682
  end
683
683
  transform.apply(tree)
684
684
  end
685
- html.root.to_s
685
+ html.to_html
686
686
  end
687
687
 
688
688
  def get_slides_html(opts={:static=>false, :pdf=>false, :toc=>false, :supplemental=>nil})
@@ -908,8 +908,9 @@ class ShowOff < Sinatra::Application
908
908
  end
909
909
 
910
910
 
911
- def self.do_static(what)
912
- what = "index" if !what
911
+ def self.do_static(args)
912
+ what = args[0] || "index"
913
+ opt = args[1]
913
914
 
914
915
  # Sinatra now aliases new to new!
915
916
  # https://github.com/sinatra/sinatra/blob/v1.3.3/lib/sinatra/base.rb#L1369
@@ -919,7 +920,11 @@ class ShowOff < Sinatra::Application
919
920
  path = showoff.instance_variable_get(:@root_path)
920
921
  logger = showoff.instance_variable_get(:@logger)
921
922
 
922
- data = showoff.send(what, true)
923
+ if what == 'supplemental'
924
+ data = showoff.send(what, opt, true)
925
+ else
926
+ data = showoff.send(what, true)
927
+ end
923
928
 
924
929
  if data.is_a?(File)
925
930
  FileUtils.cp(data.path, "#{name}.pdf")
@@ -1,3 +1,3 @@
1
1
  # No namespace here since ShowOff is a class and I'd have to inherit from
2
2
  # Sinatra::Application (which we don't want to load here)
3
- SHOWOFF_VERSION = '0.9.10'
3
+ SHOWOFF_VERSION = '0.9.10.1'
data/lib/showoff_utils.rb CHANGED
@@ -460,7 +460,6 @@ module MarkdownConfig
460
460
  {
461
461
  :auto_links => true,
462
462
  :definition_lists => true,
463
- :strikethrough => true,
464
463
  :superscript => true,
465
464
  :tables => true,
466
465
  }
@@ -470,7 +469,6 @@ module MarkdownConfig
470
469
  {
471
470
  :autolink => true,
472
471
  :no_intra_emphasis => true,
473
- :strikethrough => true,
474
472
  :superscript => true,
475
473
  :tables => true,
476
474
  :underline => true,
data/views/404.erb CHANGED
@@ -1,5 +1,4 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
1
+ <!DOCTYPE html>
3
2
 
4
3
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
4
  <head>
data/views/download.erb CHANGED
@@ -1,5 +1,4 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
1
+ <!DOCTYPE html>
3
2
 
4
3
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
4
  <head>
@@ -11,7 +10,7 @@
11
10
  <div id="preso">
12
11
  <div id="wrapper">
13
12
  <h1>File Downloads</h1>
14
-
13
+
15
14
  <ul id="downloads">
16
15
  <% if @downloads %>
17
16
  <%# [ enabled, slide name, [array, of, files] ] %>
@@ -28,7 +27,7 @@
28
27
  <% end %>
29
28
  <% end %>
30
29
  <% end %>
31
-
30
+
32
31
  </ul>
33
32
  </div>
34
33
  </div>
data/views/index.erb CHANGED
@@ -1,5 +1,4 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
1
+ <!DOCTYPE html>
3
2
 
4
3
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
4
  <head>
data/views/onepage.erb CHANGED
@@ -1,4 +1,4 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
1
+ <!DOCTYPE HTML>
2
2
 
3
3
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
4
  <head>
data/views/stats.erb CHANGED
@@ -1,10 +1,9 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
1
+ <!DOCTYPE html>
3
2
 
4
3
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
4
  <head>
6
5
  <%= erb :header_mini %>
7
-
6
+
8
7
  <script type="text/javascript">
9
8
  $(document).ready(function(){ setupStats(); });
10
9
  </script>
@@ -14,7 +13,7 @@
14
13
  <div id="preso">
15
14
  <div id="wrapper">
16
15
  <h1>Viewing Statistics</h1>
17
-
16
+
18
17
  <div id="least">
19
18
  <h3>Least viewed slides</h3>
20
19
  <% if @least.size > 0 %>
@@ -29,7 +28,7 @@
29
28
  <% end %>
30
29
  <% end %>
31
30
  </div>
32
-
31
+
33
32
  <div id="most">
34
33
  <h3>Most viewed slides</h3>
35
34
  <% if @least.size > 0 %>
@@ -44,7 +43,7 @@
44
43
  <% end %>
45
44
  <% end %>
46
45
  </div>
47
-
46
+
48
47
  <div id="all">
49
48
  <h3>All slides</h3>
50
49
  <%# We reuse the max value calculated from the above step. %>
@@ -65,7 +64,7 @@
65
64
  </div>
66
65
  <% end %>
67
66
  </div>
68
- <% end %>
67
+ <% end %>
69
68
  </div>
70
69
  </div>
71
70
  </div>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: showoff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.10
4
+ version: 0.9.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Chacon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-25 00:00:00.000000000 Z
11
+ date: 2014-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra