guard-passenger 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2010 Fabio Kuhn
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,50 @@
1
+ = Guard::Passenger
2
+
3
+ Passenger guard allows to automatically & intelligently restart passenger when needed.
4
+ This is particularly useful if you use passenger in development.
5
+
6
+
7
+ == Install
8
+
9
+ Please be sure to have {guard}[http://github.com/guard/guard] installed before continue.
10
+
11
+ Install the gem:
12
+
13
+ gem install guard-passenger
14
+
15
+ Add it to your Gemfile (inside test group):
16
+
17
+ gem 'guard-passenger'
18
+
19
+ Add guard definition to your Guardfile by running this command:
20
+
21
+ guard init passenger
22
+
23
+ == Usage
24
+
25
+ Please read {guard usage doc}[http://github.com/guard/guard#readme]
26
+
27
+ == Guardfile
28
+
29
+ Bundler guard can be really be adapated to all kind of projects.
30
+ Please read {guard doc}[http://github.com/guard/guard#readme] for more info about Guardfile DSL.
31
+
32
+ Attention place bundler guard before other is recommended.
33
+
34
+ === Standard rails app
35
+
36
+ guard 'passenger' do
37
+ watch('lib/.*\.rb')
38
+ watch('config/.*\.rb')
39
+ end
40
+
41
+ == Development
42
+
43
+ - Source hosted at {GitHub}[http://github.com/guard/guard-passenger]
44
+ - Report issues/Questions/Feature requests on {GitHub Issues}[http://github.com/guard/guard-passenger/issues]
45
+
46
+ Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change you make.
47
+
48
+ == Authors
49
+
50
+ {Fabio Kuhn}[http://github.com/mordaroso]
@@ -0,0 +1,4 @@
1
+ guard 'passenger' do
2
+ watch('lib/.*\.rb')
3
+ watch('config/.*\.rb')
4
+ end
@@ -0,0 +1,5 @@
1
+ module Guard
2
+ module BundlerVersion
3
+ VERSION = '0.0.1'
4
+ end
5
+ end
@@ -0,0 +1,42 @@
1
+ require 'guard'
2
+ require 'guard/guard'
3
+
4
+ module Guard
5
+ class Passenger < Guard
6
+
7
+ # ================
8
+ # = Guard method =
9
+ # ================
10
+
11
+ # Call once when guard starts
12
+ def start
13
+ true
14
+ end
15
+
16
+ # Call with Ctrl-C signal (when Guard quit)
17
+ def stop
18
+ true
19
+ end
20
+
21
+ # Call with Ctrl-Z signal
22
+ def reload
23
+ restart_passenger
24
+ end
25
+
26
+ # Call with Ctrl-/ signal
27
+ def run_all
28
+ true
29
+ end
30
+
31
+ # Call on file(s) modifications
32
+ def run_on_change(paths)
33
+ restart_passenger
34
+ end
35
+
36
+ private
37
+ def restart_passenger
38
+ system 'touch tmp/restart.txt'
39
+ end
40
+
41
+ end
42
+ end
metadata ADDED
@@ -0,0 +1,105 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: guard-passenger
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Fabio Kuhn
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-10-25 00:00:00 +02:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: guard
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 21
30
+ segments:
31
+ - 0
32
+ - 2
33
+ - 1
34
+ version: 0.2.1
35
+ type: :runtime
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: rspec
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ hash: 13
46
+ segments:
47
+ - 2
48
+ - 0
49
+ - 1
50
+ version: 2.0.1
51
+ type: :development
52
+ version_requirements: *id002
53
+ description: Guard::Passenger automatically restarts passenger when needed
54
+ email:
55
+ - mordaroso@gmail.com
56
+ executables: []
57
+
58
+ extensions: []
59
+
60
+ extra_rdoc_files: []
61
+
62
+ files:
63
+ - lib/guard/passenger/templates/Guardfile
64
+ - lib/guard/passenger/version.rb
65
+ - lib/guard/passenger.rb
66
+ - LICENSE
67
+ - README.rdoc
68
+ has_rdoc: true
69
+ homepage: http://rubygems.org/gems/guard-passenger
70
+ licenses: []
71
+
72
+ post_install_message:
73
+ rdoc_options: []
74
+
75
+ require_paths:
76
+ - lib
77
+ required_ruby_version: !ruby/object:Gem::Requirement
78
+ none: false
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ hash: 3
83
+ segments:
84
+ - 0
85
+ version: "0"
86
+ required_rubygems_version: !ruby/object:Gem::Requirement
87
+ none: false
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ hash: 23
92
+ segments:
93
+ - 1
94
+ - 3
95
+ - 6
96
+ version: 1.3.6
97
+ requirements: []
98
+
99
+ rubyforge_project: guard-passenger
100
+ rubygems_version: 1.3.7
101
+ signing_key:
102
+ specification_version: 3
103
+ summary: Guard gem for Passenger
104
+ test_files: []
105
+