invoker 1.5.6 → 1.5.7

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.
@@ -3,16 +3,22 @@ require 'spec_helper'
3
3
  describe Invoker::Power::UrlRewriter do
4
4
  let(:rewriter) { Invoker::Power::UrlRewriter.new }
5
5
 
6
- context "matching domain part of incoming request" do
7
- before(:all) do
8
- @original_invoker_config = Invoker.config
6
+ before(:all) do
7
+ @original_invoker_config = Invoker.config
8
+ end
9
9
 
10
- Invoker.config = mock
11
- Invoker.config.stubs(:tld).returns("test")
12
- end
10
+ def mock_invoker_tld_as(domain)
11
+ Invoker.config = mock
12
+ Invoker.config.stubs(:tld).returns(domain)
13
+ end
14
+
15
+ after(:all) do
16
+ Invoker.config = @original_invoker_config
17
+ end
13
18
 
14
- after(:all) do
15
- Invoker.config = @original_invoker_config
19
+ context "matching domain part of incoming request" do
20
+ before(:each) do
21
+ mock_invoker_tld_as("test")
16
22
  end
17
23
 
18
24
  it "should match foo.test" do
@@ -47,11 +53,8 @@ describe Invoker::Power::UrlRewriter do
47
53
  end
48
54
 
49
55
  context 'user sets up a custom top level domain' do
50
- before(:all) do
51
- @original_invoker_config = Invoker.config
52
-
53
- Invoker.config = mock
54
- Invoker.config.stubs(:tld).returns("local")
56
+ before(:each) do
57
+ mock_invoker_tld_as("local")
55
58
  end
56
59
 
57
60
  it 'should match domain part of incoming request correctly' do
@@ -61,10 +64,6 @@ describe Invoker::Power::UrlRewriter do
61
64
  matching_string = match[0]
62
65
  expect(matching_string).to eq("foo")
63
66
  end
64
-
65
- after(:all) do
66
- Invoker.config = @original_invoker_config
67
- end
68
67
  end
69
68
  end
70
69
  end
@@ -1,12 +1,12 @@
1
- require "pry"
2
1
  require "simplecov"
2
+ require 'coveralls'
3
3
  require 'fakefs/spec_helpers'
4
4
 
5
+ SimpleCov.formatter = Coveralls::SimpleCov::Formatter
5
6
  SimpleCov.start do
6
7
  add_filter "/spec/"
7
8
  end
8
9
 
9
-
10
10
  require "invoker"
11
11
  require "invoker/power/power"
12
12
  MM = Invoker::IPC::Message
@@ -14,7 +14,7 @@ MM = Invoker::IPC::Message
14
14
  RSpec.configure do |config|
15
15
  config.run_all_when_everything_filtered = true
16
16
  config.filter_run :focus
17
- config.mock_framework = :mocha
17
+ config.mock_with :mocha
18
18
  config.include FakeFS::SpecHelpers, fakefs: true
19
19
 
20
20
  # Run specs in random order to surface order dependencies. If you find an
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: invoker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.6
4
+ version: 1.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hemant Kumar
@@ -9,22 +9,28 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-01-20 00:00:00.000000000 Z
12
+ date: 2020-04-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: '0.19'
21
+ - - "<"
22
+ - !ruby/object:Gem::Version
23
+ version: '2'
21
24
  type: :runtime
22
25
  prerelease: false
23
26
  version_requirements: !ruby/object:Gem::Requirement
24
27
  requirements:
25
- - - "~>"
28
+ - - ">="
26
29
  - !ruby/object:Gem::Version
27
30
  version: '0.19'
31
+ - - "<"
32
+ - !ruby/object:Gem::Version
33
+ version: '2'
28
34
  - !ruby/object:Gem::Dependency
29
35
  name: colorize
30
36
  requirement: !ruby/object:Gem::Requirement
@@ -123,20 +129,6 @@ dependencies:
123
129
  - - "~>"
124
130
  - !ruby/object:Gem::Version
125
131
  version: '2.3'
126
- - !ruby/object:Gem::Dependency
127
- name: facter
128
- requirement: !ruby/object:Gem::Requirement
129
- requirements:
130
- - - "~>"
131
- - !ruby/object:Gem::Version
132
- version: '2.2'
133
- type: :runtime
134
- prerelease: false
135
- version_requirements: !ruby/object:Gem::Requirement
136
- requirements:
137
- - - "~>"
138
- - !ruby/object:Gem::Version
139
- version: '2.2'
140
132
  - !ruby/object:Gem::Dependency
141
133
  name: http-parser-lite
142
134
  requirement: !ruby/object:Gem::Requirement
@@ -158,6 +150,12 @@ dependencies:
158
150
  - - "~>"
159
151
  - !ruby/object:Gem::Version
160
152
  version: '2.0'
153
+ - - "!="
154
+ - !ruby/object:Gem::Version
155
+ version: 2.3.0
156
+ - - "!="
157
+ - !ruby/object:Gem::Version
158
+ version: 2.4.0
161
159
  type: :runtime
162
160
  prerelease: false
163
161
  version_requirements: !ruby/object:Gem::Requirement
@@ -165,6 +163,12 @@ dependencies:
165
163
  - - "~>"
166
164
  - !ruby/object:Gem::Version
167
165
  version: '2.0'
166
+ - - "!="
167
+ - !ruby/object:Gem::Version
168
+ version: 2.3.0
169
+ - - "!="
170
+ - !ruby/object:Gem::Version
171
+ version: 2.4.0
168
172
  - !ruby/object:Gem::Dependency
169
173
  name: rspec
170
174
  requirement: !ruby/object:Gem::Requirement
@@ -228,24 +232,7 @@ executables:
228
232
  extensions: []
229
233
  extra_rdoc_files: []
230
234
  files:
231
- - ".coveralls.yml"
232
- - ".gitignore"
233
- - ".rspec"
234
- - ".rubocop.yml"
235
- - ".travis.yml"
236
- - CHANGELOG.md
237
- - Dockerfile
238
- - Gemfile
239
- - MIT-LICENSE
240
- - Rakefile
241
- - TODO
242
235
  - bin/invoker
243
- - contrib/completion/invoker-completion.bash
244
- - contrib/completion/invoker-completion.zsh
245
- - examples/crash.rb
246
- - examples/hello_sinatra.rb
247
- - examples/sample.ini
248
- - invoker.gemspec
249
236
  - lib/invoker.rb
250
237
  - lib/invoker/cli.rb
251
238
  - lib/invoker/cli/pinger.rb
@@ -282,7 +269,6 @@ files:
282
269
  - lib/invoker/power/dns.rb
283
270
  - lib/invoker/power/http_parser.rb
284
271
  - lib/invoker/power/http_response.rb
285
- - lib/invoker/power/pf_migrate.rb
286
272
  - lib/invoker/power/port_finder.rb
287
273
  - lib/invoker/power/power.rb
288
274
  - lib/invoker/power/powerup.rb
@@ -290,7 +276,6 @@ files:
290
276
  - lib/invoker/power/setup/distro/arch.rb
291
277
  - lib/invoker/power/setup/distro/base.rb
292
278
  - lib/invoker/power/setup/distro/debian.rb
293
- - lib/invoker/power/setup/distro/mint.rb
294
279
  - lib/invoker/power/setup/distro/opensuse.rb
295
280
  - lib/invoker/power/setup/distro/redhat.rb
296
281
  - lib/invoker/power/setup/distro/ubuntu.rb
@@ -307,7 +292,6 @@ files:
307
292
  - lib/invoker/reactor.rb
308
293
  - lib/invoker/reactor/reader.rb
309
294
  - lib/invoker/version.rb
310
- - readme.md
311
295
  - spec/invoker/cli/pinger_spec.rb
312
296
  - spec/invoker/cli/tail_watcher_spec.rb
313
297
  - spec/invoker/cli_spec.rb
@@ -326,7 +310,6 @@ files:
326
310
  - spec/invoker/power/config_spec.rb
327
311
  - spec/invoker/power/http_parser_spec.rb
328
312
  - spec/invoker/power/http_response_spec.rb
329
- - spec/invoker/power/pf_migrate_spec.rb
330
313
  - spec/invoker/power/port_finder_spec.rb
331
314
  - spec/invoker/power/setup/linux_setup_spec.rb
332
315
  - spec/invoker/power/setup/osx_setup_spec.rb
@@ -336,10 +319,14 @@ files:
336
319
  - spec/invoker/process_manager_spec.rb
337
320
  - spec/invoker/reactor_spec.rb
338
321
  - spec/spec_helper.rb
339
- homepage: http://invoker.codemancers.com
322
+ homepage: https://invoker.codemancers.com
340
323
  licenses:
341
324
  - MIT
342
- metadata: {}
325
+ metadata:
326
+ bug_tracker_uri: https://github.com/code-mancers/invoker/issues
327
+ changelog_uri: https://github.com/code-mancers/invoker/blob/master/CHANGELOG.md
328
+ documentation_uri: https://invoker.codemancers.com/
329
+ source_code_uri: https://github.com/code-mancers/invoker/tree/v1.5.7
343
330
  post_install_message:
344
331
  rdoc_options: []
345
332
  require_paths:
@@ -355,37 +342,35 @@ required_rubygems_version: !ruby/object:Gem::Requirement
355
342
  - !ruby/object:Gem::Version
356
343
  version: '0'
357
344
  requirements: []
358
- rubyforge_project:
359
- rubygems_version: 2.6.13
345
+ rubygems_version: 3.1.2
360
346
  signing_key:
361
347
  specification_version: 4
362
348
  summary: Something small for Process management
363
349
  test_files:
364
- - spec/invoker/cli/pinger_spec.rb
365
- - spec/invoker/cli/tail_watcher_spec.rb
350
+ - spec/spec_helper.rb
351
+ - spec/invoker/power/port_finder_spec.rb
352
+ - spec/invoker/power/config_spec.rb
353
+ - spec/invoker/power/setup_spec.rb
354
+ - spec/invoker/power/setup/osx_setup_spec.rb
355
+ - spec/invoker/power/setup/linux_setup_spec.rb
356
+ - spec/invoker/power/http_parser_spec.rb
357
+ - spec/invoker/power/url_rewriter_spec.rb
358
+ - spec/invoker/power/balancer_spec.rb
359
+ - spec/invoker/power/web_sockets_spec.rb
360
+ - spec/invoker/power/http_response_spec.rb
361
+ - spec/invoker/config_spec.rb
362
+ - spec/invoker/invoker_spec.rb
366
363
  - spec/invoker/cli_spec.rb
367
364
  - spec/invoker/command_worker_spec.rb
368
- - spec/invoker/commander_spec.rb
369
- - spec/invoker/config_spec.rb
365
+ - spec/invoker/reactor_spec.rb
366
+ - spec/invoker/cli/pinger_spec.rb
367
+ - spec/invoker/cli/tail_watcher_spec.rb
370
368
  - spec/invoker/daemon_spec.rb
371
- - spec/invoker/event/manager_spec.rb
372
- - spec/invoker/invoker_spec.rb
373
- - spec/invoker/ipc/client_handler_spec.rb
374
- - spec/invoker/ipc/dns_check_command_spec.rb
369
+ - spec/invoker/ipc/unix_client_spec.rb
375
370
  - spec/invoker/ipc/message/list_response_spec.rb
376
371
  - spec/invoker/ipc/message_spec.rb
377
- - spec/invoker/ipc/unix_client_spec.rb
378
- - spec/invoker/power/balancer_spec.rb
379
- - spec/invoker/power/config_spec.rb
380
- - spec/invoker/power/http_parser_spec.rb
381
- - spec/invoker/power/http_response_spec.rb
382
- - spec/invoker/power/pf_migrate_spec.rb
383
- - spec/invoker/power/port_finder_spec.rb
384
- - spec/invoker/power/setup/linux_setup_spec.rb
385
- - spec/invoker/power/setup/osx_setup_spec.rb
386
- - spec/invoker/power/setup_spec.rb
387
- - spec/invoker/power/url_rewriter_spec.rb
388
- - spec/invoker/power/web_sockets_spec.rb
372
+ - spec/invoker/ipc/dns_check_command_spec.rb
373
+ - spec/invoker/ipc/client_handler_spec.rb
374
+ - spec/invoker/event/manager_spec.rb
389
375
  - spec/invoker/process_manager_spec.rb
390
- - spec/invoker/reactor_spec.rb
391
- - spec/spec_helper.rb
376
+ - spec/invoker/commander_spec.rb
@@ -1 +0,0 @@
1
- service_name: travis-ci
data/.gitignore DELETED
@@ -1,16 +0,0 @@
1
- invoker.ini
2
- config/
3
- *.gem
4
- pkg/
5
- tags
6
- .rvmrc
7
- vendor/
8
- _site
9
- .bundle
10
- coverage
11
- invoker_profile/
12
- *.pid
13
- .ruby-version
14
- Gemfile.lock
15
- .overcommit.yml
16
- Procfile
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --color
2
- --format progress
@@ -1,29 +0,0 @@
1
- AllCops:
2
- Excludes:
3
- - db/**
4
-
5
- HashSyntax:
6
- Description: 'Use either hash rocket or 1.9 styled hashes.'
7
- Enabled: false
8
-
9
- LineLength:
10
- Max: 100
11
-
12
- # Disable Certain Tests
13
-
14
- Documentation:
15
- Description: 'Document classes and non-namespace modules.'
16
- Enabled: false
17
-
18
- StringLiterals:
19
- Description: 'Checks if uses of quotes match the configured preference.'
20
- Enabled: false
21
-
22
- Encoding:
23
- Description: 'Use UTF-8 as the source file encoding.'
24
- Enabled: false
25
-
26
- SignalException:
27
- Description: 'Do not enforce use of fail when raising exceptions.'
28
- # Valid values are: semantic, only_raise and only_fail
29
- EnforcedStyle: only_raise
@@ -1,12 +0,0 @@
1
- language: ruby
2
- cache: bundler
3
- sudo: false
4
- rvm:
5
- - 2.0.0
6
- - 2.1.0
7
- - 2.2.0
8
- - 2.3.0
9
-
10
- before_install:
11
- - gem update bundler --no-document
12
- script: bundle exec rake spec
@@ -1,26 +0,0 @@
1
- ## Changelog since 1.5.4
2
-
3
-
4
-
5
- # v1.5.5
6
- * Fix high cpu usage when process managed by Invoker crashes and Invoker doesn't read from its socket.(https://github.com/code-mancers/invoker/pull/198)
7
- * Allow users to specify custom ssl certificate and key (https://github.com/code-mancers/invoker/pull/199)
8
- * Remove rainbow dependency and migrate to colorize
9
-
10
- # v1.5.4
11
- * Add support for running Invoker build in SELinux environments (https://github.com/code-mancers/invoker/pull/188)
12
- * Add an option to print process listing in raw format. This enables us to see complete process list (https://github.com/code-mancers/invoker/pull/193)
13
- * Fix colors in console output (https://github.com/code-mancers/invoker/pull/192)
14
- * Add a new option to optionally disable colors in log when starting invoker (#196)
15
- * Handle TERM and INT signals when stopping invoker. (#196)
16
-
17
- ## v1.5.3
18
-
19
- * Always capture STDOUT/STDERR of process to invoker's log file, if invoker is daemonized. (https://github.com/code-mancers/invoker/pull/186)
20
- * Add a command for filtering all logs for a process. (https://github.com/code-mancers/invoker/pull/186)
21
- * Prefer Procfile.dev to Procfile (https://github.com/code-mancers/invoker/pull/183)
22
- * Downgrade Rainbow version to prevent compilation errors in certain environments (https://github.com/code-mancers/invoker/pull/180)
23
- * Non existant PWD environment variable may cause errors while starting a process (https://github.com/code-mancers/invoker/pull/179)
24
- * Implement support for specifying process ordering. This allows user to be explicit about
25
- order in which Invoker should start processes from ini file (https://github.com/code-mancers/invoker/pull/174)
26
- * Return correct version of Invoker in HTTP header (https://github.com/code-mancers/invoker/pull/173)
data/Dockerfile DELETED
@@ -1,7 +0,0 @@
1
- FROM ruby:2.3
2
-
3
- MAINTAINER hemant@codemancers.com
4
-
5
- RUN apt-get update && apt-get -y install dnsmasq socat
6
-
7
- CMD cd /invoker && bundle install --path vendor/ && bundle exec rake spec
data/Gemfile DELETED
@@ -1,13 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem 'websocket-eventmachine-server', require: false
6
- gem 'websocket-eventmachine-client', require: false
7
-
8
- group :development do
9
- gem 'pry'
10
- gem 'tins', '~>1.4.0'
11
- gem 'coveralls', require: false
12
- gem "simplecov", require: false
13
- end
@@ -1,20 +0,0 @@
1
- Copyright (c) 2013-2014 Hemant Kumar
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile DELETED
@@ -1,16 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new
5
-
6
- task :default => :spec
7
- task :test => :spec
8
-
9
- current_directory = File.expand_path(File.dirname(__FILE__))
10
-
11
- desc "run specs inside docker"
12
- task :docker_spec do
13
- system("docker build -t invoker-ruby . ")
14
- puts "********** Building image is done **********"
15
- system("docker run --name invoker-rspec --rm -v #{current_directory}:/invoker:z -t invoker-ruby")
16
- end