lyre 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/lyre/app.rb +6 -2
- data/lib/lyre/version.rb +1 -1
- metadata +1 -1
data/lib/lyre/app.rb
CHANGED
|
@@ -6,7 +6,7 @@ module Lyre
|
|
|
6
6
|
#NOTE: Not sure this is the right name for this class
|
|
7
7
|
class App < Sinatra::Base
|
|
8
8
|
|
|
9
|
-
attr_accessor :
|
|
9
|
+
attr_accessor :host, :port
|
|
10
10
|
|
|
11
11
|
class << self
|
|
12
12
|
attr_accessor :setup_block, :teardown_block
|
|
@@ -25,7 +25,8 @@ module Lyre
|
|
|
25
25
|
Capybara::Server.new(instance).tap do |server|
|
|
26
26
|
server.boot
|
|
27
27
|
|
|
28
|
-
instance.
|
|
28
|
+
instance.host = server.host
|
|
29
|
+
instance.port = server.port
|
|
29
30
|
|
|
30
31
|
setup_block.call(instance) if setup_block
|
|
31
32
|
end
|
|
@@ -38,6 +39,9 @@ module Lyre
|
|
|
38
39
|
self.class.teardown_block.call(self) if self.class.teardown_block
|
|
39
40
|
end
|
|
40
41
|
|
|
42
|
+
def endpoint
|
|
43
|
+
"http://#{host}:#{port}"
|
|
44
|
+
end
|
|
41
45
|
end
|
|
42
46
|
|
|
43
47
|
end
|
data/lib/lyre/version.rb
CHANGED