Sha256: 6bf1fb73604cb08e3b3534fe214e5d4b64b445d800de8bf6ed757fbb77da20ce

Contents?: true

Size: 1.19 KB

Versions: 47

Compression:

Stored size: 1.19 KB

Contents

# frozen_string_literal: true

# takeltau init takelage rake
module InitTakelageRake
  # Backend method for init takelage rake.
  # @return [Boolean] successful init?
  def init_takelage_rake
    log.debug 'Initialize takelage rake project'

    files = _init_takelage_rake_files_get

    return false unless _init_takelage_rake_check_prerequisites files

    exit_code = _init_takelage_rake_create_project files

    # reinitialize config with newly created files
    initialize_config

    return false unless _init_lib_hg_clone

    return false unless exit_code

    true
  end

  private

  # Add templates.
  def _init_takelage_rake_files_get
    [
      @gitignore,
      @hgclone,
      @projectyml,
      @rakefile
    ]
  end

  # Check prerequisites.
  def _init_takelage_rake_check_prerequisites(files)
    return false unless _init_lib_git_check

    return false unless _init_lib_files_check files

    true
  end

  # Create project.
  def _init_takelage_rake_create_project(files)
    exit_code = true

    exit_code &&= _init_lib_git_init
    exit_code &&= _init_lib_files_create files
    exit_code &&= _init_lib_git_add_all
    exit_code &&= _init_lib_git_commit_initial

    exit_code
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
takeltau-0.43.23 lib/takeltau/init/takelage/rake.rb
takeltau-0.43.21 lib/takeltau/init/takelage/rake.rb
takeltau-0.43.19 lib/takeltau/init/takelage/rake.rb
takeltau-0.43.16 lib/takeltau/init/takelage/rake.rb
takeltau-0.43.15 lib/takeltau/init/takelage/rake.rb
takeltau-0.43.14 lib/takeltau/init/takelage/rake.rb
takeltau-0.43.10 lib/takeltau/init/takelage/rake.rb
takeltau-0.43.6 lib/takeltau/init/takelage/rake.rb
takeltau-0.43.4 lib/takeltau/init/takelage/rake.rb
takeltau-0.43.2 lib/takeltau/init/takelage/rake.rb
takeltau-0.43.1 lib/takeltau/init/takelage/rake.rb
takeltau-0.42.7 lib/takeltau/init/takelage/rake.rb
takeltau-0.42.5 lib/takeltau/init/takelage/rake.rb
takeltau-0.42.4 lib/takeltau/init/takelage/rake.rb
takeltau-0.42.3 lib/takeltau/init/takelage/rake.rb
takeltau-0.42.0 lib/takeltau/init/takelage/rake.rb
takeltau-0.41.10 lib/takeltau/init/takelage/rake.rb
takeltau-0.41.9 lib/takeltau/init/takelage/rake.rb
takeltau-0.41.0 lib/takeltau/init/takelage/rake.rb
takeltau-0.40.11 lib/takeltau/init/takelage/rake.rb