logbrarian 0.1.6 → 0.1.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: de9faa2330674e94800f210515feb0d0c79e38bd
4
- data.tar.gz: 401fb7c1462c40171cc7e11d4ff572fbcb4ec934
3
+ metadata.gz: 9bbb6f7fd406d92d71c118afc97122773ed6ba0a
4
+ data.tar.gz: 7524c3b7d844c37995489cacc4031d4de040344c
5
5
  SHA512:
6
- metadata.gz: b924068fe2555dc90c13d631cd353abec5cb2e53fe51c87369d0d922925652a2ca273c708061fca6b73b6c6bc13eff6aecbc8ec7f57c8e18e5b7a3418afcd186
7
- data.tar.gz: 8dd054c53c149e1b06abb1f89fa6c7330441ff2726b8c1a420c8eb7be03e1967e15b501967db11790e0e67fa4d61aa896e480e0bb8ccf799dbb435aed16926a6
6
+ metadata.gz: b086b16555849baca2f1dec89bab0215cb2559e3dc46f43368f1e1c80b0df77298985941625d6073d73b12f3446c6da6de2ce13d433369188e434634b6a61996
7
+ data.tar.gz: b8492caf602b7fa0b30a8e9cfbe3a0deb89d7f5fa4cd209007be3cb07bf5fe69b9e2f8b660da12b7fd4055d03712a873100000204ee55c1dc3b9e54cfd065bd5
@@ -52,11 +52,11 @@ begin
52
52
  birthtime = File.birthtime(current_path)
53
53
  rescue NotImplementedError
54
54
  require 'yaml'
55
+ require 'date'
55
56
  store_path = File.expand_path("~/.logbrarian.yml")
56
57
  FileUtils.touch store_path
57
58
  store = YAML.load_file(store_path) || Hash.new
58
- birth_string = store[current_path].to_s || Time.now.to_s
59
- birthtime = DateTime.parse(birth_string).to_time
59
+ birthtime = store[current_path] || Time.now
60
60
  unless store.key?(current_path)
61
61
  store[current_path] = birthtime
62
62
  File.open(store_path, 'w') {|f| YAML.dump(store,f) }
@@ -78,7 +78,7 @@ if birthtime < options[:interval].ago
78
78
  FileUtils.rm current_path
79
79
  FileUtils.touch current_path
80
80
  if store
81
- store[current_path] = Time.now.to_s
81
+ store[current_path] = Time.now
82
82
  File.open(store_path, 'w') {|f| YAML.dump(store,f) }
83
83
  end
84
84
  end
@@ -1,3 +1,3 @@
1
1
  module Logbrarian
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logbrarian
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Clink