eye-http 0.6 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YTM3N2NlZmM0NTUyOTAzMzFmMTEwNjhkODYxYjcwODBhNmUyYzZhMQ==
4
+ NDdhY2MwOWZjMTlhZWVjMzBjOTE0NTY1NThhMzk3OTI4Mjk3YzYwNg==
5
5
  data.tar.gz: !binary |-
6
- OGIxNDE2ZDgzMWNiMjczY2IyZTFmNWM3ODY0MjkyOTJlYmNiN2M2ZQ==
6
+ MzMyYzZmYjI4N2JmYWEyMDA2Yjg4OWY2NjM2NDViMTJhNDRiN2MxYw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MDQ3YzVjNWIyODUzYTNiZTdmNTNmYmJhODA4ZTU4ZTRjZjFlMzE3MjViMTBh
10
- MGQ2ZGU2YTFiOGEyZTFmNGQ0NzhhMzBlYmRlY2QyOWUwNjc3ZDRlMWM1ZDk5
11
- ZjFiOGMxM2U5ZmE3YjliNTdhMzg0NWNmODhjOGRkNGUxODRmYTk=
9
+ ODVlYzE4NDdmOTE3NjdiOWU1ODliNzI5NmE2NDA0NjEzZjM0MzM2MzgzYmRh
10
+ ZWNkMmVhYjYwOWQwZDhiNTYwMGJjMzNjYzgyZjI2NDA2NWM1MTM3OGRkZDk5
11
+ YmNjMmU1OWFiZDgyMzcwOTMyNWY0MWY4ODljMDkyMjdmMDRiNGI=
12
12
  data.tar.gz: !binary |-
13
- ODNjMDEwZGI4OGIwNzZmNDUzMzNjN2Y4YjM2NzI2YWY3ODc2YzQxZTI5NWVk
14
- Y2YwZjhhNzgzN2UzZmI1OTRjYzQ1OGU5NDU2ZTE2NDdlNTJmMmQ3YzAxZDBk
15
- ZGYzOWMwMjEzMWRhNTVjZDUzOTdhZWU2YTRkYTY2OWFhNmRkOGE=
13
+ OWI1YWMyMmVhODU5MWU5MzhjMGI5ZTRiODY2YzVhNTdiOThlYWIxNjk2MjM4
14
+ ZDdjNWU0MTlhNGU0OWJlYjBkN2M5MGE4OGNkMmVkZTgzY2Q0Y2I5NDE0NjVi
15
+ OTQ0NDkwYmMyMjg1MDFiYjEyNjEzODZiNTRmNTZkOWUwZTRjMDI=
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency 'eye', '~> 0.6'
21
+ spec.add_dependency 'eye', '~> 0.6.2'
22
22
  spec.add_dependency 'reel', '~> 0.5.0'
23
23
  spec.add_dependency 'reel-rack'
24
24
  spec.add_dependency 'cuba'
@@ -17,7 +17,7 @@ class Eye::Http
17
17
 
18
18
  def start
19
19
  stop
20
- @server = Reel::Rack::Server.supervise(@router, :Host => @host, :Port => port)
20
+ @server = Reel::Rack::Server.new(@router, :Host => @host, :Port => port)
21
21
  end
22
22
 
23
23
  def stop
@@ -1,5 +1,5 @@
1
1
  module Eye
2
2
  class Http
3
- VERSION = "0.6"
3
+ VERSION = "0.6.2"
4
4
  end
5
5
  end
@@ -9,41 +9,41 @@ describe "http" do
9
9
  it "load config with http enable" do
10
10
  expect{ Net::HTTP.get(uri) }.to raise_error(Errno::ECONNREFUSED)
11
11
 
12
- subject.load2(fixture("http1.eye"))
12
+ subject.command('load', fixture("http1.eye"))
13
13
  Net::HTTP.get(uri).should == Eye::ABOUT
14
14
  end
15
15
 
16
16
  it "load config with http enable then disable" do
17
- subject.load2(fixture("http1.eye"))
17
+ subject.command('load', fixture("http1.eye"))
18
18
  Net::HTTP.get(uri).should == Eye::ABOUT
19
19
 
20
- subject.load2(fixture("http2.eye"))
20
+ subject.command('load', fixture("http2.eye"))
21
21
  expect{ Net::HTTP.get(uri) }.to raise_error(Errno::ECONNREFUSED)
22
22
  end
23
23
 
24
24
  it "load config with http enable then change port" do
25
- subject.load2(fixture("http1.eye"))
25
+ subject.command('load', fixture("http1.eye"))
26
26
  Net::HTTP.get(uri).should == Eye::ABOUT
27
27
 
28
- subject.load2(fixture("http3.eye"))
28
+ subject.command('load', fixture("http3.eye"))
29
29
  expect{ Net::HTTP.get(uri) }.to raise_error(Errno::ECONNREFUSED)
30
30
  Net::HTTP.get(uri2).should == Eye::ABOUT
31
31
  end
32
32
 
33
33
  it "should not reconnect when load the same config" do
34
- res = subject.load2(fixture("http1.eye"))
34
+ res = subject.command('load', fixture("http1.eye"))
35
35
  res.values.map{|c| c[:error]}.should == [false]
36
36
  Net::HTTP.get(uri).should == Eye::ABOUT
37
37
 
38
38
  dont_allow(subject).stop_http
39
39
 
40
- res = subject.load2(fixture("http1.eye"))
40
+ res = subject.command('load', fixture("http1.eye"))
41
41
  res.values.map{|c| c[:error]}.should == [false]
42
42
  Net::HTTP.get(uri).should == Eye::ABOUT
43
43
  end
44
44
 
45
45
  it "load error should catch" do
46
- res = subject.load2(fixture("http4.eye"))
46
+ res = subject.command('load', fixture("http4.eye"))
47
47
  res.values.map{|c| c[:error]}.should == [true]
48
48
  end
49
49
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eye-http
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.6'
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ! '''Konstantin Makarchev'''
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-18 00:00:00.000000000 Z
11
+ date: 2014-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eye
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: '0.6'
19
+ version: 0.6.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
- version: '0.6'
26
+ version: 0.6.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: reel
29
29
  requirement: !ruby/object:Gem::Requirement