http_server_manager 0.4.6 → 0.4.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NWUwYzAyOGRkNWY2NTIwNDlmOGY3ZWIzY2IxMjQ0NzI5ZGZlOTVlNQ==
5
- data.tar.gz: !binary |-
6
- ZGJjNTRiOGRlZWM3YmE3ZGNhMTRkNTU2YTA2YTZiNDA1NDJhYWQ1YQ==
2
+ SHA1:
3
+ metadata.gz: a7f2be63d730d13660a1883c3898c160eca08a35
4
+ data.tar.gz: e9ff53839144991c2df51f95a593fa5ae9b8fdcd
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- MTA5NGNjYWUxNTBjMjdjOGUzNzFkYWQ1YTEyNjI0MzRmOGNhYjVkM2M0MzYw
10
- YjVlNmZlZjM4ZjUyZDk5ZDUxZjJhYmNmYjkwYWM3NTg3ZDYzNGY4ZTc3YTFk
11
- YmVmZGY3M2MwY2U3ZjRkMmViOTM0MGE4OGYxM2E1NzdjMDI2OGY=
12
- data.tar.gz: !binary |-
13
- OTY3OGEwMjNiNGMwOTI4MDRmYzA5YWFjNzljODg3NGUzZGEzZmY1MzdjMWFk
14
- YzMyMzE3MmZhNzQxNzdkNjliMDgwNWY3MjE2NTFjYjQzODRiNTE2NmZmNjRm
15
- ZGU1Mjk2ZTA3ZjVlODVlYzE2OWZjZDAzYTU1YzIwZWU0NzAxMWU=
6
+ metadata.gz: 27076f086f9316fe7f18272e2e45f42f340d43e3b20bf030dc580f2588deeaac255d74a16c7c0042820ffcb9b7b530490339cda8c2fc1bd1f60b953284b12c84
7
+ data.tar.gz: 3a4c225d6055ab07fa3b05c0d6a0a36815b33843b12a0e6611e7047165a64453af17f28bdbd2b2d0d7b99bd30ec51fa361fdcdf54adeec37fa588a4bdcfa7896
@@ -1,3 +1,3 @@
1
1
  module HttpServerManager
2
- VERSION = "0.4.6"
2
+ VERSION = "0.4.7"
3
3
  end
@@ -21,7 +21,7 @@ describe HttpServerManager::Rake::ServerTasks do
21
21
  let(:task) { ::Rake::Task["#{task_namespace}:start"] }
22
22
 
23
23
  it "should start the server" do
24
- server.should_receive(:start!)
24
+ expect(server).to receive(:start!)
25
25
 
26
26
  task.execute
27
27
  end
@@ -33,7 +33,7 @@ describe HttpServerManager::Rake::ServerTasks do
33
33
  let(:task) { ::Rake::Task["#{task_namespace}:stop"] }
34
34
 
35
35
  it "should stop the server" do
36
- server.should_receive(:stop!)
36
+ expect(server).to receive(:stop!)
37
37
 
38
38
  task.execute
39
39
  end
@@ -45,7 +45,7 @@ describe HttpServerManager::Rake::ServerTasks do
45
45
  let(:task) { ::Rake::Task["#{task_namespace}:restart"] }
46
46
 
47
47
  it "should restart the server" do
48
- server.should_receive(:restart!)
48
+ expect(server).to receive(:restart!)
49
49
  task.execute
50
50
  end
51
51
 
@@ -56,8 +56,8 @@ describe HttpServerManager::Rake::ServerTasks do
56
56
  let(:task) { ::Rake::Task["#{task_namespace}:status"] }
57
57
 
58
58
  it "should write the server name and it's status to stdout" do
59
- server.stub(:status).and_return("stopped")
60
- server_tasks.should_receive(:puts).with("test_server is stopped")
59
+ allow(server).to receive(:status).and_return("stopped")
60
+ expect(server_tasks).to receive(:puts).with("test_server is stopped")
61
61
 
62
62
  task.execute
63
63
  end
@@ -36,7 +36,7 @@ describe HttpServerManager::Server, "managing a real server" do
36
36
  end
37
37
 
38
38
  it "should log that the server started on the configured port" do
39
- logger.should_receive(:info).with(/started on #{host}:#{port}/)
39
+ expect(logger).to receive(:info).with(/started on #{host}:#{port}/)
40
40
 
41
41
  server.start!
42
42
  end
@@ -51,7 +51,7 @@ describe HttpServerManager::Server, "managing a real server" do
51
51
  end
52
52
 
53
53
  it "should log that the server is already running on the configured port" do
54
- logger.should_receive(:info).with(/already running on #{host}:#{port}/)
54
+ expect(logger).to receive(:info).with(/already running on #{host}:#{port}/)
55
55
 
56
56
  server.start!
57
57
  end
@@ -83,7 +83,7 @@ describe HttpServerManager::Server, "managing a real server" do
83
83
  end
84
84
 
85
85
  it "should log that the server has stopped" do
86
- logger.should_receive(:info).with(/stopped/)
86
+ expect(logger).to receive(:info).with(/stopped/)
87
87
 
88
88
  server.stop!
89
89
  end
@@ -93,7 +93,7 @@ describe HttpServerManager::Server, "managing a real server" do
93
93
  describe "when the server is not running" do
94
94
 
95
95
  it "should log that the server is not running" do
96
- logger.should_receive(:info).with(/not running/)
96
+ expect(logger).to receive(:info).with(/not running/)
97
97
 
98
98
  server.stop!
99
99
  end
@@ -113,7 +113,7 @@ describe HttpServerManager::Server, "managing a real server" do
113
113
  describe "and the pid file exists" do
114
114
 
115
115
  it "should return :started" do
116
- server.status.should eql(:started)
116
+ expect(server.status).to eql(:started)
117
117
  end
118
118
 
119
119
  end
@@ -125,7 +125,7 @@ describe HttpServerManager::Server, "managing a real server" do
125
125
  after(:each) { restore_pid_file! }
126
126
 
127
127
  it "should return :started" do
128
- server.status.should eql(:started)
128
+ expect(server.status).to eql(:started)
129
129
  end
130
130
 
131
131
  end
@@ -137,7 +137,7 @@ describe HttpServerManager::Server, "managing a real server" do
137
137
  describe "and the pid file does not exist" do
138
138
 
139
139
  it "should return :stopped" do
140
- server.status.should eql(:stopped)
140
+ expect(server.status).to eql(:stopped)
141
141
  end
142
142
 
143
143
  end
@@ -149,7 +149,7 @@ describe HttpServerManager::Server, "managing a real server" do
149
149
  after(:each) { force_pid_file_deletion! }
150
150
 
151
151
  it "should return :stopped" do
152
- server.status.should eql(:stopped)
152
+ expect(server.status).to eql(:stopped)
153
153
  end
154
154
 
155
155
  end
@@ -161,15 +161,15 @@ describe HttpServerManager::Server, "managing a real server" do
161
161
  describe "#to_s" do
162
162
 
163
163
  it "should return a string containing the servers name" do
164
- server.to_s.should match(name)
164
+ expect(server.to_s).to match(name)
165
165
  end
166
166
 
167
167
  it "should return a string containing the servers host" do
168
- server.to_s.should match(host)
168
+ expect(server.to_s).to match(host)
169
169
  end
170
170
 
171
171
  it "should return a string containing the servers port" do
172
- server.to_s.should match(port.to_s)
172
+ expect(server.to_s).to match(port.to_s)
173
173
  end
174
174
 
175
175
  end
@@ -14,20 +14,20 @@ describe HttpServerManager::Server do
14
14
 
15
15
  describe "#start!" do
16
16
 
17
- before(:each) { Wait.stub(:until_true!) }
17
+ before(:each) { allow(Wait).to receive(:until_true!) }
18
18
 
19
19
  context "when the server is not running" do
20
20
 
21
21
  let(:env_timeout) { nil }
22
22
 
23
23
  before(:each) do
24
- ENV.stub(:[]).with("timeout").and_return(env_timeout)
25
- server.stub(:running?).and_return(false)
26
- Process.stub(:spawn)
24
+ allow(ENV).to receive(:[]).with("timeout").and_return(env_timeout)
25
+ allow(server).to receive(:running?).and_return(false)
26
+ allow(Process).to receive(:spawn)
27
27
  end
28
28
 
29
29
  it "should start the server by spawning a process that executes the start command" do
30
- Process.should_receive(:spawn).with("some command", anything).and_return(888)
30
+ expect(Process).to receive(:spawn).with("some command", anything).and_return(888)
31
31
 
32
32
  server.start!
33
33
  end
@@ -37,7 +37,7 @@ describe HttpServerManager::Server do
37
37
  let(:server_options) { { name: "Test Server", host: "localhost", port: 8888, timeout_in_seconds: 3 } }
38
38
 
39
39
  it "should wait for the specified amount of time in seconds for the server to start" do
40
- Wait.should_receive(:until_true!).with(anything, timeout_in_seconds: 3)
40
+ expect(Wait).to receive(:until_true!).with(anything, timeout_in_seconds: 3)
41
41
 
42
42
  server.start!
43
43
  end
@@ -49,7 +49,7 @@ describe HttpServerManager::Server do
49
49
  let(:env_timeout) { "8" }
50
50
 
51
51
  it "should wait for the specified amount of time in seconds for the server to start" do
52
- Wait.should_receive(:until_true!).with(anything, timeout_in_seconds: 8)
52
+ expect(Wait).to receive(:until_true!).with(anything, timeout_in_seconds: 8)
53
53
 
54
54
  server.start!
55
55
  end
@@ -59,7 +59,7 @@ describe HttpServerManager::Server do
59
59
  context "when no timeout is provided" do
60
60
 
61
61
  it "should wait 20 seconds for the server to start" do
62
- Wait.should_receive(:until_true!).with(anything, timeout_in_seconds: 20)
62
+ expect(Wait).to receive(:until_true!).with(anything, timeout_in_seconds: 20)
63
63
 
64
64
  server.start!
65
65
  end
@@ -73,13 +73,13 @@ describe HttpServerManager::Server do
73
73
  describe "#restart!" do
74
74
 
75
75
  before(:each) do
76
- server.stub(:start!)
77
- server.stub(:stop!)
76
+ allow(server).to receive(:start!)
77
+ allow(server).to receive(:stop!)
78
78
  end
79
79
 
80
80
  it "should first stop the server and then start the server" do
81
- server.should_receive(:stop!).ordered
82
- server.should_receive(:start!).ordered
81
+ expect(server).to receive(:stop!).ordered
82
+ expect(server).to receive(:start!).ordered
83
83
 
84
84
  server.restart!
85
85
  end
@@ -6,7 +6,7 @@ describe HttpServerManager::StdOutLogger do
6
6
 
7
7
  it "should write the message to stdout" do
8
8
  message = "Some message"
9
- logger.should_receive(:puts).with(message)
9
+ expect(logger).to receive(:puts).with(message)
10
10
 
11
11
  logger.info message
12
12
  end
@@ -7,7 +7,7 @@ describe HttpServerManager do
7
7
  before(:each) { HttpServerManager.logger = nil }
8
8
 
9
9
  it "should default to the stdout logger" do
10
- HttpServerManager.logger.should be_a(HttpServerManager::StdOutLogger)
10
+ expect(HttpServerManager.logger).to be_a(HttpServerManager::StdOutLogger)
11
11
  end
12
12
 
13
13
  end
@@ -21,7 +21,7 @@ describe HttpServerManager do
21
21
  after(:each) { HttpServerManager.logger = nil }
22
22
 
23
23
  it "should return the configured logger" do
24
- HttpServerManager.logger.should eql(logger)
24
+ expect(HttpServerManager.logger).to eql(logger)
25
25
  end
26
26
 
27
27
  end
@@ -2,7 +2,7 @@ shared_examples_for "a managed http server" do
2
2
  include_context "managed http server integration utilities"
3
3
 
4
4
  it "should be a HttpServerManager::Server" do
5
- server.should be_an(HttpServerManager::Server)
5
+ expect(server).to be_an(HttpServerManager::Server)
6
6
  end
7
7
 
8
8
  describe "#start!" do
@@ -2,7 +2,7 @@ shared_context "managed http server integration utilities" do
2
2
  include HttpServerManager::Test::ServerIntegrationUtilities
3
3
 
4
4
  before(:each) do
5
- HttpServerManager.logger.stub(:info)
5
+ allow(HttpServerManager.logger).to receive(:info)
6
6
 
7
7
  ensure_pid_file_backup_directory_exists!
8
8
  end
metadata CHANGED
@@ -1,125 +1,126 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http_server_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Ueckerman
8
+ - Kunal Parikh
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2014-01-15 00:00:00.000000000 Z
12
+ date: 2014-08-11 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rake
15
16
  requirement: !ruby/object:Gem::Requirement
16
17
  requirements:
17
- - - ~>
18
+ - - "~>"
18
19
  - !ruby/object:Gem::Version
19
20
  version: '10.1'
20
21
  type: :runtime
21
22
  prerelease: false
22
23
  version_requirements: !ruby/object:Gem::Requirement
23
24
  requirements:
24
- - - ~>
25
+ - - "~>"
25
26
  - !ruby/object:Gem::Version
26
27
  version: '10.1'
27
28
  - !ruby/object:Gem::Dependency
28
29
  name: sys-proctree
29
30
  requirement: !ruby/object:Gem::Requirement
30
31
  requirements:
31
- - - ~>
32
+ - - "~>"
32
33
  - !ruby/object:Gem::Version
33
34
  version: '0.0'
34
35
  type: :runtime
35
36
  prerelease: false
36
37
  version_requirements: !ruby/object:Gem::Requirement
37
38
  requirements:
38
- - - ~>
39
+ - - "~>"
39
40
  - !ruby/object:Gem::Version
40
41
  version: '0.0'
41
42
  - !ruby/object:Gem::Dependency
42
43
  name: wait_until
43
44
  requirement: !ruby/object:Gem::Requirement
44
45
  requirements:
45
- - - ~>
46
+ - - "~>"
46
47
  - !ruby/object:Gem::Version
47
48
  version: '0.1'
48
49
  type: :runtime
49
50
  prerelease: false
50
51
  version_requirements: !ruby/object:Gem::Requirement
51
52
  requirements:
52
- - - ~>
53
+ - - "~>"
53
54
  - !ruby/object:Gem::Version
54
55
  version: '0.1'
55
56
  - !ruby/object:Gem::Dependency
56
57
  name: metric_fu
57
58
  requirement: !ruby/object:Gem::Requirement
58
59
  requirements:
59
- - - ~>
60
+ - - "~>"
60
61
  - !ruby/object:Gem::Version
61
62
  version: '4.7'
62
63
  type: :development
63
64
  prerelease: false
64
65
  version_requirements: !ruby/object:Gem::Requirement
65
66
  requirements:
66
- - - ~>
67
+ - - "~>"
67
68
  - !ruby/object:Gem::Version
68
69
  version: '4.7'
69
70
  - !ruby/object:Gem::Dependency
70
71
  name: rspec
71
72
  requirement: !ruby/object:Gem::Requirement
72
73
  requirements:
73
- - - ~>
74
+ - - "~>"
74
75
  - !ruby/object:Gem::Version
75
- version: '2.14'
76
+ version: '3.0'
76
77
  type: :development
77
78
  prerelease: false
78
79
  version_requirements: !ruby/object:Gem::Requirement
79
80
  requirements:
80
- - - ~>
81
+ - - "~>"
81
82
  - !ruby/object:Gem::Version
82
- version: '2.14'
83
+ version: '3.0'
83
84
  - !ruby/object:Gem::Dependency
84
85
  name: simplecov
85
86
  requirement: !ruby/object:Gem::Requirement
86
87
  requirements:
87
- - - ~>
88
+ - - "~>"
88
89
  - !ruby/object:Gem::Version
89
90
  version: '0.8'
90
91
  type: :development
91
92
  prerelease: false
92
93
  version_requirements: !ruby/object:Gem::Requirement
93
94
  requirements:
94
- - - ~>
95
+ - - "~>"
95
96
  - !ruby/object:Gem::Version
96
97
  version: '0.8'
97
98
  - !ruby/object:Gem::Dependency
98
99
  name: rack
99
100
  requirement: !ruby/object:Gem::Requirement
100
101
  requirements:
101
- - - ~>
102
+ - - "~>"
102
103
  - !ruby/object:Gem::Version
103
104
  version: '1.5'
104
105
  type: :development
105
106
  prerelease: false
106
107
  version_requirements: !ruby/object:Gem::Requirement
107
108
  requirements:
108
- - - ~>
109
+ - - "~>"
109
110
  - !ruby/object:Gem::Version
110
111
  version: '1.5'
111
112
  - !ruby/object:Gem::Dependency
112
113
  name: travis-lint
113
114
  requirement: !ruby/object:Gem::Requirement
114
115
  requirements:
115
- - - ~>
116
+ - - "~>"
116
117
  - !ruby/object:Gem::Version
117
118
  version: '1.7'
118
119
  type: :development
119
120
  prerelease: false
120
121
  version_requirements: !ruby/object:Gem::Requirement
121
122
  requirements:
122
- - - ~>
123
+ - - "~>"
123
124
  - !ruby/object:Gem::Version
124
125
  version: '1.7'
125
126
  description: Manages the lifecycle of HTTP server processes
@@ -128,24 +129,24 @@ executables: []
128
129
  extensions: []
129
130
  extra_rdoc_files: []
130
131
  files:
131
- - ./lib/http_server_manager/rake/server_tasks.rb
132
- - ./lib/http_server_manager/rake/task_generators.rb
133
- - ./lib/http_server_manager/server.rb
134
- - ./lib/http_server_manager/stdout_logger.rb
135
- - ./lib/http_server_manager/version.rb
136
- - ./lib/http_server_manager.rb
137
- - ./spec/support/http_server_manager/test/server_integration_examples.rb
138
- - ./spec/support/http_server_manager/test/server_integration_utilities.rb
139
- - ./spec/support/http_server_manager/test/server_integration_utilities_spec_context.rb
140
- - ./spec/support/http_server_manager/test/silent_logger.rb
141
- - ./spec/support/http_server_manager/test_support.rb
142
- - ./spec/lib/http_server_manager/rake/server_tasks_spec.rb
143
- - ./spec/lib/http_server_manager/server_integration_spec.rb
144
- - ./spec/lib/http_server_manager/server_spec.rb
145
- - ./spec/lib/http_server_manager/stdout_logger_spec.rb
146
- - ./spec/lib/http_server_manager/test/server_integration_examples_spec.rb
147
- - ./spec/lib/http_server_manager_spec.rb
148
- - ./spec/spec_helper.rb
132
+ - "./lib/http_server_manager.rb"
133
+ - "./lib/http_server_manager/rake/server_tasks.rb"
134
+ - "./lib/http_server_manager/rake/task_generators.rb"
135
+ - "./lib/http_server_manager/server.rb"
136
+ - "./lib/http_server_manager/stdout_logger.rb"
137
+ - "./lib/http_server_manager/version.rb"
138
+ - "./spec/lib/http_server_manager/rake/server_tasks_spec.rb"
139
+ - "./spec/lib/http_server_manager/server_integration_spec.rb"
140
+ - "./spec/lib/http_server_manager/server_spec.rb"
141
+ - "./spec/lib/http_server_manager/stdout_logger_spec.rb"
142
+ - "./spec/lib/http_server_manager/test/server_integration_examples_spec.rb"
143
+ - "./spec/lib/http_server_manager_spec.rb"
144
+ - "./spec/spec_helper.rb"
145
+ - "./spec/support/http_server_manager/test/server_integration_examples.rb"
146
+ - "./spec/support/http_server_manager/test/server_integration_utilities.rb"
147
+ - "./spec/support/http_server_manager/test/server_integration_utilities_spec_context.rb"
148
+ - "./spec/support/http_server_manager/test/silent_logger.rb"
149
+ - "./spec/support/http_server_manager/test_support.rb"
149
150
  homepage: http://github.com/MYOB-Technology/http_server_manager
150
151
  licenses:
151
152
  - MIT
@@ -157,30 +158,30 @@ require_paths:
157
158
  - spec/support
158
159
  required_ruby_version: !ruby/object:Gem::Requirement
159
160
  requirements:
160
- - - ! '>='
161
+ - - ">="
161
162
  - !ruby/object:Gem::Version
162
163
  version: 1.9.3
163
164
  required_rubygems_version: !ruby/object:Gem::Requirement
164
165
  requirements:
165
- - - ! '>='
166
+ - - ">="
166
167
  - !ruby/object:Gem::Version
167
168
  version: '0'
168
169
  requirements: []
169
170
  rubyforge_project: http_server_manager
170
- rubygems_version: 2.1.11
171
+ rubygems_version: 2.2.2
171
172
  signing_key:
172
173
  specification_version: 4
173
174
  summary: Manages the lifecycle of HTTP server processes
174
175
  test_files:
175
- - ./spec/lib/http_server_manager/rake/server_tasks_spec.rb
176
- - ./spec/lib/http_server_manager/server_integration_spec.rb
177
- - ./spec/lib/http_server_manager/server_spec.rb
178
- - ./spec/lib/http_server_manager/stdout_logger_spec.rb
179
- - ./spec/lib/http_server_manager/test/server_integration_examples_spec.rb
180
- - ./spec/lib/http_server_manager_spec.rb
181
- - ./spec/spec_helper.rb
182
- - ./spec/support/http_server_manager/test/server_integration_examples.rb
183
- - ./spec/support/http_server_manager/test/server_integration_utilities.rb
184
- - ./spec/support/http_server_manager/test/server_integration_utilities_spec_context.rb
185
- - ./spec/support/http_server_manager/test/silent_logger.rb
186
- - ./spec/support/http_server_manager/test_support.rb
176
+ - "./spec/lib/http_server_manager/rake/server_tasks_spec.rb"
177
+ - "./spec/lib/http_server_manager/server_integration_spec.rb"
178
+ - "./spec/lib/http_server_manager/server_spec.rb"
179
+ - "./spec/lib/http_server_manager/stdout_logger_spec.rb"
180
+ - "./spec/lib/http_server_manager/test/server_integration_examples_spec.rb"
181
+ - "./spec/lib/http_server_manager_spec.rb"
182
+ - "./spec/spec_helper.rb"
183
+ - "./spec/support/http_server_manager/test/server_integration_examples.rb"
184
+ - "./spec/support/http_server_manager/test/server_integration_utilities.rb"
185
+ - "./spec/support/http_server_manager/test/server_integration_utilities_spec_context.rb"
186
+ - "./spec/support/http_server_manager/test/silent_logger.rb"
187
+ - "./spec/support/http_server_manager/test_support.rb"