kill_shotgun 0.1.0 → 0.3.1

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
  SHA256:
3
- metadata.gz: 1222131a4d5cedb30e2a9cdbfd1559929de9ee1a2b2ddc88d8c4157ead1f84d8
4
- data.tar.gz: 807f5cbc355ef3ba62ef30b82146568de5dcac8bc45750fc57110fd0b90f3e00
3
+ metadata.gz: 0122f9133055e4323752b8d8ec1a8838a1fdc42ed8cdbaf85d24aec5eb79a3da
4
+ data.tar.gz: b7ad108fdbe68f954a621a7668f40957cbbe602ed48c868a0639994c96313eda
5
5
  SHA512:
6
- metadata.gz: ca483501d0653feeadc3ed74b73499809544ae79947254f0f9874d1617884e974db9ef77d595cab1a90ea411d8071c4f534a5cce63d418115f2147343c3db8e9
7
- data.tar.gz: d76de05c3e3df032840e05ac9ab9421f9d0a7dc0a75505bb26952e9c687752e313db77064735f11d8ab72132e363b52072449fd7ae369c3a5f1c75972b1f937e
6
+ metadata.gz: f6200965aa54b3f2a93a8781618c5ee6101f44f03a6acf24ca86b6ce7e4109553ce11f2bd17a768bc04a4414393643c0f2d71455acd6e5deb8241ecd8a57bf78
7
+ data.tar.gz: fd6ec84e3af6dba0d27c32d0c0478c52ea74f40d825703d9083c4782f2a3cf266fa9d105d36ae8025267362c924de9e3b03cda04c3e572c055a87ccdd2270e02
@@ -0,0 +1,19 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ kill_shotgun (0.3.1)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ rake (12.3.3)
10
+
11
+ PLATFORMS
12
+ ruby
13
+
14
+ DEPENDENCIES
15
+ kill_shotgun!
16
+ rake (~> 12.0)
17
+
18
+ BUNDLED WITH
19
+ 2.1.4
@@ -1,8 +1,13 @@
1
- #!/usr/bin/env bash
1
+ #!/usr/bin/env ruby
2
+
3
+ bash = <<-BASH
2
4
  pid=$(lsof -i :9393 -sTCP:LISTEN |awk 'NR > 1 {print $2}')
3
5
  if [ $pid ]
4
6
  then
7
+ echo "killing process: $pid"
5
8
  kill $pid
6
9
  else
7
10
  echo "No Shotgun Server Active on port 9393"
8
11
  fi
12
+ BASH
13
+ system(bash)
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env ruby
2
+ puts "Killed processes will print below. If you didn't see any output that means you didn't have any shotgun servers active."
3
+ bash = <<-BASH
4
+ pids=$(ps ax | grep shotgun|awk 'NR > 0 {print $1}');
5
+ arr=();
6
+
7
+ for i in "${pids[@]}" ; do
8
+ if ps -p $i
9
+ then
10
+ arr+=($i)
11
+ fi
12
+ done;
13
+
14
+ for i in "${arr[@]}" ; do
15
+ if ps -p $i
16
+ then
17
+ echo "killing process: $i"
18
+ kill $i
19
+ fi
20
+ done
21
+ BASH
22
+ system(bash)
@@ -22,6 +22,6 @@ Gem::Specification.new do |spec|
22
22
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
23
23
  end
24
24
 
25
- spec.executables = ["kill_shotgun"]
25
+ spec.executables = ["kill_shotgun", "kill_shotgun_wsl"]
26
26
  spec.require_paths = ["lib"]
27
27
  end
@@ -1,3 +1,3 @@
1
1
  module KillShotgun
2
- VERSION = "0.1.0"
2
+ VERSION = "0.3.1"
3
3
  end
@@ -0,0 +1,3 @@
1
+ module KillShotgun
2
+ VERSION = "0.3.0"
3
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kill_shotgun
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - DakotaLMartinez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-21 00:00:00.000000000 Z
11
+ date: 2020-08-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: install the gem, run kill_shotgun from your terminal and you're good
14
14
  to go.
@@ -16,21 +16,25 @@ email:
16
16
  - dakotaleemusic@gmail.com
17
17
  executables:
18
18
  - kill_shotgun
19
+ - kill_shotgun_wsl
19
20
  extensions: []
20
21
  extra_rdoc_files: []
21
22
  files:
22
23
  - ".gitignore"
23
24
  - CODE_OF_CONDUCT.md
24
25
  - Gemfile
26
+ - Gemfile.lock
25
27
  - LICENSE.txt
26
28
  - README.md
27
29
  - Rakefile
28
30
  - bin/console
29
31
  - bin/kill_shotgun
32
+ - bin/kill_shotgun_wsl
30
33
  - bin/setup
31
34
  - kill_shotgun.gemspec
32
35
  - lib/kill_shotgun.rb
33
36
  - lib/kill_shotgun/version.rb
37
+ - lib/kill_shotgun/version.rb.bak
34
38
  homepage: https://github.com/DakotaLMartinez/kill_shotgun
35
39
  licenses:
36
40
  - MIT