capistrano-npm 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6c15b4955d3cc537e4a8fb0b4dae69120abd1199
4
- data.tar.gz: 77d88dae54ebed3a3ab0b91d1c26fb921823d2c5
3
+ metadata.gz: 57bebf464bf69d58ba01d925f24b5fce18e70e3d
4
+ data.tar.gz: 1d44ef3e51840674559b71024c582ed4d039ea53
5
5
  SHA512:
6
- metadata.gz: 3adfc7c4d0f69835f0f95fc579b5085a366a5f9a52e30bcca9c7491547a22a2790a4a42c2bc05901179ec7e389d68e4ec0e001f3863bb95ad8fb14c9ed2148cc
7
- data.tar.gz: 6b614f1c188fed6eb9339ebfc17ed6f7c60480dee5512ed8c792910e247c589f1e8b77e481f5d0385962cccd21e448728fabfbb1ebd19570ecbbef5975a731d5
6
+ metadata.gz: 5f9f6b65371bab8951bbd53a90677dd6655120959b53fede2735a381422180e8bf8544885901f9569a6623d38176d5157ef5c3f1dd020af22125edc795591183
7
+ data.tar.gz: e08d44e691cbfd675f2ab005f4ec4f624560ca004ac98efaa8f78c13007232bd2980362cab0b014a2e4f7de4d36f60dc0697fd75c1e66241f3dbbd2d331c763d
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in capistrano-composer.gemspec
3
+ # Specify your gem's dependencies in capistrano-bundler.gemspec
4
4
  gemspec
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
- # capistrano-npm
1
+ # Capistrano::npm
2
2
 
3
- capistrano-npm is a [Capistrano](https://github.com/capistrano/capistrano) extension that will let you run [npm](https://npmjs.org/) during your deploy process.
3
+ npm for support for Capistrano 3.x
4
4
 
5
5
  ## Installation
6
6
 
7
- 1. Install the Gem
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
- 2. Add to `Capfile` or `config/deploy.rb`:
14
+ And then execute:
20
15
 
21
- ```ruby
22
- require 'capistrano/npm'
23
- ```
16
+ $ bundle
17
+
18
+ Or install it yourself as:
19
+
20
+ $ gem install capistrano-npm
24
21
 
25
22
  ## Usage
26
23
 
27
- Add the task to your `deploy.rb`:
24
+ Require in `Capfile` to use the default task:
28
25
 
29
26
  ```ruby
30
- after 'deploy:finalize_update', 'npm:install'
27
+ require 'capistrano/npm'
31
28
  ```
32
29
 
33
- ### Optimize
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
- Ideally when using npm, you should add `node_modules` to your `.gitignore` file to keep them out of your repository.
33
+ Configurable options, shown here with defaults:
36
34
 
37
- Since `npm install` does not guarantee that you will get the same package versions when deploying, you should use `npm shrinkwrap` (https://npmjs.org/doc/shrinkwrap.html) first.
38
-
39
- Running `npm shrinkwrap` will created a `npm-shrinkwrap.json` file that locks down the dependency versions. Check this file into your repository.
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
- ### Configuration
40
+ ## Contributing
52
41
 
53
- * `npm_path`: Path to npm bin on the remote server. Defaults to just `npm` as its assumed to be in your `$PATH`.
54
- * `npm_options`: Options for `npm` command. Defaults to `--production --silent` to avoid installing dev dependencies.
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
@@ -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
- require 'capistrano/npm/version'
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
- Gem::Specification.new do |s|
8
- s.name = 'capistrano-npm'
9
- s.version = Capistrano::Npm::VERSION
10
- s.authors = ['Scott Walkinshaw']
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
- s.files = `git ls-files`.split($/)
17
- s.require_paths = %w(lib)
20
+ spec.add_dependency 'capistrano', '>= 3.0.0.pre'
18
21
 
19
- s.add_dependency 'capistrano', '>= 2.5.5'
22
+ spec.add_development_dependency 'bundler', '~> 1.3'
23
+ spec.add_development_dependency 'rake'
20
24
  end
File without changes
@@ -1,13 +1 @@
1
- Capistrano::Configuration.instance(true).load do
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.2
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-07-27 00:00:00.000000000 Z
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: 2.5.5
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: 2.5.5
27
- description:
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/version.rb
41
- homepage: https://github.com/swalkinshaw/capistrano-npm
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: Capistrano extension for npm (Node Packaged Modules)
94
+ summary: npm support for Capistrano 3.x
65
95
  test_files: []
data/.gitignore DELETED
@@ -1,4 +0,0 @@
1
- *.gem
2
- .bundle
3
- Gemfile.lock
4
- pkg/*
@@ -1,5 +0,0 @@
1
- module Capistrano
2
- module Npm
3
- VERSION = '0.0.2'
4
- end
5
- end