logbrarian 0.1.0 → 0.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1fe41574bc75037b2cc52d8c175e8cbb86f09205
4
- data.tar.gz: 07b8e5c3fb1c5b7a19cde632ce14ca81731d54ab
3
+ metadata.gz: 7b3a1ab3d949d7f05f68f1e633ac03e6de7614ea
4
+ data.tar.gz: c69907ad01a2a3311402f890f85d7adefd499359
5
5
  SHA512:
6
- metadata.gz: a88c6b56a8fbc39292857490b31a92d23091357cb986a9301c1402608f6eab3c15d62c60b7cd137ea6ab48dbff617e109092b211e8c768c9b98c13f6e0182e1b
7
- data.tar.gz: 2175a6d316649b42119dae94d6ffe309008085cbca1ffff0ca3540ef8bfffeae26ec6d6a6a72522f95b777a04858ce7f28ea0008a0a4c165448a5ec32aa341ec
6
+ metadata.gz: 8ee9243c3fa5366c41f4e83d65ddf8ba7aacbf07c6b41c9771b813c29a5301bc77a0bf8a8115c329806aef62c8c18bad9f98cf5e105ef4dae4c1866e328f7976
7
+ data.tar.gz: 10dcf5823b730d9324abd1d1f86e0d7f704bb56ca616022a93d75bd7535d1258b8ab31406bb8c125dc83e82729f4ea63e3a67fbd98b38232e737f5bf95053f4f
data/bin/logbrarian CHANGED
@@ -44,12 +44,13 @@ OptionParser.new do |opts|
44
44
  end.parse!
45
45
 
46
46
  current_path = ARGV.shift
47
+ dir_path = File.dirname(current_path)
48
+ FileUtils.mkdir_p dir_path
47
49
  FileUtils.touch current_path unless File.exist? current_path
48
50
 
49
51
  if File.birthtime(current_path) < options[:interval].ago
50
52
  # Rotate older file
51
53
  require 'zlib'
52
- dir_path = File.dirname(current_path)
53
54
  current_name = File.basename(current_path)[/[^\.]+/]
54
55
 
55
56
  time_stamp = options[:interval].ago.strftime(options[:format])
@@ -1,3 +1,3 @@
1
1
  module Logbrarian
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
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.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Clink