Module: Bowline::Library

Extended by:
Library
Included in:
Library
Defined in:
lib/bowline/library.rb

Overview

Provides paths to Bowline’s required libraries.

Constant Summary collapse

PROJECT_URL =
"http://bowline.s3.amazonaws.com/#{Platform.type}"
DESKTOP_URL =
"#{PROJECT_URL}/bowline-desktop.zip"
LIBS_URL =
"#{PROJECT_URL}/libs.zip"

Instance Method Summary collapse

Instance Method Details

#desktop_pathObject

Path to the bowline-desktop binary



21
22
23
# File 'lib/bowline/library.rb', line 21

def desktop_path
  path.join("bowline-desktop")
end

#libs_pathObject



25
26
27
# File 'lib/bowline/library.rb', line 25

def libs_path
  path.join("libs")
end

#local_build_pathObject



29
30
31
# File 'lib/bowline/library.rb', line 29

def local_build_path
  Bowline.root.join("build")
end

#pathObject

Path to a folder stored under the users home directory containing the downloaded libraries.



12
13
14
15
16
17
18
# File 'lib/bowline/library.rb', line 12

def path
  Pathname.new(
    File.expand_path(
      File.join(Gem.user_home, ".bowline")
    )
  )
end

#ready?Boolean

Returns true if all required libraries exist.

Returns:

  • (Boolean)


34
35
36
37
# File 'lib/bowline/library.rb', line 34

def ready?
  File.exist?(desktop_path) && 
    File.directory?(libs_path)
end