after 0.8.2 → 0.8.3

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.
Files changed (5) hide show
  1. data/ChangeLog +3 -0
  2. data/VERSION +1 -1
  3. data/bin/after +2 -1
  4. data/lib/after.rb +4 -3
  5. metadata +90 -95
data/ChangeLog CHANGED
@@ -1,3 +1,6 @@
1
+ 0.8.3
2
+ fix -p functionality
3
+
1
4
  0.8.2
2
5
  make after -p 1234,4556 possible, cleanup help
3
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.2
1
+ 0.8.3
data/bin/after CHANGED
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/ruby
2
2
 
3
3
  if ARGV.include?('-h') || ARGV.include?('--help') || ARGV.length == 0
4
- puts 'syntax: after [-q] [-l | --list] [-l or --list] [-p pid1 | pid1,pid2,pid3] "command string to match" command to run with args'
4
+ puts 'after: the command to run things after an external process terminates'
5
+ puts 'syntax: after [-q] [-l | --list] ([-p (pid1 | pid1,pid2,pid3)] | "command string to match") command to run after it and its args'
5
6
  puts ' -q : quiet mode (don\'t show output for when process ends)'
6
7
  puts ' --list : only list matches, don\'t actually wait for them'
7
8
  puts " \"command string to match\" like ruby.exe or irb : match all processes by name and arguments"
@@ -58,6 +58,7 @@ class After
58
58
  end
59
59
 
60
60
  $DISPLAY_ALL = false
61
+ # TODO real command line parsing, yikes for this stuff!
61
62
  if ARGV[0].in? ['-l', '--list']
62
63
  ARGV.shift
63
64
  $DISPLAY_ALL = true
@@ -70,14 +71,14 @@ class After
70
71
  elsif ARGV[0] == '-p'
71
72
  ARGV.shift
72
73
  pids = ARGV.shift
73
- pids = pids.split(',')
74
+ pids = pids.split(',')
74
75
  puts "waiting for pids #{pids.join(',')}" if $VERBOSE and pids.length > 1
75
- for pid in pids.split(',')
76
+ for pid in pids
76
77
  puts "waiting for pid #{pid}" if $VERBOSE
77
78
  begin
78
79
  After.wait_pid pid.to_i
79
80
  rescue Errno::EPERM
80
- p 'pid does not exist maybe it already had exited ' + pid if $VERBOSE
81
+ p 'pid does not exist maybe it already has exited ' + pid if $VERBOSE
81
82
  end
82
83
  end
83
84
  else
metadata CHANGED
@@ -1,102 +1,106 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: after
3
- version: !ruby/object:Gem::Version
4
- hash: 59
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.8.3
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 8
9
- - 2
10
- version: 0.8.2
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - rogerdpack
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-10-05 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2014-04-02 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: sane
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- hash: 3
29
- segments:
30
- - 0
31
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
32
22
  type: :runtime
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
35
- name: jeweler
36
23
  prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: jeweler
32
+ requirement: !ruby/object:Gem::Requirement
38
33
  none: false
39
- requirements:
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- hash: 3
43
- segments:
44
- - 0
45
- version: "0"
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
46
38
  type: :development
47
- version_requirements: *id002
48
- - !ruby/object:Gem::Dependency
49
- name: rspec
50
39
  prerelease: false
51
- requirement: &id003 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rspec
48
+ requirement: !ruby/object:Gem::Requirement
52
49
  none: false
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- hash: 3
57
- segments:
58
- - 0
59
- version: "0"
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
60
54
  type: :development
61
- version_requirements: *id003
62
- - !ruby/object:Gem::Dependency
63
- name: rdp-ruby-wmi
64
55
  prerelease: false
65
- requirement: &id004 !ruby/object:Gem::Requirement
56
+ version_requirements: !ruby/object:Gem::Requirement
66
57
  none: false
67
- requirements:
68
- - - ">="
69
- - !ruby/object:Gem::Version
70
- hash: 3
71
- segments:
72
- - 0
73
- version: "0"
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: rdp-ruby-wmi
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
74
70
  type: :runtime
75
- version_requirements: *id004
76
- - !ruby/object:Gem::Dependency
77
- name: wait_pid
78
71
  prerelease: false
79
- requirement: &id005 !ruby/object:Gem::Requirement
72
+ version_requirements: !ruby/object:Gem::Requirement
80
73
  none: false
81
- requirements:
82
- - - ">="
83
- - !ruby/object:Gem::Version
84
- hash: 3
85
- segments:
86
- - 0
87
- version: "0"
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ name: wait_pid
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
88
86
  type: :runtime
89
- version_requirements: *id005
90
- description: Command to allow you to wait for a command in "some other terminal window" to finish before this one is run
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ description: Command to allow you to wait for a command in "some other terminal window"
95
+ to finish before this one is run
91
96
  email: rogerdpack@gmail.com
92
- executables:
97
+ executables:
93
98
  - after
94
99
  extensions: []
95
-
96
- extra_rdoc_files:
100
+ extra_rdoc_files:
97
101
  - ChangeLog
98
102
  - README
99
- files:
103
+ files:
100
104
  - .document
101
105
  - ChangeLog
102
106
  - README
@@ -110,36 +114,27 @@ files:
110
114
  - spec/spec.after.rb
111
115
  homepage:
112
116
  licenses: []
113
-
114
117
  post_install_message:
115
118
  rdoc_options: []
116
-
117
- require_paths:
119
+ require_paths:
118
120
  - lib
119
- required_ruby_version: !ruby/object:Gem::Requirement
121
+ required_ruby_version: !ruby/object:Gem::Requirement
120
122
  none: false
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- hash: 3
125
- segments:
126
- - 0
127
- version: "0"
128
- required_rubygems_version: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - ! '>='
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
127
+ required_rubygems_version: !ruby/object:Gem::Requirement
129
128
  none: false
130
- requirements:
131
- - - ">="
132
- - !ruby/object:Gem::Version
133
- hash: 3
134
- segments:
135
- - 0
136
- version: "0"
129
+ requirements:
130
+ - - ! '>='
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
137
133
  requirements: []
138
-
139
134
  rubyforge_project:
140
- rubygems_version: 1.7.2
135
+ rubygems_version: 1.8.24
141
136
  signing_key:
142
137
  specification_version: 3
143
- summary: Command to allow you to wait for a command in "some other terminal window" to finish before this one is run
138
+ summary: Command to allow you to wait for a command in "some other terminal window"
139
+ to finish before this one is run
144
140
  test_files: []
145
-