Sha256: 451089cbcd64a50e96b452b3e82ede82f64912c9326ab9dfed02c7ab4bdf0d14
Contents?: true
Size: 1.41 KB
Versions: 9
Compression:
Stored size: 1.41 KB
Contents
class Fanforce::AppFactory::CLI::Scripts include Fanforce::AppFactory::CLI::Utils require_relative '../lib/env' require_relative '../lib/scaffolding' ###################################################################################################################### def update(type) type = type.to_sym if Fanforce::CLI::TYPE == :directory_of_apps confirm("\nYou are about to update #{Fanforce::CLI::Apps.total_count} apps in this directory. This cannot be undone.\n"+ 'ARE YOU SURE?', true) Fanforce::CLI::Apps.each do |app, processed_count, total_count| log divider '+-------------------------------------------------------------------------------------------------' log "#{'APP'.format(:bold)} - #{app._id.upcase.gsub('-',' ').format(:bold)} (#{processed_count} of #{total_count})... " update_app(app, type) end else app = Fanforce::CLI::App.load(Fanforce::CLI::DIR) confirm("\nYou are about to update #{app.name}. This cannot be undone.\n" + 'ARE YOU SURE?', true) update_app(app, type) end puts '' end def update_app(app, type) if [:all,:files].include?(type) if !Fanforce::AppFactory::CLI::Scaffolding.new(app).update log "\nNO FILES NEED UPDATING" end end if [:all,:env].include?(type) Fanforce::AppFactory::CLI::Env.new(app).setup(:development) end end end
Version data entries
9 entries across 9 versions & 1 rubygems