sales 0.0.4 → 0.1.0
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/VERSION.yml +2 -2
- data/bin/sale +2 -2
- metadata +1 -1
data/VERSION.yml
CHANGED
data/bin/sale
CHANGED
@@ -32,7 +32,7 @@ USAGE = <<-EGASU
|
|
32
32
|
#{'sale'.green}
|
33
33
|
|
34
34
|
get and present a daily summary report for a date
|
35
|
-
#{'sale
|
35
|
+
#{'sale YYYYMMDD'.green}
|
36
36
|
|
37
37
|
EGASU
|
38
38
|
|
@@ -353,7 +353,7 @@ elsif ARGV[0] == "daily" || ARGV[0] == "weekly"
|
|
353
353
|
#collect the report files
|
354
354
|
dir_filter = ARGV[0] == "daily" ? "D" : "W" #the daily or the weekly files
|
355
355
|
reports = Dir["S_#{dir_filter}_*.txt"].uniq.compact
|
356
|
-
if reports.empty?
|
356
|
+
if reports.empty? || reports.size<2
|
357
357
|
#no reports, try downloding them first
|
358
358
|
puts "\nDownloading reports first...".red
|
359
359
|
method("get_#{ARGV[0]}_reports".to_sym).call #dynamically instantiating a method and calling on it
|