summaryrefslogtreecommitdiff
path: root/lib/leap/server.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/leap/server.rb')
-rw-r--r--lib/leap/server.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/leap/server.rb b/lib/leap/server.rb
new file mode 100644
index 0000000..bc60455
--- /dev/null
+++ b/lib/leap/server.rb
@@ -0,0 +1,11 @@
+require 'couchrest'
+
+module LEAP
+ class Server < CouchRest::Server
+ def initialize
+ netrc = File.read('/root/.netrc').split(' ')
+ auth = "%{username}:%{password}@" % {username: netrc[3], password: netrc[5]}
+ super("http://#{auth}localhost:5984")
+ end
+ end
+end \ No newline at end of file