summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2016-08-31 12:15:20 +0200
committerAzul <azul@riseup.net>2016-09-10 08:15:47 +0200
commitf18d698d09afda894a568de79c5770704a0c9de7 (patch)
treec7f41e9fff1345a95c781efa0ea5324ea643f0f7 /lib
parent625416ac16a1216240fc4c48aa19802ef8a967a1 (diff)
refactor: remove global require in test_helper
require all the things we depend upon where we depend upon them.
Diffstat (limited to 'lib')
-rw-r--r--lib/nickserver.rb7
-rw-r--r--lib/nickserver/adapters/celluloid_http.rb1
-rw-r--r--lib/nickserver/daemon.rb3
-rw-r--r--lib/nickserver/request_handlers/leap_email_handler.rb1
-rw-r--r--lib/nickserver/server.rb5
-rw-r--r--lib/nickserver/source.rb2
6 files changed, 10 insertions, 9 deletions
diff --git a/lib/nickserver.rb b/lib/nickserver.rb
deleted file mode 100644
index 8843acd..0000000
--- a/lib/nickserver.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-
-require "nickserver/version"
-require "nickserver/config"
-require "nickserver/email_address"
-
-require "nickserver/server"
-require "nickserver/daemon"
diff --git a/lib/nickserver/adapters/celluloid_http.rb b/lib/nickserver/adapters/celluloid_http.rb
index 44b6fe8..92c5c53 100644
--- a/lib/nickserver/adapters/celluloid_http.rb
+++ b/lib/nickserver/adapters/celluloid_http.rb
@@ -1,4 +1,5 @@
require 'nickserver/adapters'
+require 'nickserver/config'
silence_warnings do
require 'celluloid/io'
end
diff --git a/lib/nickserver/daemon.rb b/lib/nickserver/daemon.rb
index 9b06a3c..9cc1af7 100644
--- a/lib/nickserver/daemon.rb
+++ b/lib/nickserver/daemon.rb
@@ -1,3 +1,6 @@
+require "nickserver/version"
+require "nickserver/config"
+
require 'etc'
require 'fileutils'
diff --git a/lib/nickserver/request_handlers/leap_email_handler.rb b/lib/nickserver/request_handlers/leap_email_handler.rb
index 548bc8a..bdebc23 100644
--- a/lib/nickserver/request_handlers/leap_email_handler.rb
+++ b/lib/nickserver/request_handlers/leap_email_handler.rb
@@ -1,3 +1,4 @@
+require 'nickserver/request_handlers/base'
require 'nickserver/email_address'
require 'nickserver/nicknym/source'
diff --git a/lib/nickserver/server.rb b/lib/nickserver/server.rb
index 8f4a49f..11e7012 100644
--- a/lib/nickserver/server.rb
+++ b/lib/nickserver/server.rb
@@ -1,7 +1,8 @@
-require 'kernel_ext'
-require 'json'
+require 'nickserver/config'
require 'nickserver/reel_server'
+require 'kernel_ext'
+require 'json'
#
# This is the main HTTP server that clients connect to in order to fetch keys
diff --git a/lib/nickserver/source.rb b/lib/nickserver/source.rb
index 78f245b..edc57e9 100644
--- a/lib/nickserver/source.rb
+++ b/lib/nickserver/source.rb
@@ -1,3 +1,5 @@
+require 'nickserver/adapters/celluloid_http'
+
module Nickserver
class Source