Class: Match::ChangePassword

Inherits:
Object
  • Object
show all
Defined in:
lib/match/change_password.rb

Class Method Summary collapse

Class Method Details

.update(params: nil, from: nil, to: nil) ⇒ Object



3
4
5
6
7
8
9
10
11
12
# File 'lib/match/change_password.rb', line 3

def self.update(params: nil, from: nil, to: nil)
  to ||= UI.password("New password: ")
  GitHelper.clear_changes
  workspace = GitHelper.clone(params[:git_url], params[:shallow_clone], manual_password: from)
  Encrypt.new.clear_password(params[:git_url])
  Encrypt.new.store_password(params[:git_url], to)

  message = "[fastlane] Changed password"
  GitHelper.commit_changes(workspace, message, params[:git_url])
end