resty_test 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/Gemfile +2 -2
- data/Gemfile.lock +3 -3
- data/lib/resty_test/config.rb +1 -1
- data/lib/resty_test.rb +5 -0
- data/resty_test.gemspec +1 -1
- data/spec/resty_test_spec.rb +5 -1
- metadata +3 -3
data/.gitignore
CHANGED
data/Gemfile
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
source
|
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.
|
4
|
+
resty_test (0.1.1)
|
5
5
|
excon
|
6
6
|
|
7
7
|
GEM
|
8
|
-
remote:
|
8
|
+
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
10
|
diff-lcs (1.1.3)
|
11
|
-
excon (0.
|
11
|
+
excon (0.20.1)
|
12
12
|
rake (10.0.3)
|
13
13
|
rspec (2.12.0)
|
14
14
|
rspec-core (~> 2.12.0)
|
data/lib/resty_test/config.rb
CHANGED
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.
|
10
|
+
s.version = "0.1.1"
|
11
11
|
|
12
12
|
s.authors = ["Dimitrij Denissenko"]
|
13
13
|
s.email = "dimitrij@blacksquaremedia.com"
|
data/spec/resty_test_spec.rb
CHANGED
@@ -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.
|
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-
|
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.
|
118
|
+
rubygems_version: 1.8.25
|
119
119
|
signing_key:
|
120
120
|
specification_version: 3
|
121
121
|
summary: RestyTest
|