Sha256: 0605e21dfad79d2a2d81168f5f17e07f5ef5bb36efc50b1629800c6881ee9d6e

Contents?: true

Size: 537 Bytes

Versions: 22

Compression:

Stored size: 537 Bytes

Contents

require 'evrone/ci/common'

module Evrone
  module CI
    module Worker

      LocalCreateDirs = Struct.new(:app) do

        include Common::Helper::Shell
        include Worker::Helper::Config

        def call(env)
          tmp_dir!  env

          app.call env
        end

        private

          def tmp_dir!(env)
            env.tmp_dir = env.path_prefix.join(config.tmp_dir_name)
                                         .join(env.job.message.name)
            recreate env.tmp_dir
          end
      end

    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
evrone-ci-worker-0.2.0.pre27 lib/evrone/ci/worker/middlewares/local_create_dirs.rb
evrone-ci-worker-0.2.0.pre26 lib/evrone/ci/worker/middlewares/local_create_dirs.rb
evrone-ci-worker-0.2.0.pre25 lib/evrone/ci/worker/middlewares/local_create_dirs.rb
evrone-ci-worker-0.2.0.pre24 lib/evrone/ci/worker/middlewares/local_create_dirs.rb
evrone-ci-worker-0.2.0.pre23 lib/evrone/ci/worker/middlewares/local_create_dirs.rb
evrone-ci-worker-0.2.0.pre22 lib/evrone/ci/worker/middlewares/local_create_dirs.rb
evrone-ci-worker-0.2.0.pre21 lib/evrone/ci/worker/middlewares/local_create_dirs.rb
evrone-ci-worker-0.2.0.pre20 lib/evrone/ci/worker/middlewares/local_create_dirs.rb
evrone-ci-worker-0.2.0.pre19 lib/evrone/ci/worker/middlewares/local_create_dirs.rb
evrone-ci-worker-0.2.0.pre18 lib/evrone/ci/worker/middlewares/local_create_dirs.rb
evrone-ci-worker-0.2.0.pre17 lib/evrone/ci/worker/middlewares/local_create_dirs.rb
evrone-ci-worker-0.2.0.pre15 lib/evrone/ci/worker/middlewares/local_create_dirs.rb
evrone-ci-worker-0.2.0.pre14 lib/evrone/ci/worker/middlewares/local_create_dirs.rb
evrone-ci-worker-0.2.0.pre13 lib/evrone/ci/worker/middlewares/local_create_dirs.rb
evrone-ci-worker-0.2.0.pre12 lib/evrone/ci/worker/middlewares/local_create_dirs.rb
evrone-ci-worker-0.2.0.pre11 lib/evrone/ci/worker/middlewares/local_create_dirs.rb
evrone-ci-worker-0.2.0.pre10 lib/evrone/ci/worker/middlewares/local_create_dirs.rb
evrone-ci-worker-0.2.0.pre9 lib/evrone/ci/worker/middlewares/local_create_dirs.rb
evrone-ci-worker-0.2.0.pre8 lib/evrone/ci/worker/middlewares/local_create_dirs.rb
evrone-ci-worker-0.2.0.pre7 lib/evrone/ci/worker/middlewares/local_create_dirs.rb