launch-agent 0.8.0 → 0.8.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.
@@ -16,17 +16,20 @@ A library to use launchd easily
16
16
 
17
17
  == CLI
18
18
 
19
- $ launchagent -h
19
+ % launchagent -h
20
20
  Usage:
21
- launchagent [--env=<env>] (--daemon | --interval <sec>) [--wdir=<dir>] [--] (<argument>...)
21
+ launchagent [--env=<env>] (--daemon | --interval <sec>) [--wdir=<dir>] [--stdout=<path>] [--stderr=<path>] (<argument>...)
22
22
  launchagent -h | --help
23
23
 
24
24
  Options:
25
25
  -h --help Show this screen.
26
+ -v --version Show version information.
26
27
  -e --env=<env> Additional environmental variables to be set before running the job. Can specify multiple value with comma. e.g. FOO=bar,BAR=baz
27
28
  -w --wdir=<dir> Specify a directory to chdir(2) to before running the job
28
- -d --daemon Load as daemon. If it is set, --interval option is ignored.
29
+ -d --daemon Load as daemon. If it is set, --interval option is ignored
29
30
  -i --interval=<sec> Causes the job to be started every N seconds
31
+ -o --stdout=<path> Specify what file should be used for data being sent to stdout when using stdio(3)
32
+ -r --stderr=<path> Specify what file should be used for data being sent to stderr when using stdio(3)
30
33
 
31
34
  == Note on Patches/Pull Requests
32
35
 
@@ -68,7 +68,7 @@ module LaunchAgent
68
68
  end
69
69
 
70
70
  def loaded?
71
- `launchctl list | grep #{job_id}` =~ /#{job_id}/
71
+ system("launchctl list -x #{job_id}")
72
72
  end
73
73
 
74
74
  def []=(key, value)
@@ -1,3 +1,3 @@
1
1
  module LaunchAgent
2
- VERSION = '0.8.0'
2
+ VERSION = '0.8.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: launch-agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-28 00:00:00.000000000 Z
12
+ date: 2013-02-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: plist
@@ -116,7 +116,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
116
116
  version: '0'
117
117
  segments:
118
118
  - 0
119
- hash: -1931962325568098184
119
+ hash: 1884754288559776459
120
120
  required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  none: false
122
122
  requirements:
@@ -125,10 +125,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  version: '0'
126
126
  segments:
127
127
  - 0
128
- hash: -1931962325568098184
128
+ hash: 1884754288559776459
129
129
  requirements: []
130
130
  rubyforge_project:
131
- rubygems_version: 1.8.24
131
+ rubygems_version: 1.8.25
132
132
  signing_key:
133
133
  specification_version: 3
134
134
  summary: A library to use launchd easily