slideshow 1.0.5 → 1.1.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -14,7 +14,8 @@ Hoe.spec 'slideshow' do
14
14
  self.extra_deps = [
15
15
  ['RedCloth','>= 4.2.9'],
16
16
  ['markdown','>= 0.1.0'],
17
- ['fetcher','>= 0.1.0']
17
+ ['fetcher','>= 0.1.0'],
18
+ ['props','>= 0.1.0']
18
19
  ]
19
20
 
20
21
  self.remote_rdoc_dir = 'doc'
data/bin/slideshow CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- require 'rubygems'
2
+
3
3
  require 'slideshow'
4
4
 
5
5
  Slideshow.main
data/lib/slideshow.rb CHANGED
@@ -1,7 +1,11 @@
1
1
  $KCODE = 'utf'
2
2
 
3
- LIB_PATH = File.expand_path( File.dirname(__FILE__) )
4
- $LOAD_PATH.unshift(LIB_PATH)
3
+ ###
4
+ # NB: for local testing run like:
5
+ #
6
+ # 1.8.x: ruby -Ilib -rrubygems lib/slideshow.rb
7
+ # 1.9.x: ruby -Ilib lib/slideshow.rb
8
+
5
9
 
6
10
  # core and stlibs
7
11
  require 'optparse'
@@ -22,6 +26,15 @@ require 'redcloth' # default textile library
22
26
  require 'markdown' # default markdown library
23
27
  require 'fetcher' # fetch docs and blogs via http, https, etc.
24
28
 
29
+ require 'props' # manage settings/env
30
+
31
+ class Env
32
+ def self.slideshowopt
33
+ ENV[ 'SLIDESHOWOPT' ]
34
+ end
35
+ end # class Env
36
+
37
+
25
38
  # our own code
26
39
  require 'slideshow/opts'
27
40
  require 'slideshow/config'
@@ -55,19 +68,23 @@ require 'slideshow/filters/slide_filter'
55
68
 
56
69
  module Slideshow
57
70
 
58
- VERSION = '1.0.5'
59
-
71
+ VERSION = '1.1.0.beta1'
72
+
73
+ def self.root
74
+ "#{File.expand_path( File.dirname(File.dirname(__FILE__)) )}"
75
+ end
76
+
60
77
  # version string for generator meta tag (includes ruby version)
61
- def Slideshow.generator
78
+ def self.generator
62
79
  "Slide Show (S9) #{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"
63
80
  end
64
81
 
65
82
 
66
- def Slideshow.main
83
+ def self.main
67
84
 
68
85
  # allow env variable to set RUBYOPT-style default command line options
69
86
  # e.g. -o slides -t <your_template_manifest_here>
70
- slideshowopt = ENV[ 'SLIDESHOWOPT' ]
87
+ slideshowopt = Env.slideshowopt
71
88
 
72
89
  args = []
73
90
  args += slideshowopt.split if slideshowopt
@@ -17,8 +17,8 @@ class Config
17
17
 
18
18
  def load
19
19
  # load builtin config file @ <gem>/config/slideshow.yml
20
- config_file = "#{File.dirname( LIB_PATH )}/config/slideshow.yml"
21
- config_builtin_file = "#{File.dirname( LIB_PATH )}/config/slideshow.builtin.yml"
20
+ config_file = "#{Slideshow.root}/config/slideshow.yml"
21
+ config_builtin_file = "#{Slideshow.root}/config/slideshow.builtin.yml"
22
22
 
23
23
  # run through erb
24
24
  config_txt = File.read( config_file )
data/lib/slideshow/gen.rb CHANGED
@@ -413,7 +413,7 @@ def load_plugins
413
413
 
414
414
  patterns = []
415
415
  patterns << "#{config_dir}/lib/**/*.rb"
416
- patterns << 'lib/**/*.rb' unless LIB_PATH == File.expand_path( 'lib' ) # don't include lib if we are in repo (don't include slideshow/lib)
416
+ patterns << 'lib/**/*.rb' unless Slideshow.root == File.expand_path( '.' ) # don't include lib if we are in repo (don't include slideshow/lib)
417
417
 
418
418
  patterns.each do |pattern|
419
419
  pattern.gsub!( '\\', '/') # normalize path; make sure all path use / only
@@ -486,6 +486,7 @@ More examles:
486
486
 
487
487
  Further information:
488
488
  http://slideshow.rubyforge.org
489
+
489
490
  EOS
490
491
 
491
492
 
@@ -66,7 +66,7 @@ module Slideshow
66
66
  # 1) search gem/templates
67
67
 
68
68
  builtin_patterns = [
69
- "#{File.dirname( LIB_PATH )}/templates/*.txt.gen"
69
+ "#{Slideshow.root}/templates/*.txt.gen"
70
70
  ]
71
71
 
72
72
  find_manifests( builtin_patterns )
@@ -78,7 +78,7 @@ module Slideshow
78
78
  # 3) search gem/templates
79
79
 
80
80
  builtin_patterns = [
81
- "#{File.dirname( LIB_PATH )}/templates/*.txt"
81
+ "#{Slideshow.root}/templates/*.txt"
82
82
  ]
83
83
  config_patterns = [
84
84
  "#{config_dir}/templates/*.txt",
@@ -90,7 +90,7 @@ module Slideshow
90
90
  ]
91
91
 
92
92
  patterns = []
93
- patterns += current_patterns unless LIB_PATH == File.expand_path( 'lib' ) # don't include working dir if we test code from repo (don't include slideshow/templates)
93
+ patterns += current_patterns unless Slideshow.root == File.expand_path( '.' ) # don't include working dir if we test code from repo (don't include slideshow/templates)
94
94
  patterns += config_patterns
95
95
  patterns += builtin_patterns
96
96
 
metadata CHANGED
@@ -1,13 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slideshow
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
5
- prerelease:
4
+ hash: -37085639
5
+ prerelease: 6
6
6
  segments:
7
7
  - 1
8
+ - 1
8
9
  - 0
9
- - 5
10
- version: 1.0.5
10
+ - beta
11
+ - 1
12
+ version: 1.1.0.beta1
11
13
  platform: ruby
12
14
  authors:
13
15
  - Gerald Bauer
@@ -66,9 +68,25 @@ dependencies:
66
68
  type: :runtime
67
69
  version_requirements: *id003
68
70
  - !ruby/object:Gem::Dependency
69
- name: rdoc
71
+ name: props
70
72
  prerelease: false
71
73
  requirement: &id004 !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ hash: 27
79
+ segments:
80
+ - 0
81
+ - 1
82
+ - 0
83
+ version: 0.1.0
84
+ type: :runtime
85
+ version_requirements: *id004
86
+ - !ruby/object:Gem::Dependency
87
+ name: rdoc
88
+ prerelease: false
89
+ requirement: &id005 !ruby/object:Gem::Requirement
72
90
  none: false
73
91
  requirements:
74
92
  - - ~>
@@ -79,11 +97,11 @@ dependencies:
79
97
  - 10
80
98
  version: "3.10"
81
99
  type: :development
82
- version_requirements: *id004
100
+ version_requirements: *id005
83
101
  - !ruby/object:Gem::Dependency
84
102
  name: hoe
85
103
  prerelease: false
86
- requirement: &id005 !ruby/object:Gem::Requirement
104
+ requirement: &id006 !ruby/object:Gem::Requirement
87
105
  none: false
88
106
  requirements:
89
107
  - - ~>
@@ -94,7 +112,7 @@ dependencies:
94
112
  - 0
95
113
  version: "3.0"
96
114
  type: :development
97
- version_requirements: *id005
115
+ version_requirements: *id006
98
116
  description: |-
99
117
  The Slide Show (S9) Ruby gem lets you create slide shows and author slides in plain text
100
118
  using a wiki-style markup language that's easy-to-write and easy-to-read.
@@ -183,12 +201,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
183
201
  required_rubygems_version: !ruby/object:Gem::Requirement
184
202
  none: false
185
203
  requirements:
186
- - - ">="
204
+ - - ">"
187
205
  - !ruby/object:Gem::Version
188
- hash: 3
206
+ hash: 25
189
207
  segments:
190
- - 0
191
- version: "0"
208
+ - 1
209
+ - 3
210
+ - 1
211
+ version: 1.3.1
192
212
  requirements: []
193
213
 
194
214
  rubyforge_project: slideshow