Sha256: 8c9aff5b79a526569033c0bbd71be506d6169e3550225ec845038dfb2ed47861

Contents?: true

Size: 929 Bytes

Versions: 5

Compression:

Stored size: 929 Bytes

Contents

require "pathname"

module Bowline
  # Provides paths to Bowline's required libraries.
  module Library
    PROJECT_URL  = "http://bowline.s3.amazonaws.com/#{Platform.type}"
    DESKTOP_URL  = "#{PROJECT_URL}/bowline-desktop.zip"
    LIBS_URL     = "#{PROJECT_URL}/libs.zip"
    
    # Path to a folder stored under the users
    # home directory containing the downloaded libraries.
    def path
      Pathname.new(
        File.expand_path(
          File.join(Gem.user_home, ".bowline")
        )
      )
    end
    
    # Path to the bowline-desktop binary
    def desktop_path
      path.join("bowline-desktop")
    end
    
    def libs_path
      path.join("libs")
    end
    
    def local_build_path
      Bowline.root.join("build")
    end
    
    # Returns true if all required libraries exist.
    def ready?
      File.exist?(desktop_path) && 
        File.directory?(libs_path)
    end

    extend self
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bowline-0.9.4 lib/bowline/library.rb
bowline-0.9.3 lib/bowline/library.rb
bowline-0.9.2 lib/bowline/library.rb
bowline-0.9.1 lib/bowline/library.rb
bowline-0.6.3 lib/bowline/library.rb