capistrano-composer 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1ae6c47ef05b3330895c2dc975945285c073685a
4
+ data.tar.gz: bf39bd5cd39c97c97146212244979325e48d8641
5
+ SHA512:
6
+ metadata.gz: 9f52432b5f7cbb6b07484672477de4b3757c3beea7598efc5dfd626f0eff78e89f1679b674769679f3f14a144f417564e4cda8242e8147d78ba39a788c1824c1
7
+ data.tar.gz: a156c65c4eb59d49e479dc66374f5c86a722473bd1a11f40abb1b17e29de612646070e6352cafe47338b854c889404d27d1b495a8fe135b417d41756acd94fab
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in capistrano-composer.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # capistrano-composer
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.
4
+
5
+ ## Installation
6
+
7
+ 1. Install the Gem
8
+
9
+ ```bash
10
+ gem install capistrano-composer
11
+ ```
12
+
13
+ Or if you're using Bundler, add it to your `Gemfile`:
14
+
15
+ ```ruby
16
+ gem 'capistrano-composer', github: 'swalkinshaw/composer'
17
+ ```
18
+
19
+ 2. Add to `Capfile` or `config/deploy.rb`:
20
+
21
+ ```ruby
22
+ require 'capistrano/composer'
23
+ ```
24
+
25
+ ## Usage
26
+
27
+ Add the task to your `deploy.rb`:
28
+
29
+ ```ruby
30
+ after 'deploy:finalize_update', 'composer:install'
31
+ ```
32
+
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
40
+
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.
42
+
43
+ ## Configuration
44
+
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`)
47
+
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require 'bundler/gem_tasks'
@@ -0,0 +1,20 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ require 'capistrano/composer/version'
6
+
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
+
16
+ s.files = `git ls-files`.split($/)
17
+ s.require_paths = %w(lib)
18
+
19
+ s.add_dependency 'capistrano', '>= 2.5.5'
20
+ end
@@ -0,0 +1,23 @@
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
@@ -0,0 +1,5 @@
1
+ module Capistrano
2
+ module Composer
3
+ VERSION = '0.0.1'
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,65 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-composer
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Scott Walkinshaw
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-07-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: capistrano
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: 2.5.5
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: 2.5.5
27
+ description:
28
+ email:
29
+ - scott.walkinshaw@gmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - .gitignore
35
+ - Gemfile
36
+ - README.md
37
+ - Rakefile
38
+ - capistrano-composer.gemspec
39
+ - lib/capistrano/composer.rb
40
+ - lib/capistrano/composer/version.rb
41
+ homepage: https://github.com/swalkinshaw/capistrano-composer
42
+ licenses:
43
+ - MIT
44
+ metadata: {}
45
+ post_install_message:
46
+ rdoc_options: []
47
+ require_paths:
48
+ - lib
49
+ required_ruby_version: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ required_rubygems_version: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - '>='
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
59
+ requirements: []
60
+ rubyforge_project:
61
+ rubygems_version: 2.0.0
62
+ signing_key:
63
+ specification_version: 4
64
+ summary: Capistrano extension that adds Composer tasks
65
+ test_files: []