lyre 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/lib/lyre/app.rb CHANGED
@@ -25,7 +25,7 @@ module Lyre
25
25
  def start
26
26
  return if started?
27
27
  Lyre::Registry.register_and_run self
28
- self.instance_eval(&self.class.setup_block) if self.class.setup_block
28
+ self.class.setup_block.call(self) if self.class.setup_block
29
29
  self.started = true
30
30
  self
31
31
  end
@@ -33,7 +33,7 @@ module Lyre
33
33
  def stop
34
34
  return unless started?
35
35
  Lyre::Registry.stop_and_deregister self
36
- self.instance_eval(&self.class.teardown_block) if self.class.teardown_block
36
+ self.class.teardown_block.call(self) if self.class.teardown_block
37
37
  self.started = false
38
38
  self
39
39
  end
data/lib/lyre/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lyre
2
- VERSION = '0.0.1'
2
+ VERSION = '0.1.0'
3
3
  end
@@ -1,11 +1,11 @@
1
1
  class FakeServiceLyre < Lyre::App
2
2
 
3
- setup do
3
+ setup do |lyre|
4
4
  @original_endpoint = FakeService.endpoint
5
- FakeService.endpoint = endpoint
5
+ FakeService.endpoint = lyre.endpoint
6
6
  end
7
7
 
8
- teardown do
8
+ teardown do |lyre|
9
9
  FakeService.endpoint = @original_endpoint
10
10
  end
11
11
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lyre
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-16 00:00:00.000000000 Z
12
+ date: 2013-02-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sinatra