slide_hero 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/Gemfile +1 -1
  4. data/README.md +2 -2
  5. data/lib/slide_hero/blockquote.rb +10 -0
  6. data/lib/slide_hero/pluggable.rb +4 -4
  7. data/lib/slide_hero/plugins.rb +0 -1
  8. data/lib/slide_hero/presentation.rb +3 -3
  9. data/lib/slide_hero/slide.rb +2 -2
  10. data/lib/slide_hero/version.rb +1 -1
  11. data/lib/slide_hero/views/blockquote.html.erb +3 -0
  12. data/lib/slide_hero.rb +1 -0
  13. data/test/slide_hero/blockquote_spec.rb +13 -0
  14. data/test/slide_hero/plugins_spec.rb +0 -1
  15. data/test/slide_hero/presentation_spec.rb +2 -1
  16. data/test/slide_hero/slide_spec.rb +14 -3
  17. data/test/slide_hero_spec.rb +1 -0
  18. data/vendor/reveal.js/.gitignore +6 -1
  19. data/vendor/reveal.js/.travis.yml +1 -1
  20. data/vendor/reveal.js/CONTRIBUTING.md +4 -0
  21. data/vendor/reveal.js/Gruntfile.js +26 -24
  22. data/vendor/reveal.js/LICENSE +1 -1
  23. data/vendor/reveal.js/README.md +215 -124
  24. data/vendor/reveal.js/bower.json +27 -0
  25. data/vendor/reveal.js/css/print/paper.css +1 -1
  26. data/vendor/reveal.js/css/print/pdf.css +30 -27
  27. data/vendor/reveal.js/css/reveal.css +381 -191
  28. data/vendor/reveal.js/css/reveal.scss +259 -164
  29. data/vendor/reveal.js/css/theme/README.md +2 -6
  30. data/vendor/reveal.js/css/theme/beige.css +75 -49
  31. data/vendor/reveal.js/css/theme/black.css +64 -38
  32. data/vendor/reveal.js/css/theme/blood.css +75 -56
  33. data/vendor/reveal.js/css/theme/league.css +69 -43
  34. data/vendor/reveal.js/css/theme/moon.css +69 -43
  35. data/vendor/reveal.js/css/theme/night.css +64 -38
  36. data/vendor/reveal.js/css/theme/serif.css +66 -40
  37. data/vendor/reveal.js/css/theme/simple.css +63 -37
  38. data/vendor/reveal.js/css/theme/sky.css +69 -43
  39. data/vendor/reveal.js/css/theme/solarized.css +69 -43
  40. data/vendor/reveal.js/css/theme/source/black.scss +1 -1
  41. data/vendor/reveal.js/css/theme/source/blood.scss +3 -15
  42. data/vendor/reveal.js/css/theme/source/white.scss +1 -1
  43. data/vendor/reveal.js/css/theme/template/theme.scss +30 -23
  44. data/vendor/reveal.js/css/theme/white.css +69 -43
  45. data/vendor/reveal.js/demo.html +410 -0
  46. data/vendor/reveal.js/index.html +13 -371
  47. data/vendor/reveal.js/js/reveal.js +643 -175
  48. data/vendor/reveal.js/lib/css/zenburn.css +41 -78
  49. data/vendor/reveal.js/lib/js/head.min.js +9 -8
  50. data/vendor/reveal.js/package.json +20 -24
  51. data/vendor/reveal.js/plugin/highlight/highlight.js +4 -3
  52. data/vendor/reveal.js/plugin/markdown/example.html +1 -1
  53. data/vendor/reveal.js/plugin/markdown/markdown.js +19 -7
  54. data/vendor/reveal.js/plugin/markdown/marked.js +2 -33
  55. data/vendor/reveal.js/plugin/math/math.js +5 -2
  56. data/vendor/reveal.js/plugin/multiplex/client.js +1 -1
  57. data/vendor/reveal.js/plugin/multiplex/index.js +24 -16
  58. data/vendor/reveal.js/plugin/multiplex/master.js +22 -42
  59. data/vendor/reveal.js/plugin/multiplex/package.json +19 -0
  60. data/vendor/reveal.js/plugin/notes/notes.html +11 -3
  61. data/vendor/reveal.js/plugin/notes/notes.js +19 -5
  62. data/vendor/reveal.js/plugin/notes-server/client.js +6 -1
  63. data/vendor/reveal.js/plugin/notes-server/index.js +17 -14
  64. data/vendor/reveal.js/plugin/notes-server/notes.html +17 -6
  65. data/vendor/reveal.js/plugin/print-pdf/print-pdf.js +1 -1
  66. data/vendor/reveal.js/plugin/zoom-js/zoom.js +1 -1
  67. data/vendor/reveal.js/test/examples/slide-backgrounds.html +1 -1
  68. data/vendor/reveal.js/test/examples/slide-transitions.html +101 -0
  69. data/vendor/reveal.js/test/test-markdown-element-attributes.html +3 -3
  70. data/vendor/reveal.js/test/test-markdown-element-attributes.js +1 -1
  71. data/vendor/reveal.js/test/test.html +5 -1
  72. data/vendor/reveal.js/test/test.js +26 -1
  73. metadata +11 -5
  74. data/vendor/reveal.js/plugin/leap/leap.js +0 -159
  75. data/vendor/reveal.js/plugin/remotes/remotes.js +0 -39
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eea8fd7d40b7ac15991d031fa339c5a685639c8f
4
- data.tar.gz: af7ac4484b30e27993015101cdcbafbb42a44e33
3
+ metadata.gz: 549d560ee3a562e77ada4b1d2ec9a780e0b678e9
4
+ data.tar.gz: 2a64285cb01ac43a1450aba8076965cab776e146
5
5
  SHA512:
6
- metadata.gz: 784cc104067b250611f492d567de86a9df8e5020e0a41ec0651683152661d6f8805928cc77bbbdcc15906603fd528aff02c715abc42eae5596199d7f1fe0c0cf
7
- data.tar.gz: 4a4b6a552bcbcfd2c64a646fd4625c3c0f34b2c47a6969835c610fdf91261aab0c7b472650cc07168bdd46a6d553b127a7e6c76271f52b44258e9cb722317171
6
+ metadata.gz: 3dfdcbcf2471ca854baf94511105839b30febdef84f6cb96bddd46969331c7bbc8bbdaa0147c9955e2bc014b13c2ac391a42fcd8ecea27fa0ecc673b3378a004
7
+ data.tar.gz: e061029f499c6eb716b04cb3b7dc03cecb0dfca0fcc15ba558586ea5e174c9a462098520080096165ecac23ab449984b8bdb463334c797b84580205ac540d7b3
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.2
1
+ 2.3
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- ruby '2.2.1'
1
+ ruby '2.3.0'
2
2
  source 'https://rubygems.org'
3
3
 
4
4
  # Specify your gem's dependencies in slide_hero.gemspec
data/README.md CHANGED
@@ -286,11 +286,11 @@ end
286
286
 
287
287
  presentation "My Presentation" do
288
288
  slide "A slide with video" do
289
- media "video.mp4", type: video
289
+ media "video.mp4", type: :video
290
290
  end
291
291
 
292
292
  slide "A slide with video" do
293
- media "audio.mp3", type: audio
293
+ media "audio.mp3", type: :audio
294
294
  end
295
295
  end
296
296
 
@@ -0,0 +1,10 @@
1
+ module SlideHero
2
+ class Blockquote
3
+ attr_reader :cite, :quote
4
+ include Compilable
5
+ def initialize(cite:nil, quote:"")
6
+ @cite = cite
7
+ @quote = quote
8
+ end
9
+ end
10
+ end
@@ -20,12 +20,12 @@ module SlideHero
20
20
  end
21
21
 
22
22
  def initialization_fields_from_class(klass)
23
- fields = ""
23
+ fields = []
24
24
  arguments = klass.instance_method(:initialize).parameters.to_h
25
25
  fields << "*args" if arguments.has_key?(:req) || arguments.has_key?(:opt)
26
- fields << ", **kwargs" if arguments.has_key?(:key)
27
- fields << ", &block" if arguments.has_key?(:block)
28
- fields
26
+ fields << "**kwargs" if arguments.has_key?(:key)
27
+ fields << "&block" if arguments.has_key?(:block)
28
+ fields.join(",")
29
29
  end
30
30
  end
31
31
  end
@@ -8,7 +8,6 @@ module SlideHero
8
8
  highlight: "{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }",
9
9
  zoom: "{ src: 'plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } }",
10
10
  notes: "{ src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }",
11
- remote: "{ src: 'plugin/remotes/remotes.js', async: true, condition: function() { return !!document.body.classList; } }",
12
11
  leap: "{ src: 'plugin/leap/leap.js', async: true }"
13
12
  }
14
13
  end
@@ -11,7 +11,7 @@ module SlideHero
11
11
 
12
12
  def set_plugins(*plugin_list)
13
13
  if plugin_list.empty?
14
- defaults = %i{class_list highlight notes remote}
14
+ defaults = %i{class_list highlight notes}
15
15
  plugin_list = defaults
16
16
  end
17
17
 
@@ -30,9 +30,9 @@ module SlideHero
30
30
 
31
31
  def compile
32
32
  set_plugins if plugins.empty?
33
- Tilt::ERBTemplate.new(File.join(SlideHero.template_path,
33
+ Tilt::ERBTemplate.new(File.join(SlideHero.template_path,
34
34
  'lib/slide_hero/views/layout.html.erb')).
35
- render(self) do
35
+ render(self) do
36
36
  collected_slides
37
37
  end
38
38
  end
@@ -13,7 +13,7 @@ module SlideHero
13
13
  instance_eval(&point_block) if block_given?
14
14
  end
15
15
 
16
- create_plugs_for Note, Point, List, Code, Image, RemoteImage, Media
16
+ create_plugs_for Note, Point, List, Code, Image, RemoteImage, Media, Blockquote
17
17
 
18
18
  def points
19
19
  @points ||= []
@@ -30,7 +30,7 @@ module SlideHero
30
30
 
31
31
  def data_attributes
32
32
  "data-transition=\"#{transition}\"".tap do |attr|
33
- case
33
+ case
34
34
  when String(background).start_with?('http')
35
35
  attr << " data-background=\"#{background}\""
36
36
  when String(background).include?('.')
@@ -1,3 +1,3 @@
1
1
  module SlideHero
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
@@ -0,0 +1,3 @@
1
+ <blockquote cite="<%=cite %>">
2
+ <%= quote %>
3
+ </blockquote>
data/lib/slide_hero.rb CHANGED
@@ -12,6 +12,7 @@ require_relative "slide_hero/note"
12
12
  require_relative "slide_hero/image"
13
13
  require_relative "slide_hero/remote_image"
14
14
  require_relative "slide_hero/media"
15
+ require_relative "slide_hero/blockquote"
15
16
  require_relative "slide_hero/slide"
16
17
  require_relative "slide_hero/dsl"
17
18
 
@@ -0,0 +1,13 @@
1
+ require 'minitest_helper'
2
+ module SlideHero
3
+ describe Blockquote do
4
+ it "compiles to a beautiful blockquote" do
5
+ quote = Blockquote.new(cite:"http://hostiledeveloper.com", quote: "You can't take a picture of a chess board from the top.")
6
+ quote.compile.must_equal(<<-QUOTE.strip)
7
+ <blockquote cite="http://hostiledeveloper.com">
8
+ You can't take a picture of a chess board from the top.
9
+ </blockquote>
10
+ QUOTE
11
+ end
12
+ end
13
+ end
@@ -8,7 +8,6 @@ module SlideHero
8
8
  Plugins.reveal[:highlight].must_equal "{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }"
9
9
  Plugins.reveal[:zoom].must_equal "{ src: 'plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } }"
10
10
  Plugins.reveal[:notes].must_equal "{ src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }"
11
- Plugins.reveal[:remote].must_equal "{ src: 'plugin/remotes/remotes.js', async: true, condition: function() { return !!document.body.classList; } }"
12
11
  Plugins.reveal[:leap].must_equal "{ src: 'plugin/leap/leap.js', async: true }"
13
12
  end
14
13
  end
@@ -100,7 +100,7 @@ module SlideHero
100
100
 
101
101
  it "sets default plugins if not provided" do
102
102
  pres = Presentation.new("New stuff") {}
103
- assert pres.compile.include?("{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },{ src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } },{ src: 'plugin/remotes/remotes.js', async: true, condition: function() { return !!document.body.classList; } }"), pres.compile
103
+ assert pres.compile.include?("{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },{ src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }"), pres.compile
104
104
  end
105
105
 
106
106
  it "ignores invalid plugins" do
@@ -111,5 +111,6 @@ module SlideHero
111
111
  assert pres.compile.include?("{ src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
112
112
  { src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }"), pres.compile
113
113
  end
114
+
114
115
  end
115
116
  end
@@ -105,7 +105,7 @@ module SlideHero
105
105
  end
106
106
 
107
107
  assert_dom_match slide.compile, "<section data-transition=\"default\">" +
108
- "<h2>Embedding</h2>" +
108
+ "<h2>Embedding</h2>" +
109
109
  "<p><small>I'm embedded!</small></p>" +
110
110
  "</section>"
111
111
  end
@@ -117,7 +117,7 @@ module SlideHero
117
117
  end
118
118
 
119
119
  assert_dom_match slide.compile, "<section data-transition=\"default\">" +
120
- "<h2>Embedding</h2>" +
120
+ "<h2>Embedding</h2>" +
121
121
  "<p>I'm embedded!</p>" +
122
122
  "<p>Me too!</p>" +
123
123
  "</section>"
@@ -129,7 +129,7 @@ module SlideHero
129
129
  end
130
130
 
131
131
  assert_dom_match slide.compile, "<section data-transition=\"default\">"+
132
- "<h2>Animation</h2>" +
132
+ "<h2>Animation</h2>" +
133
133
  "<p class=\"fragment \">I'm animated!</p>" +
134
134
  "</section>"
135
135
 
@@ -241,5 +241,16 @@ end
241
241
  slide.compile.must_include %{<video data-autoplay src="video/video.mp4"></video>}
242
242
  end
243
243
  end
244
+ describe "#blockquote" do
245
+ it "allows for blockquotes" do
246
+ slide = Slide.new("Quotes!") do
247
+ blockquote cite: "http://hostiledeveloper.com", quote: <<-QUOTE
248
+ Sup
249
+ QUOTE
250
+ end
251
+ slide.compile.include?("blockquote")
252
+ slide.compile.include?("Sup")
253
+ end
254
+ end
244
255
  end
245
256
  end
@@ -12,6 +12,7 @@ require_relative 'slide_hero/image_spec'
12
12
  require_relative 'slide_hero/remote_image_spec'
13
13
  require_relative 'slide_hero/media_spec'
14
14
  require_relative 'slide_hero/plugins_spec'
15
+ require_relative 'slide_hero/blockquote_spec'
15
16
 
16
17
  describe ::SlideHero do
17
18
  it "has a version" do
@@ -1,3 +1,8 @@
1
+ .idea/
2
+ *.iml
3
+ *.iws
4
+ *.eml
5
+ out/
1
6
  .DS_Store
2
7
  .svn
3
8
  log/*.log
@@ -5,4 +10,4 @@ tmp/**
5
10
  node_modules/
6
11
  .sass-cache
7
12
  css/reveal.min.css
8
- js/reveal.min.js
13
+ js/reveal.min.js
@@ -1,5 +1,5 @@
1
1
  language: node_js
2
2
  node_js:
3
- - 0.10
3
+ - 4.1.1
4
4
  before_script:
5
5
  - npm install -g grunt-cli
@@ -17,3 +17,7 @@ When reporting a bug make sure to include information about which browser and op
17
17
  - Single-quoted strings
18
18
  - Should be made towards the **dev branch**
19
19
  - Should be submitted from a feature/topic branch (not your master)
20
+
21
+
22
+ ### Plugins
23
+ Please do not submit plugins as pull requests. They should be maintained in their own separate repository. More information here: https://github.com/hakimel/reveal.js/wiki/Plugin-Guidelines
@@ -1,6 +1,8 @@
1
1
  /* global module:false */
2
2
  module.exports = function(grunt) {
3
3
  var port = grunt.option('port') || 8000;
4
+ var base = grunt.option('base') || '.';
5
+
4
6
  // Project configuration
5
7
  grunt.initConfig({
6
8
  pkg: grunt.file.readJSON('package.json'),
@@ -11,7 +13,7 @@ module.exports = function(grunt) {
11
13
  ' * http://lab.hakim.se/reveal-js\n' +
12
14
  ' * MIT licensed\n' +
13
15
  ' *\n' +
14
- ' * Copyright (C) 2015 Hakim El Hattab, http://hakim.se\n' +
16
+ ' * Copyright (C) 2016 Hakim El Hattab, http://hakim.se\n' +
15
17
  ' */'
16
18
  },
17
19
 
@@ -36,19 +38,15 @@ module.exports = function(grunt) {
36
38
  }
37
39
  },
38
40
  themes: {
39
- files: {
40
- 'css/theme/black.css': 'css/theme/source/black.scss',
41
- 'css/theme/white.css': 'css/theme/source/white.scss',
42
- 'css/theme/league.css': 'css/theme/source/league.scss',
43
- 'css/theme/beige.css': 'css/theme/source/beige.scss',
44
- 'css/theme/night.css': 'css/theme/source/night.scss',
45
- 'css/theme/serif.css': 'css/theme/source/serif.scss',
46
- 'css/theme/simple.css': 'css/theme/source/simple.scss',
47
- 'css/theme/sky.css': 'css/theme/source/sky.scss',
48
- 'css/theme/moon.css': 'css/theme/source/moon.scss',
49
- 'css/theme/solarized.css': 'css/theme/source/solarized.scss',
50
- 'css/theme/blood.css': 'css/theme/source/blood.scss'
51
- }
41
+ files: [
42
+ {
43
+ expand: true,
44
+ cwd: 'css/theme/source',
45
+ src: ['*.scss'],
46
+ dest: 'css/theme',
47
+ ext: '.css'
48
+ }
49
+ ]
52
50
  }
53
51
  },
54
52
 
@@ -95,9 +93,9 @@ module.exports = function(grunt) {
95
93
  server: {
96
94
  options: {
97
95
  port: port,
98
- base: '.',
99
- livereload: true,
100
- open: true
96
+ base: base,
97
+ livereload: true,
98
+ open: true
101
99
  }
102
100
  }
103
101
  },
@@ -109,14 +107,12 @@ module.exports = function(grunt) {
109
107
  'js/**',
110
108
  'lib/**',
111
109
  'images/**',
112
- 'plugin/**'
110
+ 'plugin/**',
111
+ '**.md'
113
112
  ]
114
113
  },
115
114
 
116
115
  watch: {
117
- options: {
118
- livereload: true
119
- },
120
116
  js: {
121
117
  files: [ 'Gruntfile.js', 'js/reveal.js' ],
122
118
  tasks: 'js'
@@ -129,9 +125,15 @@ module.exports = function(grunt) {
129
125
  files: [ 'css/reveal.scss' ],
130
126
  tasks: 'css-core'
131
127
  },
132
- html: {
133
- files: [ 'index.html']
134
- }
128
+ html: {
129
+ files: [ '*.html']
130
+ },
131
+ markdown: {
132
+ files: [ '*.md' ]
133
+ },
134
+ options: {
135
+ livereload: true
136
+ }
135
137
  }
136
138
 
137
139
  });
@@ -1,4 +1,4 @@
1
- Copyright (C) 2015 Hakim El Hattab, http://hakim.se
1
+ Copyright (C) 2016 Hakim El Hattab, http://hakim.se
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal