guard-ego 0.0.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.
@@ -0,0 +1 @@
1
+ == 0.0.1 (Nov 09, 2010) Alpha
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.
@@ -0,0 +1,67 @@
1
+ = Guard::Passenger
2
+
3
+ Guard::Passenger is the useful development server solution. The guard automatically starts passenger and intelligently restarts the server when needed.
4
+
5
+ == Install
6
+
7
+ Please be sure to have {guard}[http://github.com/guard/guard] installed before continue.
8
+
9
+ Install the gem:
10
+
11
+ gem install guard-passenger
12
+
13
+ Add it to your Gemfile (inside test group):
14
+
15
+ gem 'guard-passenger'
16
+
17
+ Add guard definition to your Guardfile by running this command:
18
+
19
+ guard init passenger
20
+
21
+ == Usage
22
+
23
+ Please read {guard usage doc}[http://github.com/guard/guard#readme]
24
+
25
+ == Guardfile
26
+
27
+ Passenger guard can be really be adapted to all kind of rack project with passenger.
28
+ Please read {guard doc}[http://github.com/guard/guard#readme] for more info about Guardfile DSL.
29
+
30
+ === Standard rails app
31
+
32
+ guard 'passenger' do
33
+ watch('lib/.*\.rb')
34
+ watch('config/.*\.rb')
35
+ end
36
+
37
+ === Passenger standalone
38
+
39
+ Passenger standalone is used as default. You can pass options to the guard to disable or configure it. Guard::Passenger will start passenger on startup and take it down on exit.
40
+ By default passenger standalone is activated and port is set to 3000.
41
+
42
+ === Touching
43
+
44
+ If touching is enabled Guard::Passenger will open the given path. By default it requests http://localhost:3000/ and checks if the http status is alright.
45
+
46
+ === Guard options
47
+
48
+ Guard::Passenger accepts some options for configuration.
49
+
50
+ # :standalone boolean run passenger standalone (default: true)
51
+ # :port integer using the given port (default: 3000)
52
+ # :env string framework environment (default: development)
53
+ # :touch string path to check if restart was successful (default: /) (false = off)
54
+
55
+ guard 'passenger', :standalone => false, :port => 3001, :env => 'production', :touch => '/users/all' do
56
+ end
57
+
58
+ == Development
59
+
60
+ - Source hosted at {GitHub}[http://github.com/guard/guard-passenger]
61
+ - Report issues/Questions/Feature requests on {GitHub Issues}[http://github.com/guard/guard-passenger/issues]
62
+
63
+ Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change you make.
64
+
65
+ == Authors
66
+
67
+ {Fabio Kuhn}[http://github.com/mordaroso]
@@ -0,0 +1,48 @@
1
+ require 'guard'
2
+ require 'guard/guard'
3
+ require 'rubygems'
4
+
5
+ module Guard
6
+ class Ego < Guard
7
+
8
+ # ================
9
+ # = Guard method =
10
+ # ================
11
+
12
+ # Call once when guard starts
13
+ def start
14
+ true
15
+ end
16
+
17
+ # Call with Ctrl-C signal (when Guard quit)
18
+ def stop
19
+ true
20
+ end
21
+
22
+ # Call with Ctrl-Z signal
23
+ def reload
24
+ true
25
+ end
26
+
27
+ # Call with Ctrl-/ signal
28
+ def run_all
29
+ true
30
+ end
31
+
32
+ # Call on file(s) modifications
33
+ def run_on_change(paths)
34
+ restart_guard
35
+ end
36
+
37
+ private
38
+ def restart_guard
39
+ UI.info "Guard is now restarting..."
40
+ if Gem::Version.create(::Guard::VERSION) > Gem::Version.create('0.2.2')
41
+ ::Guard.guards.each { |g| ::Guard.supervised_task g, :stop }
42
+ else
43
+ ::Guard.guards.all? { |g| g.stop }
44
+ end
45
+ ::Guard.start
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,3 @@
1
+ guard 'ego' do
2
+ watch('Guardfile')
3
+ end
@@ -0,0 +1,5 @@
1
+ module Guard
2
+ module EgoVersion
3
+ VERSION = '0.0.1'
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,106 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: guard-ego
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-11-09 00:00:00 +01: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::Ego automatically restarts guard when needed
54
+ email:
55
+ - mordaroso@gmail.com
56
+ executables: []
57
+
58
+ extensions: []
59
+
60
+ extra_rdoc_files: []
61
+
62
+ files:
63
+ - lib/guard/ego/templates/Guardfile
64
+ - lib/guard/ego/version.rb
65
+ - lib/guard/ego.rb
66
+ - LICENSE
67
+ - README.rdoc
68
+ - CHANGELOG.rdoc
69
+ has_rdoc: true
70
+ homepage: http://rubygems.org/gems/guard-ego
71
+ licenses: []
72
+
73
+ post_install_message:
74
+ rdoc_options: []
75
+
76
+ require_paths:
77
+ - lib
78
+ required_ruby_version: !ruby/object:Gem::Requirement
79
+ none: false
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ hash: 3
84
+ segments:
85
+ - 0
86
+ version: "0"
87
+ required_rubygems_version: !ruby/object:Gem::Requirement
88
+ none: false
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ hash: 23
93
+ segments:
94
+ - 1
95
+ - 3
96
+ - 6
97
+ version: 1.3.6
98
+ requirements: []
99
+
100
+ rubyforge_project: guard-ego
101
+ rubygems_version: 1.3.7
102
+ signing_key:
103
+ specification_version: 3
104
+ summary: Guard gem to reload guard itself
105
+ test_files: []
106
+