codex 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,31 @@
1
+ = Codex
2
+
3
+ http://github.com/pragdave/codex
4
+
5
+ == Description
6
+
7
+ This is a remarkably trivial package that makes simply HTML-based presentations from
8
+ a set up source files written using Textile. It's designed to help when creating
9
+ slides that contain lots of code, as it allows code to be embedded from external source files.
10
+ This means that the code that you embed can come from running (and tested) programs.
11
+
12
+ The code in the resulting slides is syntax highlighted, and is hyperlinked to the original
13
+ source file, allowing that file to be brought up in Textmate.
14
+
15
+ == Requirements
16
+
17
+ * make sure you have Ruby 1.8.6 installed and RubyGems
18
+
19
+ == Installation
20
+
21
+ gem install codex
22
+
23
+ == Usage
24
+
25
+ * type 'rake all' in the same directory as this README file
26
+ * open html/all.html
27
+
28
+ == License
29
+
30
+ See the file LICENSE.txt for details on how this all may be used.
31
+
data/Rakefile CHANGED
@@ -1,5 +1,9 @@
1
1
  $:.unshift File.join(File.dirname(__FILE__), 'lib')
2
2
 
3
+ # Hoe insists on reading every damn file looking for a version string.
4
+ # This can't work, because we don't know what the encoding is
5
+ Encoding.default_external = 'binary' if defined?(Encoding)
6
+
3
7
  require 'config/requirements'
4
8
  require 'config/hoe' # setup Hoe + all gem configuration
5
9
 
@@ -23,18 +23,18 @@ class CodexGenerator < RubiGen::Base
23
23
 
24
24
  # Create stubs
25
25
  m.template_copy_each %w[Rakefile]
26
- m.template_copy_each "html/all.html"
26
+ m.template_copy_each %w[html/all.html]
27
27
  %w[basics building example including_code including_tex table_of_contents user_defined graphviz].each do |template|
28
- m.file_copy_each "content/#{template}.textile"
28
+ m.file_copy_each ["content/#{template}.textile"]
29
29
  end
30
- m.template_copy_each "config/metadata.yml"
30
+ m.template_copy_each %w[config/metadata.yml]
31
31
  %w[build_all].each do |bin|
32
- m.file_copy_each "bin/#{bin}.rb"
32
+ m.file_copy_each ["bin/#{bin}.rb"]
33
33
  end
34
34
  %w[basic_continuation cc_throw_catch closure_continuation closure_continuation_2].each do |code|
35
- m.file_copy_each "code/control/#{code}.rb"
35
+ m.file_copy_each ["code/control/#{code}.rb"]
36
36
  end
37
- m.file_copy_each "code/graphviz/graph.dot"
37
+ m.file_copy_each ["code/graphviz/graph.dot"]
38
38
  ["CollapseCode.html", "Cpp.html", "CrashTest.html", "CSharp.html", "CSS.html",
39
39
  "Delphi.html", "FirstLine.html", "Index.html", "Java.html", "JavaScript.html",
40
40
  "NoControls.html", "NoGutter.html", "PHP.html", "Python.html", "Ruby.html",
@@ -48,21 +48,21 @@ class CodexGenerator < RubiGen::Base
48
48
  "Styles/SyntaxHighlighter.css", "Styles/TestPages.css",
49
49
  "Templates/Test.dwt"
50
50
  ].each do |syntax|
51
- m.file_copy_each "assets/dp.SyntaxHighlighter/#{syntax}"
51
+ m.file_copy_each ["assets/dp.SyntaxHighlighter/#{syntax}"]
52
52
  end
53
53
  ["pressie.css", "print.css", "ruby.png"].each do |asset|
54
- m.file_copy_each "assets/stylesheets/#{asset}"
54
+ m.file_copy_each ["assets/stylesheets/#{asset}"]
55
55
  end
56
56
  ["blank.gif", "bodybg.gif", "framing.css", "iepngfix.htc", "opera.css", "outline.css",
57
57
  "pretty.css", "print.css", "s5-core.css", "slides.css", "slides.js"
58
58
  ].each do |asset|
59
- m.file_copy_each "assets/ui/default/#{asset}"
59
+ m.file_copy_each ["assets/ui/default/#{asset}"]
60
60
  end
61
- m.template_copy_each "filters/example_filter.rb"
61
+ m.template_copy_each ["filters/example_filter.rb"]
62
62
  ["change_code_urls.rb", "upcase_titles.rb"].each do |asset|
63
- m.file_copy_each "post_processors/#{asset}"
63
+ m.file_copy_each ["post_processors/#{asset}"]
64
64
  end
65
- m.file_copy_each "templates/layout.erb"
65
+ m.file_copy_each ["templates/layout.erb"]
66
66
 
67
67
  m.dependency "install_rubigen_scripts", [destination_root, 'codex'],
68
68
  :shebang => options[:shebang], :collision => :force
@@ -6,7 +6,7 @@ h1. Building HTML Slides
6
6
 
7
7
  @rake html/xxx.html@
8
8
 
9
- * If you've created a @content/table_of_contents.textile@, build the whole presentation with
9
+ * If youve created a @content/table_of_contents.textile@, build the whole presentation with
10
10
 
11
11
  @rake all@
12
12
 
@@ -18,7 +18,7 @@ h1. Running the Presentation
18
18
 
19
19
  * See the "S5 documentation":http://meyerweb.com/eric/tools/s5/ for details
20
20
 
21
- * Some hints
21
+ * Some hints
22
22
  ** arrow keys and space bar work
23
23
  ** type the slide number to jump
24
24
  ** mouse over the bottom right to bring up a set of controls and a list of all available slides
data/bin/codex CHANGED
@@ -5,7 +5,7 @@ require 'rubigen'
5
5
 
6
6
  if %w(-v --version).include? ARGV.first
7
7
  require 'codex/version'
8
- puts "#{File.basename($0)} #{Codex::VERSION::STRING}"
8
+ puts "#{File.basename($0)} #{Codex::VERSION}"
9
9
  exit(0)
10
10
  end
11
11
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{codex}
5
- s.version = "1.1.0"
5
+ s.version = "1.1.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Dave Thomas"]
@@ -40,4 +40,7 @@ To create new presentations:
40
40
  else
41
41
  s.add_dependency(%q<hoe>, [">= 2.3.3"])
42
42
  end
43
+
44
+ s.add_dependency("rubigen")
45
+
43
46
  end
@@ -34,10 +34,6 @@ Run 'rubyforge setup' to prepare your env for access to Rubyforge
34
34
  end
35
35
 
36
36
 
37
- REV = nil
38
- # UNCOMMENT IF REQUIRED:
39
- # REV = YAML.load(`svn info`)['Revision']
40
- VERS = Codex::VERSION::STRING + (REV ? ".#{REV}" : "")
41
37
  RDOC_OPTS = ['--quiet', '--title', 'codex documentation',
42
38
  "--opname", "index.html",
43
39
  "--line-numbers",
@@ -53,17 +49,17 @@ end
53
49
 
54
50
  # Generate all the Rake tasks
55
51
  # Run 'rake -T' to see list of generated tasks (from gem root directory)
56
- $hoe = Hoe.new(GEM_NAME, VERS) do |p|
57
- p.developer(AUTHOR, EMAIL)
58
- p.description = DESCRIPTION
59
- p.summary = DESCRIPTION
60
- p.url = HOMEPATH
61
- p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
62
- p.test_globs = ["test/**/test_*.rb"]
63
- p.clean_globs |= ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store'] #An array of file patterns to delete on clean.
52
+ $hoe = Hoe.spec(GEM_NAME) do |p|
53
+ developer(AUTHOR, EMAIL)
54
+ description = DESCRIPTION
55
+ summary = DESCRIPTION
56
+ url = HOMEPATH
57
+ rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
58
+ test_globs = ["test/**/test_*.rb"]
59
+ clean_globs |= ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store'] #An array of file patterns to delete on clean.
64
60
 
65
61
  # == Optional
66
- p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
62
+ changes = paragraphs_of("History.txt", 0..1).join("\n\n")
67
63
  #p.extra_deps = EXTRA_DEPENDENCIES
68
64
 
69
65
  #p.spec_extras = {} # A hash of extra values to set in the gemspec.
@@ -71,7 +71,7 @@ module Codex
71
71
  task :all => [ 'tmp', output_dir, all_html, :remove_tmp ]
72
72
 
73
73
  desc "Remove all generated output and temporary files"
74
- task :clean => "#{name}:remove_tmp" do
74
+ task :clean => "remove_tmp" do
75
75
  FileUtils.rm_rf output_path
76
76
  end
77
77
 
@@ -1,9 +1,7 @@
1
1
  module Codex #:nodoc:
2
- module VERSION #:nodoc:
3
- MAJOR = 1
4
- MINOR = 1
5
- TINY = 0
2
+ # Thanks, Hoe
3
+ VERSION = "1.1.1"
4
+ end
5
+
6
+
6
7
 
7
- STRING = [MAJOR, MINOR, TINY].join('.')
8
- end
9
- end
@@ -15,8 +15,9 @@ module Codex
15
15
  end
16
16
 
17
17
  def test_process
18
- assert !File.exist?(@output)
18
+ assert !File.exist?(@output), "#{@output} already exists"
19
19
  @pressie.process(@input, @output)
20
+ puts @output.inspect
20
21
  assert File.exist?(@output)
21
22
  end
22
23
 
@@ -22,13 +22,12 @@ class Test::Unit::TestCase
22
22
 
23
23
  private
24
24
 
25
- def generate
25
+ def generate
26
26
  run_generator('codex', [Codex.root], sources)
27
27
  end
28
28
 
29
29
  def sources
30
- [RubiGen::PathSource.new(:test, File.join(File.dirname(__FILE__),"..", 'app_generators'))
31
- ]
30
+ [ RubiGen::PathSource.new(:test, File.join(File.dirname(__FILE__),"..", 'app_generators')) ]
32
31
  end
33
32
 
34
33
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codex
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Thomas
@@ -9,8 +9,8 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-09 00:00:00 -05:00
13
- default_executable: codex
12
+ date: 2009-11-03 00:00:00 -06:00
13
+ default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: hoe
@@ -22,7 +22,14 @@ dependencies:
22
22
  - !ruby/object:Gem::Version
23
23
  version: 2.3.3
24
24
  version:
25
- description: Simple tool for creating source-code intensive presentations and courses
25
+ description: |-
26
+ This is a remarkably trivial package that makes simply HTML-based presentations from
27
+ a set up source files written using Textile. It's designed to help when creating
28
+ slides that contain lots of code, as it allows code to be embedded from external source files.
29
+ This means that the code that you embed can come from running (and tested) programs.
30
+
31
+ The code in the resulting slides is syntax highlighted, and is hyperlinked to the original
32
+ source file, allowing that file to be brought up in Textmate.
26
33
  email:
27
34
  - dave@pragprog.com
28
35
  executables:
@@ -41,6 +48,7 @@ files:
41
48
  - LICENSE.txt
42
49
  - Manifest.txt
43
50
  - PostInstall.txt
51
+ - README.rdoc
44
52
  - README.txt
45
53
  - Rakefile
46
54
  - app_generators/codex/USAGE
@@ -153,7 +161,7 @@ files:
153
161
  - test/test_filter.rb
154
162
  - test/test_helper.rb
155
163
  has_rdoc: true
156
- homepage: http://codex.rubyforge.org
164
+ homepage: http://github.com/pragdave/codex
157
165
  licenses: []
158
166
 
159
167
  post_install_message: |
@@ -185,8 +193,8 @@ requirements: []
185
193
  rubyforge_project: codex
186
194
  rubygems_version: 1.3.5
187
195
  signing_key:
188
- specification_version: 2
189
- summary: Simple tool for creating source-code intensive presentations and courses
196
+ specification_version: 3
197
+ summary: This is a remarkably trivial package that makes simply HTML-based presentations from a set up source files written using Textile
190
198
  test_files:
191
199
  - test/codex/post_processor/test_add_title_slides_processor.rb
192
200
  - test/codex/post_processor/test_post_processors.rb