guard-delayed 0.0.9 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.1.0 (2011-07-28)
2
+
3
+ * Fixed options for current delayed_job version (from dbloete)
4
+ * Environment settings needed to be passed in via RAILS_ENV=
5
+
1
6
  ## 0.0.9 (2011-06-22)
2
7
 
3
8
  * Fixed argument passing to the start script
data/README.markdown CHANGED
@@ -47,7 +47,9 @@ you make.
47
47
 
48
48
  gem build guard-delayed.gemspec
49
49
 
50
- *
50
+ * Push to rubygems.org:
51
+
52
+ gem push gem push guard-delayed-0.0.9.gem
51
53
 
52
54
 
53
55
  ## Authors
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module DelayedVersion
3
- VERSION = "0.0.9"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
data/lib/guard/delayed.rb CHANGED
@@ -21,25 +21,24 @@ module Guard
21
21
  end
22
22
 
23
23
  def start
24
- system('script/delayed_job', 'stop')
24
+ system(cmd, 'stop')
25
25
  UI.info "Starting up delayed_job..."
26
26
  args = "start"
27
- args << "--environment=#{@options[:environment]} " if @options[:environment]
28
- args << "--min-priority #{@options[:min_priority]} " if @options[:min_priority]
29
- args << "--max-priority #{@options[:max_priority]} " if @options[:max_priority]
30
- args << "--number_of_workers=#{@options[:number_of_workers]} " if @options[:number_of_workers]
31
- args << "--pid-dir=#{@options[:pid_dir]} " if @options[:pid_dir]
32
- args << "--identifier=#{@options[:identifier]} " if @options[:identifier]
33
- args << "--monitor " if @options[:monitor]
34
- args << "--sleep-delay #{@options[:sleep_delay]} " if @options[:sleep_delay]
35
- args << "--prefix #{@options[:prefix]} " if @options[:prefix]
36
- system('script/delayed_job', args)
27
+ args << " --min-priority #{@options[:min_priority]}" if @options[:min_priority]
28
+ args << " --max-priority #{@options[:max_priority]}" if @options[:max_priority]
29
+ args << " --number_of_workers=#{@options[:number_of_workers]}" if @options[:number_of_workers]
30
+ args << " --pid-dir=#{@options[:pid_dir]}" if @options[:pid_dir]
31
+ args << " --identifier=#{@options[:identifier]}" if @options[:identifier]
32
+ args << " --monitor" if @options[:monitor]
33
+ args << " --sleep-delay #{@options[:sleep_delay]}" if @options[:sleep_delay]
34
+ args << " --prefix #{@options[:prefix]} " if @options[:prefix]
35
+ system(cmd, args)
37
36
  end
38
37
 
39
38
  # Called on Ctrl-C signal (when Guard quits)
40
39
  def stop
41
40
  UI.info "Stopping delayed_job..."
42
- system('script/delayed_job', 'stop')
41
+ system(cmd, 'stop')
43
42
  end
44
43
 
45
44
  # Called on Ctrl-Z signal
@@ -63,7 +62,13 @@ module Guard
63
62
  private
64
63
 
65
64
  def restart
66
- system('script/delayed_job', 'restart')
65
+ system(cmd, 'restart')
66
+ end
67
+
68
+ def cmd
69
+ command = "script/delayed_job"
70
+ command = "RAILS_ENV=#{@options[:environment]} #{command}" if @options[:environment]
71
+ command
67
72
  end
68
73
  end
69
74
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-delayed
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
+ - 1
8
9
  - 0
9
- - 9
10
- version: 0.0.9
10
+ version: 0.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - David Parry
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-22 00:00:00 Z
18
+ date: 2011-07-28 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: guard