Sha256: 362a42bb556ef20b83f25427f646cd954060d52c154bcf14d287687f5fa375ed

Contents?: true

Size: 630 Bytes

Versions: 18

Compression:

Stored size: 630 Bytes

Contents

module Vpsb
  module Tasks
    class DbPostgresRole < BaseTask
      include AskSupport

      PATH = 'bootstrap_server_app_in_do/roles/db.json'

      prepare_squence :db_postgres_version, :db_postgres_json

      def call
        prepare

        ask_loop(proc {|r| process(r)}) do
          ap preparation_results
          p "Save this configuration y[es]/n[o]?"
        end

        Vpsb::Helpers::FileReplace.replace_json(PATH,core.get(:db_postgres_json))
      end

      private

      def process(result)
        return true if result[0].to_s.downcase == 'y'
        reprepare
        false
      end
    end
  end
end


Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
vpsb-1.1.7 lib/vpsb/tasks/db_postgres_role.rb
vpsb-1.1.6 lib/vpsb/tasks/db_postgres_role.rb
vpsb-1.1.5 lib/vpsb/tasks/db_postgres_role.rb
vpsb-1.1.4 lib/vpsb/tasks/db_postgres_role.rb
vpsb-1.1.3 lib/vpsb/tasks/db_postgres_role.rb
vpsb-1.1.2 lib/vpsb/tasks/db_postgres_role.rb
vpsb-1.1.1 lib/vpsb/tasks/db_postgres_role.rb
vpsb-1.1.0 lib/vpsb/tasks/db_postgres_role.rb
vpsb-1.0.9 lib/vpsb/tasks/db_postgres_role.rb
vpsb-1.0.8 lib/vpsb/tasks/db_postgres_role.rb
vpsb-1.0.7 lib/vpsb/tasks/db_postgres_role.rb
vpsb-1.0.6 lib/vpsb/tasks/db_postgres_role.rb
vpsb-1.0.5 lib/vpsb/tasks/db_postgres_role.rb
vpsb-1.0.4 lib/vpsb/tasks/db_postgres_role.rb
vpsb-1.0.3 lib/vpsb/tasks/db_postgres_role.rb
vpsb-1.0.2 lib/vpsb/tasks/db_postgres_role.rb
vpsb-1.0.1 lib/vpsb/tasks/db_postgres_role.rb
vpsb-1.0.0 lib/vpsb/tasks/db_postgres_role.rb