html_email_creator 1.0.0 → 1.0.1
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/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|
|