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 +4 -4
- data/Gemfile.lock +19 -0
- data/bin/kill_shotgun +6 -1
- data/bin/kill_shotgun_wsl +22 -0
- data/kill_shotgun.gemspec +1 -1
- data/lib/kill_shotgun/version.rb +1 -1
- data/lib/kill_shotgun/version.rb.bak +3 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0122f9133055e4323752b8d8ec1a8838a1fdc42ed8cdbaf85d24aec5eb79a3da
|
4
|
+
data.tar.gz: b7ad108fdbe68f954a621a7668f40957cbbe602ed48c868a0639994c96313eda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6200965aa54b3f2a93a8781618c5ee6101f44f03a6acf24ca86b6ce7e4109553ce11f2bd17a768bc04a4414393643c0f2d71455acd6e5deb8241ecd8a57bf78
|
7
|
+
data.tar.gz: fd6ec84e3af6dba0d27c32d0c0478c52ea74f40d825703d9083c4782f2a3cf266fa9d105d36ae8025267362c924de9e3b03cda04c3e572c055a87ccdd2270e02
|
data/Gemfile.lock
ADDED
data/bin/kill_shotgun
CHANGED
@@ -1,8 +1,13 @@
|
|
1
|
-
#!/usr/bin/env
|
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)
|
data/kill_shotgun.gemspec
CHANGED
@@ -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
|
data/lib/kill_shotgun/version.rb
CHANGED
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
|
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-
|
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
|