Class: Avmtrf1::Git::PushLarge

Inherits:
Object
  • Object
show all
Includes:
EacRubyUtils::SimpleCache
Defined in:
lib/avmtrf1/git/push_large.rb,
lib/avmtrf1/git/push_large/_utils.rb,
lib/avmtrf1/git/push_large/lfs_commit.rb,
lib/avmtrf1/git/push_large/source_commit.rb,
lib/avmtrf1/git/push_large/lfs_commit/push.rb,
lib/avmtrf1/git/push_large/lfs_commit/cache.rb,
lib/avmtrf1/git/push_large/lfs_commit/helpers.rb,
lib/avmtrf1/git/push_large/source_commit/push.rb,
lib/avmtrf1/git/push_large/lfs_commit/commit_changes.rb,
lib/avmtrf1/git/push_large/lfs_commit/track_large_files.rb,
lib/avmtrf1/git/push_large/lfs_commit/pick_source_revision.rb,
lib/avmtrf1/git/push_large/lfs_commit/checkout_previous_revision.rb

Defined Under Namespace

Classes: LfsCommit, SourceCommit

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(git_local_path, remote_name, source_ref, target_ref) ⇒ PushLarge

Returns a new instance of PushLarge.


20
21
22
23
24
25
26
# File 'lib/avmtrf1/git/push_large.rb', line 20

def initialize(git_local_path, remote_name, source_ref, target_ref)
  @git = ::Avm::Launcher::Git::Base.new(git_local_path)
  @remote_name = remote_name
  @source_ref = source_ref
  @target_ref = target_ref
  @last_pushed_revision = nil
end

Instance Attribute Details

#gitObject (readonly)

Returns the value of attribute git.


18
19
20
# File 'lib/avmtrf1/git/push_large.rb', line 18

def git
  @git
end

#last_pushed_revisionObject (readonly)

Returns the value of attribute last_pushed_revision.


18
19
20
# File 'lib/avmtrf1/git/push_large.rb', line 18

def last_pushed_revision
  @last_pushed_revision
end

#remote_nameObject (readonly)

Returns the value of attribute remote_name.


18
19
20
# File 'lib/avmtrf1/git/push_large.rb', line 18

def remote_name
  @remote_name
end

#source_refObject (readonly)

Returns the value of attribute source_ref.


18
19
20
# File 'lib/avmtrf1/git/push_large.rb', line 18

def source_ref
  @source_ref
end

#target_refObject (readonly)

Returns the value of attribute target_ref.


18
19
20
# File 'lib/avmtrf1/git/push_large.rb', line 18

def target_ref
  @target_ref
end

Class Method Details

.bytes_size(size) ⇒ Object


7
8
9
10
11
12
# File 'lib/avmtrf1/git/push_large/_utils.rb', line 7

def bytes_size(size)
  return 'NONE' if size.blank?

  b = "#{size} B"
  "#{::Filesize.from(b).pretty} (#{b})"
end

Instance Method Details

#fs_cache_object_idObject


33
34
35
# File 'lib/avmtrf1/git/push_large.rb', line 33

def fs_cache_object_id
  ::File.expand_path(git).parameterize
end

#runObject


28
29
30
31
# File 'lib/avmtrf1/git/push_large.rb', line 28

def run
  start_banner
  push_revisions
end