File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed
bake/async/container/notify
lib/async/container/notify
test/async/container/notify Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
12
23def initialize ( ...)
34 super
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ class Log < Client
1919 def self . path ( environment = ENV )
2020 environment [ NOTIFY_LOG ]
2121 end
22-
22+
2323 # Open a notification client attached to the current {NOTIFY_LOG} if possible.
2424 # @parameter environment [Hash] The environment variables, defaults to `ENV`.
2525 def self . open! ( environment = ENV )
Original file line number Diff line number Diff line change 1717 after do
1818 File . unlink ( notify_log ) rescue nil
1919 end
20-
20+
2121 it "receives notification of child status" do
2222 system ( { "NOTIFY_LOG" => notify_log } , "bundle" , "exec" , notify_script )
2323
2828 "size" => be > 0 ,
2929 )
3030 end
31-
31+
3232 with "async:container:notify:log:ready?" do
3333 let ( :context ) { Bake ::Context . load }
3434 let ( :recipe ) { context . lookup ( "async:container:notify:log:ready?" ) }
35-
35+
3636 it "fails if the log file does not exist" do
3737 expect do
3838 recipe . call ( path : "nonexistant.log" )
3939 end . to raise_exception ( RuntimeError , message : be =~ /log file does not exist/i )
4040 end
41-
41+
4242 it "succeeds if the log file exists and is ready" do
4343 notify . ready!
44-
44+
4545 expect ( recipe . call ( path : notify_log ) ) . to be == true
4646 end
47-
47+
4848 it "fails if the log file exists but is not ready" do
4949 notify . status! ( "Loading..." )
5050
You can’t perform that action at this time.
0 commit comments