capistrano-composer 0.0.1 → 0.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1ae6c47ef05b3330895c2dc975945285c073685a
4
- data.tar.gz: bf39bd5cd39c97c97146212244979325e48d8641
3
+ metadata.gz: ff7dc8f1d63d91d1a5a3abcead9db092b3d30943
4
+ data.tar.gz: ffdaad864f1873810fdf953293d59b0efe1d0faf
5
5
  SHA512:
6
- metadata.gz: 9f52432b5f7cbb6b07484672477de4b3757c3beea7598efc5dfd626f0eff78e89f1679b674769679f3f14a144f417564e4cda8242e8147d78ba39a788c1824c1
7
- data.tar.gz: a156c65c4eb59d49e479dc66374f5c86a722473bd1a11f40abb1b17e29de612646070e6352cafe47338b854c889404d27d1b495a8fe135b417d41756acd94fab
6
+ metadata.gz: e929a2f9bcc1d33a7622efe4b03b5551abc1a0de2282ad8e88c7add378db4a9fa2b2b0f450b2cff440229fa1e02f87e3e277d582e1543347deb2c49bc35df021
7
+ data.tar.gz: 22d2621d365adae5876a735b0c2cc9b3d32d2330a4bc68152156fde09008739e13c6e7303a96444664ed779f2e409b323ce6f8fd26c6e7ce55ce3ba4d4645fdb
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.
@@ -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,47 +1,46 @@
1
- # capistrano-composer
1
+ # Capistrano::Composer
2
2
 
3
- capistrano-composer is a [Capistrano](https://github.com/capistrano/capistrano) extension that will let you use [Composer](http://getcomposer.org/) to manage your dependencies during your deploy process.
3
+ Composer for support for Capistrano 3.x
4
4
 
5
5
  ## Installation
6
6
 
7
- 1. Install the Gem
7
+ Add this line to your application's Gemfile:
8
8
 
9
- ```bash
10
- gem install capistrano-composer
9
+ ```ruby
10
+ gem 'capistrano', '~> 3.0.0'
11
+ gem 'capistrano-composer'
11
12
  ```
12
13
 
13
- Or if you're using Bundler, add it to your `Gemfile`:
14
+ And then execute:
14
15
 
15
- ```ruby
16
- gem 'capistrano-composer', github: 'swalkinshaw/composer'
17
- ```
16
+ $ bundle
18
17
 
19
- 2. Add to `Capfile` or `config/deploy.rb`:
18
+ Or install it yourself as:
20
19
 
21
- ```ruby
22
- require 'capistrano/composer'
23
- ```
20
+ $ gem install capistrano-composer
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', 'composer:install'
27
+ require 'capistrano/composer'
31
28
  ```
32
29
 
33
- ### Tasks
34
-
35
- * `composer:install`: Installs the project dependencies from the composer.lock file if present, or falls back on the composer.json.
36
- * `composer:update`: Updates your dependencies to the latest version according to composer.json, and updates the composer.lock file.
37
- * `composer:dump_autoload`: Dumps an optimized autoloader.
38
-
39
- ### Dependencies
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 composer:install`
40
32
 
41
- This extension also adds `composer_path` as a Capistrano dependency. Meaning when you run `cap deploy:check`, it will make sure the `composer` command exists.
33
+ Configurable options, shown here with defaults:
42
34
 
43
- ## Configuration
35
+ ```ruby
36
+ set :composer_flags, '--production --silent'
37
+ set :composer_roles, :all
38
+ ```
44
39
 
45
- * `composer_path`: Path to the Composer bin (defaults to `/usr/local/bin/composer`)
46
- * `composer_options`: Options passed to composer command (defaults to `--no-scripts --no-dev --verbose --prefer-dist --optimize-autoloader --no-progress`)
40
+ ## Contributing
47
41
 
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/composer/version'
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'capistrano-composer'
7
+ spec.version = '0.0.2'
8
+ spec.authors = ['Scott Walkinshaw']
9
+ spec.email = ['scott.walkinshaw@gmail.com']
10
+ spec.description = %q{Composer support for Capistrano 3.x}
11
+ spec.summary = %q{Composer support for Capistrano 3.x}
12
+ spec.homepage = 'https://github.com/capistrano/composer'
13
+ spec.license = 'MIT'
6
14
 
7
- Gem::Specification.new do |s|
8
- s.name = 'capistrano-composer'
9
- s.version = Capistrano::Composer::VERSION
10
- s.authors = ['Scott Walkinshaw']
11
- s.email = ['scott.walkinshaw@gmail.com']
12
- s.homepage = 'https://github.com/swalkinshaw/capistrano-composer'
13
- s.summary = %q{Capistrano extension that adds Composer tasks}
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,23 +1 @@
1
- Capistrano::Configuration.instance(true).load do
2
- set :composer_path, '/usr/local/bin/composer'
3
- set :composer_options, '--no-scripts --no-dev --verbose --prefer-dist --optimize-autoloader --no-progress'
4
-
5
- depend :remote, :command, composer_path
6
-
7
- namespace :composer do
8
- desc 'Installs the project dependencies from the composer.lock file if present, or falls back on the composer.json.'
9
- task :install, :roles => :app, :except => { :no_release => true } do
10
- try_sudo "cd #{latest_release} && #{composer_path} install #{composer_options}"
11
- end
12
-
13
- desc 'Updates your dependencies to the latest version according to composer.json, and updates the composer.lock file.'
14
- task :update, :roles => :app, :except => { :no_release => true } do
15
- try_sudo "cd #{latest_release} && #{composer_path} update #{composer_options}"
16
- end
17
-
18
- desc 'Dumps an optimized autoloader.'
19
- task :dump_autoload, :roles => :app, :except => { :no_release => true } do
20
- try_sudo "cd #{latest_release} && #{composer_path} dump-autoload --optimize"
21
- end
22
- end
23
- end
1
+ load File.expand_path('../tasks/composer.cap', __FILE__)
@@ -0,0 +1,27 @@
1
+ namespace :composer do
2
+ desc <<-DESC
3
+ Install the project dependencies via Composer. By default, require-dev \
4
+ dependencies will not be installed.
5
+
6
+ You can override any of the defaults by setting the variables shown below.
7
+
8
+ set :composer_flags, '--no-dev --no-scripts --quiet --optimize-autoloader'
9
+ set :composer_roles, :all
10
+ DESC
11
+ task :install do
12
+ on roles fetch(:composer_roles) do
13
+ within release_path do
14
+ execute :composer, fetch(:composer_flags)
15
+ end
16
+ end
17
+ end
18
+
19
+ before 'deploy:updated', 'composer:install'
20
+ end
21
+
22
+ namespace :load do
23
+ task :defaults do
24
+ set :composer_flags, '--no-dev --no-scripts --quiet --optimize-autoloader'
25
+ set :composer_roles, :all
26
+ end
27
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-composer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
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-19 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,15 +16,43 @@ 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: Composer support for Capistrano 3.x
28
56
  email:
29
57
  - scott.walkinshaw@gmail.com
30
58
  executables: []
@@ -33,12 +61,15 @@ extra_rdoc_files: []
33
61
  files:
34
62
  - .gitignore
35
63
  - Gemfile
64
+ - LICENSE
65
+ - LICENSE.txt
36
66
  - README.md
37
67
  - Rakefile
38
68
  - capistrano-composer.gemspec
69
+ - lib/capistrano-composer.rb
39
70
  - lib/capistrano/composer.rb
40
- - lib/capistrano/composer/version.rb
41
- homepage: https://github.com/swalkinshaw/capistrano-composer
71
+ - lib/capistrano/tasks/composer.cap
72
+ homepage: https://github.com/capistrano/composer
42
73
  licenses:
43
74
  - MIT
44
75
  metadata: {}
@@ -61,5 +92,5 @@ rubyforge_project:
61
92
  rubygems_version: 2.0.0
62
93
  signing_key:
63
94
  specification_version: 4
64
- summary: Capistrano extension that adds Composer tasks
95
+ summary: Composer support for Capistrano 3.x
65
96
  test_files: []
@@ -1,5 +0,0 @@
1
- module Capistrano
2
- module Composer
3
- VERSION = '0.0.1'
4
- end
5
- end