Module: Skypager

Defined in:
lib/skypager/router.rb,
lib/skypager.rb,
lib/skypager/cli.rb,
lib/skypager/site.rb,
lib/skypager/proxy.rb,
lib/skypager/version.rb,
lib/skypager/configuration.rb,
lib/skypager/builder/server.rb

Overview

Skypager::Builder::Server

A Rack mountable server which can receive Webhook notifications from services like Dropbox, Google Drive, or our own Rest APIs and trigger builds for the various Skypager::Site that are referenced in the Skypager::Site.directory

Currently, the Builder::Server just finds sites and marks them as requiring a build. Some external process will poll the sites directory to find the sites which require a build, and run that for us. (Cron, perhaps)

Defined Under Namespace

Modules: Cli Classes: Builder, Configuration, Proxy, Router, Site

Constant Summary collapse

VERSION =
"0.2.0"

Class Method Summary collapse

Class Method Details

.configObject



30
31
32
# File 'lib/skypager.rb', line 30

def self.config
  Skypager::Configuration.instance
end

.libObject



42
43
44
# File 'lib/skypager.rb', line 42

def self.lib
  Pathname(File.dirname(__FILE__))
end

.proxy(options = {}) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
# File 'lib/skypager.rb', line 18

def self.proxy(options={})
  if options.is_a?(String)
    options = {bucket: options}
  end

  require 'rack-proxy' unless defined?(Rack::Proxy)
  require 'skypager/proxy' unless defined?(Skypager::Proxy)

  @_proxies ||= {}
  @_proxies[options.hash] ||= Skypager::Proxy.new(options)
end

.rootObject



38
39
40
# File 'lib/skypager.rb', line 38

def self.root
  Skypager::Configuration.skypager_root
end

.router(app, options = {}) ⇒ Object



14
15
16
# File 'lib/skypager.rb', line 14

def self.router(app, options={})
  @router ||= Skypager::Router.new(app, options)
end

.sitesObject



34
35
36
# File 'lib/skypager.rb', line 34

def self.sites
  Skypager::Site.directory
end