Sha256: ba5556c2ff50687c734125f8c1ba349639d5d6e7e92747a42bd80520510f8070

Contents?: true

Size: 552 Bytes

Versions: 5

Compression:

Stored size: 552 Bytes

Contents

module Calabash
  module Android
    module Build
      # @!visibility private
      class TestServer
        def initialize(application_path)
          @application_path = application_path
        end

        def path
          File.expand_path("test_servers/#{checksum(@application_path)}_#{VERSION}.apk")
        end

        def exists?
          File.exists?(path)
        end

        private

        def checksum(file_path)
          require 'digest/md5'
          Digest::MD5.file(file_path).hexdigest
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
calabash-2.0.0.pre2 lib/calabash/android/build/test_server.rb
calabash-2.0.0.pre1 lib/calabash/android/build/test_server.rb
calabash-1.9.9.pre3 lib/calabash/android/build/test_server.rb
calabash-1.9.9.pre2 lib/calabash/android/build/test_server.rb
calabash-1.9.9.pre1 lib/calabash/android/build/test_server.rb