Sha256: c19fcc25e1955e0fae0ea17c49183babbeeb43392f9c03bf349a98bd9e501cd6

Contents?: true

Size: 763 Bytes

Versions: 1

Compression:

Stored size: 763 Bytes

Contents

module Pairzone
  module Commands
    class Info
      def initialize(project_name)
        @project_name = project_name
      end

      def execute
        Logger.info("<%= color('Pairzone Account Information', CYAN + BOLD) %>")
        @user = Pairzone::Api::User.current_user
        Logger.info(@user)
        Logger.info("")
        Logger.debug("Finding information about local pairzone: #{local_pairzone_name}")
        pairzone = Pairzone::Api::Pairzone.find_by_project_name(local_pairzone_name)
        Logger.info(pairzone || "No pairzone found for this directory (create one with <%= color('pairzone create', CYAN) %>).")
      end

      private

      def local_pairzone_name
        "#{@user.username}-#{@project_name}"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pairzone-0.0.1 lib/pairzone/commands/info.rb