capistrano-nodejs 0.4.5 → 1.4.5
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.
- checksums.yaml +4 -4
- data/README.md +17 -3
- data/lib/capistrano/nodejs/version.rb +1 -1
- data/lib/capistrano/tasks/nodejs.rake +22 -41
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8714a9077be274e9cd48c3638794ee956ca3a9f
|
4
|
+
data.tar.gz: 5050f3b92957f1397c5593606c88def6baa0e87f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce2f5efee60869d7e8d155ee303ab4447d89ccea3ddfada175477c07f50cd1bfac57158a57767ae2698d3f5f9dde3cd2e34701f36bead17b00f5b665da7708ae
|
7
|
+
data.tar.gz: 4774dd3bd5d652088297f59c2b1ec635fbb9b9bacbd7450eab24f59ed9e26a0636c1e52f92c763a345bfc2938d205f31cb7e9606a64a33278c28d3097f15607e
|
data/README.md
CHANGED
@@ -27,12 +27,26 @@ require 'capistrano/nodejs'
|
|
27
27
|
|
28
28
|
```ruby
|
29
29
|
# config/deploy.rb
|
30
|
-
|
31
|
-
|
30
|
+
|
31
|
+
# Only required if you don't want to download dependencies on every deploy, rather than updating the previous deploy.
|
32
|
+
set :linked_dirs, %w(node_modules app/bower_components)
|
33
|
+
|
34
|
+
set :npm_target, -> { release_path.join('npm_dir') } # Defaults to not set.
|
35
|
+
set :bower_target, -> { release_path.join('bower_dir') } # Defaults to not set.
|
36
|
+
set :grunt_target, -> { release_path.join('grunt_dir') } # Defaults to not set.
|
37
|
+
|
38
|
+
set :npm_role, :all # Defaults to :all
|
39
|
+
set :bower_role, :all # Defaults to :all
|
40
|
+
set :grunt_role, :all # Defaults to :all
|
41
|
+
|
42
|
+
set :npm_args, %w(--production --silent) # Defaults to '--production' & '--silent'.
|
43
|
+
set :bower_args, %w(--silent) # Defaults to '--silent'.
|
44
|
+
set :grunt_args, %w() # Defaults to none.
|
45
|
+
```
|
32
46
|
|
33
47
|
## Contributing
|
34
48
|
|
35
|
-
1. Fork it ( https://github.com/
|
49
|
+
1. Fork it ( https://github.com/Ranndom/Capistrano-NodeJS/fork )
|
36
50
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
37
51
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
38
52
|
4. Push to the branch (`git push origin my-new-feature`)
|
@@ -2,7 +2,6 @@ namespace :config do
|
|
2
2
|
task :set_paths do
|
3
3
|
SSHKit.config.command_map[:bower] = File.join(release_path, 'node_modules', 'bower', 'bin', 'bower')
|
4
4
|
SSHKit.config.command_map[:grunt] = File.join(release_path, 'node_modules', 'grunt-cli', 'bin', 'grunt')
|
5
|
-
SSHKit.config.command_map[:forever] = File.join(release_path, 'node_modules', 'forever', 'bin', 'forever')
|
6
5
|
end
|
7
6
|
end
|
8
7
|
|
@@ -15,11 +14,13 @@ namespace :nodejs do
|
|
15
14
|
end
|
16
15
|
end
|
17
16
|
|
17
|
+
before 'deploy:updated', 'nodejs:build'
|
18
|
+
|
18
19
|
namespace :npm do
|
19
20
|
task :install do
|
20
|
-
on roles(:
|
21
|
-
within release_path do
|
22
|
-
execute :npm, "install"
|
21
|
+
on roles(:npm_role) do
|
22
|
+
within fetch(:npm_target, release_path) do
|
23
|
+
execute :npm, "install", fetch(:npm_args)
|
23
24
|
end
|
24
25
|
end
|
25
26
|
end
|
@@ -27,9 +28,9 @@ end
|
|
27
28
|
|
28
29
|
namespace :bower do
|
29
30
|
task :install do
|
30
|
-
on roles(:
|
31
|
-
within release_path do
|
32
|
-
execute :bower, "install"
|
31
|
+
on roles(:bower_role) do
|
32
|
+
within fetch(:bower_target, release_path) do
|
33
|
+
execute :bower, "install", fetch(:bower_args)
|
33
34
|
end
|
34
35
|
end
|
35
36
|
end
|
@@ -37,43 +38,23 @@ end
|
|
37
38
|
|
38
39
|
namespace :grunt do
|
39
40
|
task :build do
|
40
|
-
on roles(:
|
41
|
-
within release_path do
|
42
|
-
execute :grunt, "build"
|
41
|
+
on roles(:grunt_role) do
|
42
|
+
within fetch(:grunt_target, release_path) do
|
43
|
+
execute :grunt, "build", fetch(:grunt_args)
|
43
44
|
end
|
44
45
|
end
|
45
46
|
end
|
46
47
|
end
|
47
48
|
|
48
|
-
namespace :
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
end
|
58
|
-
end
|
59
|
-
task :stop do
|
60
|
-
invoke 'config:set_paths'
|
61
|
-
on roles(:app) do |host|
|
62
|
-
within release_path do
|
63
|
-
with PORT: host.properties.app_port || 8080 do
|
64
|
-
execute :forever, "stop #{fetch(:forever_options, ["-l logs/forever.log", "-o logs/stdout.log", "-e logs/stderr.log", "--spinSleepTime 10000", "--minUptime 1000"]).join(" ")} #{host.properties.forever_uid || "qixalite-website-staging"} #{fetch(:forever_script_options, "")}"
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
69
|
-
task :restart do
|
70
|
-
invoke 'config:set_paths'
|
71
|
-
on roles(:app), in: :sequence, wait: 5 do |host|
|
72
|
-
within release_path do
|
73
|
-
with PORT: host.properties.app_port || 8080 do
|
74
|
-
execute :forever, "restart #{fetch(:forever_options, ["-l logs/forever.log", "-o logs/stdout.log", "-e logs/stderr.log", "--spinSleepTime 10000", "--minUptime 1000"]).join(" ")} #{host.properties.forever_uid || "qixalite-website-staging"} #{fetch(:forever_script_options, "")}"
|
75
|
-
end
|
76
|
-
end
|
49
|
+
namespace :load do
|
50
|
+
task :defaults do
|
51
|
+
set :npm_args, %w(--production --silent)
|
52
|
+
set :bower_args, %w(--silent)
|
53
|
+
set :grunt_args, %w()
|
54
|
+
|
55
|
+
set :npm_role, :all
|
56
|
+
set :bower_role, :all
|
57
|
+
set :grunt_role, :all
|
77
58
|
end
|
78
|
-
|
79
|
-
|
59
|
+
end
|
60
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-nodejs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ranndom
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
version: '0'
|
101
101
|
requirements: []
|
102
102
|
rubyforge_project:
|
103
|
-
rubygems_version: 2.4.
|
103
|
+
rubygems_version: 2.4.5.1
|
104
104
|
signing_key:
|
105
105
|
specification_version: 4
|
106
106
|
summary: NodeJS/Grunt/Bower integration for Capistrano
|