Class: Nabokov::ProjectSyncer

Inherits:
Syncer
  • Object
show all
Defined in:
lib/nabokov/commands/syncers/project_syncer.rb

Instance Attribute Summary

Attributes inherited from Syncer

#git_repo, #nabokovfile

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Syncer

#checkout_master_branch, #init_git_repo, #initialize_nabokov_file

Methods inherited from Runner

#ui

Constructor Details

#initialize(argv) ⇒ ProjectSyncer

Returns a new instance of ProjectSyncer.



12
13
14
15
# File 'lib/nabokov/commands/syncers/project_syncer.rb', line 12

def initialize(argv)
  super
  @synchronized_file_names = []
end

Class Method Details

.optionsObject



21
22
23
# File 'lib/nabokov/commands/syncers/project_syncer.rb', line 21

def self.options
  super
end

Instance Method Details

#runObject



25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/nabokov/commands/syncers/project_syncer.rb', line 25

def run
  ui.important("Nabokov starts project repo synchronization")
  super
  fetch_localization_repo_master_branch_changes
  init_project_git_repo
  checkout_project_repo_temporary_branch
  has_changes = update_localization_files_in_project_repo
  checkout_project_repo_original_branch
  if has_changes
    merge_project_repo_original_branch_with_temporary
  end
  delete_temporary_branch
  notify_user_about_finish
end

#validate!Object



17
18
19
# File 'lib/nabokov/commands/syncers/project_syncer.rb', line 17

def validate!
  super
end