redrug 0.2.1 → 0.2.2

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 (3) hide show
  1. data/bin/redrug +45 -0
  2. data/lib/red_rug.rb +1 -1
  3. metadata +12 -10
data/bin/redrug ADDED
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env ruby
2
+ require 'optparse'
3
+ require 'red_rug'
4
+
5
+ help_text = {
6
+ :help => 'Display this help text.',
7
+ :version => 'Display version and license information.'
8
+ }
9
+
10
+ @usage = <<EOF
11
+
12
+ USAGE: #{File.basename $0} [options] FILE
13
+
14
+ EOF
15
+
16
+ version_help = <<EOF
17
+
18
+ RedRug #{RedRug.version}, Copyright 2012 Chad perrin
19
+ May be distributed under the terms of the Open Works License.
20
+
21
+ EOF
22
+
23
+ OptionParser.new do |opts|
24
+ opts.banner = @usage
25
+
26
+ opts.on('--help', '-h', help_text[:help]) do
27
+ puts opts
28
+ puts
29
+ exit(0)
30
+ end
31
+
32
+ opts.on_tail('--version', help_text[:version]) do
33
+ puts version_help
34
+ exit(0)
35
+ end
36
+ end.parse!
37
+
38
+ if 1 > ARGV.size
39
+ puts @usage
40
+ puts %Q{ Try "#{File.basename $0} --help" for usage information}
41
+ puts
42
+ else
43
+ file = File.read(ARGV[0])
44
+ puts RedRug.to_html(file)
45
+ end
data/lib/red_rug.rb CHANGED
@@ -16,7 +16,7 @@ This method returns the version number of the RedRug gem.
16
16
 
17
17
  =end
18
18
 
19
- def self.version; '0.2.1'; end
19
+ def self.version; '0.2.2'; end
20
20
 
21
21
  =begin rdoc
22
22
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redrug
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-20 00:00:00.000000000 Z
12
+ date: 2012-10-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: redcarpet
16
- requirement: &5824980 !ruby/object:Gem::Requirement
16
+ requirement: &18201020 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,11 +21,12 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *5824980
24
+ version_requirements: *18201020
25
25
  description: ! " RedRug is a wrapper for Redcarpet, intended to provide more convenient\n
26
26
  \ interfaces for common Markdown parsing use cases.\n"
27
27
  email: code@apotheon.net
28
- executables: []
28
+ executables:
29
+ - redrug
29
30
  extensions: []
30
31
  extra_rdoc_files: []
31
32
  files:
@@ -33,13 +34,14 @@ files:
33
34
  - README
34
35
  - owl.txt
35
36
  - lib/red_rug.rb
37
+ - bin/redrug
36
38
  homepage: http://redrug.fossrec.com
37
39
  licenses:
38
40
  - OWL
39
- post_install_message: ! ' Thank you for using RedRug. Require "red_rug" to load
40
- this library.
41
-
42
- '
41
+ post_install_message: ! " Thank you for using RedRug. Require \"red_rug\" to load
42
+ this library.\n The \"redrug\" command line utility takes a filename argument
43
+ and outputs\n the contents of the file translated from Markdown to HTML. Usage
44
+ and\n option help for it can be had via the \"-h\" option.\n"
43
45
  rdoc_options: []
44
46
  require_paths:
45
47
  - lib
@@ -48,7 +50,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
48
50
  requirements:
49
51
  - - ! '>='
50
52
  - !ruby/object:Gem::Version
51
- version: 1.9.3
53
+ version: 1.9.2
52
54
  required_rubygems_version: !ruby/object:Gem::Requirement
53
55
  none: false
54
56
  requirements: