guard-unicorn 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -42,8 +42,20 @@ to have graphical notifications.
42
42
  [notifu]: https://rubygems.org/gems/rb-notifu
43
43
 
44
44
 
45
- ## Guardfile
45
+ ## Guardfile for guard-unicorn
46
46
 
47
47
  ```ruby
48
- guard :unicorn, :daemonized => true, :config_file => "config/unicorn.rb", :pid_file => "tmp/pids/unicorn.pid"
48
+ guard :unicorn, :daemonized => true
49
49
  ```
50
+
51
+ Available options:
52
+
53
+ * `:daemonized` run the Unicorn server as a daemon. Can be `true` or `false`.
54
+ Defaults to `false`
55
+ * `:bundler` use `bundle exec` to start Unicorn. Defaults to `true`.
56
+ * `:config_file` path to the Unicorn config file. Defaults to
57
+ `config/unicorn.rb`
58
+ * `:pid_file` path to the Unicorn PID file. Defaults to `tmp/pids/unicorn.pid`
59
+ * `:preloading` is Unicorn configured to preload the application? Defaults to
60
+ `false`.
61
+ * `:port` on what port to run Unicorn. Defaults to `3000`.
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "guard-unicorn"
6
- s.version = "0.0.5"
6
+ s.version = "0.0.6"
7
7
  s.authors = ["Andrei Maxim"]
8
8
  s.email = ["andrei@andreimaxim.ro"]
9
9
  s.homepage = "https://github.com/xhr/guard-unicorn"
data/lib/guard/unicorn.rb CHANGED
@@ -7,6 +7,7 @@ module Guard
7
7
  # Sensible defaults for Rails projects
8
8
  DEFAULT_PID_PATH = File.join("tmp", "pids", "unicorn.pid")
9
9
  DEFAULT_CONFIG_PATH = File.join("config", "unicorn.rb")
10
+ DEFAULT_PORT = 3000
10
11
 
11
12
  # Initialize a Guard.
12
13
  # @param [Array<Guard::Watcher>] watchers the Guard file watchers
@@ -22,6 +23,7 @@ module Guard
22
23
  @pid_file = options.fetch(:pid_file, DEFAULT_PID_PATH)
23
24
  @config_file = options.fetch(:config_file, DEFAULT_CONFIG_PATH)
24
25
  @preloading = options.fetch(:preloading, false)
26
+ @port = options.fetch(:port, DEFAULT_PORT)
25
27
 
26
28
  super
27
29
  end
@@ -36,6 +38,7 @@ module Guard
36
38
  cmd << "bundle exec" if @enable_bundler
37
39
  cmd << "unicorn_rails"
38
40
  cmd << "-c #{@config_file}"
41
+ cmd << "-p #{@port}"
39
42
  cmd << "-D" if @run_as_daemon
40
43
 
41
44
  @pid = Process.fork do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-unicorn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
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: 2012-04-26 00:00:00.000000000 Z
12
+ date: 2012-05-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: guard
16
- requirement: &70286071860660 !ruby/object:Gem::Requirement
16
+ requirement: &70124379198340 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70286071860660
24
+ version_requirements: *70124379198340
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rake
27
- requirement: &70286071859860 !ruby/object:Gem::Requirement
27
+ requirement: &70124379197900 !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: :development
34
34
  prerelease: false
35
- version_requirements: *70286071859860
35
+ version_requirements: *70124379197900
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: bundler
38
- requirement: &70286071859000 !ruby/object:Gem::Requirement
38
+ requirement: &70124379197480 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70286071859000
46
+ version_requirements: *70124379197480
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: minitest
49
- requirement: &70286071857860 !ruby/object:Gem::Requirement
49
+ requirement: &70124379197060 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70286071857860
57
+ version_requirements: *70124379197060
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: guard
60
- requirement: &70286071856960 !ruby/object:Gem::Requirement
60
+ requirement: &70124379196640 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70286071856960
68
+ version_requirements: *70124379196640
69
69
  description: Guard plug-in that allows you to restart Unicorn
70
70
  email:
71
71
  - andrei@andreimaxim.ro
@@ -96,7 +96,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
96
96
  version: '0'
97
97
  segments:
98
98
  - 0
99
- hash: 3501195389242757760
99
+ hash: 2852090064455978205
100
100
  required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  none: false
102
102
  requirements:
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  version: '0'
106
106
  segments:
107
107
  - 0
108
- hash: 3501195389242757760
108
+ hash: 2852090064455978205
109
109
  requirements: []
110
110
  rubyforge_project: guard-unicorn
111
111
  rubygems_version: 1.8.11