capistrano-symfony-light 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +2 -0
- data/LICENCE.txt +22 -0
- data/README.md +112 -0
- data/capistrano-symfony-light.gemspec +23 -0
- data/lib/capistrano/symfony/defaults.rb +32 -0
- data/lib/capistrano/symfony/symfony.rb +1 -0
- data/lib/capistrano/symfony.rb +7 -0
- data/lib/capistrano/tasks/symfony.rake +64 -0
- data/lib/capistrano-symfony-light.rb +0 -0
- metadata +67 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6a6e9119d3eb5315a0aad598c77a7e88c909bde4
|
4
|
+
data.tar.gz: e4772a91428c4875455690766d6fc2931986f507
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 748538ca9e7748bf28b07c2c87b9075e63d9199c7ba3f65ab114f50bc9836dff68829c1a06fa3928cbc4c2cbbf2d2a6cc465cc6e87043fc7cf4de814d603c1b2
|
7
|
+
data.tar.gz: 9bdf993f957069128aadcf21c079525c8543a05593ccdb295bf4d44fb05e6908eb25254ce7043f436cde5306c909e708f2aad5de56bceaf1fd716f99a2046931
|
data/.gitignore
ADDED
data/LICENCE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 Remdan
|
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
ADDED
@@ -0,0 +1,112 @@
|
|
1
|
+
# Capistrano::Symfony
|
2
|
+
|
3
|
+
Provide some Symfony task for to use them in your Capistrano project.
|
4
|
+
For more flexibility it comes just whit tasks and it's nothing doing automatically on the Capistrano [flow][1].
|
5
|
+
If you need something from Symfony, so hook into the Capistrano [flow][1] by your self.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```
|
12
|
+
# Gemfile
|
13
|
+
gem 'capistrano', '~> 3.1'
|
14
|
+
gem 'capistrano-symfony-light', '~> 0.0.1'
|
15
|
+
```
|
16
|
+
|
17
|
+
And then execute:
|
18
|
+
|
19
|
+
$ bundle
|
20
|
+
|
21
|
+
Or install it yourself as:
|
22
|
+
|
23
|
+
$ gem install capistrano-symfony-light
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
Require capistrano-symfony-light in your cap file
|
28
|
+
|
29
|
+
```
|
30
|
+
# Capfile
|
31
|
+
require 'capistrano/symfony'
|
32
|
+
```
|
33
|
+
|
34
|
+
### Settings
|
35
|
+
|
36
|
+
The following settings (displayed with defaults) are provided:
|
37
|
+
|
38
|
+
```ruby
|
39
|
+
# If you have a other name for your php, maybe like "php54 or php55" change it.
|
40
|
+
set :symfony_php, "php"
|
41
|
+
|
42
|
+
# If you use a diffrent php.ini change it and set the path.
|
43
|
+
set :symfony_php_ini, ""
|
44
|
+
|
45
|
+
# Set the roles for all tasks.
|
46
|
+
set :symfony_roles, :all
|
47
|
+
|
48
|
+
# Set the path in that is run all the tasks.
|
49
|
+
set :symfony_working_path, -> { fetch(:release_path) }
|
50
|
+
|
51
|
+
# Symfony application path
|
52
|
+
set :symfony_app_path, "app"
|
53
|
+
|
54
|
+
# Symfony web path
|
55
|
+
set :symfony_web_path, "web"
|
56
|
+
|
57
|
+
# Symfony log path
|
58
|
+
set :symfony_log_path, "#{fetch(:symfony_app_path)}/logs"
|
59
|
+
|
60
|
+
# Symfony cache path
|
61
|
+
set :symfony_cache_path, "#{fetch(:symfony_app_path)}/cache"
|
62
|
+
|
63
|
+
# Symfony config file path
|
64
|
+
set :symfony_app_config_path, "#{fetch(:symfony_app_path)}/config"
|
65
|
+
|
66
|
+
# Symfony console path
|
67
|
+
set :symfony_console_path, "#{fetch(:symfony_app_path)}/console"
|
68
|
+
|
69
|
+
# Files to clear relative from :symfony_working_path
|
70
|
+
set :symfony_clear_files, ["#{fetch(:symfony_web_path)}/app_*.php"]
|
71
|
+
```
|
72
|
+
|
73
|
+
### Integrated common tasks
|
74
|
+
|
75
|
+
The folowing common tasks are already integrated:
|
76
|
+
* ```symfony:assets:install```
|
77
|
+
* ```symfony:assetic:dump```
|
78
|
+
* ```symfony:cache:clear```
|
79
|
+
* ```symfony:cache:warmup```
|
80
|
+
* ```symfony:clear_files```
|
81
|
+
* ```symfony:build_bootstrap```
|
82
|
+
|
83
|
+
So you can use them with hooks like this:
|
84
|
+
```ruby
|
85
|
+
after 'deploy:updated', 'symfony:assets:install'
|
86
|
+
after 'deploy:updated', 'symfony:cache:clear'
|
87
|
+
```
|
88
|
+
|
89
|
+
Or if you need to pass some options:
|
90
|
+
```ruby
|
91
|
+
after :deploy, :updated do
|
92
|
+
invoke "symfony:assetic:dump", "--env=prod"
|
93
|
+
invoke "symfony:cache:clear", "--env=prod --no-debug"
|
94
|
+
end
|
95
|
+
```
|
96
|
+
|
97
|
+
If you need a not already provided task you can use "symfony:console"
|
98
|
+
```ruby
|
99
|
+
after :deploy, :updated do
|
100
|
+
invoke "symfony:console", "doctrine:schema:update", "--force"
|
101
|
+
end
|
102
|
+
```
|
103
|
+
|
104
|
+
[1]: http://capistranorb.com/documentation/getting-started/flow/
|
105
|
+
|
106
|
+
## Contributing
|
107
|
+
|
108
|
+
1. Fork it
|
109
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
110
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
111
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
112
|
+
5. Create new Pull Request
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'capistrano-symfony-light'
|
7
|
+
spec.version = '0.0.1'
|
8
|
+
spec.authors = ['Remdan']
|
9
|
+
spec.email = ['info@remdan.co']
|
10
|
+
|
11
|
+
spec.summary = %q{Symfony support for Capistrano 3.x}
|
12
|
+
spec.description = %q{Provide some Symfony task for to use them in your capistrano project.}
|
13
|
+
spec.homepage = 'https://github.com/remdan/capistrano-symfony-light'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.require_paths = ['lib']
|
18
|
+
|
19
|
+
# No tests yet.
|
20
|
+
# spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
21
|
+
|
22
|
+
spec.add_dependency 'capistrano', '~> 3.1'
|
23
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# If you have a other name for your php, maybe like "php54 or php55" change it.
|
2
|
+
set :symfony_php, "php"
|
3
|
+
|
4
|
+
# If you use a diffrent php.ini change it and set the path.
|
5
|
+
set :symfony_php_ini, ""
|
6
|
+
|
7
|
+
# Set the roles for all tasks.
|
8
|
+
set :symfony_roles, :all
|
9
|
+
|
10
|
+
# Set the path in that is run all the tasks.
|
11
|
+
set :symfony_working_path, -> { fetch(:release_path) }
|
12
|
+
|
13
|
+
# Symfony application path
|
14
|
+
set :symfony_app_path, "app"
|
15
|
+
|
16
|
+
# Symfony web path
|
17
|
+
set :symfony_web_path, "web"
|
18
|
+
|
19
|
+
# Symfony log path
|
20
|
+
set :symfony_log_path, "#{fetch(:symfony_app_path)}/logs"
|
21
|
+
|
22
|
+
# Symfony cache path
|
23
|
+
set :symfony_cache_path, "#{fetch(:symfony_app_path)}/cache"
|
24
|
+
|
25
|
+
# Symfony config file path
|
26
|
+
set :symfony_app_config_path, "#{fetch(:symfony_app_path)}/config"
|
27
|
+
|
28
|
+
# Symfony console path
|
29
|
+
set :symfony_console_path, "#{fetch(:symfony_app_path)}/console"
|
30
|
+
|
31
|
+
# Files to clear relative from :symfony_working_path
|
32
|
+
set :symfony_clear_files, ["#{fetch(:symfony_web_path)}/app_*.php"]
|
@@ -0,0 +1 @@
|
|
1
|
+
load File.expand_path("../../tasks/symfony.rake", __FILE__)
|
@@ -0,0 +1,64 @@
|
|
1
|
+
namespace :symfony do
|
2
|
+
|
3
|
+
task :console, :command, :options do |t, args|
|
4
|
+
on release_roles(fetch(:symfony_roles)) do
|
5
|
+
within fetch(:symfony_working_path) do
|
6
|
+
php_ini = fetch(:symfony_php_ini) || ''
|
7
|
+
if php_ini.length > 0
|
8
|
+
php_ini = ' -c ' + php_ini
|
9
|
+
end
|
10
|
+
execute fetch(:symfony_php), php_ini, fetch(:symfony_console_path), args[:command], args[:options]
|
11
|
+
end
|
12
|
+
end
|
13
|
+
Rake::Task[t.name].reenable
|
14
|
+
end
|
15
|
+
|
16
|
+
desc "Build the bootstrap file"
|
17
|
+
task :build_bootstrap, :options do |t, args|
|
18
|
+
on release_roles(fetch(:symfony_roles)) do
|
19
|
+
within fetch(:symfony_working_path) do
|
20
|
+
php_ini = fetch(:symfony_php_ini) || ''
|
21
|
+
if php_ini.length > 0
|
22
|
+
php_ini = ' -c ' + php_ini
|
23
|
+
end
|
24
|
+
execute fetch(:symfony_php), php_ini, "./vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
desc "Clear files"
|
30
|
+
task :clear_files do
|
31
|
+
next unless any? :symfony_clear_files
|
32
|
+
on release_roles :all do
|
33
|
+
within fetch(:symfony_working_path) do
|
34
|
+
execute :rm, "-f", *fetch(:symfony_clear_files)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
namespace :assets do
|
40
|
+
desc "Install assets"
|
41
|
+
task :install, :options do |t, args|
|
42
|
+
invoke "symfony:console", "assets:install", args[:options]
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
namespace :assetic do
|
47
|
+
desc "Dump assets with Assetic"
|
48
|
+
task :dump, :options do |t, args|
|
49
|
+
invoke "symfony:console", "assetic:dump", args[:options]
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
namespace :cache do
|
54
|
+
desc "Clear the cache"
|
55
|
+
task :clear, :options do |t, args|
|
56
|
+
invoke "symfony:console", "cache:clear", args[:options]
|
57
|
+
end
|
58
|
+
|
59
|
+
desc "Warumup the cache"
|
60
|
+
task :warmup, :options do |t, args|
|
61
|
+
invoke "symfony:console", "cache:warmup", args[:options]
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
File without changes
|
metadata
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano-symfony-light
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Remdan
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-03-09 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: '3.1'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.1'
|
27
|
+
description: Provide some Symfony task for to use them in your capistrano project.
|
28
|
+
email:
|
29
|
+
- info@remdan.co
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files: []
|
33
|
+
files:
|
34
|
+
- ".gitignore"
|
35
|
+
- LICENCE.txt
|
36
|
+
- README.md
|
37
|
+
- capistrano-symfony-light.gemspec
|
38
|
+
- lib/capistrano-symfony-light.rb
|
39
|
+
- lib/capistrano/symfony.rb
|
40
|
+
- lib/capistrano/symfony/defaults.rb
|
41
|
+
- lib/capistrano/symfony/symfony.rb
|
42
|
+
- lib/capistrano/tasks/symfony.rake
|
43
|
+
homepage: https://github.com/remdan/capistrano-symfony-light
|
44
|
+
licenses:
|
45
|
+
- MIT
|
46
|
+
metadata: {}
|
47
|
+
post_install_message:
|
48
|
+
rdoc_options: []
|
49
|
+
require_paths:
|
50
|
+
- lib
|
51
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
requirements: []
|
62
|
+
rubyforge_project:
|
63
|
+
rubygems_version: 2.4.6
|
64
|
+
signing_key:
|
65
|
+
specification_version: 4
|
66
|
+
summary: Symfony support for Capistrano 3.x
|
67
|
+
test_files: []
|