resty_test 0.1.0 → 0.1.1

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/.gitignore CHANGED
@@ -1 +1,2 @@
1
1
  spec/resty/
2
+ *.gem
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
- source :rubygems
1
+ source "https://rubygems.org"
2
2
 
3
- gemspec
3
+ gemspec
data/Gemfile.lock CHANGED
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- resty_test (0.1.0)
4
+ resty_test (0.1.1)
5
5
  excon
6
6
 
7
7
  GEM
8
- remote: http://rubygems.org/
8
+ remote: https://rubygems.org/
9
9
  specs:
10
10
  diff-lcs (1.1.3)
11
- excon (0.16.10)
11
+ excon (0.20.1)
12
12
  rake (10.0.3)
13
13
  rspec (2.12.0)
14
14
  rspec-core (~> 2.12.0)
@@ -5,7 +5,7 @@ class RestyTest::Config
5
5
  attr_accessor :root
6
6
 
7
7
  def source
8
- @source ||= "http://agentzh.org/misc/nginx/ngx_openresty-1.2.4.14.tar.gz"
8
+ @source ||= "http://openresty.org/download/ngx_openresty-1.2.6.6.tar.gz"
9
9
  end
10
10
 
11
11
  def logger
data/lib/resty_test.rb CHANGED
@@ -43,6 +43,11 @@ module RestyTest
43
43
  @running = nil
44
44
  end
45
45
 
46
+ def reload!
47
+ return unless File.file?(paths.nginx_bin) && running
48
+ system "#{paths.nginx_bin} -s reload"
49
+ end
50
+
46
51
  end
47
52
 
48
53
  root = caller.detect {|path| path =~ /^(.+?\/(?:test|spec|features))\// }
data/resty_test.gemspec CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.name = File.basename(__FILE__, '.gemspec')
8
8
  s.summary = "RestyTest"
9
9
  s.description = "Test OpenResty with your favourite test framework!"
10
- s.version = "0.1.0"
10
+ s.version = "0.1.1"
11
11
 
12
12
  s.authors = ["Dimitrij Denissenko"]
13
13
  s.email = "dimitrij@blacksquaremedia.com"
@@ -13,7 +13,7 @@ describe RestyTest do
13
13
  end
14
14
  end
15
15
 
16
- it "should start and stop nginx" do
16
+ it "should start, reload and stop nginx" do
17
17
  lambda { subject.start! }.should change {
18
18
  subject.running
19
19
  }.from(nil).to(true)
@@ -22,6 +22,10 @@ describe RestyTest do
22
22
  res.status.should == 200
23
23
  res.body.should == "Success!\n"
24
24
 
25
+ lambda { subject.reload! }.should_not change {
26
+ subject.running
27
+ }.from(true)
28
+
25
29
  lambda { subject.stop! }.should change {
26
30
  subject.running
27
31
  }.from(true).to(nil)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resty_test
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
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-01-26 00:00:00.000000000 Z
12
+ date: 2013-04-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: excon
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  version: 1.8.0
116
116
  requirements: []
117
117
  rubyforge_project:
118
- rubygems_version: 1.8.24
118
+ rubygems_version: 1.8.25
119
119
  signing_key:
120
120
  specification_version: 3
121
121
  summary: RestyTest