wingtips 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +22 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +3 -0
- data/LICENSE +20 -0
- data/README.md +94 -0
- data/Rakefile +2 -0
- data/bin/wingtips +24 -0
- data/lib/wingtips.rb +11 -0
- data/lib/wingtips/configuration.rb +59 -0
- data/lib/wingtips/dsl.rb +40 -0
- data/lib/wingtips/presentation.rb +80 -0
- data/lib/wingtips/slide.rb +202 -0
- data/lib/wingtips/version.rb +3 -0
- data/samples/wingtips_introduction/code/demo_code.rb +9 -0
- data/samples/wingtips_introduction/config.rb +17 -0
- data/samples/wingtips_introduction/images/learning.jpg +0 -0
- data/samples/wingtips_introduction/images/shoes-icon.png +0 -0
- data/samples/wingtips_introduction/slides/how_does_this_work.rb +8 -0
- data/samples/wingtips_introduction/slides/my_slides.rb +64 -0
- data/samples/wingtips_introduction/templates/code_template.rb +7 -0
- data/wingtips.gemspec +27 -0
- metadata +139 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: cd5429f39cdabf82c98b720de0920b7a6fedd089
|
4
|
+
data.tar.gz: b5d697a68077b2b9c887d3f516fca620ccfcdedc
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: de4609a436f831be9af71febdff06fc086d2cc7a901c84137e65fe787aeba00237b5021ebc81365664af3bf753da4674ec50e7d65a2f3917d210a0ded9d1e640
|
7
|
+
data.tar.gz: dc4b09eae42b9a318c13e79bad2358e5870071c29c98b1b5086bf88c69475a7c596dd8f38780e2fa3ab733b2e39dffdf9f82b95383109b021b1a8fde2c3e77c8
|
data/.gitignore
ADDED
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
wingtips
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
jruby-1.7.19
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2013-2015 Tobias Pfeiffer, Jason R. Clark
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
7
|
+
the Software without restriction, including without limitation the rights to
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
10
|
+
subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
# Wingtips
|
2
|
+
|
3
|
+
A presentation tool written in ruby - write your slides in Ruby!
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Ensure that [JRuby](jruby.org) is installed.
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'wingtips'
|
13
|
+
```
|
14
|
+
|
15
|
+
Or to grab it straight from github
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
gem 'wingtips', github: 'PragTob/wingtips'
|
19
|
+
```
|
20
|
+
|
21
|
+
And then execute:
|
22
|
+
|
23
|
+
$ bundle
|
24
|
+
|
25
|
+
Or install it yourself as:
|
26
|
+
|
27
|
+
$ gem install wingtips
|
28
|
+
|
29
|
+
## Usage
|
30
|
+
|
31
|
+
A `wingtips` presentation expects this layout:
|
32
|
+
|
33
|
+
```
|
34
|
+
presentation_folder/
|
35
|
+
code/*.rb
|
36
|
+
images/*.*
|
37
|
+
slides/*.rb
|
38
|
+
config.rb
|
39
|
+
```
|
40
|
+
|
41
|
+
And a basic slide looks like this:
|
42
|
+
|
43
|
+
```ruby
|
44
|
+
class Bullets < Wingtips::Slide
|
45
|
+
def content
|
46
|
+
headline 'Use bullet points, would you?'
|
47
|
+
|
48
|
+
bullet "It's easy isn't it?"
|
49
|
+
bullet 'Just keep on'
|
50
|
+
bullet 'with ease!'
|
51
|
+
end
|
52
|
+
end
|
53
|
+
```
|
54
|
+
|
55
|
+
You can express the same slide an even more fluent DSL like this:
|
56
|
+
|
57
|
+
```ruby
|
58
|
+
slide do
|
59
|
+
headline 'Use bullet points, would you?'
|
60
|
+
|
61
|
+
bullet "It's easy isn't it?"
|
62
|
+
bullet 'Just keep on'
|
63
|
+
bullet 'with ease!'
|
64
|
+
end
|
65
|
+
```
|
66
|
+
|
67
|
+
For more examples please refer to the `samples` directory!
|
68
|
+
|
69
|
+
### OS X
|
70
|
+
|
71
|
+
You need need a special flag to start the presentation as it is needed by the JVM. You need to add `JRUBY_OPTS=-J-XstartOnFirstThread` when trying to launch a presentation. So to launch the sample you need to type:
|
72
|
+
|
73
|
+
```
|
74
|
+
JRUBY_OPTS=-J-XstartOnFirstThread bin/wingtips samples/wingtips_introduction
|
75
|
+
```
|
76
|
+
|
77
|
+
Otherwise without the JRUBYY_OPTS, you will encounter the following error on Mac OSX:
|
78
|
+
|
79
|
+
|
80
|
+
```bash
|
81
|
+
Presenting 12 slides
|
82
|
+
***WARNING: Display must be created on main thread due to Cocoa restrictions.
|
83
|
+
LoadError: Couldn't load backend Shoes::Swt'. Error: load error: shoes/swt -- org.eclipse.swt.SWTException: Invalid thread access
|
84
|
+
org/jruby/RubyKernel.java:1065:in `require'
|
85
|
+
```
|
86
|
+
|
87
|
+
|
88
|
+
## Contributing
|
89
|
+
|
90
|
+
1. Fork it ( https://github.com/[my-github-username]/wingtips/fork )
|
91
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
92
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
93
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
94
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
data/bin/wingtips
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
#! /usr/bin/env jruby
|
2
|
+
|
3
|
+
require 'bundler/setup'
|
4
|
+
Bundler.require
|
5
|
+
|
6
|
+
require 'wingtips/presentation'
|
7
|
+
require 'wingtips/configuration'
|
8
|
+
|
9
|
+
if ARGV.empty?
|
10
|
+
config_path = File.expand_path("./config.rb")
|
11
|
+
else
|
12
|
+
config_path = File.expand_path(ARGV[0])
|
13
|
+
config_path = File.join(config_path, "config.rb") if File.directory?(config_path)
|
14
|
+
end
|
15
|
+
|
16
|
+
if File.exists?(config_path)
|
17
|
+
Dir.chdir(File.dirname(config_path))
|
18
|
+
|
19
|
+
config = Wingtips::Configuration.new(config_path)
|
20
|
+
Wingtips::Presentation.start(config)
|
21
|
+
else
|
22
|
+
puts "Whoops, don't have a config file at #{config_path}"
|
23
|
+
end
|
24
|
+
|
data/lib/wingtips.rb
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
module Wingtips
|
2
|
+
class Configuration
|
3
|
+
include DSL
|
4
|
+
|
5
|
+
attr_reader :slide_classes, :app_options
|
6
|
+
|
7
|
+
def initialize(path)
|
8
|
+
self.class.current = self
|
9
|
+
@app_options = {
|
10
|
+
title: 'Presentation',
|
11
|
+
fullscreen: true
|
12
|
+
}
|
13
|
+
|
14
|
+
full_path = File.expand_path(path)
|
15
|
+
load_templates full_path
|
16
|
+
load_named_slides full_path
|
17
|
+
|
18
|
+
# the empty slide at the start is needed as otherwise the dimensions
|
19
|
+
# of the first slide are most likely messed up
|
20
|
+
@slide_classes = [Wingtips::Slide]
|
21
|
+
|
22
|
+
self.instance_eval(File.read(full_path))
|
23
|
+
end
|
24
|
+
|
25
|
+
def startup_options(opts={})
|
26
|
+
@app_options.merge!(opts)
|
27
|
+
end
|
28
|
+
|
29
|
+
def slides(*slide_classes)
|
30
|
+
@slide_classes.concat(slide_classes)
|
31
|
+
end
|
32
|
+
|
33
|
+
def unnamed_slides_allowed?
|
34
|
+
@allow_unnamed_slides
|
35
|
+
end
|
36
|
+
|
37
|
+
class << self
|
38
|
+
attr_accessor :current
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
def load_templates(full_path)
|
43
|
+
load_in_dir(full_path, "templates/*.rb")
|
44
|
+
end
|
45
|
+
|
46
|
+
def load_named_slides(full_path)
|
47
|
+
@allow_unnamed_slides = false
|
48
|
+
load_in_dir(full_path, "slides/*.rb")
|
49
|
+
@allow_unnamed_slides = true
|
50
|
+
end
|
51
|
+
|
52
|
+
def load_in_dir(full_path, pattern)
|
53
|
+
dir = File.dirname(full_path)
|
54
|
+
Dir[File.join(dir, pattern)].each do |file|
|
55
|
+
require file unless file == full_path
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
data/lib/wingtips/dsl.rb
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
module Wingtips
|
2
|
+
module DSL
|
3
|
+
def slide(title=nil, &content)
|
4
|
+
clazz = create_slide_class content
|
5
|
+
publish_slide_class clazz, title
|
6
|
+
end
|
7
|
+
|
8
|
+
private
|
9
|
+
def create_slide_class(content)
|
10
|
+
clazz = Class.new(Wingtips::Slide)
|
11
|
+
clazz.class_eval do
|
12
|
+
define_method(:content, &content)
|
13
|
+
end
|
14
|
+
clazz
|
15
|
+
end
|
16
|
+
|
17
|
+
def publish_slide_class(clazz, title)
|
18
|
+
if unnamed_slides_allowed? && title.nil?
|
19
|
+
@slide_classes << clazz
|
20
|
+
elsif title.nil?
|
21
|
+
raise "Unnamed calls to `slide do` aren't allowed in the slides subdirectory.\n" \
|
22
|
+
"Try `slide \"MySlide\" do` so you can reference it in config."
|
23
|
+
else
|
24
|
+
Object.const_set(title, clazz)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def configuration
|
29
|
+
Wingtips::Configuration.current
|
30
|
+
end
|
31
|
+
|
32
|
+
def unnamed_slides_allowed?
|
33
|
+
configuration.unnamed_slides_allowed?
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
|
39
|
+
# extending the main object (doesn't touch the Object class)
|
40
|
+
extend Wingtips::DSL
|
@@ -0,0 +1,80 @@
|
|
1
|
+
module Wingtips
|
2
|
+
module Presentation
|
3
|
+
NEXT_KEYS = [:right, :page_down, " "]
|
4
|
+
PREVIOUS_KEYS = [:left, :page_up, :backspace]
|
5
|
+
|
6
|
+
def self.start(config)
|
7
|
+
slides = config.slide_classes
|
8
|
+
puts "Presenting #{slides.size} slides"
|
9
|
+
|
10
|
+
Shoes.app(config.app_options) do
|
11
|
+
@slides = slides
|
12
|
+
|
13
|
+
def start
|
14
|
+
setup_controls
|
15
|
+
go_to_slide(0)
|
16
|
+
end
|
17
|
+
|
18
|
+
def on_slide_change(&block)
|
19
|
+
@on_slide_change_block = block
|
20
|
+
end
|
21
|
+
|
22
|
+
def slide_changing
|
23
|
+
@on_slide_change_block.call if @on_slide_change_block
|
24
|
+
end
|
25
|
+
|
26
|
+
def go_to_slide(number)
|
27
|
+
clear
|
28
|
+
@current_slide.slide_changing if @current_slide
|
29
|
+
|
30
|
+
@current_slide_number = number.to_i
|
31
|
+
slide_class = @slides[@current_slide_number]
|
32
|
+
@current_slide = slide_class.new(app)
|
33
|
+
@current_slide.show
|
34
|
+
end
|
35
|
+
|
36
|
+
def next_slide
|
37
|
+
if @current_slide_number <= @slides.size - 2
|
38
|
+
go_to_slide @current_slide_number + 1
|
39
|
+
else
|
40
|
+
exit
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def previous_slide
|
45
|
+
if @current_slide_number > 0
|
46
|
+
go_to_slide @current_slide_number - 1
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def setup_controls
|
51
|
+
keypress do |key|
|
52
|
+
slide_controls key
|
53
|
+
fullscreen_controls key
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def slide_controls(key)
|
58
|
+
if NEXT_KEYS.include? key
|
59
|
+
if @current_slide.effects_left?
|
60
|
+
@current_slide.trigger_effect
|
61
|
+
else
|
62
|
+
next_slide
|
63
|
+
end
|
64
|
+
end
|
65
|
+
previous_slide if PREVIOUS_KEYS.include? key
|
66
|
+
end
|
67
|
+
|
68
|
+
def fullscreen_controls(key)
|
69
|
+
toggle_fullscreen if key == :f11 || key == "f"
|
70
|
+
end
|
71
|
+
|
72
|
+
def toggle_fullscreen
|
73
|
+
self.fullscreen = !fullscreen
|
74
|
+
end
|
75
|
+
|
76
|
+
start
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,202 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
module Wingtips
|
4
|
+
PHOTO_CREDIT_SIZE = 18
|
5
|
+
CODE_SIZE = 30
|
6
|
+
BULLET_POINT_SIZE = 40
|
7
|
+
HEADLINE_SIZE = 65
|
8
|
+
VERY_BIG_SIZE = 80
|
9
|
+
ENORMOUS_SIZE = 140
|
10
|
+
|
11
|
+
class Slide
|
12
|
+
include Shoes::Highlighter::Markup
|
13
|
+
|
14
|
+
IMAGES_DIRECTORY = 'images/'
|
15
|
+
CODE_DIRECTORY = 'code/'
|
16
|
+
|
17
|
+
attr_reader :app
|
18
|
+
|
19
|
+
def initialize(app)
|
20
|
+
@app = app
|
21
|
+
@effects = []
|
22
|
+
after_initialize
|
23
|
+
end
|
24
|
+
|
25
|
+
def content
|
26
|
+
# implemented by subclasses
|
27
|
+
end
|
28
|
+
|
29
|
+
def show
|
30
|
+
@main_slot = stack height: app.height do
|
31
|
+
content
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def append(&blk)
|
36
|
+
@main_slot.append &blk
|
37
|
+
end
|
38
|
+
|
39
|
+
# copied from the URL implementation... weird but I want to have
|
40
|
+
# classes not methods for this
|
41
|
+
def method_missing(method, *args, &blk)
|
42
|
+
if app_should_handle_method? method
|
43
|
+
app.send(method, *args, &blk)
|
44
|
+
else
|
45
|
+
super
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def code(string, demo_as_effect = false, &block)
|
50
|
+
source = source_from string
|
51
|
+
source = source.split("\n").map{|line| ' ' + line}.join("\n")
|
52
|
+
highlighted_code = para *highlight(source), size: CODE_SIZE
|
53
|
+
add_demo_as_effect(source, &block) if demo_as_effect
|
54
|
+
highlighted_code
|
55
|
+
end
|
56
|
+
|
57
|
+
def demo(string, &block)
|
58
|
+
source = source_from string
|
59
|
+
eval source
|
60
|
+
|
61
|
+
last_app = Shoes.apps.last
|
62
|
+
last_app.keypress do |key|
|
63
|
+
last_app.quit if key == :control_w
|
64
|
+
end
|
65
|
+
|
66
|
+
yield last_app if block_given?
|
67
|
+
end
|
68
|
+
|
69
|
+
def source_from(string)
|
70
|
+
file_path = find_file_in(string, [CODE_DIRECTORY])
|
71
|
+
|
72
|
+
if file_path
|
73
|
+
File.read file_path
|
74
|
+
else
|
75
|
+
string
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
def add_demo_as_effect(string, &block)
|
80
|
+
add_effect do demo(string, &block) end
|
81
|
+
end
|
82
|
+
|
83
|
+
def add_effect(&effect)
|
84
|
+
@effects << effect
|
85
|
+
end
|
86
|
+
|
87
|
+
def headline(string)
|
88
|
+
text = title ' ' + string, size: HEADLINE_SIZE
|
89
|
+
empty_line
|
90
|
+
text
|
91
|
+
end
|
92
|
+
|
93
|
+
def bullet(string)
|
94
|
+
para ' • ' + string, size: BULLET_POINT_SIZE
|
95
|
+
end
|
96
|
+
|
97
|
+
def empty_line
|
98
|
+
para ' ', size: BULLET_POINT_SIZE
|
99
|
+
end
|
100
|
+
|
101
|
+
def image(path, *args)
|
102
|
+
app.image(image_path(path), *args)
|
103
|
+
end
|
104
|
+
|
105
|
+
def image_path(path)
|
106
|
+
path = find_file_in(path, [IMAGES_DIRECTORY])
|
107
|
+
File.expand_path(path)
|
108
|
+
end
|
109
|
+
|
110
|
+
def fullscreen_image(path)
|
111
|
+
img = image path
|
112
|
+
height_ratio = height.to_r/img.height
|
113
|
+
width_ratio = width.to_r/img.width
|
114
|
+
scale_image_by img, [width_ratio, height_ratio].max
|
115
|
+
img
|
116
|
+
end
|
117
|
+
|
118
|
+
def fully_shown_image(path, additional_height = 0)
|
119
|
+
img = image path
|
120
|
+
height_ratio = (height - additional_height).to_r/img.height
|
121
|
+
width_ratio = width.to_r/img.width
|
122
|
+
scale_image_by img, [width_ratio, height_ratio].min
|
123
|
+
img
|
124
|
+
end
|
125
|
+
|
126
|
+
def scale_image_by(img, ratio)
|
127
|
+
img.width = (img.width * ratio).to_i
|
128
|
+
img.height = (img.height * ratio).to_i
|
129
|
+
end
|
130
|
+
|
131
|
+
def centered_title(string, opts={})
|
132
|
+
para string, defaulted_options(opts,
|
133
|
+
align: 'center',
|
134
|
+
size: VERY_BIG_SIZE,
|
135
|
+
margin_top: 50)
|
136
|
+
end
|
137
|
+
|
138
|
+
def centered_subtitle(string, opts={})
|
139
|
+
para string, defaulted_options(opts,
|
140
|
+
align: 'center',
|
141
|
+
size: BULLET_POINT_SIZE,
|
142
|
+
margin_top: 50)
|
143
|
+
end
|
144
|
+
|
145
|
+
def centered_huge_text(string, opts={})
|
146
|
+
para string, defaulted_options(opts,
|
147
|
+
align: 'center',
|
148
|
+
size: VERY_BIG_SIZE,
|
149
|
+
margin_top: 50)
|
150
|
+
end
|
151
|
+
|
152
|
+
def centered_enormous_text(string, opts={})
|
153
|
+
para string, defaulted_options(opts,
|
154
|
+
align: 'center',
|
155
|
+
size: ENORMOUS_SIZE,
|
156
|
+
margin_top: 50)
|
157
|
+
end
|
158
|
+
|
159
|
+
def center_horizontally(element)
|
160
|
+
element.left = @app.width / 2 - element.width / 2
|
161
|
+
end
|
162
|
+
|
163
|
+
def defaulted_options(passed, defaults={})
|
164
|
+
results = defaults.merge(passed)
|
165
|
+
if results[:vertical_align] == 'center'
|
166
|
+
results[:margin_top] = height/2 - 100
|
167
|
+
end
|
168
|
+
results
|
169
|
+
end
|
170
|
+
|
171
|
+
def after_initialize
|
172
|
+
# subclasses if an after hook is needed
|
173
|
+
end
|
174
|
+
|
175
|
+
def effects_left?
|
176
|
+
!@effects.empty?
|
177
|
+
end
|
178
|
+
|
179
|
+
def trigger_effect
|
180
|
+
effect = @effects.shift
|
181
|
+
@main_slot.append &effect
|
182
|
+
end
|
183
|
+
|
184
|
+
private
|
185
|
+
def find_file_in(file_path, locations)
|
186
|
+
candidate_locations = locations.map {|location| location + file_path}
|
187
|
+
candidate_locations << file_path
|
188
|
+
candidate_locations.find do |candidate_path|
|
189
|
+
is_file_path? candidate_path
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
def is_file_path?(file_path)
|
194
|
+
File.exist? file_path
|
195
|
+
end
|
196
|
+
|
197
|
+
def app_should_handle_method? method_name
|
198
|
+
!self.respond_to?(method_name) && app.respond_to?(method_name)
|
199
|
+
end
|
200
|
+
|
201
|
+
end
|
202
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Arrange the order of your slides here
|
2
|
+
slides Hello, Bullets, DSLSlide, Images, FullScreenImage, FullyShownImage, Code,
|
3
|
+
CodeExecute, HowDoesThisWork
|
4
|
+
|
5
|
+
slide do
|
6
|
+
headline 'Fancy DSLs can even be unnamed'
|
7
|
+
end
|
8
|
+
|
9
|
+
code = <<-CODE
|
10
|
+
class MyClass
|
11
|
+
def fancy_method
|
12
|
+
magic!
|
13
|
+
end
|
14
|
+
end
|
15
|
+
CODE
|
16
|
+
|
17
|
+
code_slide 'Template methods', code
|
Binary file
|
Binary file
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# You can write multiple files with slides or just put them all in one file
|
2
|
+
|
3
|
+
class Hello < Wingtips::Slide
|
4
|
+
def content
|
5
|
+
centered_huge_text 'Welcome to Wingtips!'
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
class Bullets < Wingtips::Slide
|
10
|
+
def content
|
11
|
+
headline 'Use bullet points, would you?'
|
12
|
+
|
13
|
+
bullet "It's easy isn't it?"
|
14
|
+
bullet 'Just keep on'
|
15
|
+
bullet 'with ease!'
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
slide 'DSLSlide' do
|
20
|
+
headline 'Using the fancier DSL'
|
21
|
+
end
|
22
|
+
|
23
|
+
class Images < Wingtips::Slide
|
24
|
+
def content
|
25
|
+
headline 'Embed images and shoes easily!'
|
26
|
+
|
27
|
+
image 'shoes-icon.png'
|
28
|
+
para 'standard shoes methods like para are of course okay as well!'
|
29
|
+
subtitle 'Or some drawing'
|
30
|
+
rect 300, 400, 200, 300, fill: lime
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
class FullScreenImage < Wingtips::Slide
|
35
|
+
def content
|
36
|
+
# learning photo - Creative Commons Attribution-ShareAlike 2.0 http://www.flickr.com/photos/83633410@N07/7658165122/in/photostream/
|
37
|
+
fullscreen_image 'learning.jpg'
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
class FullyShownImage < Wingtips::Slide
|
42
|
+
def content
|
43
|
+
# learning photo - Creative Commons Attribution-ShareAlike 2.0 http://www.flickr.com/photos/83633410@N07/7658165122/in/photostream/
|
44
|
+
fully_shown_image 'learning.jpg'
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
class Code < Wingtips::Slide
|
49
|
+
def content
|
50
|
+
subtitle 'Show code from a string...'
|
51
|
+
code 'puts "Hello wingtips!"'
|
52
|
+
empty_line
|
53
|
+
subtitle 'Or a file'
|
54
|
+
code 'demo_code.rb'
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
class CodeExecute < Wingtips::Slide
|
59
|
+
def content
|
60
|
+
headline 'Code and execute'
|
61
|
+
|
62
|
+
code 'alert "Surprse!"', true
|
63
|
+
end
|
64
|
+
end
|
data/wingtips.gemspec
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'wingtips/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "wingtips"
|
8
|
+
spec.version = Wingtips::VERSION
|
9
|
+
spec.authors = ['Tobias Pfiffer', 'Jason R. Clark']
|
10
|
+
spec.email = ['pragtob@gmail.com', 'jason@jasonrclark.net']
|
11
|
+
spec.summary = %q{Presentation software for Shoes}
|
12
|
+
spec.description = %q{Put your best foot forward, present with Shoes!}
|
13
|
+
spec.homepage = "https://github.com/PragTob/wingtips"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency "shoes", "~> 4.0.0.pre3"
|
22
|
+
spec.add_dependency "shoes-highlighter", "~> 1.0.0"
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
25
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
+
spec.add_development_dependency "pry", "~> 0.10.0"
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,139 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: wingtips
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Tobias Pfiffer
|
8
|
+
- Jason R. Clark
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2015-03-16 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: shoes
|
16
|
+
version_requirements: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ~>
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 4.0.0.pre3
|
21
|
+
requirement: !ruby/object:Gem::Requirement
|
22
|
+
requirements:
|
23
|
+
- - ~>
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: 4.0.0.pre3
|
26
|
+
prerelease: false
|
27
|
+
type: :runtime
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: shoes-highlighter
|
30
|
+
version_requirements: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ~>
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 1.0.0
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ~>
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: 1.0.0
|
40
|
+
prerelease: false
|
41
|
+
type: :runtime
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: bundler
|
44
|
+
version_requirements: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ~>
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '1.7'
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '1.7'
|
54
|
+
prerelease: false
|
55
|
+
type: :development
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: rake
|
58
|
+
version_requirements: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ~>
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '10.0'
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ~>
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '10.0'
|
68
|
+
prerelease: false
|
69
|
+
type: :development
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: pry
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ~>
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 0.10.0
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ~>
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: 0.10.0
|
82
|
+
prerelease: false
|
83
|
+
type: :development
|
84
|
+
description: Put your best foot forward, present with Shoes!
|
85
|
+
email:
|
86
|
+
- pragtob@gmail.com
|
87
|
+
- jason@jasonrclark.net
|
88
|
+
executables:
|
89
|
+
- wingtips
|
90
|
+
extensions: []
|
91
|
+
extra_rdoc_files: []
|
92
|
+
files:
|
93
|
+
- .gitignore
|
94
|
+
- .ruby-gemset
|
95
|
+
- .ruby-version
|
96
|
+
- Gemfile
|
97
|
+
- LICENSE
|
98
|
+
- README.md
|
99
|
+
- Rakefile
|
100
|
+
- bin/wingtips
|
101
|
+
- lib/wingtips.rb
|
102
|
+
- lib/wingtips/configuration.rb
|
103
|
+
- lib/wingtips/dsl.rb
|
104
|
+
- lib/wingtips/presentation.rb
|
105
|
+
- lib/wingtips/slide.rb
|
106
|
+
- lib/wingtips/version.rb
|
107
|
+
- samples/wingtips_introduction/code/demo_code.rb
|
108
|
+
- samples/wingtips_introduction/config.rb
|
109
|
+
- samples/wingtips_introduction/images/learning.jpg
|
110
|
+
- samples/wingtips_introduction/images/shoes-icon.png
|
111
|
+
- samples/wingtips_introduction/slides/how_does_this_work.rb
|
112
|
+
- samples/wingtips_introduction/slides/my_slides.rb
|
113
|
+
- samples/wingtips_introduction/templates/code_template.rb
|
114
|
+
- wingtips.gemspec
|
115
|
+
homepage: https://github.com/PragTob/wingtips
|
116
|
+
licenses:
|
117
|
+
- MIT
|
118
|
+
metadata: {}
|
119
|
+
post_install_message:
|
120
|
+
rdoc_options: []
|
121
|
+
require_paths:
|
122
|
+
- lib
|
123
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
124
|
+
requirements:
|
125
|
+
- - '>='
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '0'
|
128
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - '>='
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
133
|
+
requirements: []
|
134
|
+
rubyforge_project:
|
135
|
+
rubygems_version: 2.4.5
|
136
|
+
signing_key:
|
137
|
+
specification_version: 4
|
138
|
+
summary: Presentation software for Shoes
|
139
|
+
test_files: []
|