gfm 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/bin/gfm +3 -1
- data/lib/gfm.rb +1 -1
- data/lib/gfm/converter.rb +7 -3
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjZmZGNkYjM1OWIzNWUzOWQ4MjkzZTg4Nzk5NDczZWE2OGY5YTE4YQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDM2MTU3MTk4NzE4ZDY2M2EzOTUzMWM5ZGE3OTNjOTZjZDQ0YzA0Nw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YWMxY2M2NTIzMWFmYjg2Y2U2ZTgwZTM0YjM1NDlkZjZmNjVmYWVkMzU2N2Jk
|
10
|
+
MzU1ZDUwM2FiNmZjZWZiNWQwNTYzMTRlMDc1ZTk0YjJjMjVlOWIxMGFmMTA4
|
11
|
+
MzVkNWYyMzcxZjIxN2M5ZWVhZjNiZDI4MDgzNjRkZjc3MjE0ZTc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YWNkOWUyMGU2MDUyY2YwNDdlZmNhMzAyYTMwMjFmZWEzZjEzOGMzMDM2ZjQ0
|
14
|
+
N2I3MWUxMWJjZmM1OGUwODI4MTJkMDhhYTQ1OGFmNGFlYTgzNGVkMzA1NDBj
|
15
|
+
OTg3YzMzNGU4MTRmM2Y1MTY2ZTAxNDgwYjAzM2YwNGVlNWRmNjQ=
|
data/bin/gfm
CHANGED
@@ -8,7 +8,9 @@ input_file, output_file = ARGV
|
|
8
8
|
if input_file.nil? || ARGV.include?('--help') || ARGV.include?('-h')
|
9
9
|
puts GFM::HELP_TEXT
|
10
10
|
elsif input_file.end_with?(".md") && File.exists?(input_file)
|
11
|
-
GFM::Converter.new(input_file)
|
11
|
+
converter = GFM::Converter.new(input_file)
|
12
|
+
converter.write_output_file(output_file)
|
13
|
+
puts "Markdown from #{converter.input_file_name} written to #{converter.output_file_name}."
|
12
14
|
else
|
13
15
|
puts "Invalid markdown file #{input_file}"
|
14
16
|
end
|
data/lib/gfm.rb
CHANGED
data/lib/gfm/converter.rb
CHANGED
@@ -1,11 +1,15 @@
|
|
1
1
|
module GFM
|
2
2
|
class Converter
|
3
|
-
|
4
|
-
|
3
|
+
attr_reader :input_file_name
|
4
|
+
attr_reader :output_file_name
|
5
|
+
|
6
|
+
def initialize(filename)
|
7
|
+
@input_file_name = filename
|
5
8
|
end
|
6
9
|
|
7
10
|
def write_output_file(filename = nil)
|
8
|
-
|
11
|
+
@output_file_name = sanitized_output_file_name(filename)
|
12
|
+
File.open(@output_file_name, 'w').write(html_content)
|
9
13
|
end
|
10
14
|
|
11
15
|
private
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gfm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Rose
|
@@ -38,7 +38,21 @@ dependencies:
|
|
38
38
|
- - ! '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
-
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: httpclient
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Generates an HTML file from a GitHub Flavored Markdown file. Useful for
|
42
56
|
previewing README files.
|
43
57
|
email: ekimsc1094@sympatico.ca
|
44
58
|
executables:
|