Module: Railsonfire

Includes:
Helper
Defined in:
lib/railsonfire.rb,
lib/railsonfire/helpers/key.rb,
lib/railsonfire/railsonfire.rb,
lib/railsonfire/helpers/base.rb,
lib/railsonfire/helpers/constants.rb

Defined Under Namespace

Modules: Helper Classes: Config, Heroku, Project, User

Constant Summary collapse

DOMAIN =
ENV["railsonfire_domain"] ||= "https://www.railsonfire.com"
RAILSONFIRE_FILE =
"./railsonfire.yml"
PUBLIC_KEY_FILE =
"railsonfire-ssh-public-key.pub"
PRIVATE_KEY_FILE =
"railsonfire-ssh-private-key"

Class Method Summary collapse

Methods included from Helper

#error, #heroku, #is_git_managed?, #notify, #post_json, #select, #send_signal, #shell, #success, #warning, #write_config_file

Class Method Details

.configObject



11
12
13
# File 'lib/railsonfire/railsonfire.rb', line 11

def self.config
  @config ||= File.exists?(RAILSONFIRE_FILE) ? stringify(YAML.load(File.read(RAILSONFIRE_FILE))) : {}
end

.login(token, github_token) ⇒ Object



15
16
17
# File 'lib/railsonfire/railsonfire.rb', line 15

def self. token, github_token
  @user = Railsonfire::User.new token, github_token
end

.projectObject



23
24
25
26
27
28
29
30
# File 'lib/railsonfire/railsonfire.rb', line 23

def self.project
  id =  Railsonfire.config["id"]
  if id
    @project ||= Project.new user.railsonfire_token, id
  else
    @project ||= Project.new user.railsonfire_token
  end
end

.userObject



19
20
21
# File 'lib/railsonfire/railsonfire.rb', line 19

def self.user
  @user
end