slideshow 0.8 → 0.8.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.
Files changed (5) hide show
  1. data/History.txt +6 -0
  2. data/Rakefile +11 -9
  3. data/lib/slideshow.rb +4 -3
  4. data/lib/slideshow/gen.rb +14 -13
  5. metadata +73 -21
@@ -1,3 +1,9 @@
1
+ === 0.8.1 / 2010-06-13
2
+
3
+ * Add patches for Ruby 1.9 compatibility [Thanks Lorenzo Riccucci]
4
+ * Replaced BlueCloth 1.x with Kramdown 0.8 as default markdown engine
5
+ * Minor fixes
6
+
1
7
  === 0.8 / 2009-03-14
2
8
 
3
9
  * Added -f/--fetch URI option; lets you fetch templates from the internet
data/Rakefile CHANGED
@@ -1,18 +1,20 @@
1
1
  require 'hoe'
2
2
  require './lib/slideshow.rb'
3
3
 
4
- Hoe.new('slideshow', Slideshow::VERSION) do |p|
5
-
6
- p.summary = 'Slide Show (S9) - A Free Web Alternative to PowerPoint and KeyNote in Ruby'
7
- p.url = 'http://slideshow.rubyforge.org'
4
+ Hoe.spec 'slideshow' do
5
+
6
+ self.version = Slideshow::VERSION
7
+
8
+ self.summary = 'Slide Show (S9) - A Free Web Alternative to PowerPoint and KeyNote in Ruby'
9
+ self.url = 'http://slideshow.rubyforge.org'
8
10
 
9
- p.author = 'Gerald Bauer'
10
- p.email = 'webslideshow@googlegroups.com'
11
+ self.author = 'Gerald Bauer'
12
+ self.email = 'webslideshow@googlegroups.com'
11
13
 
12
- p.extra_deps = [
14
+ self.extra_deps = [
13
15
  ['RedCloth','>= 4.0.0'],
14
- ['BlueCloth','>= 1.0.0']
16
+ ['kramdown','>= 0.8.0']
15
17
  ]
16
18
 
17
- p.remote_rdoc_dir = 'doc'
19
+ self.remote_rdoc_dir = 'doc'
18
20
  end
@@ -8,13 +8,14 @@ require 'optparse'
8
8
  require 'erb'
9
9
  require 'logger'
10
10
  require 'fileutils'
11
- require 'ftools'
12
11
  require 'pp'
13
12
  require 'uri'
14
13
  require 'net/http'
15
14
 
16
15
  # required gems
17
- require 'redcloth'
16
+ require 'redcloth' # default textile library
17
+ require 'kramdown' # default markdown library
18
+
18
19
 
19
20
  # own code
20
21
  require 'slideshow/opts'
@@ -22,7 +23,7 @@ require 'slideshow/gen'
22
23
 
23
24
  module Slideshow
24
25
 
25
- VERSION = '0.8'
26
+ VERSION = '0.8.1'
26
27
 
27
28
  def Slideshow.main
28
29
 
@@ -9,17 +9,18 @@ class Gen
9
9
  KNOWN_MARKDOWN_EXTNAMES = [ '.markdown', '.m', '.mark', '.mkdn', '.md', '.txt', '.text' ]
10
10
  KNOWN_EXTNAMES = KNOWN_TEXTILE_EXTNAMES + KNOWN_MARKDOWN_EXTNAMES
11
11
 
12
- # note: only bluecloth is listed as a dependency in gem specs (because it's Ruby only and, thus, easy to install)
12
+ # note: only kramdown is listed as a dependency in gem specs (because it's Ruby only and, thus, easy to install)
13
13
  # if you want to use other markdown libs install the required/desired lib e.g.
14
14
  # use gem install rdiscount for rdiscount and so on
15
15
  #
16
16
  # also note for now the first present markdown library gets used
17
- # the search order is first come, first serve, that is: rdiscount, rpeg-markdown, maruku, bluecloth (fallback, always present)
17
+ # the search order is first come, first serve, that is: rdiscount, rpeg-markdown, maruku, bluecloth, kramdown (fallback, always present)
18
18
  KNOWN_MARKDOWN_LIBS = [
19
19
  [ 'rdiscount', lambda { |content| RDiscount.new( content ).to_html } ],
20
20
  [ 'rpeg-markdown', lambda { |content| PEGMarkdown.new( content ).to_html } ],
21
21
  [ 'maruku', lambda { |content| Maruku.new( content, {:on_error => :raise} ).to_html } ],
22
- [ 'bluecloth', lambda { |content| BlueCloth.new( content ).to_html } ]
22
+ [ 'bluecloth', lambda { |content| BlueCloth.new( content ).to_html } ],
23
+ [ 'kramdown', lambda { |content| Kramdown::Document.new( content ).to_html } ]
23
24
  ]
24
25
 
25
26
  def initialize
@@ -80,7 +81,7 @@ class Gen
80
81
  end
81
82
 
82
83
  def cache_dir
83
- PLATFORM =~ /win32/ ? win32_cache_dir : File.join(File.expand_path("~"), ".slideshow")
84
+ RUBY_PLATFORM =~ /win32/ ? win32_cache_dir : File.join(File.expand_path("~"), ".slideshow")
84
85
  end
85
86
 
86
87
  def win32_cache_dir
@@ -103,7 +104,7 @@ class Gen
103
104
  end
104
105
 
105
106
  # make sure path exists
106
- File.makedirs( @config_dir ) unless File.directory? @config_dir
107
+ FileUtils.makedirs( @config_dir ) unless File.directory? @config_dir
107
108
  end
108
109
 
109
110
  @config_dir
@@ -238,7 +239,7 @@ class Gen
238
239
  # make sure dest path exists
239
240
  dest_path = File.dirname( dest_full )
240
241
  logger.debug "dest_path=#{dest_path}"
241
- File.makedirs( dest_path ) unless File.directory? dest_path
242
+ FileUtils.makedirs( dest_path ) unless File.directory? dest_path
242
243
  dest_full
243
244
  end
244
245
 
@@ -296,7 +297,7 @@ class Gen
296
297
  logger.debug "dlpath: #{dlbase}"
297
298
  logger.debug "pkgpath: #{pkgpath}"
298
299
 
299
- File.makedirs( pkgpath ) unless File.directory? pkgpath
300
+ FileUtils.makedirs( pkgpath ) unless File.directory? pkgpath
300
301
 
301
302
  puts "Fetching template package '#{basename}'"
302
303
  puts " : from '#{dlbase}'"
@@ -319,7 +320,7 @@ class Gen
319
320
 
320
321
  # make sure path exists
321
322
  destpath = File.dirname( dest )
322
- File.makedirs( destpath ) unless File.directory? destpath
323
+ FileUtils.makedirs( destpath ) unless File.directory? destpath
323
324
 
324
325
  src = "#{dlbase}/#{file}"
325
326
 
@@ -351,14 +352,14 @@ class Gen
351
352
  # expand output path in current dir and make sure output path exists
352
353
  outpath = File.expand_path( opts.output_path )
353
354
  logger.debug "outpath=#{outpath}"
354
- File.makedirs( outpath ) unless File.directory? outpath
355
+ FileUtils.makedirs( outpath ) unless File.directory? outpath
355
356
 
356
357
  manifest.each do |entry|
357
358
  dest = entry[0]
358
359
  source = entry[1]
359
360
 
360
361
  puts "Copying to #{dest} from #{source}..."
361
- File.copy( source, with_output_path( dest, outpath ) )
362
+ FileUtils.copy( source, with_output_path( dest, outpath ) )
362
363
  end
363
364
 
364
365
  puts "Done."
@@ -400,7 +401,7 @@ class Gen
400
401
  # expand output path in current dir and make sure output path exists
401
402
  outpath = File.expand_path( opts.output_path )
402
403
  logger.debug "outpath=#{outpath}"
403
- File.makedirs( outpath ) unless File.directory? outpath
404
+ FileUtils.makedirs( outpath ) unless File.directory? outpath
404
405
 
405
406
  dirname = File.dirname( fn )
406
407
  basename = File.basename( fn, '.*' )
@@ -463,7 +464,7 @@ class Gen
463
464
 
464
465
  # fix: allow comments in header too (#)
465
466
 
466
- content_with_headers.each do |line|
467
+ content_with_headers.each_line do |line|
467
468
  if read_headers && line =~ /^\s*(\w[\w-]*)[ \t]*:[ \t]*(.*)/
468
469
  key = $1.downcase
469
470
  value = $2.strip
@@ -552,7 +553,7 @@ class Gen
552
553
  source = entry[1]
553
554
 
554
555
  puts "Copying to #{dest} from #{source}..."
555
- File.copy( source, with_output_path( dest, outpath ) )
556
+ FileUtils.copy( source, with_output_path( dest, outpath ) )
556
557
  end
557
558
  end
558
559
 
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slideshow
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.8"
4
+ hash: 61
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 8
9
+ - 1
10
+ version: 0.8.1
5
11
  platform: ruby
6
12
  authors:
7
13
  - Gerald Bauer
@@ -9,40 +15,78 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2009-03-14 00:00:00 -04:00
18
+ date: 2010-06-13 00:00:00 +02:00
13
19
  default_executable:
14
20
  dependencies:
15
21
  - !ruby/object:Gem::Dependency
16
22
  name: RedCloth
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
20
26
  requirements:
21
27
  - - ">="
22
28
  - !ruby/object:Gem::Version
29
+ hash: 63
30
+ segments:
31
+ - 4
32
+ - 0
33
+ - 0
23
34
  version: 4.0.0
24
- version:
35
+ type: :runtime
36
+ version_requirements: *id001
25
37
  - !ruby/object:Gem::Dependency
26
- name: BlueCloth
38
+ name: kramdown
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ hash: 63
46
+ segments:
47
+ - 0
48
+ - 8
49
+ - 0
50
+ version: 0.8.0
27
51
  type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
52
+ version_requirements: *id002
53
+ - !ruby/object:Gem::Dependency
54
+ name: rubyforge
55
+ prerelease: false
56
+ requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
30
58
  requirements:
31
59
  - - ">="
32
60
  - !ruby/object:Gem::Version
33
- version: 1.0.0
34
- version:
61
+ hash: 7
62
+ segments:
63
+ - 2
64
+ - 0
65
+ - 4
66
+ version: 2.0.4
67
+ type: :development
68
+ version_requirements: *id003
35
69
  - !ruby/object:Gem::Dependency
36
70
  name: hoe
37
- type: :development
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
71
+ prerelease: false
72
+ requirement: &id004 !ruby/object:Gem::Requirement
73
+ none: false
40
74
  requirements:
41
75
  - - ">="
42
76
  - !ruby/object:Gem::Version
43
- version: 1.9.0
44
- version:
45
- description: The Slide Show (S9) Ruby gem lets you create slide shows and author slides in plain text
46
77
  using a wiki-style markup language that's easy-to-write and easy-to-read.
47
78
  The Slide Show (S9) project also collects and welcomes themes and ships
48
79
  "out-of-the-gem" with built-in support for "loss-free" gradient vector graphics themes.
80
+ hash: 21
81
+ segments:
82
+ - 2
83
+ - 6
84
+ - 1
85
+ version: 2.6.1
86
+ type: :development
87
+ version_requirements: *id004
88
+ description: |-
89
+ The Slide Show (S9) Ruby gem lets you create slide shows and author slides in plain text
90
+ using a wiki-style markup language that's easy-to-write and easy-to-read.
91
+ The Slide Show (S9) project also collects and welcomes themes and ships
92
+ "out-of-the-gem" with built-in support for "loss-free" gradient vector graphics themes.
49
93
  email: webslideshow@googlegroups.com
50
94
  executables:
51
95
  - slideshow
@@ -100,6 +144,8 @@ files:
100
144
  - templates/s6/style.css.erb
101
145
  has_rdoc: true
102
146
  homepage: http://slideshow.rubyforge.org
147
+ licenses: []
148
+
103
149
  post_install_message:
104
150
  rdoc_options:
105
151
  - --main
@@ -107,23 +153,29 @@ rdoc_options:
107
153
  require_paths:
108
154
  - lib
109
155
  required_ruby_version: !ruby/object:Gem::Requirement
156
+ none: false
110
157
  requirements:
111
158
  - - ">="
112
159
  - !ruby/object:Gem::Version
160
+ hash: 3
161
+ segments:
162
+ - 0
113
163
  version: "0"
114
- version:
115
164
  required_rubygems_version: !ruby/object:Gem::Requirement
165
+ none: false
116
166
  requirements:
117
167
  - - ">="
118
168
  - !ruby/object:Gem::Version
169
+ hash: 3
170
+ segments:
171
+ - 0
119
172
  version: "0"
120
- version:
121
173
  requirements: []
122
174
 
123
175
  rubyforge_project: slideshow
124
- rubygems_version: 1.3.1
176
+ rubygems_version: 1.3.7
125
177
  signing_key:
126
- specification_version: 2
178
+ specification_version: 3
127
179
  summary: Slide Show (S9) - A Free Web Alternative to PowerPoint and KeyNote in Ruby
128
180
  test_files: []
129
181