meepo 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +1 -0
  3. data/.gitignore +16 -0
  4. data/.rspec +2 -0
  5. data/.rubocop.yml +29 -0
  6. data/.travis.yml +10 -0
  7. data/Dockerfile +7 -0
  8. data/Gemfile +13 -0
  9. data/MIT-LICENSE +20 -0
  10. data/Rakefile +15 -0
  11. data/TODO +5 -0
  12. data/bin/invoker +7 -0
  13. data/contrib/completion/invoker-completion.bash +70 -0
  14. data/contrib/completion/invoker-completion.zsh +62 -0
  15. data/examples/hello_sinatra.rb +26 -0
  16. data/examples/sample.ini +3 -0
  17. data/invoker.gemspec +43 -0
  18. data/lib/invoker.rb +152 -0
  19. data/lib/invoker/cli.rb +159 -0
  20. data/lib/invoker/cli/pinger.rb +23 -0
  21. data/lib/invoker/cli/question.rb +15 -0
  22. data/lib/invoker/cli/tail.rb +34 -0
  23. data/lib/invoker/cli/tail_watcher.rb +34 -0
  24. data/lib/invoker/command_worker.rb +60 -0
  25. data/lib/invoker/commander.rb +95 -0
  26. data/lib/invoker/daemon.rb +126 -0
  27. data/lib/invoker/dns_cache.rb +23 -0
  28. data/lib/invoker/errors.rb +17 -0
  29. data/lib/invoker/event/manager.rb +79 -0
  30. data/lib/invoker/ipc.rb +45 -0
  31. data/lib/invoker/ipc/add_command.rb +12 -0
  32. data/lib/invoker/ipc/add_http_command.rb +10 -0
  33. data/lib/invoker/ipc/base_command.rb +24 -0
  34. data/lib/invoker/ipc/client_handler.rb +26 -0
  35. data/lib/invoker/ipc/dns_check_command.rb +17 -0
  36. data/lib/invoker/ipc/list_command.rb +11 -0
  37. data/lib/invoker/ipc/message.rb +170 -0
  38. data/lib/invoker/ipc/message/list_response.rb +35 -0
  39. data/lib/invoker/ipc/message/tail_response.rb +10 -0
  40. data/lib/invoker/ipc/ping_command.rb +10 -0
  41. data/lib/invoker/ipc/reload_command.rb +12 -0
  42. data/lib/invoker/ipc/remove_command.rb +12 -0
  43. data/lib/invoker/ipc/server.rb +26 -0
  44. data/lib/invoker/ipc/tail_command.rb +11 -0
  45. data/lib/invoker/ipc/unix_client.rb +60 -0
  46. data/lib/invoker/logger.rb +13 -0
  47. data/lib/invoker/parsers/config.rb +184 -0
  48. data/lib/invoker/parsers/procfile.rb +86 -0
  49. data/lib/invoker/power/balancer.rb +131 -0
  50. data/lib/invoker/power/config.rb +77 -0
  51. data/lib/invoker/power/dns.rb +38 -0
  52. data/lib/invoker/power/http_parser.rb +68 -0
  53. data/lib/invoker/power/http_response.rb +81 -0
  54. data/lib/invoker/power/pf_migrate.rb +64 -0
  55. data/lib/invoker/power/port_finder.rb +49 -0
  56. data/lib/invoker/power/power.rb +3 -0
  57. data/lib/invoker/power/powerup.rb +29 -0
  58. data/lib/invoker/power/setup.rb +90 -0
  59. data/lib/invoker/power/setup/distro/arch.rb +15 -0
  60. data/lib/invoker/power/setup/distro/base.rb +57 -0
  61. data/lib/invoker/power/setup/distro/debian.rb +11 -0
  62. data/lib/invoker/power/setup/distro/mint.rb +10 -0
  63. data/lib/invoker/power/setup/distro/opensuse.rb +11 -0
  64. data/lib/invoker/power/setup/distro/redhat.rb +11 -0
  65. data/lib/invoker/power/setup/distro/ubuntu.rb +10 -0
  66. data/lib/invoker/power/setup/files/invoker_forwarder.sh.erb +17 -0
  67. data/lib/invoker/power/setup/files/socat_invoker.service +12 -0
  68. data/lib/invoker/power/setup/linux_setup.rb +105 -0
  69. data/lib/invoker/power/setup/osx_setup.rb +137 -0
  70. data/lib/invoker/power/templates/400.html +40 -0
  71. data/lib/invoker/power/templates/404.html +40 -0
  72. data/lib/invoker/power/templates/503.html +40 -0
  73. data/lib/invoker/power/url_rewriter.rb +40 -0
  74. data/lib/invoker/process_manager.rb +198 -0
  75. data/lib/invoker/process_printer.rb +43 -0
  76. data/lib/invoker/reactor.rb +37 -0
  77. data/lib/invoker/reactor/reader.rb +54 -0
  78. data/lib/invoker/version.rb +47 -0
  79. data/readme.md +25 -0
  80. data/spec/invoker/cli/pinger_spec.rb +22 -0
  81. data/spec/invoker/cli/tail_watcher_spec.rb +39 -0
  82. data/spec/invoker/cli_spec.rb +27 -0
  83. data/spec/invoker/command_worker_spec.rb +45 -0
  84. data/spec/invoker/commander_spec.rb +152 -0
  85. data/spec/invoker/config_spec.rb +361 -0
  86. data/spec/invoker/daemon_spec.rb +34 -0
  87. data/spec/invoker/event/manager_spec.rb +67 -0
  88. data/spec/invoker/invoker_spec.rb +71 -0
  89. data/spec/invoker/ipc/client_handler_spec.rb +54 -0
  90. data/spec/invoker/ipc/dns_check_command_spec.rb +32 -0
  91. data/spec/invoker/ipc/message/list_response_spec.rb +24 -0
  92. data/spec/invoker/ipc/message_spec.rb +49 -0
  93. data/spec/invoker/ipc/unix_client_spec.rb +29 -0
  94. data/spec/invoker/power/balancer_spec.rb +22 -0
  95. data/spec/invoker/power/config_spec.rb +18 -0
  96. data/spec/invoker/power/http_parser_spec.rb +32 -0
  97. data/spec/invoker/power/http_response_spec.rb +34 -0
  98. data/spec/invoker/power/pf_migrate_spec.rb +87 -0
  99. data/spec/invoker/power/port_finder_spec.rb +16 -0
  100. data/spec/invoker/power/setup/linux_setup_spec.rb +103 -0
  101. data/spec/invoker/power/setup/osx_setup_spec.rb +105 -0
  102. data/spec/invoker/power/setup_spec.rb +4 -0
  103. data/spec/invoker/power/url_rewriter_spec.rb +70 -0
  104. data/spec/invoker/power/web_sockets_spec.rb +61 -0
  105. data/spec/invoker/process_manager_spec.rb +130 -0
  106. data/spec/invoker/reactor_spec.rb +6 -0
  107. data/spec/spec_helper.rb +43 -0
  108. metadata +389 -0
@@ -0,0 +1,6 @@
1
+ require "spec_helper"
2
+
3
+ describe Invoker::Reactor do
4
+ describe "writing to socket" do
5
+ end
6
+ end
@@ -0,0 +1,43 @@
1
+ require "pry"
2
+ require "simplecov"
3
+ require 'fakefs/spec_helpers'
4
+
5
+ SimpleCov.start do
6
+ add_filter "/spec/"
7
+ end
8
+
9
+
10
+ require "invoker"
11
+ require "invoker/power/power"
12
+ MM = Invoker::IPC::Message
13
+
14
+ RSpec.configure do |config|
15
+ config.run_all_when_everything_filtered = true
16
+ config.filter_run :focus
17
+ config.mock_framework = :mocha
18
+ config.include FakeFS::SpecHelpers, fakefs: true
19
+
20
+ # Run specs in random order to surface order dependencies. If you find an
21
+ # order dependency and want to debug it, you can fix the order by providing
22
+ # the seed, which is printed after each run.
23
+ # --seed 1234
24
+ config.order = 'random'
25
+ end
26
+
27
+ ENV["INVOKER_TESTS"] = "true"
28
+
29
+ def invoker_commander
30
+ Invoker.commander ||= mock
31
+ end
32
+
33
+ def invoker_dns_cache
34
+ Invoker.dns_cache ||= mock
35
+ end
36
+
37
+ def inv_conf_dir
38
+ File.join(ENV['HOME'], '.invoker')
39
+ end
40
+
41
+ def inv_conf_file
42
+ File.join(inv_conf_dir, 'config')
43
+ end
metadata ADDED
@@ -0,0 +1,389 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: meepo
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.5.2
5
+ platform: ruby
6
+ authors:
7
+ - Hemant Kumar
8
+ - Amitava Basak
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2016-12-14 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: thor
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '0.19'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '0.19'
28
+ - !ruby/object:Gem::Dependency
29
+ name: rainbow
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: '2.0'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '2.0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: iniparse
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '1.1'
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '1.1'
56
+ - !ruby/object:Gem::Dependency
57
+ name: formatador
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '0.2'
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '0.2'
70
+ - !ruby/object:Gem::Dependency
71
+ name: eventmachine
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - "~>"
75
+ - !ruby/object:Gem::Version
76
+ version: 1.0.4
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: 1.0.4
84
+ - !ruby/object:Gem::Dependency
85
+ name: em-proxy
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: '0.1'
91
+ type: :runtime
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: '0.1'
98
+ - !ruby/object:Gem::Dependency
99
+ name: rubydns
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - "~>"
103
+ - !ruby/object:Gem::Version
104
+ version: 0.8.5
105
+ type: :runtime
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - "~>"
110
+ - !ruby/object:Gem::Version
111
+ version: 0.8.5
112
+ - !ruby/object:Gem::Dependency
113
+ name: uuid
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - "~>"
117
+ - !ruby/object:Gem::Version
118
+ version: '2.3'
119
+ type: :runtime
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - "~>"
124
+ - !ruby/object:Gem::Version
125
+ 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
+ - !ruby/object:Gem::Dependency
141
+ name: http-parser-lite
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - "~>"
145
+ - !ruby/object:Gem::Version
146
+ version: '0.6'
147
+ type: :runtime
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - "~>"
152
+ - !ruby/object:Gem::Version
153
+ version: '0.6'
154
+ - !ruby/object:Gem::Dependency
155
+ name: dotenv
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - "~>"
159
+ - !ruby/object:Gem::Version
160
+ version: '2.0'
161
+ type: :runtime
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - "~>"
166
+ - !ruby/object:Gem::Version
167
+ version: '2.0'
168
+ - !ruby/object:Gem::Dependency
169
+ name: rspec
170
+ requirement: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - "~>"
173
+ - !ruby/object:Gem::Version
174
+ version: '3.0'
175
+ type: :development
176
+ prerelease: false
177
+ version_requirements: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - "~>"
180
+ - !ruby/object:Gem::Version
181
+ version: '3.0'
182
+ - !ruby/object:Gem::Dependency
183
+ name: mocha
184
+ requirement: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - ">="
187
+ - !ruby/object:Gem::Version
188
+ version: '0'
189
+ type: :development
190
+ prerelease: false
191
+ version_requirements: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - ">="
194
+ - !ruby/object:Gem::Version
195
+ version: '0'
196
+ - !ruby/object:Gem::Dependency
197
+ name: rake
198
+ requirement: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - ">="
201
+ - !ruby/object:Gem::Version
202
+ version: '0'
203
+ type: :development
204
+ prerelease: false
205
+ version_requirements: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - ">="
208
+ - !ruby/object:Gem::Version
209
+ version: '0'
210
+ - !ruby/object:Gem::Dependency
211
+ name: fakefs
212
+ requirement: !ruby/object:Gem::Requirement
213
+ requirements:
214
+ - - ">="
215
+ - !ruby/object:Gem::Version
216
+ version: '0'
217
+ type: :development
218
+ prerelease: false
219
+ version_requirements: !ruby/object:Gem::Requirement
220
+ requirements:
221
+ - - ">="
222
+ - !ruby/object:Gem::Version
223
+ version: '0'
224
+ description: Something small for process management
225
+ email: hemant@codemancers.com
226
+ executables:
227
+ - invoker
228
+ extensions: []
229
+ extra_rdoc_files: []
230
+ files:
231
+ - ".coveralls.yml"
232
+ - ".gitignore"
233
+ - ".rspec"
234
+ - ".rubocop.yml"
235
+ - ".travis.yml"
236
+ - Dockerfile
237
+ - Gemfile
238
+ - MIT-LICENSE
239
+ - Rakefile
240
+ - TODO
241
+ - bin/invoker
242
+ - contrib/completion/invoker-completion.bash
243
+ - contrib/completion/invoker-completion.zsh
244
+ - examples/hello_sinatra.rb
245
+ - examples/sample.ini
246
+ - invoker.gemspec
247
+ - lib/invoker.rb
248
+ - lib/invoker/cli.rb
249
+ - lib/invoker/cli/pinger.rb
250
+ - lib/invoker/cli/question.rb
251
+ - lib/invoker/cli/tail.rb
252
+ - lib/invoker/cli/tail_watcher.rb
253
+ - lib/invoker/command_worker.rb
254
+ - lib/invoker/commander.rb
255
+ - lib/invoker/daemon.rb
256
+ - lib/invoker/dns_cache.rb
257
+ - lib/invoker/errors.rb
258
+ - lib/invoker/event/manager.rb
259
+ - lib/invoker/ipc.rb
260
+ - lib/invoker/ipc/add_command.rb
261
+ - lib/invoker/ipc/add_http_command.rb
262
+ - lib/invoker/ipc/base_command.rb
263
+ - lib/invoker/ipc/client_handler.rb
264
+ - lib/invoker/ipc/dns_check_command.rb
265
+ - lib/invoker/ipc/list_command.rb
266
+ - lib/invoker/ipc/message.rb
267
+ - lib/invoker/ipc/message/list_response.rb
268
+ - lib/invoker/ipc/message/tail_response.rb
269
+ - lib/invoker/ipc/ping_command.rb
270
+ - lib/invoker/ipc/reload_command.rb
271
+ - lib/invoker/ipc/remove_command.rb
272
+ - lib/invoker/ipc/server.rb
273
+ - lib/invoker/ipc/tail_command.rb
274
+ - lib/invoker/ipc/unix_client.rb
275
+ - lib/invoker/logger.rb
276
+ - lib/invoker/parsers/config.rb
277
+ - lib/invoker/parsers/procfile.rb
278
+ - lib/invoker/power/balancer.rb
279
+ - lib/invoker/power/config.rb
280
+ - lib/invoker/power/dns.rb
281
+ - lib/invoker/power/http_parser.rb
282
+ - lib/invoker/power/http_response.rb
283
+ - lib/invoker/power/pf_migrate.rb
284
+ - lib/invoker/power/port_finder.rb
285
+ - lib/invoker/power/power.rb
286
+ - lib/invoker/power/powerup.rb
287
+ - lib/invoker/power/setup.rb
288
+ - lib/invoker/power/setup/distro/arch.rb
289
+ - lib/invoker/power/setup/distro/base.rb
290
+ - lib/invoker/power/setup/distro/debian.rb
291
+ - lib/invoker/power/setup/distro/mint.rb
292
+ - lib/invoker/power/setup/distro/opensuse.rb
293
+ - lib/invoker/power/setup/distro/redhat.rb
294
+ - lib/invoker/power/setup/distro/ubuntu.rb
295
+ - lib/invoker/power/setup/files/invoker_forwarder.sh.erb
296
+ - lib/invoker/power/setup/files/socat_invoker.service
297
+ - lib/invoker/power/setup/linux_setup.rb
298
+ - lib/invoker/power/setup/osx_setup.rb
299
+ - lib/invoker/power/templates/400.html
300
+ - lib/invoker/power/templates/404.html
301
+ - lib/invoker/power/templates/503.html
302
+ - lib/invoker/power/url_rewriter.rb
303
+ - lib/invoker/process_manager.rb
304
+ - lib/invoker/process_printer.rb
305
+ - lib/invoker/reactor.rb
306
+ - lib/invoker/reactor/reader.rb
307
+ - lib/invoker/version.rb
308
+ - readme.md
309
+ - spec/invoker/cli/pinger_spec.rb
310
+ - spec/invoker/cli/tail_watcher_spec.rb
311
+ - spec/invoker/cli_spec.rb
312
+ - spec/invoker/command_worker_spec.rb
313
+ - spec/invoker/commander_spec.rb
314
+ - spec/invoker/config_spec.rb
315
+ - spec/invoker/daemon_spec.rb
316
+ - spec/invoker/event/manager_spec.rb
317
+ - spec/invoker/invoker_spec.rb
318
+ - spec/invoker/ipc/client_handler_spec.rb
319
+ - spec/invoker/ipc/dns_check_command_spec.rb
320
+ - spec/invoker/ipc/message/list_response_spec.rb
321
+ - spec/invoker/ipc/message_spec.rb
322
+ - spec/invoker/ipc/unix_client_spec.rb
323
+ - spec/invoker/power/balancer_spec.rb
324
+ - spec/invoker/power/config_spec.rb
325
+ - spec/invoker/power/http_parser_spec.rb
326
+ - spec/invoker/power/http_response_spec.rb
327
+ - spec/invoker/power/pf_migrate_spec.rb
328
+ - spec/invoker/power/port_finder_spec.rb
329
+ - spec/invoker/power/setup/linux_setup_spec.rb
330
+ - spec/invoker/power/setup/osx_setup_spec.rb
331
+ - spec/invoker/power/setup_spec.rb
332
+ - spec/invoker/power/url_rewriter_spec.rb
333
+ - spec/invoker/power/web_sockets_spec.rb
334
+ - spec/invoker/process_manager_spec.rb
335
+ - spec/invoker/reactor_spec.rb
336
+ - spec/spec_helper.rb
337
+ homepage: http://invoker.codemancers.com
338
+ licenses:
339
+ - MIT
340
+ metadata: {}
341
+ post_install_message:
342
+ rdoc_options: []
343
+ require_paths:
344
+ - lib
345
+ required_ruby_version: !ruby/object:Gem::Requirement
346
+ requirements:
347
+ - - ">="
348
+ - !ruby/object:Gem::Version
349
+ version: '0'
350
+ required_rubygems_version: !ruby/object:Gem::Requirement
351
+ requirements:
352
+ - - ">="
353
+ - !ruby/object:Gem::Version
354
+ version: '0'
355
+ requirements: []
356
+ rubyforge_project:
357
+ rubygems_version: 2.5.1
358
+ signing_key:
359
+ specification_version: 4
360
+ summary: Something small for Process management
361
+ test_files:
362
+ - spec/invoker/cli/pinger_spec.rb
363
+ - spec/invoker/cli/tail_watcher_spec.rb
364
+ - spec/invoker/cli_spec.rb
365
+ - spec/invoker/command_worker_spec.rb
366
+ - spec/invoker/commander_spec.rb
367
+ - spec/invoker/config_spec.rb
368
+ - spec/invoker/daemon_spec.rb
369
+ - spec/invoker/event/manager_spec.rb
370
+ - spec/invoker/invoker_spec.rb
371
+ - spec/invoker/ipc/client_handler_spec.rb
372
+ - spec/invoker/ipc/dns_check_command_spec.rb
373
+ - spec/invoker/ipc/message/list_response_spec.rb
374
+ - spec/invoker/ipc/message_spec.rb
375
+ - spec/invoker/ipc/unix_client_spec.rb
376
+ - spec/invoker/power/balancer_spec.rb
377
+ - spec/invoker/power/config_spec.rb
378
+ - spec/invoker/power/http_parser_spec.rb
379
+ - spec/invoker/power/http_response_spec.rb
380
+ - spec/invoker/power/pf_migrate_spec.rb
381
+ - spec/invoker/power/port_finder_spec.rb
382
+ - spec/invoker/power/setup/linux_setup_spec.rb
383
+ - spec/invoker/power/setup/osx_setup_spec.rb
384
+ - spec/invoker/power/setup_spec.rb
385
+ - spec/invoker/power/url_rewriter_spec.rb
386
+ - spec/invoker/power/web_sockets_spec.rb
387
+ - spec/invoker/process_manager_spec.rb
388
+ - spec/invoker/reactor_spec.rb
389
+ - spec/spec_helper.rb