Sha256: 391a71bb47f2c28bae3d85cf7e0dea3c99c55c38e6d45059d619819245e4afa6

Contents?: true

Size: 648 Bytes

Versions: 19

Compression:

Stored size: 648 Bytes

Contents

module Vpsb
  module Tasks
    class PackagesBags < BaseTask
      include AskSupport

      PATH = 'bootstrap_server_app_in_do/data_bags/components/packages.json'

      prepare_squence :packages_list, :packages_bags_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(:packages_bags_json))
      end

      private

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


Version data entries

19 entries across 19 versions & 1 rubygems

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