Class: DTK::Network::Client::Command::Update

Inherits:
DTK::Network::Client::Command show all
Defined in:
lib/client/command/update.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DTK::Network::Client::Command

wrap_command

Methods included from RestWrapper

#rest_delete, #rest_get, #rest_post

Methods included from Client::PermissionsUtil

#validate_permissions!

Methods included from Util::Tar

#gzip, #tar, #ungzip, #untar

Constructor Details

#initialize(module_ref, dependency_tree, options = {}) ⇒ Update

Returns a new instance of Update.



4
5
6
7
8
9
10
# File 'lib/client/command/update.rb', line 4

def initialize(module_ref, dependency_tree, options = {})
  @module_ref       = module_ref
  @dependency_tree  = dependency_tree
  @module_directory = module_ref.repo_dir
  @options          = options
  @parsed_module    = options[:parsed_module]
end

Class Method Details

.run(module_info, opts = {}) ⇒ Object



12
13
14
15
# File 'lib/client/command/update.rb', line 12

def self.run(module_info, opts = {})
  module_ref = ModuleRef.new(module_info)
  DependencyTree.get_or_create(module_ref, opts.merge(save_to_file: true, update_lock_file: true))
end