smartdict-core 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/smartdict/commands/list_command.rb +2 -2
- data/lib/smartdict/log.rb +2 -2
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
@@ -17,8 +17,8 @@ module Smartdict::Commands
|
|
17
17
|
SYNTAX
|
18
18
|
|
19
19
|
options :format => lambda { configatron.default.format },
|
20
|
-
:since => lambda { Date.today
|
21
|
-
:till => lambda {
|
20
|
+
:since => lambda { Date.today },
|
21
|
+
:till => lambda { Date.today + 1 },
|
22
22
|
:from => nil,
|
23
23
|
:to => nil,
|
24
24
|
:driver => nil
|
data/lib/smartdict/log.rb
CHANGED
@@ -46,14 +46,14 @@ class Smartdict::Log
|
|
46
46
|
sql << " WHERE "
|
47
47
|
|
48
48
|
if @options[:till]
|
49
|
-
till = @options[:till].is_a?(String) ?
|
49
|
+
till = @options[:till].is_a?(String) ? DateTime.parse(@options[:till]) : @options[:till]
|
50
50
|
sql << " #{queries_table}.created_at < \"#{till.to_s(:db)}\" "
|
51
51
|
where = true
|
52
52
|
end
|
53
53
|
|
54
54
|
if @options[:since]
|
55
55
|
sql << " AND " if where
|
56
|
-
since = @options[:since].is_a?(String) ?
|
56
|
+
since = @options[:since].is_a?(String) ? DateTime.parse(@options[:since]) : @options[:since]
|
57
57
|
sql << " #{queries_table}.created_at > \"#{since.to_s(:db)}\" "
|
58
58
|
where = true
|
59
59
|
end
|