Sha256: 1545922b8338085bc9b11151436d147a5c5404b68f335213da29fc938c61f763
Contents?: true
Size: 1013 Bytes
Versions: 24
Compression:
Stored size: 1013 Bytes
Contents
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. module VagrantPlugins module Google module Action # This can be used with "Call" built-in to check if the machine # is stopped and branch in the middleware. class IsTerminated def initialize(app, env) @app = app end def call(env) env[:result] = env[:machine].state.id == :TERMINATED @app.call(env) end end end end end
Version data entries
24 entries across 24 versions & 1 rubygems