Sha256: 886076f53fc53444214f98228d53216c947ec77f7ebd9c431aec8e0503723bde
Contents?: true
Size: 784 Bytes
Versions: 14
Compression:
Stored size: 784 Bytes
Contents
module Evrone module CI class Router class ScriptBuilder Databases = Struct.new(:app) do 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} mysql = [] mysql << %{echo "CREATE USER 'ci'@'localhost';" | mysql -u root } mysql << %{echo "GRANT ALL PRIVILEGES ON *.* TO 'ci'@'localhost';" | mysql -u root } env.init.tap do |i| psql.each {|c| i << c } mysql.each {|c| i << c } end app.call(env) end end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems