lorekeeper 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 28082939a78a1f7c53df3d13057eb6708d33106b
4
- data.tar.gz: f2228468c82b48c7d7b485bf3d5571fc81150a17
3
+ metadata.gz: 9fb9c7cab3e4f19d195751e8b24eaa616eb60940
4
+ data.tar.gz: 57381c101b3aca75f0b30ca1439debf52a1269c3
5
5
  SHA512:
6
- metadata.gz: f8d4490eb690b7713d25c154bc558fd10c7b299607e4c2b3e9be3610bebe2eb0a7a3288d0b4c02335b93ea750aa3289402c00b97f766ab4c964a1166a9beeb51
7
- data.tar.gz: c394db8116c39d18f6c1c867bba80133ef7bc2f4835ddf7f4526ccd1598809c08408555fc1ab9e68a7ca5211ae700904ca2d9887adf85eb9281edf0b6f67d8b6
6
+ metadata.gz: 43abb0bd8d32c1355c1edc7a701a9519bbd10eef45bb4c28daf8c283697de387f1faabaacc1153f2286f0c7365ce8b0c2d704c9902402852b15172d6a93e4f86
7
+ data.tar.gz: f5d5adef019602b137a74c679ab3bce07d749bf5f9fd1e3e37e7fd1be70dd0f47e4d0694e6ea3aa83ce67be5d1ef7397226b8c174760528a7de1d66b5df751e5
@@ -1,3 +1,6 @@
1
+ # 1.2.1
2
+ If a file does not exist, it will create it on behalf of the application
3
+
1
4
  # 1.2
2
5
  Added a silence_logger method to the logger. For compatibility with
3
6
  activerecord-session and maybe other gems.
@@ -89,7 +89,13 @@ module Lorekeeper
89
89
  def open_logfile(filename)
90
90
  File.open(filename, (File::WRONLY | File::APPEND))
91
91
  rescue Errno::ENOENT => e
92
- puts "File #{filename} can't be open for logging. #{e.message}"
92
+ create_logfile(filename)
93
+ end
94
+
95
+ def create_logfile(filename)
96
+ File.open(filename, (File::WRONLY | File::APPEND | File::CREAT))
97
+ rescue Errno::EEXIST
98
+ open_logfile(filename)
93
99
  end
94
100
  end
95
101
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  # The comment above will make all strings in a current file frozen
3
3
  module Lorekeeper
4
- VERSION = '1.2.0'
4
+ VERSION = '1.2.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lorekeeper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordi Polo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-25 00:00:00.000000000 Z
11
+ date: 2016-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj