md_inc 0.2.2 → 0.2.3
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.
- data/bin/md_inc +5 -5
- data/lib/md_inc/version.rb +1 -1
- metadata +1 -1
data/bin/md_inc
CHANGED
|
@@ -5,16 +5,16 @@ require "md_inc"
|
|
|
5
5
|
base_dir = nil
|
|
6
6
|
|
|
7
7
|
op = OptionParser.new do |op|
|
|
8
|
-
on "-h", "--help", "Print help string" do
|
|
8
|
+
op.on "-h", "--help", "Print help string" do
|
|
9
9
|
puts op
|
|
10
10
|
exit 0
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
on "-i dir", "--include dir", "Add this directory to the Ruby path" do |dir|
|
|
13
|
+
op.on "-i dir", "--include dir", "Add this directory to the Ruby path" do |dir|
|
|
14
14
|
$: << dir
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
on '-d dir', '--dir dir', "Set the default dir for pulling incldue files" do |dir|
|
|
17
|
+
op.on '-d dir', '--dir dir', "Set the default dir for pulling incldue files" do |dir|
|
|
18
18
|
base_dir = dir
|
|
19
19
|
end
|
|
20
20
|
end
|
|
@@ -25,9 +25,9 @@ tp = MdInc::TextProcessor.new
|
|
|
25
25
|
tp.base_dir = base_dir if base_dir
|
|
26
26
|
|
|
27
27
|
if ARGV.empty?
|
|
28
|
-
tp.process_stream(STDIN)
|
|
28
|
+
puts tp.process_stream(STDIN)
|
|
29
29
|
else
|
|
30
30
|
ARGV.each do |path|
|
|
31
|
-
tp.process_file(path)
|
|
31
|
+
puts tp.process_file(path)
|
|
32
32
|
end
|
|
33
33
|
end
|
data/lib/md_inc/version.rb
CHANGED