process_controller 0.0.1 → 0.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d7675279ad00cea114fbb342f65f39949b86c474
4
- data.tar.gz: 89d622bc7dfe864917a94b034c6b910220484452
3
+ metadata.gz: 176e23fb0bc75352642ae32a6d0178bc9b39cd45
4
+ data.tar.gz: 83c40631d570d1eccecf4161a439972801230774
5
5
  SHA512:
6
- metadata.gz: 380067bb93500337ed7fe84383d854364fa9d092b965525e5e9bc0cd736949d0be6b80d18d8312cdfbf447e99d6d5601bcf8b16366032cb6e0b78f4704f91049
7
- data.tar.gz: 37b3a7510b9009b696dfed81390e8703163fe87f1b9472f68a6e9e1863bd9714aa9b47d9120faec75a11f8f172f450036f44d150c50fcc76e9e731d5b3509c0f
6
+ metadata.gz: c16b4a240d1cd9f2abe42b999409aa1798b370805115f6d12b164f0af91219e9fcd55cc9de4d06939a5d0a6429cb75b3a5e22de381bd7cb87bac24a9b8721031
7
+ data.tar.gz: 44af8726c0dbaa4b37687dcfa4f0e5dc4c9585346f59122a5fd8f59f9f491e3ff27ae22374e0adedc9b87f8b54a467d90014118b859f3f8de489f7d7886e6591
data/control.gemspec CHANGED
@@ -7,11 +7,13 @@ Gem::Specification.new do |s|
7
7
  s.version = Control::VERSION
8
8
  s.authors = ['ohad partuck']
9
9
  s.email = ['ohadpartuck@gmail.com']
10
- s.homepage = 'http://open-source.com'
10
+ s.homepage = 'https://github.com/ohadpartuck/control'
11
11
  s.licenses = ['MIT']
12
12
  s.summary = %q{stop/start/restart}
13
13
  s.description = %q{Generic stop/start/restart for processes}
14
14
 
15
+ s.required_ruby_version = '> 1.9'
16
+
15
17
  s.files = `git ls-files`.split("\n")
16
18
  # s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
19
  # s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
@@ -1,3 +1,3 @@
1
1
  module Control
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
@@ -6,7 +6,8 @@ class Control_P
6
6
  OPTIONS_ATTRIBUTES = {action: 'action', pid: 'pid_filename', find_pid_by: 'find_pid_by',
7
7
  app_name: 'app_name', port_num: 'port_num', app_filename: 'app_filename',
8
8
  http_server: 'http_server', kill_command: 'kill_command',
9
- restart_command: 'restart_command', start_command: 'start_command'}.with_indifferent_access
9
+ restart_command: 'restart_command', environment: 'environment',
10
+ start_command: 'start_command'}.with_indifferent_access
10
11
 
11
12
  FIND_BY_OPTIONS = {app_filename: 'app_filename', port_num: 'port_num', app_name: 'app_name', pid_file: 'pid_file'}.with_indifferent_access
12
13
  HOSTNAME = Socket.gethostname
@@ -16,6 +17,13 @@ class Control_P
16
17
  options = options.with_indifferent_access
17
18
  #TODO options validations
18
19
  action = options.fetch(OPTIONS_ATTRIBUTES[:action], nil)
20
+ environment = options.fetch(OPTIONS_ATTRIBUTES[:environment], nil)
21
+
22
+ if action.nil? || environment.nil?
23
+ p "didn't pass enough arguments"
24
+ p 'Usage: {start|stop|restart|status} {env}, exiting'
25
+ exit(1)
26
+ end
19
27
 
20
28
  case action
21
29
  when 'start'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: process_controller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ohad partuck
@@ -39,7 +39,7 @@ files:
39
39
  - lib/control/version.rb
40
40
  - lib/control_helper.rb
41
41
  - lib/process_controller.rb
42
- homepage: http://open-source.com
42
+ homepage: https://github.com/ohadpartuck/control
43
43
  licenses:
44
44
  - MIT
45
45
  metadata: {}
@@ -49,9 +49,9 @@ require_paths:
49
49
  - lib
50
50
  required_ruby_version: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - ">"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '1.9'
55
55
  required_rubygems_version: !ruby/object:Gem::Requirement
56
56
  requirements:
57
57
  - - ">="