capistrano-npm 0.0.2 → 0.0.3
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/Gemfile +1 -1
- data/LICENSE +20 -0
- data/LICENSE.txt +22 -0
- data/README.md +25 -33
- data/capistrano-npm.gemspec +16 -12
- data/lib/capistrano-npm.rb +0 -0
- data/lib/capistrano/npm.rb +1 -13
- data/lib/capistrano/tasks/npm.cap +29 -0
- metadata +39 -9
- data/.gitignore +0 -4
- data/lib/capistrano/npm/version.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57bebf464bf69d58ba01d925f24b5fce18e70e3d
|
4
|
+
data.tar.gz: 1d44ef3e51840674559b71024c582ed4d039ea53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f9f6b65371bab8951bbd53a90677dd6655120959b53fede2735a381422180e8bf8544885901f9569a6623d38176d5157ef5c3f1dd020af22125edc795591183
|
7
|
+
data.tar.gz: e08d44e691cbfd675f2ab005f4ec4f624560ca004ac98efaa8f78c13007232bd2980362cab0b014a2e4f7de4d36f60dc0697fd75c1e66241f3dbbd2d331c763d
|
data/Gemfile
CHANGED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2013 Capistrano, your one stop deployment shop.
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
7
|
+
the Software without restriction, including without limitation the rights to
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
10
|
+
subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 swalkinshaw
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,54 +1,46 @@
|
|
1
|
-
#
|
1
|
+
# Capistrano::npm
|
2
2
|
|
3
|
-
|
3
|
+
npm for support for Capistrano 3.x
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
```bash
|
10
|
-
gem install capistrano-npm
|
11
|
-
```
|
12
|
-
|
13
|
-
Or if you're using Bundler, add it to your `Gemfile`:
|
7
|
+
Add this line to your application's Gemfile:
|
14
8
|
|
15
9
|
```ruby
|
10
|
+
gem 'capistrano', '~> 3.0.0'
|
16
11
|
gem 'capistrano-npm'
|
17
12
|
```
|
18
13
|
|
19
|
-
|
14
|
+
And then execute:
|
20
15
|
|
21
|
-
|
22
|
-
|
23
|
-
|
16
|
+
$ bundle
|
17
|
+
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install capistrano-npm
|
24
21
|
|
25
22
|
## Usage
|
26
23
|
|
27
|
-
|
24
|
+
Require in `Capfile` to use the default task:
|
28
25
|
|
29
26
|
```ruby
|
30
|
-
|
27
|
+
require 'capistrano/npm'
|
31
28
|
```
|
32
29
|
|
33
|
-
|
30
|
+
The task will run before `deploy:updated` as part of Capistrano's default deploy,
|
31
|
+
or can be run in isolation with `cap production npm:install`
|
34
32
|
|
35
|
-
|
33
|
+
Configurable options, shown here with defaults:
|
36
34
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
Now when deploying, `npm install` will detect the `npm-shrinkwrap.json` file and use that to install the packages.
|
42
|
-
|
43
|
-
### Tasks
|
44
|
-
|
45
|
-
* `npm:install`: Runs `npm install`.
|
46
|
-
|
47
|
-
### Dependencies
|
48
|
-
|
49
|
-
This extension also adds the `npm` command as a Capistrano dependency. Meaning when you run `cap deploy:check`, it will make sure the `npm` command exists.
|
35
|
+
```ruby
|
36
|
+
set :npm_flags, '--production --silent'
|
37
|
+
set :npm_roles, :all
|
38
|
+
```
|
50
39
|
|
51
|
-
|
40
|
+
## Contributing
|
52
41
|
|
53
|
-
|
54
|
-
|
42
|
+
1. Fork it
|
43
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
44
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
45
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
46
|
+
5. Create new Pull Request
|
data/capistrano-npm.gemspec
CHANGED
@@ -2,19 +2,23 @@
|
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
4
|
|
5
|
-
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'capistrano-npm'
|
7
|
+
spec.version = '0.0.3'
|
8
|
+
spec.authors = ['Scott Walkinshaw']
|
9
|
+
spec.email = ['scott.walkinshaw@gmail.com']
|
10
|
+
spec.description = %q{npm support for Capistrano 3.x}
|
11
|
+
spec.summary = %q{npm support for Capistrano 3.x}
|
12
|
+
spec.homepage = 'https://github.com/capistrano/npm'
|
13
|
+
spec.license = 'MIT'
|
6
14
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
s.email = ['scott.walkinshaw@gmail.com']
|
12
|
-
s.homepage = 'https://github.com/swalkinshaw/capistrano-npm'
|
13
|
-
s.summary = %q{Capistrano extension for npm (Node Packaged Modules)}
|
14
|
-
s.license = 'MIT'
|
15
|
+
spec.files = `git ls-files`.split($/)
|
16
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
|
+
spec.require_paths = ['lib']
|
15
19
|
|
16
|
-
|
17
|
-
s.require_paths = %w(lib)
|
20
|
+
spec.add_dependency 'capistrano', '>= 3.0.0.pre'
|
18
21
|
|
19
|
-
|
22
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
23
|
+
spec.add_development_dependency 'rake'
|
20
24
|
end
|
File without changes
|
data/lib/capistrano/npm.rb
CHANGED
@@ -1,13 +1 @@
|
|
1
|
-
|
2
|
-
set :npm_path, 'npm'
|
3
|
-
set :npm_options, '--production --silent'
|
4
|
-
|
5
|
-
depend :remote, :command, npm_path
|
6
|
-
|
7
|
-
namespace :npm do
|
8
|
-
desc 'Runs npm install.'
|
9
|
-
task :install, :roles => :app, :except => { :no_release => true } do
|
10
|
-
try_sudo "cd #{latest_release} && #{npm_path} #{npm_options} install"
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
1
|
+
load File.expand_path('../tasks/npm.cap', __FILE__)
|
@@ -0,0 +1,29 @@
|
|
1
|
+
namespace :npm do
|
2
|
+
desc <<-DESC
|
3
|
+
Install the project dependencies via npm. By default, devDependencies \
|
4
|
+
will not be installed. The install command is executed \
|
5
|
+
with the --production and --silent flags.
|
6
|
+
|
7
|
+
You can override any of these defaults by setting the variables shown below.
|
8
|
+
|
9
|
+
set :npm_flags, '--production --silent'
|
10
|
+
set :npm_roles, :all
|
11
|
+
DESC
|
12
|
+
task :install do
|
13
|
+
on roles fetch(:npm_roles) do
|
14
|
+
within release_path do
|
15
|
+
execute :npm, "install",
|
16
|
+
fetch(:npm_flags)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
before 'deploy:updated', 'npm:install'
|
22
|
+
end
|
23
|
+
|
24
|
+
namespace :load do
|
25
|
+
task :defaults do
|
26
|
+
set :npm_flags, '--production --silent'
|
27
|
+
set :npm_roles, :all
|
28
|
+
end
|
29
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-npm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Walkinshaw
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -16,29 +16,59 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 3.0.0.pre
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
27
|
-
|
26
|
+
version: 3.0.0.pre
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.3'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.3'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: npm support for Capistrano 3.x
|
28
56
|
email:
|
29
57
|
- scott.walkinshaw@gmail.com
|
30
58
|
executables: []
|
31
59
|
extensions: []
|
32
60
|
extra_rdoc_files: []
|
33
61
|
files:
|
34
|
-
- .gitignore
|
35
62
|
- Gemfile
|
63
|
+
- LICENSE
|
64
|
+
- LICENSE.txt
|
36
65
|
- README.md
|
37
66
|
- Rakefile
|
38
67
|
- capistrano-npm.gemspec
|
68
|
+
- lib/capistrano-npm.rb
|
39
69
|
- lib/capistrano/npm.rb
|
40
|
-
- lib/capistrano/npm
|
41
|
-
homepage: https://github.com/
|
70
|
+
- lib/capistrano/tasks/npm.cap
|
71
|
+
homepage: https://github.com/capistrano/npm
|
42
72
|
licenses:
|
43
73
|
- MIT
|
44
74
|
metadata: {}
|
@@ -61,5 +91,5 @@ rubyforge_project:
|
|
61
91
|
rubygems_version: 2.0.0
|
62
92
|
signing_key:
|
63
93
|
specification_version: 4
|
64
|
-
summary:
|
94
|
+
summary: npm support for Capistrano 3.x
|
65
95
|
test_files: []
|
data/.gitignore
DELETED