Sha256: e8592ce272cca3b282b11940d9f240bd3fdb745bd054194823dfef8ad183a61c

Contents?: true

Size: 571 Bytes

Versions: 7

Compression:

Stored size: 571 Bytes

Contents

module Evrone
  module CI
    class Router
      class ScriptBuilder

        Databases = Struct.new(:app) do

          include Helper::TraceShCommand

          def call(env)
            psql = []
            psql << %{sudo -u postgres psql -q -h localhost -c "create role ci with login superuser password 'ci'" || true}
            psql << %{sudo -u postgres psql -q -h localhost -c "create database ci" || true}
            env.init.tap do |i|
              i << psql
            end
            app.call(env)
          end

        end
      end
    end
  end
end


Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
evrone-ci-router-0.2.0.pre11 lib/evrone/ci/router/script_builder/databases.rb
evrone-ci-router-0.2.0.pre10 lib/evrone/ci/router/script_builder/databases.rb
evrone-ci-router-0.2.0.pre9 lib/evrone/ci/router/script_builder/databases.rb
evrone-ci-router-0.2.0.pre8 lib/evrone/ci/router/script_builder/databases.rb
evrone-ci-router-0.2.0.pre7 lib/evrone/ci/router/script_builder/databases.rb
evrone-ci-router-0.2.0.pre6 lib/evrone/ci/router/script_builder/databases.rb
evrone-ci-router-0.2.0.pre5 lib/evrone/ci/router/script_builder/databases.rb