shutup 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1b6a73edd8939b6be7ce1e8b517d5e8dd73b6004
4
- data.tar.gz: 9b69d8c033e8b348a32ab594eae0e69b2b6cf134
3
+ metadata.gz: 99fc73b3f503f67d0326d3f3b739b3d91d91d695
4
+ data.tar.gz: 04d20b920e2ec21cba61f605698ea7d958e42901
5
5
  SHA512:
6
- metadata.gz: b5e08ab6b707a356bf9b5df3adcf19d51854bcd9b7cb76b2112e81a445d129d4fa90f4260fdd883a74bb10a861718f5264b12256ff0d217382ec3abec6814143
7
- data.tar.gz: c68f7b6553e5f2b145e57f72c181b000b983474d4b6decac725109f83ad8832672945cf13a25b6cfb4ead705ea01b33085b6606252f9802c06b1e08f990af168
6
+ metadata.gz: 8a304610ef54d97a8a06cb4ceb48f8aed14666f454e507e2fd8ed78237dec5514de72f44ebb372bc25c312294c48ff597f9359d13c63b6697a00dee8b6a64bf2
7
+ data.tar.gz: 0544eb53e90da816136b239e08ad8015602fa7a1b2a927d9c01e176dc9c508e65c9bad80a48db89705144371ccbb4164b568da122e6972e859810311206d494c
data/exe/shutup CHANGED
@@ -3,6 +3,4 @@ lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'shutup'
5
5
 
6
- puts "Killing the process."
7
-
8
6
  Shutup.process(name: :server)
@@ -5,8 +5,11 @@ module Shutup
5
5
  ALLOWED_SERVICES = %i(server)
6
6
 
7
7
  def self.process(name:)
8
- done = ALLOWED_SERVICES.include?(name) && send(name)
9
- done || puts("#{name.to_s} not supported.")
8
+ if ALLOWED_SERVICES.include?(name)
9
+ send(name)
10
+ else
11
+ puts "#{name.to_s}.pid not yet supported"
12
+ end
10
13
  end
11
14
 
12
15
  def self.server
@@ -13,8 +13,8 @@ module Shutup
13
13
  begin
14
14
  File.read(pid_file)
15
15
  rescue => e
16
- e.message << ' Are you sure that the process is running?'
17
- raise(e)
16
+ puts "Error reading the pid file."
17
+ system "cat #{pid_file}"
18
18
  end
19
19
  end
20
20
 
@@ -1,3 +1,3 @@
1
1
  module Shutup
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shutup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lorenzo Sinisi