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 CHANGED
@@ -1 +1 @@
1
- 0.1.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 { Time.now },
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) ? Date.parse(@options[:till]) : @options[:till]
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) ? Date.parse(@options[:since]) : @options[:since]
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartdict-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: