mdopen 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/mdopen +11 -2
  3. data/lib/mdopen/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 82797d1c45873db9090d6d34a7b15c10ce6f74e4
4
- data.tar.gz: ff00cc0abd9d4158cfb5ba5c2dd436eda306b7e2
3
+ metadata.gz: 0b95a6428eeb74c1e8a403a26dec356d4a4e58be
4
+ data.tar.gz: ac20c8c579f7c5b1a99baaad5996fadd1115f26d
5
5
  SHA512:
6
- metadata.gz: ed15a5754aac8459d025287528d0e5e96cbe2542afb85ebea2f9d2fe228d5fbfb02f99094a536a95b22f58f05d709763f1e9275cf75c52a900513be1f05e684b
7
- data.tar.gz: 2f2ecd77917e390abd92c94afe136e8dc0abc87c896d53f9f5f977404735dbc4b68e55574af6afb6a0fb2a221e1bc768bf9b7d7025c3e39a9342bffc764c9d95
6
+ metadata.gz: '074088d5c841838628ab6234f587fa0823b922c14bc3fb66266fbeb8d3a882ed2cdfef24ac54498cd991aa75a48f09ac4f96a00a0df5151f280301fa6e88ece2'
7
+ data.tar.gz: 276690d0a559df4658dca7f9440058cc1c8c11009049d9e0c564b816051d1f9cf79f6256b9582273fd8743d9244e03ad72a12f336e46576196cc9fe549619370
data/bin/mdopen CHANGED
@@ -12,6 +12,11 @@ Usage: mdopen <markdown_file_path>
12
12
  USAGE
13
13
  end
14
14
 
15
+ if !ARGV[0].nil? && ARGV[0] =~ /^-{,2}help$/
16
+ help
17
+ exit(1)
18
+ end
19
+
15
20
  md_file = if File.exist?(ARGV[0] || "")
16
21
  ARGV[0]
17
22
  elsif File.exist?("./README")
@@ -19,5 +24,9 @@ md_file = if File.exist?(ARGV[0] || "")
19
24
  elsif File.exist?("./README.md")
20
25
  "./README.md"
21
26
  end
22
- help() if md_file.nil?
23
- Mdopen.preview(File.read(md_file))
27
+
28
+ if md_file.nil?
29
+ help
30
+ else
31
+ Mdopen.preview(File.read(md_file))
32
+ end
@@ -1,3 +1,3 @@
1
1
  module Mdopen
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mdopen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - B1nj0y