capistrano-composer 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NGUxYWY0NWQwMzZkMmU5ZWUzZmEwNDRmZDgyMWRhMDJkMjFjOTU2Nw==
5
- data.tar.gz: !binary |-
6
- OTlmYWRmMjI3MGU5YTA2NmQyNWFhZDlhNmI3MTRlYTZhMWZjZjNkZg==
2
+ SHA1:
3
+ metadata.gz: 541cd7950b62d60a30541b353ce7de9b088ebf49
4
+ data.tar.gz: a086b49e69a310e41cbb7686811b4e251001db9d
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- OTllNWUzZWQwYThiNTg2MTkyYWJhYjM5MzJjMTIyMmYxMGMyN2E2NTkyNjZh
10
- NTI4N2NjZjVlYjUzYjNjN2JkODI1NGM5OWQ0MDZlOThkZGQ3NTA4MjBiMjA4
11
- MjRkYzdjM2U3YTIyMWE3NjM5Zjg2YzQ3NDZmZTU2NDkyYzJkMWQ=
12
- data.tar.gz: !binary |-
13
- NGMzZThkZWQyZWQyNTlkNmU2NTI2M2QzZWRiNjkwYWUzMzk1N2JlN2U1ZmU5
14
- MWQ3ZjA4MmZkNDE2ZGU0ZDg0OWQ0NTJiYjZmNmFmN2YzYTIxNDdlZDY5Yzhi
15
- ZmQ1YWQxZjc1OWNlOGMwN2I5OWMwNDRjZGQ5OGM3MmQ0ZjAzNTI=
6
+ metadata.gz: ecba7850d7382d694b390cb16a6dbe03ab62786bb79f97d825b7b510a25f39472890eeca69c43af0d74576aaeda5245ac59415a25921698ac5b2bb715f32f742
7
+ data.tar.gz: 0755924045ea16621e7fcecdf68a710e1dc2001bb13c3f6d91455120a7af90ae5f4659e1a49ffc896494d96199dd691e7a7a01356ceef6faa93204e897b485fa
data/README.md CHANGED
@@ -52,6 +52,7 @@ Configurable options, shown here with defaults:
52
52
  ```ruby
53
53
  set :composer_install_flags, '--no-dev --no-interaction --quiet --optimize-autoloader'
54
54
  set :composer_roles, :all
55
+ set :composer_working_dir, -> { fetch(:release_path) }
55
56
  set :composer_dump_autoload_flags, '--optimize'
56
57
  set :composer_download_url, "https://getcomposer.org/installer"
57
58
  set :composer_version, '1.0.0-alpha8' #(default: not set)
@@ -63,10 +64,10 @@ Add the following to `deploy.rb` to manage the installation of composer during
63
64
  deployment (composer.phar is install in the shared path).
64
65
 
65
66
  ```ruby
66
- SSHKit.config.command_map[:composer] = "#{shared_path.join("composer.phar")}"
67
+ SSHKit.config.command_map[:composer] = "php #{shared_path.join("composer.phar")}"
67
68
 
68
69
  namespace :deploy do
69
- before :starting, 'composer:install_executable'
70
+ after :starting, 'composer:install_executable'
70
71
  end
71
72
  ```
72
73
 
@@ -89,6 +90,18 @@ task :my_custom_composer_task do
89
90
  end
90
91
  ```
91
92
 
93
+ ### Removing the default install task
94
+
95
+ If you do not want to run the default install task on `deploy:updated`, (for
96
+ example, if you do not have root level dependencies stored in a `composer.json`
97
+ you can remove it by adding the following line to your `config/deploy.rb`:
98
+
99
+ ```ruby
100
+ Rake::Task['deploy:updated'].prerequisites.delete('composer:install')
101
+ ```
102
+
103
+ You can then call `composer.install` task within your own defined tasks, at an
104
+ appropriate juncture.
92
105
 
93
106
  ## Contributing
94
107
 
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'capistrano-composer'
7
- spec.version = '0.0.4'
7
+ spec.version = '0.0.5'
8
8
  spec.authors = ['Scott Walkinshaw', 'Peter Mitchell']
9
9
  spec.email = ['scott.walkinshaw@gmail.com', 'peterjmit@gmail.com']
10
10
  spec.description = %q{Composer support for Capistrano 3.x}
@@ -20,5 +20,5 @@ Gem::Specification.new do |spec|
20
20
  spec.add_dependency 'capistrano', '>= 3.0.0.pre'
21
21
 
22
22
  spec.add_development_dependency 'bundler', '~> 1.3'
23
- spec.add_development_dependency 'rake'
23
+ spec.add_development_dependency 'rake', '~> 10.1'
24
24
  end
@@ -3,13 +3,13 @@ namespace :composer do
3
3
  Installs composer.phar to the shared directory
4
4
  In order to use the .phar file, the composer command needs to be mapped:
5
5
  SSHKit.config.command_map[:composer] = "\#{shared_path.join("composer.phar")}"
6
- This is best used before deploy:starting:
6
+ This is best used after deploy:starting:
7
7
  namespace :deploy do
8
- before :starting, 'composer:install_executable'
8
+ after :starting, 'composer:install_executable'
9
9
  end
10
10
  DESC
11
11
  task :install_executable do
12
- on roles fetch(:composer_roles) do
12
+ on release_roles(fetch(:composer_roles)) do
13
13
  within shared_path do
14
14
  unless test "[", "-e", "composer.phar", "]"
15
15
  composer_version = fetch(:composer_version, nil)
@@ -22,8 +22,8 @@ namespace :composer do
22
22
 
23
23
  task :run, :command do |t, args|
24
24
  args.with_defaults(:command => :list)
25
- on roles fetch(:composer_roles) do
26
- within release_path do
25
+ on release_roles(fetch(:composer_roles)) do
26
+ within fetch(:composer_working_dir) do
27
27
  execute :composer, args[:command], *args.extras
28
28
  end
29
29
  end
@@ -64,6 +64,7 @@ namespace :load do
64
64
  task :defaults do
65
65
  set :composer_install_flags, '--no-dev --prefer-dist --no-interaction --quiet --optimize-autoloader'
66
66
  set :composer_roles, :all
67
+ set :composer_working_dir, -> { fetch(:release_path) }
67
68
  set :composer_dump_autoload_flags, '--optimize'
68
69
  set :composer_download_url, "https://getcomposer.org/installer"
69
70
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-composer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Walkinshaw
@@ -9,20 +9,20 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-03-12 00:00:00.000000000 Z
12
+ date: 2015-01-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ! '>='
18
+ - - '>='
19
19
  - !ruby/object:Gem::Version
20
20
  version: 3.0.0.pre
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ! '>='
25
+ - - '>='
26
26
  - !ruby/object:Gem::Version
27
27
  version: 3.0.0.pre
28
28
  - !ruby/object:Gem::Dependency
@@ -43,16 +43,16 @@ dependencies:
43
43
  name: rake
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ! '>='
46
+ - - ~>
47
47
  - !ruby/object:Gem::Version
48
- version: '0'
48
+ version: '10.1'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ! '>='
53
+ - - ~>
54
54
  - !ruby/object:Gem::Version
55
- version: '0'
55
+ version: '10.1'
56
56
  description: Composer support for Capistrano 3.x
57
57
  email:
58
58
  - scott.walkinshaw@gmail.com
@@ -81,17 +81,17 @@ require_paths:
81
81
  - lib
82
82
  required_ruby_version: !ruby/object:Gem::Requirement
83
83
  requirements:
84
- - - ! '>='
84
+ - - '>='
85
85
  - !ruby/object:Gem::Version
86
86
  version: '0'
87
87
  required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  requirements:
89
- - - ! '>='
89
+ - - '>='
90
90
  - !ruby/object:Gem::Version
91
91
  version: '0'
92
92
  requirements: []
93
93
  rubyforge_project:
94
- rubygems_version: 2.1.10
94
+ rubygems_version: 2.0.0
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: Composer support for Capistrano 3.x