Skip to content

Commit 9b1eb34

Browse files
committed
Lazy initialization of Notifier's temp file.
1 parent 2bc3159 commit 9b1eb34

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## [1.0.1] - 2021-07-24
2+
3+
### Changed
4+
5+
- Lazy initialization of Notifier's temp file.
6+
17
## [1.0.0] - 2021-07-05
28

39
### Added

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
lambda_punch (1.0.0)
4+
lambda_punch (1.0.1)
55
concurrent-ruby
66
rake
77
rb-inotify

lib/lambda_punch/notifier.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ module LambdaPunch
22
class Notifier
33

44
FILE = "#{Dir.tmpdir}/lambdapunch-handled"
5-
File.open(FILE, 'w') { |f| f.write('') }
65

76
class << self
87

@@ -20,6 +19,7 @@ def request_id
2019

2120
def initialize
2221
@notifier = INotify::Notifier.new
22+
File.open(FILE, 'w') { |f| f.write('') } unless File.exist?(FILE)
2323
end
2424

2525
def watch

lib/lambda_punch/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module LambdaPunch
2-
VERSION = "1.0.0"
2+
VERSION = "1.0.1"
33
end

0 commit comments

Comments
 (0)