html_email_creator 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/html_email_creator +3 -5
- data/lib/html_email_creator/version.rb +1 -1
- metadata +2 -2
data/bin/html_email_creator
CHANGED
@@ -13,13 +13,11 @@ program :description, HtmlEmailCreator::DESCRIPTION
|
|
13
13
|
command :create do |c|
|
14
14
|
c.syntax = 'html_email_creator create <email or directory>'
|
15
15
|
c.description = 'Creates a single email or all emails from the directory'
|
16
|
-
c.option '--
|
16
|
+
c.option '--norecursive', 'If creating directory, don\'t look into sub directories.'
|
17
17
|
c.action do |args, options|
|
18
18
|
# TODO implement me
|
19
|
-
recursive = options.
|
20
|
-
full_path = File.expand_path(args.first)
|
21
|
-
# run in this directory
|
22
|
-
Dir.chdir(File.dirname(full_path))
|
19
|
+
recursive = options.norecursive ? false : true
|
20
|
+
full_path = File.expand_path(args.first, Dir.pwd)
|
23
21
|
results = HtmlEmailCreator::EmailCreator.new.save_emails(full_path, recursive)
|
24
22
|
say "Creation completed!\n\n"
|
25
23
|
results.each_pair do |file, format|
|