shutup 0.0.3 → 0.0.4

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: b635fa7d1fd25e0dbfe01ab64b6cb7b789cd345b
4
- data.tar.gz: a8e2465f0a883fe5e3c4e2b8810677c2a1c60485
3
+ metadata.gz: df2dd56ae607b54b47645b956b6d771a547fdc4d
4
+ data.tar.gz: 297aa20c76d4ff904062ffda8111bee4a62d1f6e
5
5
  SHA512:
6
- metadata.gz: 538f4ed6efa8b8c7f9e13b61cf798d9428263e00191a5ede695d1ae9e3c849353000dce8fb1f0a8f8e93022b8f9b1ac6c5e333f66692b409e36f062a859912a6
7
- data.tar.gz: 9f7d45f123916b73ac26fabf1570a4f60e8a25c0ee2eb3f26b12590dceae8dccedc75045c25766e31ab4b2e157657fa3da9dcf7f805457f0ae3e94ef246e5991
6
+ metadata.gz: 8a7f2ef81d50cc93a91403c8b7cfd59161e39eb1db3190c1e17fc198635f41f74df2fe6e190cdef1121b4657d8f3661a06f81459061350915c5c0dde75d0339b
7
+ data.tar.gz: f629ddf11a6d5f4545c36c6b5112ecdeac07015ffc4c9e0549da1ed0d287b6da347399dd202bbfe094d6db4c257c355808bc9aa735639aca8a574ad33cb4a3b0
data/README.md CHANGED
@@ -1,38 +1,55 @@
1
1
  # Shutup
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/shutup`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ If you find yourself in this situation (A server is already running) often:
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
6
-
7
- ## Installation
5
+ ```
6
+ => Run `rails server -h` for more startup options
7
+ => Ctrl-C to shutdown server
8
+ A server is already running. Check /tmp/pids/server.pid.
9
+ Exiting
10
+ ```
8
11
 
9
- Add this line to your application's Gemfile:
12
+ What you do includes, for instance, killing the process by its process id:
10
13
 
11
- ```ruby
12
- gem 'shutup'
14
+ ```
15
+ cat /tmp/pids/server.pid
16
+ kill -9 PID
13
17
  ```
14
18
 
15
- And then execute:
19
+ But this is boring. And you have to do it all the times. This gems creates a shortcut to fix the 'A server is already running' problem when dealing with Rails.
16
20
 
17
- $ bundle
21
+ ## Installation
18
22
 
19
- Or install it yourself as:
23
+ Go in the root folder of your Rails project:
20
24
 
21
25
  $ gem install shutup
22
26
 
27
+
23
28
  ## Usage
24
29
 
25
- TODO: Write usage instructions here
30
+ After installing the gem run:
26
31
 
27
- ## Development
32
+ $ shutup
33
+
34
+ NOTE: try to start the Rails app, open a new terminal window and then type:
28
35
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
36
+ $ shutup
37
+
38
+ To see how this gem kills the current process.
39
+
40
+ ## Development
30
41
 
31
42
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
43
 
33
44
  ## Contributing
34
45
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/shutup.
46
+ Bug reports and pull requests are welcome on GitHub at https://github.com/lorenzosinisi/shutup.
47
+
48
+ ## Todo
49
+
50
+ 1. Write tests
51
+ 2. Kill other type of apps (Node, PHP, Scala)
52
+ 3. Improve the error messages and error handling
36
53
 
37
54
 
38
55
  ## License
data/lib/shutup.rb CHANGED
@@ -22,8 +22,6 @@ module Shutup
22
22
  if pid
23
23
  system "kill -9 #{pid}"
24
24
  puts "Killed process id: #{pid}"
25
- else
26
- "File #{pid_file} does not exist, unable to find Rails process"
27
25
  end
28
26
  end
29
27
  end
@@ -1,3 +1,3 @@
1
1
  module Shutup
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
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.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lorenzo Sinisi