reveal-ck 3.0.1 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe28b2e1f7465e77c637433fdbb4209047c9a24b
4
- data.tar.gz: 52a8cd18be575a4a38a8b7d2e4a0882199385423
3
+ metadata.gz: 59fa7e933639f0da930a31f71e84254bb9d3bee6
4
+ data.tar.gz: 29efbba155e601845b9c0b92ac2d9fbe5da2a8c6
5
5
  SHA512:
6
- metadata.gz: 36342fbf609118f8c436fabda25f23b5b7fd09d322102e7114d09391a804e20eb621a44b71e91d651c4d0585e9a1500788e9181c6143c33ccdec449d1a22f4c0
7
- data.tar.gz: 62c926ae3bcee8b9d4dc51a6d2a56f6f2450c688ea83277ad1481bc692b68cac4bea92e5c2b4d5ea6fcf3275143b07f85018c083dcc1c50a8a6054c3439a8208
6
+ metadata.gz: 0afaad9b2c6330e0002d53062fc9d391ec982723af5166d822ce786d70ff13af2ded8d56c17b50504aa51c58ded38cbfdfe4e16b2ab7d56b65b823f07dbc09cb
7
+ data.tar.gz: c954437737b835917e0d6fad45b70e247867ba16cf889f7a2849c18e4024b2aa9ce5e7cfa15f5febc0405a9da6beedecb298dd9441c212a3e698fcb1f5859e8c
@@ -2,8 +2,9 @@
2
2
 
3
3
  <title><%= config.title %></title>
4
4
 
5
- <meta name="description" content="A framework for easily creating beautiful presentations using HTML">
5
+ <meta name="description" content="<%= config.description %>">
6
6
  <meta name="author" content="<%= config.author %>">
7
+ <meta name="generator" content="reveal-ck <%= RevealCK::VERSION %>">
7
8
 
8
9
  <meta name="apple-mobile-web-app-capable" content="yes" />
9
10
  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
@@ -7,7 +7,8 @@ module RevealCK
7
7
  class ListenToRebuildSlides
8
8
  attr_reader :ui, :rebuild_method
9
9
  def initialize(ui, &block)
10
- @ui, @rebuild_method = ui, block
10
+ @ui = ui
11
+ @rebuild_method = block
11
12
  end
12
13
 
13
14
  def run
@@ -25,7 +26,7 @@ module RevealCK
25
26
  end
26
27
 
27
28
  def ignored_files_regex
28
- /^slides\/.+$/
29
+ %r{^slides/.+$}
29
30
  end
30
31
 
31
32
  def message_and_rebuild(mod, add, del)
@@ -6,7 +6,9 @@ module RevealCK
6
6
  class PrintBanner
7
7
  attr_reader :doc_root, :port, :slides_file, :ui
8
8
  def initialize(doc_root, port, slides_file, ui)
9
- @doc_root, @port, @slides_file = doc_root, port, slides_file
9
+ @doc_root = doc_root
10
+ @port = port
11
+ @slides_file = slides_file
10
12
  @ui = ui
11
13
  end
12
14
 
@@ -8,7 +8,8 @@ module RevealCK
8
8
  class StartWebServer
9
9
  attr_reader :doc_root, :port
10
10
  def initialize(doc_root, port)
11
- @doc_root, @port = doc_root, port
11
+ @doc_root = doc_root
12
+ @port = port
12
13
  end
13
14
 
14
15
  def run
@@ -3,7 +3,8 @@ module RevealCK
3
3
  # Utility that wakes up a thread periodically
4
4
  class ThreadWaker
5
5
  def initialize(thread_to_wake, wait_period = 1)
6
- @thread_to_wake, @wait_period = thread_to_wake, wait_period
6
+ @thread_to_wake = thread_to_wake
7
+ @wait_period = wait_period
7
8
  end
8
9
 
9
10
  def run
@@ -22,10 +22,11 @@ module RevealCK
22
22
 
23
23
  def core_defaults
24
24
  {
25
- 'title' => 'Slides',
26
- 'author' => '',
27
- 'theme' => 'black',
28
- 'transition' => 'default',
25
+ 'title' => 'Slides',
26
+ 'description' => '',
27
+ 'author' => '',
28
+ 'theme' => 'black',
29
+ 'transition' => 'default',
29
30
  'data' => {
30
31
 
31
32
  }
@@ -28,7 +28,8 @@ module RevealCK
28
28
  end
29
29
 
30
30
  def self.from_template(args)
31
- file, config = retrieve(:file, args), retrieve(:config, args)
31
+ file = retrieve(:file, args)
32
+ config = retrieve(:config, args)
32
33
  presentation = Presentation.new config: config
33
34
  template = Templates::Processor.open(file: file, config: config)
34
35
  presentation.html = template.output
@@ -36,12 +37,14 @@ module RevealCK
36
37
  end
37
38
 
38
39
  def self.from_dsl(args)
39
- file, config = retrieve(:file, args), retrieve(:config, args)
40
+ file = retrieve(:file, args)
41
+ config = retrieve(:config, args)
40
42
  RevealCK::PresentationDSL.load file: file, config: config
41
43
  end
42
44
 
43
45
  def self.load(args)
44
- file, config = retrieve(:file, args), retrieve(:config, args)
46
+ file = retrieve(:file, args)
47
+ config = retrieve(:config, args)
45
48
  if file.end_with? '.rb'
46
49
  Presentation.from_dsl file: file, config: config
47
50
  else
@@ -1,3 +1,4 @@
1
+
1
2
  module RevealCK
2
3
  #
3
4
  # Public: A PresentationDSL defines the DSL behind a
@@ -64,7 +65,8 @@ module RevealCK
64
65
  end
65
66
 
66
67
  def self.load(args)
67
- file, config = retrieve(:file, args), retrieve(:config, args)
68
+ file = retrieve(:file, args)
69
+ config = retrieve(:config, args)
68
70
  builder = PresentationDSL.new config: config
69
71
  contents = File.open(file).read
70
72
  builder.instance_eval(contents)
@@ -15,7 +15,8 @@ module RevealCK
15
15
  attr_reader :config
16
16
 
17
17
  def initialize(args)
18
- file, @config = retrieve(:file, args), retrieve(:config, args)
18
+ @config = retrieve(:config, args)
19
+ file = retrieve(:file, args)
19
20
  @template = Tilt.new file
20
21
  end
21
22
 
@@ -25,7 +26,8 @@ module RevealCK
25
26
  end
26
27
 
27
28
  def self.open(args)
28
- file, config = retrieve(:file, args), retrieve(:config, args)
29
+ file = retrieve(:file, args)
30
+ config = retrieve(:config, args)
29
31
  Processor.new(file: file, config: config)
30
32
  end
31
33
  end
@@ -1,4 +1,4 @@
1
1
  # RevealCK::VERSION is the current version of reveal-ck
2
2
  module RevealCK
3
- VERSION = '3.0.1'
3
+ VERSION = '3.1.0'
4
4
  end
@@ -1,6 +1,8 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  module RevealCK
4
+ VERSION = '1.0'
5
+
4
6
  module Builders
5
7
  describe IndexHtml do
6
8
  let :index_html_erb do
@@ -15,6 +17,7 @@ module RevealCK
15
17
  let :config do
16
18
  config = Config.new
17
19
  config.title = 'Sample Title'
20
+ config.description = 'Sample Description'
18
21
  config.author = 'Sample Author'
19
22
  config.theme = 'night'
20
23
  config.transition = 'page'
@@ -41,11 +44,21 @@ module RevealCK
41
44
  .to include('<html lang="en">')
42
45
  end
43
46
 
47
+ it 'prints the program name and version in the generator tag' do
48
+ expect(rendered_content)
49
+ .to include('<meta name="generator" content="reveal-ck 1.0">')
50
+ end
51
+
44
52
  it 'supports replacing the configured title' do
45
53
  expect(rendered_content)
46
54
  .to include('<title>Sample Title</title>')
47
55
  end
48
56
 
57
+ it 'support replacing the configured description' do
58
+ expect(rendered_content)
59
+ .to include('<meta name="description" content="Sample Description">')
60
+ end
61
+
49
62
  it 'supports replacing the configured author' do
50
63
  expect(rendered_content)
51
64
  .to include('<meta name="author" content="Sample Author">')
@@ -10,7 +10,7 @@ module RevealCK
10
10
  end
11
11
 
12
12
  let :generated_slides do
13
- /^slides\/.+$/
13
+ %r{^slides/.+$}
14
14
  end
15
15
 
16
16
  it 'sets up ::Listen to run when things change' do
@@ -34,6 +34,15 @@ module RevealCK
34
34
  expect(config.title).to eq 'My Presentation'
35
35
  end
36
36
 
37
+ it 'supplies a default description' do
38
+ expect(config.description).to eq ''
39
+ end
40
+
41
+ it 'supplies a #description, and #description=' do
42
+ config.description = 'My beautiful slides'
43
+ expect(config.description).to eq 'My beautiful slides'
44
+ end
45
+
37
46
  it 'supplies a default transition' do
38
47
  expect(config.transition).to eq 'default'
39
48
  end
@@ -16,7 +16,7 @@ module RevealCK
16
16
  end
17
17
 
18
18
  let :pretty_printed_basic do
19
- /<p>\s+This is basic (Slim|Haml)\s+<\/p>/
19
+ %r{<p>\s+This is basic (Slim|Haml)\s+</p>}
20
20
  end
21
21
 
22
22
  it 'can process a slim template' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reveal-ck
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jed Northridge
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-01 00:00:00.000000000 Z
11
+ date: 2015-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docile