gmdprev 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source :rubygems
2
+ gem "github-markup"
3
+ gem "redcarpet"
@@ -0,0 +1,12 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ github-markup (0.5.3)
5
+ redcarpet (1.17.2)
6
+
7
+ PLATFORMS
8
+ ruby
9
+
10
+ DEPENDENCIES
11
+ github-markup
12
+ redcarpet
@@ -0,0 +1,7 @@
1
+ Gemfile
2
+ Gemfile.lock
3
+ README.markdown
4
+ Rakefile
5
+ bin/gmdprev
6
+ lib/gmdprev.rb
7
+ Manifest
@@ -0,0 +1,40 @@
1
+ GMDPrev
2
+ ======
3
+
4
+ GMDPrev (_GitHub Markdown Preview_) allows you to convert
5
+ your Github flavored Markdown into HTML.
6
+ Useful for getting a rough idea how the rendered Markdown
7
+ will look on Github (without the CSS formatting).
8
+
9
+ Usage
10
+ -----
11
+
12
+ `gmdprev file.markdown`
13
+
14
+ Install
15
+ -------
16
+ gmdprev is available as a Ruby gem.
17
+ Install with:
18
+
19
+ `[sudo] gem install gmdprev`
20
+
21
+ Dependencies
22
+ ------------
23
+
24
+ Programs:
25
+
26
+ * Ruby 1.9+
27
+ * RubyGems 1.8.5+
28
+
29
+ Depends on the following Ruby gems, which should be retrieved automatically:
30
+
31
+ * [redcarpet](http://rubygems.org/gems/redcarpet)
32
+ * [github-markup](http://rubygems.org/gems/github-markup)
33
+
34
+ Otherwise, install with `[sudo] gem install redcarpet github-markup`
35
+
36
+ License
37
+ -------
38
+
39
+ This utility is [licensed as github-markup](https://github.com/github/markup/blob/master/LICENSE) is.
40
+
@@ -0,0 +1,26 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+ require 'echoe'
4
+ require 'fileutils'
5
+
6
+ name = 'gmdprev'
7
+ Echoe.new(name, '1.0.3') do |p|
8
+ p.description = "Convert Github flavored Markdown into HTML."
9
+ p.url = "http://github.com/stpettersens/GMDPrev"
10
+ p.author = "Sam Saint-Pettersen"
11
+ p.email = "s.stpettersen@gmail.com"
12
+ p.ignore_pattern = []
13
+ p.development_dependencies = ["echoe", "rake >=0.9.2"]
14
+ p.runtime_dependencies = ["github-markup", "redcarpet"]
15
+ end
16
+
17
+ task :makegem => [:build_gemspec] do
18
+ puts "Building gem..."
19
+ system("gem build #{name}.gemspec")
20
+ end
21
+
22
+ task :cleanup => [:clobber] do
23
+ puts "Removing everything, including .gemspec"
24
+ FileUtils.rm("Manifest")
25
+ FileUtils.rm("#{name}.gemspec")
26
+ end
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ require 'gmdprev'
3
+
4
+ begin
5
+ GMDPrev.convert(ARGV[0])
6
+ rescue
7
+ puts "Usage: gmdprev [file.markdown]"
8
+ end
@@ -0,0 +1,42 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{gmdprev}
5
+ s.version = "1.0.3"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
+ s.authors = [%q{Sam Saint-Pettersen}]
9
+ s.date = %q{2011-07-09}
10
+ s.description = %q{Convert Github flavored Markdown into HTML.}
11
+ s.email = %q{s.stpettersen@gmail.com}
12
+ s.executables = [%q{gmdprev}]
13
+ s.extra_rdoc_files = [%q{README.markdown}, %q{bin/gmdprev}, %q{lib/gmdprev.rb}]
14
+ s.files = [%q{Gemfile}, %q{Gemfile.lock}, %q{README.markdown}, %q{Rakefile}, %q{bin/gmdprev}, %q{lib/gmdprev.rb}, %q{Manifest}, %q{gmdprev.gemspec}]
15
+ s.homepage = %q{http://github.com/stpettersens/GMDPrev}
16
+ s.rdoc_options = [%q{--line-numbers}, %q{--inline-source}, %q{--title}, %q{Gmdprev}, %q{--main}, %q{README.markdown}]
17
+ s.require_paths = [%q{lib}]
18
+ s.rubyforge_project = %q{gmdprev}
19
+ s.rubygems_version = %q{1.8.5}
20
+ s.summary = %q{Convert Github flavored Markdown into HTML.}
21
+
22
+ if s.respond_to? :specification_version then
23
+ s.specification_version = 3
24
+
25
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
26
+ s.add_runtime_dependency(%q<github-markup>, [">= 0"])
27
+ s.add_runtime_dependency(%q<redcarpet>, [">= 0"])
28
+ s.add_development_dependency(%q<echoe>, [">= 0"])
29
+ s.add_development_dependency(%q<rake>, [">= 0.9.2"])
30
+ else
31
+ s.add_dependency(%q<github-markup>, [">= 0"])
32
+ s.add_dependency(%q<redcarpet>, [">= 0"])
33
+ s.add_dependency(%q<echoe>, [">= 0"])
34
+ s.add_dependency(%q<rake>, [">= 0.9.2"])
35
+ end
36
+ else
37
+ s.add_dependency(%q<github-markup>, [">= 0"])
38
+ s.add_dependency(%q<redcarpet>, [">= 0"])
39
+ s.add_dependency(%q<echoe>, [">= 0"])
40
+ s.add_dependency(%q<rake>, [">= 0.9.2"])
41
+ end
42
+ end
@@ -0,0 +1,16 @@
1
+ """
2
+ GMDPrev: 'GitHub MarkDown Preview'
3
+
4
+ Converts a GitHub-ready markdown file into HTML.
5
+
6
+ Author: Sam Saint-Pettersen.
7
+ Licensed as GitHub Markup is.
8
+ """
9
+ require 'github/markup'
10
+
11
+ module GMDPrev
12
+ def self.convert(file)
13
+ html = GitHub::Markup.render(file, File.read(file))
14
+ File.open(file + '.html', 'w') { |f| f.write(html) }
15
+ end
16
+ end
metadata ADDED
@@ -0,0 +1,111 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gmdprev
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 1.0.3
6
+ platform: ruby
7
+ authors:
8
+ - Sam Saint-Pettersen
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2011-07-09 00:00:00 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: github-markup
17
+ prerelease: false
18
+ requirement: &id001 !ruby/object:Gem::Requirement
19
+ none: false
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0"
24
+ type: :runtime
25
+ version_requirements: *id001
26
+ - !ruby/object:Gem::Dependency
27
+ name: redcarpet
28
+ prerelease: false
29
+ requirement: &id002 !ruby/object:Gem::Requirement
30
+ none: false
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: "0"
35
+ type: :runtime
36
+ version_requirements: *id002
37
+ - !ruby/object:Gem::Dependency
38
+ name: echoe
39
+ prerelease: false
40
+ requirement: &id003 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: "0"
46
+ type: :development
47
+ version_requirements: *id003
48
+ - !ruby/object:Gem::Dependency
49
+ name: rake
50
+ prerelease: false
51
+ requirement: &id004 !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: 0.9.2
57
+ type: :development
58
+ version_requirements: *id004
59
+ description: Convert Github flavored Markdown into HTML.
60
+ email: s.stpettersen@gmail.com
61
+ executables:
62
+ - gmdprev
63
+ extensions: []
64
+
65
+ extra_rdoc_files:
66
+ - README.markdown
67
+ - bin/gmdprev
68
+ - lib/gmdprev.rb
69
+ files:
70
+ - Gemfile
71
+ - Gemfile.lock
72
+ - README.markdown
73
+ - Rakefile
74
+ - bin/gmdprev
75
+ - lib/gmdprev.rb
76
+ - Manifest
77
+ - gmdprev.gemspec
78
+ homepage: http://github.com/stpettersens/GMDPrev
79
+ licenses: []
80
+
81
+ post_install_message:
82
+ rdoc_options:
83
+ - --line-numbers
84
+ - --inline-source
85
+ - --title
86
+ - Gmdprev
87
+ - --main
88
+ - README.markdown
89
+ require_paths:
90
+ - lib
91
+ required_ruby_version: !ruby/object:Gem::Requirement
92
+ none: false
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: "0"
97
+ required_rubygems_version: !ruby/object:Gem::Requirement
98
+ none: false
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: "1.2"
103
+ requirements: []
104
+
105
+ rubyforge_project: gmdprev
106
+ rubygems_version: 1.8.5
107
+ signing_key:
108
+ specification_version: 3
109
+ summary: Convert Github flavored Markdown into HTML.
110
+ test_files: []
111
+