capistrano-node-deploy 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,6 +1,7 @@
1
1
  source "http://rubygems.org"
2
2
 
3
3
  gem "railsless-deploy", "~> 1.0.2"
4
+ gem "multi_json", "~> 1.3.6"
4
5
 
5
6
  group :development do
6
7
  gem "shoulda", ">= 0"
data/Gemfile.lock CHANGED
@@ -8,6 +8,7 @@ GEM
8
8
  rake
9
9
  rdoc
10
10
  json (1.6.6)
11
+ multi_json (1.3.6)
11
12
  railsless-deploy (1.0.2)
12
13
  rake (0.9.2.2)
13
14
  rcov (1.0.0)
@@ -25,6 +26,7 @@ PLATFORMS
25
26
  DEPENDENCIES
26
27
  bundler (~> 1.1)
27
28
  jeweler (~> 1.8.3)
29
+ multi_json (~> 1.3.6)
28
30
  railsless-deploy (~> 1.0.2)
29
31
  rcov
30
32
  rdoc (~> 3.12)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.1
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "capistrano-node-deploy"
8
- s.version = "1.0.0"
8
+ s.version = "1.0.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"]
@@ -40,6 +40,7 @@ Gem::Specification.new do |s|
40
40
 
41
41
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
42
42
  s.add_runtime_dependency(%q<railsless-deploy>, ["~> 1.0.2"])
43
+ s.add_runtime_dependency(%q<multi_json>, ["~> 1.3.6"])
43
44
  s.add_development_dependency(%q<shoulda>, [">= 0"])
44
45
  s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
45
46
  s.add_development_dependency(%q<bundler>, ["~> 1.1"])
@@ -47,6 +48,7 @@ Gem::Specification.new do |s|
47
48
  s.add_development_dependency(%q<rcov>, [">= 0"])
48
49
  else
49
50
  s.add_dependency(%q<railsless-deploy>, ["~> 1.0.2"])
51
+ s.add_dependency(%q<multi_json>, ["~> 1.3.6"])
50
52
  s.add_dependency(%q<shoulda>, [">= 0"])
51
53
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
52
54
  s.add_dependency(%q<bundler>, ["~> 1.1"])
@@ -55,6 +57,7 @@ Gem::Specification.new do |s|
55
57
  end
56
58
  else
57
59
  s.add_dependency(%q<railsless-deploy>, ["~> 1.0.2"])
60
+ s.add_dependency(%q<multi_json>, ["~> 1.3.6"])
58
61
  s.add_dependency(%q<shoulda>, [">= 0"])
59
62
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
60
63
  s.add_dependency(%q<bundler>, ["~> 1.1"])
@@ -1,4 +1,5 @@
1
1
  require "railsless-deploy"
2
+ require "multi_json"
2
3
 
3
4
  UPSTART_TEMPLATE = <<EOD
4
5
  #!upstart
@@ -25,8 +26,11 @@ Capistrano::Configuration.instance(:must_exist).load do |configuration|
25
26
  after "deploy:symlink", "node:install_packages"
26
27
  after "deploy:symlink", "node:restart"
27
28
 
29
+ package_json = MultiJson.load(File.open("package.json").read) rescue {}
30
+
31
+ set :application, package_json["name"] unless defined? application
32
+ set :app_command, package_json["main"] || "index.js" unless defined? app_command
28
33
  set :node_binary, "/usr/bin/node" unless defined? node_binary
29
- set :app_command, "index.js" unless defined? app_command
30
34
 
31
35
  namespace :node do
32
36
  desc "Check required packages and install if packages are not installed"
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: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - James Smith
@@ -36,6 +36,22 @@ dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  prerelease: false
38
38
  version_requirements: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ hash: 23
44
+ segments:
45
+ - 1
46
+ - 3
47
+ - 6
48
+ version: 1.3.6
49
+ requirement: *id002
50
+ type: :runtime
51
+ name: multi_json
52
+ - !ruby/object:Gem::Dependency
53
+ prerelease: false
54
+ version_requirements: &id003 !ruby/object:Gem::Requirement
39
55
  none: false
40
56
  requirements:
41
57
  - - ">="
@@ -44,12 +60,12 @@ dependencies:
44
60
  segments:
45
61
  - 0
46
62
  version: "0"
47
- requirement: *id002
63
+ requirement: *id003
48
64
  type: :development
49
65
  name: shoulda
50
66
  - !ruby/object:Gem::Dependency
51
67
  prerelease: false
52
- version_requirements: &id003 !ruby/object:Gem::Requirement
68
+ version_requirements: &id004 !ruby/object:Gem::Requirement
53
69
  none: false
54
70
  requirements:
55
71
  - - ~>
@@ -59,12 +75,12 @@ dependencies:
59
75
  - 3
60
76
  - 12
61
77
  version: "3.12"
62
- requirement: *id003
78
+ requirement: *id004
63
79
  type: :development
64
80
  name: rdoc
65
81
  - !ruby/object:Gem::Dependency
66
82
  prerelease: false
67
- version_requirements: &id004 !ruby/object:Gem::Requirement
83
+ version_requirements: &id005 !ruby/object:Gem::Requirement
68
84
  none: false
69
85
  requirements:
70
86
  - - ~>
@@ -74,12 +90,12 @@ dependencies:
74
90
  - 1
75
91
  - 1
76
92
  version: "1.1"
77
- requirement: *id004
93
+ requirement: *id005
78
94
  type: :development
79
95
  name: bundler
80
96
  - !ruby/object:Gem::Dependency
81
97
  prerelease: false
82
- version_requirements: &id005 !ruby/object:Gem::Requirement
98
+ version_requirements: &id006 !ruby/object:Gem::Requirement
83
99
  none: false
84
100
  requirements:
85
101
  - - ~>
@@ -90,12 +106,12 @@ dependencies:
90
106
  - 8
91
107
  - 3
92
108
  version: 1.8.3
93
- requirement: *id005
109
+ requirement: *id006
94
110
  type: :development
95
111
  name: jeweler
96
112
  - !ruby/object:Gem::Dependency
97
113
  prerelease: false
98
- version_requirements: &id006 !ruby/object:Gem::Requirement
114
+ version_requirements: &id007 !ruby/object:Gem::Requirement
99
115
  none: false
100
116
  requirements:
101
117
  - - ">="
@@ -104,7 +120,7 @@ dependencies:
104
120
  segments:
105
121
  - 0
106
122
  version: "0"
107
- requirement: *id006
123
+ requirement: *id007
108
124
  type: :development
109
125
  name: rcov
110
126
  description: Capistrano recipes for deploying node apps