Module: Powify
- Included in:
- App, Client, Server, Utils
- Defined in:
- lib/powify/utils.rb,
lib/powify/app.rb,
lib/powify/core.rb,
lib/powify/client.rb,
lib/powify/server.rb,
lib/powify/version.rb
Overview
powify server functions invoked via powify server [COMMAND] [ARGS]
Defined Under Namespace
Classes: App, Client, Server, Utils
Constant Summary
collapse
- POWPATH =
File.expand_path("~/.pow")
- VERSION =
'0.9.2'
Instance Method Summary
collapse
Instance Method Details
#config ⇒ Object
27
28
29
30
|
# File 'lib/powify/core.rb', line 27
def config
result = %x{curl localhost/config.json --silent --header host:pow}
JSON.parse(result)
end
|
#current_path ⇒ Object
11
12
13
|
# File 'lib/powify/core.rb', line 11
def current_path
%x{pwd}.strip
end
|
#extension ⇒ Object
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/powify/core.rb', line 15
def extension
if File.exists?('~/.powconfig')
return %x{source ~/.powconfig; echo $POW_DOMAIN}.strip unless %x{source ~/.powconfig; echo $POW_DOMAIN}.strip.empty?
return %x{source ~/.powconfig; echo $POW_DOMAINS}.strip.split(',').first unless %x{source ~/.powconfig; echo $POW_DOMAINS}.strip.empty?
else
return %x{echo $POW_DOMAIN}.strip unless %x{echo $POW_DOMAIN}.strip.empty?
return %x{echo $POW_DOMAINS}.strip.split(',').first unless %x{echo $POW_DOMAINS}.strip.empty?
end
return 'dev'
end
|