daemons-rails 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -9,12 +9,16 @@ rails generate daemon <name>
9
9
 
10
10
  Then insert your code in the lib/daemons/<name>.rb stub. All pids and logs will live in the normal log/ folder. This helps to make things Capistrano friendly.
11
11
 
12
+ == CHANGES ==
13
+
14
+ 0.0.3 - added rake for running script without daemonization (rake daemon:<name>)
15
+
12
16
  == CONTROL ==
13
17
 
14
18
  Individual control script:
15
19
  > ./lib/daemons/<name>_ctl [start|stop|restart|status]
16
- > rake daemon:<name> [start|stop|restart|status]
20
+ > rake daemon:<name>[:(start|stop|status)]
17
21
 
18
22
  App-wide control script:
19
23
  > ./script/daemons [start|stop|restart]
20
- > rake daemons [start|stop|restart|status]
24
+ > rake daemons:(start|stop|status)
@@ -1,5 +1,5 @@
1
1
  module Daemons
2
2
  module Rails
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -15,9 +15,16 @@ end
15
15
  namespace :daemon do
16
16
  Dir['lib/daemons/*_ctl'].each do |controller|
17
17
  app_name = controller.sub(/.*\/(\w+)_ctl/, '\1')
18
+ desc "Start #{app_name} script"
19
+ task app_name do
20
+ FileUtils.cd 'lib/daemons' do
21
+ load "#{app_name}.rb"
22
+ end
23
+ end
24
+
18
25
  namespace app_name do
19
26
  %w[start stop status].each do |arg|
20
- desc "#{arg.capitalize} #{app_name} daemons."
27
+ desc "#{arg.capitalize} #{app_name} daemon."
21
28
  task :"#{arg}" do
22
29
  puts `#{controller} #{arg}`
23
30
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daemons-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-11-01 00:00:00.000000000Z
12
+ date: 2011-11-16 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &14576940 !ruby/object:Gem::Requirement
16
+ requirement: &7575200 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *14576940
24
+ version_requirements: *7575200
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: daemons
27
- requirement: &14576300 !ruby/object:Gem::Requirement
27
+ requirement: &7574340 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *14576300
35
+ version_requirements: *7574340
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: multi_json
38
- requirement: &14575580 !ruby/object:Gem::Requirement
38
+ requirement: &7572640 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '1.0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *14575580
46
+ version_requirements: *7572640
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
- requirement: &14575120 !ruby/object:Gem::Requirement
49
+ requirement: &7572060 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *14575120
57
+ version_requirements: *7572060
58
58
  description: daemons gem support for Rails 3
59
59
  email: []
60
60
  executables: []
@@ -90,12 +90,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
90
90
  - - ! '>='
91
91
  - !ruby/object:Gem::Version
92
92
  version: '0'
93
+ segments:
94
+ - 0
95
+ hash: 1511355952573857073
93
96
  required_rubygems_version: !ruby/object:Gem::Requirement
94
97
  none: false
95
98
  requirements:
96
99
  - - ! '>='
97
100
  - !ruby/object:Gem::Version
98
101
  version: '0'
102
+ segments:
103
+ - 0
104
+ hash: 1511355952573857073
99
105
  requirements: []
100
106
  rubyforge_project:
101
107
  rubygems_version: 1.8.10