capistrano-node-deploy 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -20,7 +20,7 @@ First install the gem:
20
20
 
21
21
  or add it to your `Gemfile` if you have one:
22
22
 
23
- gem "capistrano-rails-deploy"
23
+ gem "capistrano-node-deploy"
24
24
 
25
25
  Now add the following to your `Capfile`
26
26
 
@@ -30,34 +30,41 @@ Now add the following to your `Capfile`
30
30
  Full Capfile Example
31
31
  --------------------
32
32
 
33
- require "capistrano/node-deploy"
33
+ ```ruby
34
+ require "capistrano/node-deploy"
34
35
 
35
- set :application, "my-node-app-name"
36
- set :repository, "git@github.com:/loopj/my-node-app-name"
37
- set :user, "deploy"
38
- set :scm, :git
39
- set :deploy_to, "/var/apps/my-app-folder"
36
+ set :application, "my-node-app-name"
37
+ set :repository, "git@github.com:/loopj/my-node-app-name"
38
+ set :user, "deploy"
39
+ set :scm, :git
40
+ set :deploy_to, "/var/apps/my-app-folder"
40
41
 
41
- role :app, "myserver.com"
42
+ role :app, "myserver.com"
43
+ ```
42
44
 
43
45
 
44
46
  Overriding Default Settings
45
47
  ---------------------------
46
48
 
47
- # Set app command to run (defaults to index.js, or your `main` file from `package.json`)
48
- set :app_command, "my_server.coffee"
49
+ ```ruby
50
+ # Set app command to run (defaults to index.js, or your `main` file from `package.json`)
51
+ set :app_command, "my_server.coffee"
52
+
53
+ # Set additional environment variables for the app
54
+ set :app_environment, "PORT=8080"
49
55
 
50
- # Set node binary to run (defaults to /usr/bin/node)
51
- set :node_binary, "/usr/bin/coffee"
56
+ # Set node binary to run (defaults to /usr/bin/node)
57
+ set :node_binary, "/usr/bin/coffee"
52
58
 
53
- # Set node environment (defaults to production)
54
- set :node_env, "staging"
59
+ # Set node environment (defaults to production)
60
+ set :node_env, "staging"
55
61
 
56
- # Set the user to run node as (defaults to deploy)
57
- set :node_user, "james"
62
+ # Set the user to run node as (defaults to deploy)
63
+ set :node_user, "james"
58
64
 
59
- # Set the name of the upstart command (defaults to #{application}-#{node_env})
60
- set :upstart_job_name, "myserver"
65
+ # Set the name of the upstart command (defaults to #{application}-#{node_env})
66
+ set :upstart_job_name, "myserver"
67
+ ```
61
68
 
62
69
 
63
70
  Contributing to capistrano-node-deploy
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.0
1
+ 1.2.1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "capistrano-node-deploy"
8
- s.version = "1.2.0"
8
+ s.version = "1.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["James Smith"]
12
- s.date = "2012-10-30"
12
+ s.date = "2012-12-31"
13
13
  s.description = "Capistrano recipes for deploying node apps"
14
14
  s.email = "james@loopj.com"
15
15
  s.extra_rdoc_files = [
@@ -14,7 +14,7 @@ respawn
14
14
  respawn limit 99 5
15
15
 
16
16
  script
17
- exec sudo -u {{node_user}} NODE_ENV={{node_env}} {{app_environment}} {{node_binary}} {{current_path}}/{{app_command}} 2>> {{shared_path}}/{{node_env}}.err.log 1>> {{shared_path}}/{{node_env}}.out.log
17
+ cd {{current_path}} && exec sudo -u {{node_user}} NODE_ENV={{node_env}} {{app_environment}} {{node_binary}} {{current_path}}/{{app_command}} 2>> {{shared_path}}/{{node_env}}.err.log 1>> {{shared_path}}/{{node_env}}.out.log
18
18
  end script
19
19
  EOD
20
20
 
@@ -59,7 +59,7 @@ Capistrano::Configuration.instance(:must_exist).load do |configuration|
59
59
  task :install_packages do
60
60
  run "mkdir -p #{shared_path}/node_modules"
61
61
  run "cp #{release_path}/package.json #{shared_path}"
62
- run "cd #{shared_path} && npm install"
62
+ run "cd #{shared_path} && npm install #{(node_env == 'production') ? '--production' : ''}"
63
63
  run "ln -s #{shared_path}/node_modules #{release_path}/node_modules"
64
64
  end
65
65
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-node-deploy
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 0
10
- version: 1.2.0
9
+ - 1
10
+ version: 1.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - James Smith
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-10-30 00:00:00 Z
18
+ date: 2012-12-31 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  requirement: &id001 !ruby/object:Gem::Requirement