Skip to content

Commit

Permalink
Fix host
Browse files Browse the repository at this point in the history
  • Loading branch information
b0nn1e committed Feb 24, 2016
1 parent 2019fed commit 46fff6e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea/
5 changes: 4 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
openvpn-http-hooks (1.0.4)
openvpn-http-hooks (1.0.6)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -34,3 +34,6 @@ DEPENDENCIES
openvpn-http-hooks!
rspec
webmock

BUNDLED WITH
1.11.0
7 changes: 4 additions & 3 deletions lib/api/billing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@

module Api
class Billing
API_HOST = "api.smartvpn.biz"
KEY_PATH = "/etc/openvpn/auth_key"
API_HOST = '/etc/openvpn/API_HOST'
KEY_PATH = '/etc/openvpn/auth_key'

def host_with_port
"http://#{API_HOST}"
host = File.read(API_HOST)
"http://#{host.strip}"
end

def auth_key
Expand Down
4 changes: 3 additions & 1 deletion openvpn-http-hooks.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ Gem::Specification.new do |s|
s.files = `git ls-files`.split($/)
s.homepage = 'https://smartvpn.biz'
s.executables = ['openvpn-activate', 'openvpn-authenticate', 'openvpn-connect', 'openvpn-disconnect']

s.license = 'MIT'
s.require_path = 'lib'
s.add_development_dependency 'rspec', ['>= 0']
s.add_development_dependency 'mocha'
s.add_development_dependency 'webmock'

end

0 comments on commit 46fff6e

Please sign in to comment.