Sha256: c4a49eeaa17e909607bc788c8ef612e8c2fa0038836cbbda7319914ef9856248

Contents?: true

Size: 942 Bytes

Versions: 1

Compression:

Stored size: 942 Bytes

Contents

require 'colorize'
require 'tmpdir'
require 'fileutils'
require 'dryrun/github'
require 'dryrun/android_project'

module DryRun

  class MainApp

    def self.is_ANDROID_HOME_defined
      return true
    end


    def self.initialize(url)

      if !is_ANDROID_HOME_defined
        # TODO missing warning
      end

      github = Github.new(url)

      if !github.is_valid
        puts "#{url.red} is not a valid github url"
        exit 1
      end

      puts "\nLets work this one out: #{url.green}\n\n"

      # clone the repository
      clonable = github.clonable_url
      puts "git clone #{clonable.yellow}.....\n\n"

      repository = github.clone

      project = AndroidProject.new(repository)

      # is a valid android project?
      if !project.is_valid
        puts "#{url.red} is not a valid android project"
        exit 1
      end

      project.clean_install


      puts "\nOpened #{url.green}!\n"

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dryrun-0.2.0 lib/dryrun.rb