process_exists 0.1.3 → 0.2.0

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
- SHA1:
3
- metadata.gz: 1a7336bbe25d1c17a899c67b8738c3a452c263f1
4
- data.tar.gz: d293996fdd66f93be16226453781a7c5a0fab749
2
+ SHA256:
3
+ metadata.gz: c4e60daa3598dc2b341d6ff22ee09bf85649da68c6e60b6c44ab419aadaaa482
4
+ data.tar.gz: 613c166c96a5b58ac7bb72b0fd1012ba2f59cfaac32c2cf3fa1b4c42414b0588
5
5
  SHA512:
6
- metadata.gz: 6e3ad96bea3284e72ef5b70a635b0f3bdeaf18cd69fd64e1c039dfb7ec5f724128124b52adf16d7818ebd4139536b82dd328a7b4b09c54aa5a796214f0b0fa53
7
- data.tar.gz: f1259d9ca0b1978dd67a2f5bb4068a039b88bff47f339a013a6b78ee2e8b8233988f00b1781afef961a3f6e7b0557467cd92077c4367d9e074f40b3d1dc1aa66
6
+ metadata.gz: c4edc8c1d24659fd85696a1c69b0b0a206e7702a62adf78c31006211a89462d865ce413161f66b605c106a2d1ce21fe75e4e813ce75f41158b1131138bcd6b85
7
+ data.tar.gz: 24ab02e2a4c8451de63ffdf38478fbebbc89a8de57ad9290860da6a342d726539cc1842064a64f5df44cce64edb89586a9785e8e5ff40ae208ad9a8fe9d6d6e0
@@ -1,19 +1,20 @@
1
1
  language: ruby
2
2
 
3
+ env:
4
+ global:
5
+ - CC_TEST_REPORTER_ID=60547bb26da976413277b29ddb8eadef1f563dff8ba2cf905618c8e6195c7f3e
6
+
3
7
  rvm:
4
- - jruby
5
- - 1.9.3
6
- - 2.1.2
8
+ - 2.5.0
7
9
 
8
- script: 'bundle exec rake'
10
+ before_install: gem install bundler -v 1.16.1
9
11
 
10
- notifications:
11
- email:
12
- recipients:
13
- - wilson.dsigns@gmail.com
14
- on_failure: change
15
- on_success: never
12
+ before_script:
13
+ - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
14
+ - chmod +x ./cc-test-reporter
15
+ - ./cc-test-reporter before-build
16
+ scripts:
17
+ - bundle exec rspec spec
16
18
 
17
- addons:
18
- code_climate:
19
- repo_token: 60547bb26da976413277b29ddb8eadef1f563dff8ba2cf905618c8e6195c7f3e
19
+ after_script:
20
+ - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
data/Gemfile CHANGED
@@ -1,9 +1,3 @@
1
- source 'http://rubygems.org/'
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
-
5
- gem "codeclimate-test-reporter", group: :test, require: nil
6
-
7
- group :development do
8
- gem 'kramdown'
9
- end
data/README.md CHANGED
@@ -1,9 +1,10 @@
1
1
  # process_exists
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/process_exists.svg)](http://badge.fury.io/rb/process_exists)
4
- [![Code Climate](https://codeclimate.com/github/wilsonsilva/process_exists/badges/gpa.svg)](https://codeclimate.com/github/wilsonsilva/process_exists)
5
4
  [![Build Status](https://travis-ci.org/wilsonsilva/process_exists.svg?branch=master)](https://travis-ci.org/wilsonsilva/process_exists)
6
- [![Dependency Status](https://gemnasium.com/wilsonsilva/process_exists.svg)](https://gemnasium.com/wilsonsilva/process_exists)
5
+ [![Code Climate](https://codeclimate.com/github/wilsonsilva/process_exists/badges/gpa.svg)](https://codeclimate.com/github/wilsonsilva/process_exists)
6
+ [![Test Coverage](https://codeclimate.com/github/wilsonsilva/process_exists/badges/coverage.svg)](https://codeclimate.com/github/wilsonsilva/process_exists)
7
+ [![Depfu](https://badges.depfu.com/badges/ffec1fc2a9f213d8538dfc0d3958c788/overview.svg)](https://depfu.com/github/wilsonsilva/process_exists)
7
8
  [![Inline docs](http://inch-ci.org/github/wilsonsilva/process_exists.png?branch=master)](http://inch-ci.org/github/wilsonsilva/process_exists)
8
9
 
9
10
  ## Description
@@ -12,10 +13,12 @@ Sends a null signal to a process or a group of processes specified by pid to che
12
13
 
13
14
  ## Usage
14
15
 
15
- require 'process_exists'
16
+ ```ruby
17
+ require 'process_exists'
16
18
 
17
- pid = 12
18
- pid_exists = Process.exists?(pid)
19
+ pid = 12
20
+ pid_exists = Process.exists?(pid)
21
+ ```
19
22
 
20
23
  ## Requirements
21
24
 
@@ -23,4 +26,7 @@ A Unix-like operating system.
23
26
 
24
27
  ## Install
25
28
 
26
- $ gem install process_exists
29
+ ```bash
30
+ $ gem install process_exists
31
+ ```
32
+
data/Rakefile CHANGED
@@ -1,34 +1,10 @@
1
- # encoding: utf-8
2
-
3
- require 'rubygems'
4
-
5
- begin
6
- require 'bundler'
7
- rescue LoadError => e
8
- warn e.message
9
- warn "Run `gem install bundler` to install Bundler."
10
- exit -1
11
- end
12
-
13
- begin
14
- Bundler.setup(:development)
15
- rescue Bundler::BundlerError => e
16
- warn e.message
17
- warn "Run `bundle install` to install missing gems."
18
- exit e.status_code
19
- end
20
-
21
- require 'rake'
22
-
23
- require 'rubygems/tasks'
24
- Gem::Tasks.new
25
-
1
+ require 'bundler/gem_tasks'
26
2
  require 'rspec/core/rake_task'
27
- RSpec::Core::RakeTask.new
3
+ require 'yard'
28
4
 
29
- task :test => :spec
30
- task :default => :spec
5
+ RSpec::Core::RakeTask.new(:spec)
6
+ YARD::Rake::YardocTask.new
31
7
 
32
- require 'yard'
33
- YARD::Rake::YardocTask.new
34
- task :doc => :yard
8
+ task default: :spec
9
+ task doc: :yard
10
+ task test: :spec
@@ -1,5 +1,5 @@
1
1
  # Contains the gem version
2
2
  module ProcessExists
3
3
  # process_exists version
4
- VERSION = "0.1.3"
4
+ VERSION = '0.2.0'
5
5
  end
@@ -1,25 +1,27 @@
1
- # -*- encoding: utf-8 -*-
1
+ lib = File.expand_path('lib', __dir__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
2
3
 
3
- require File.expand_path('../lib/process_exists/version', __FILE__)
4
+ require 'process_exists/version'
4
5
 
5
6
  Gem::Specification.new do |gem|
6
- gem.name = "process_exists"
7
+ gem.name = 'process_exists'
7
8
  gem.version = ProcessExists::VERSION
8
- gem.summary = "Checks if a PID exists."
9
- gem.description = "Sends a null signal to a process or a group of processes specified by pid to check if it exists."
10
- gem.license = "MIT"
11
- gem.authors = ["wilsonsilva"]
12
- gem.email = "me@wilsonsilva.net"
13
- gem.homepage = "https://github.com/wilsonsilva/process_exists"
9
+ gem.summary = 'Checks if a PID exists.'
10
+ gem.description = 'Sends a null signal to a process or a group of processes specified by pid to check if it exists.'
11
+ gem.license = 'MIT'
12
+ gem.authors = ['wilsonsilva']
13
+ gem.email = 'me@wilsonsilva.net'
14
+ gem.homepage = 'https://github.com/wilsonsilva/process_exists'
14
15
 
15
16
  gem.files = `git ls-files`.split($/)
16
17
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
18
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
19
  gem.require_paths = ['lib']
19
20
 
20
- gem.add_development_dependency 'bundler', '~> 1.0'
21
- gem.add_development_dependency 'rake', '~> 10.3'
22
- gem.add_development_dependency 'rspec', '~> 3.0'
23
- gem.add_development_dependency 'rubygems-tasks', '~> 0.2'
24
- gem.add_development_dependency 'yard', '~> 0.8'
21
+ gem.add_development_dependency 'bundler', '~> 1.16'
22
+ gem.add_development_dependency 'rake', '~> 12.3'
23
+ gem.add_development_dependency 'rspec', '~> 3.7'
24
+ gem.add_development_dependency 'simplecov', '~> 0.16'
25
+ gem.add_development_dependency 'simplecov-console', '~> 0.4'
26
+ gem.add_development_dependency 'yard', '~> 0.9'
25
27
  end
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
  require 'process_exists'
3
3
 
4
4
  describe ProcessExists do
5
- it "has a VERSION constant" do
5
+ it 'has a VERSION constant' do
6
6
  expect(subject.const_get('VERSION')).not_to be_empty
7
7
  end
8
8
  end
@@ -2,20 +2,20 @@ require 'spec_helper'
2
2
  require 'process_exists'
3
3
 
4
4
  describe Process do
5
- it "responds to :exists?" do
5
+ it 'responds to :exists?' do
6
6
  expect(subject).to respond_to(:exists?)
7
7
  end
8
8
 
9
9
  describe '.exists?' do
10
- it "returns false when a pid does not exist" do
10
+ it 'returns false when a pid does not exist' do
11
11
  expect(subject.exists?(-2)).to be false
12
12
  end
13
13
 
14
- it "returns true when a pid exists" do
14
+ it 'returns true when a pid exists' do
15
15
  expect(subject.exists?(Process.pid)).to be true
16
16
  end
17
17
 
18
- it "returns true when a pid exists and belongs to another user" do
18
+ it 'returns true when a pid exists and belongs to another user' do
19
19
  # Process ID 1 is usually the init process primarily responsible for starting and shutting down the system.
20
20
  expect(subject.exists?(1)).to be true
21
21
  end unless running_specs_as_root?
@@ -1,10 +1,11 @@
1
- require "codeclimate-test-reporter"
2
- CodeClimate::TestReporter.start
1
+ require 'simplecov'
2
+ require 'simplecov-console'
3
3
 
4
- require 'rspec'
5
- require 'process_exists/version'
4
+ SimpleCov.formatter = SimpleCov::Formatter::Console
5
+ SimpleCov.start
6
6
 
7
- include ProcessExists
7
+ require 'rspec'
8
+ require 'process_exists'
8
9
 
9
10
  def running_specs_as_root?
10
11
  # The superuser normally has a UID of zero (0)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: process_exists
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - wilsonsilva
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-13 00:00:00.000000000 Z
11
+ date: 2018-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,70 +16,84 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.0'
19
+ version: '1.16'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.0'
26
+ version: '1.16'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.3'
33
+ version: '12.3'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '10.3'
40
+ version: '12.3'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.0'
47
+ version: '3.7'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '3.0'
54
+ version: '3.7'
55
55
  - !ruby/object:Gem::Dependency
56
- name: rubygems-tasks
56
+ name: simplecov
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.2'
61
+ version: '0.16'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.2'
68
+ version: '0.16'
69
+ - !ruby/object:Gem::Dependency
70
+ name: simplecov-console
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '0.4'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '0.4'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: yard
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
87
  - - "~>"
74
88
  - !ruby/object:Gem::Version
75
- version: '0.8'
89
+ version: '0.9'
76
90
  type: :development
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
94
  - - "~>"
81
95
  - !ruby/object:Gem::Version
82
- version: '0.8'
96
+ version: '0.9'
83
97
  description: Sends a null signal to a process or a group of processes specified by
84
98
  pid to check if it exists.
85
99
  email: me@wilsonsilva.net
@@ -123,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
137
  version: '0'
124
138
  requirements: []
125
139
  rubyforge_project:
126
- rubygems_version: 2.2.2
140
+ rubygems_version: 2.7.6
127
141
  signing_key:
128
142
  specification_version: 4
129
143
  summary: Checks if a PID exists.