Module: Squarespace::Sync

Defined in:
lib/squarespace/sync.rb,
lib/squarespace/sync/cli.rb,
lib/squarespace/sync/version.rb,
lib/squarespace/sync/connection.rb

Defined Under Namespace

Classes: Cli, Connection

Constant Summary collapse

VERSION =
"0.0.3"

Class Method Summary collapse

Class Method Details

.configObject



16
17
18
# File 'lib/squarespace/sync.rb', line 16

def self.config
  File.join(local_path, "squarespace.yaml")
end

.local_pathObject



12
13
14
# File 'lib/squarespace/sync.rb', line 12

def self.local_path
  Dir.pwd
end

.optionsObject



20
21
22
23
24
25
26
27
28
# File 'lib/squarespace/sync.rb', line 20

def self.options
  if File.exists? config
    options = YAML.load_file( config )
    options["ignore"] << "squarespace.yaml"
    Thor::CoreExt::HashWithIndifferentAccess.new( options )
  else
    abort "No config exists. Run `squarespace setup` to create it."
  end
end