capistrano-symfony-light 0.0.1 → 1.0.0

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: 6a6e9119d3eb5315a0aad598c77a7e88c909bde4
4
- data.tar.gz: e4772a91428c4875455690766d6fc2931986f507
3
+ metadata.gz: 67548f4695eb2a8d26fb8a03294d260d7671fc07
4
+ data.tar.gz: e383547cd6094ebba790c89358207617fe973423
5
5
  SHA512:
6
- metadata.gz: 748538ca9e7748bf28b07c2c87b9075e63d9199c7ba3f65ab114f50bc9836dff68829c1a06fa3928cbc4c2cbbf2d2a6cc465cc6e87043fc7cf4de814d603c1b2
7
- data.tar.gz: 9bdf993f957069128aadcf21c079525c8543a05593ccdb295bf4d44fb05e6908eb25254ce7043f436cde5306c909e708f2aad5de56bceaf1fd716f99a2046931
6
+ metadata.gz: c88829f0dd85e8037581aba597b312bbf4734cbf40e9a0ce11e1c4842fc25dd73e8a1507dfd966909300ca466b6cf7de3e71b21c5b2b3ca169284bc412c3836e
7
+ data.tar.gz: b2d4c468a1606179adcf3ae59727e4491a90dcea5029f52e82bf4cf00d6a499f72c89d92fe6ad7f258a7ee2069cb456a1876ad8c84c9582154475219bf1af9e4
data/LICENCE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2015 Remdan
1
+ Copyright (c) 2016 Remdan
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -10,8 +10,8 @@ Add this line to your application's Gemfile:
10
10
 
11
11
  ```
12
12
  # Gemfile
13
- gem 'capistrano', '~> 3.1'
14
- gem 'capistrano-symfony-light', '~> 0.0.1'
13
+ gem 'capistrano', '~> 3.1.0'
14
+ gem 'capistrano-symfony-light',
15
15
  ```
16
16
 
17
17
  And then execute:
@@ -69,15 +69,21 @@ set :symfony_console_path, "#{fetch(:symfony_app_path)}/console"
69
69
  # Files to clear relative from :symfony_working_path
70
70
  set :symfony_clear_files, ["#{fetch(:symfony_web_path)}/app_*.php"]
71
71
  ```
72
+ # Folders that have be created relative from :symfony_working_path
73
+ set :symfony_create_folders, ["#{fetch(:symfony_app_path)}/cache"]
74
+
75
+ # Symfony build_bootstrap.php path depend on the composer setting
76
+ set :symfony_build_bootstrap_path, "./vendor/sensio/distribution-bundle/Resources/bin/build_bootstrap.php"
72
77
 
73
78
  ### Integrated common tasks
74
79
 
75
- The folowing common tasks are already integrated:
80
+ The folowing common tasks are already integrated and every task is reenabled, that means you can call them many times if you need.
76
81
  * ```symfony:assets:install```
77
82
  * ```symfony:assetic:dump```
78
83
  * ```symfony:cache:clear```
79
84
  * ```symfony:cache:warmup```
80
85
  * ```symfony:clear_files```
86
+ * ```symfony:create_folders```
81
87
  * ```symfony:build_bootstrap```
82
88
 
83
89
  So you can use them with hooks like this:
@@ -88,17 +94,31 @@ So you can use them with hooks like this:
88
94
 
89
95
  Or if you need to pass some options:
90
96
  ```ruby
91
- after :deploy, :updated do
92
- invoke "symfony:assetic:dump", "--env=prod"
93
- invoke "symfony:cache:clear", "--env=prod --no-debug"
97
+ namespace :deploy do
98
+
99
+ task :assetic_dump_prod do
100
+ invoke "symfony:assetic:dump", "--env=prod"
101
+ end
102
+
103
+ task :cache_clear_prod do
104
+ invoke "symfony:cache:clear", "--env=prod --no-debug"
105
+ end
106
+
107
+ after "deploy:updated", "symfony:build_bootstrap"
108
+ after "deploy:updated", "deploy:cache_clear_prod"
109
+ after "deploy:updated", "deploy:assetic_dump_prod"
94
110
  end
95
111
  ```
96
112
 
113
+ Your tasks can you also define in a separate .rake and load it in you Capfile:
114
+ ```ruby
115
+ # Load custom tasks from `lib/capistrano/tasks' if you have any defined
116
+ #Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
117
+ ```
118
+
97
119
  If you need a not already provided task you can use "symfony:console"
98
120
  ```ruby
99
- after :deploy, :updated do
100
- invoke "symfony:console", "doctrine:schema:update", "--force"
101
- end
121
+ invoke "symfony:console", "doctrine:schema:update", "--force"
102
122
  ```
103
123
 
104
124
  [1]: http://capistranorb.com/documentation/getting-started/flow/
@@ -4,11 +4,11 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'capistrano-symfony-light'
7
- spec.version = '0.0.1'
7
+ spec.version = '1.0.0'
8
8
  spec.authors = ['Remdan']
9
- spec.email = ['info@remdan.co']
9
+ spec.email = ['hello@remdan.ch']
10
10
 
11
- spec.summary = %q{Symfony support for Capistrano 3.x}
11
+ spec.summary = %q{Symfony support for Capistrano 3.4.x}
12
12
  spec.description = %q{Provide some Symfony task for to use them in your capistrano project.}
13
13
  spec.homepage = 'https://github.com/remdan/capistrano-symfony-light'
14
14
  spec.license = 'MIT'
@@ -19,5 +19,5 @@ Gem::Specification.new do |spec|
19
19
  # No tests yet.
20
20
  # spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
21
21
 
22
- spec.add_dependency 'capistrano', '~> 3.1'
22
+ spec.add_dependency 'capistrano', '~> 3.1.0'
23
23
  end
@@ -1,7 +1,7 @@
1
1
  # If you have a other name for your php, maybe like "php54 or php55" change it.
2
2
  set :symfony_php, "php"
3
3
 
4
- # If you use a diffrent php.ini change it and set the path.
4
+ # If you use a diffrent php.ini change it and set the path absolute to your root like "/etc/php55/php.ini".
5
5
  set :symfony_php_ini, ""
6
6
 
7
7
  # Set the roles for all tasks.
@@ -29,4 +29,10 @@ set :symfony_app_config_path, "#{fetch(:symfony_app_path)}/config"
29
29
  set :symfony_console_path, "#{fetch(:symfony_app_path)}/console"
30
30
 
31
31
  # Files to clear relative from :symfony_working_path
32
- set :symfony_clear_files, ["#{fetch(:symfony_web_path)}/app_*.php"]
32
+ set :symfony_clear_files, ["#{fetch(:symfony_web_path)}/app_*.php"]
33
+
34
+ # Folders that have be created relative from :symfony_working_path
35
+ set :symfony_create_folders, ["#{fetch(:symfony_app_path)}/cache"]
36
+
37
+ # Symfony build_bootstrap.php path
38
+ set :symfony_build_bootstrap_path, "./vendor/sensio/distribution-bundle/Resources/bin/build_bootstrap.php"
@@ -21,25 +21,41 @@ namespace :symfony do
21
21
  if php_ini.length > 0
22
22
  php_ini = ' -c ' + php_ini
23
23
  end
24
- execute fetch(:symfony_php), php_ini, "./vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php"
24
+ execute fetch(:symfony_php), php_ini, fetch(:symfony_build_bootstrap_path)
25
25
  end
26
26
  end
27
+ Rake::Task[t.name].reenable
27
28
  end
28
29
 
29
30
  desc "Clear files"
30
- task :clear_files do
31
+ task :clear_files do |t|
31
32
  next unless any? :symfony_clear_files
32
- on release_roles :all do
33
+ on release_roles(fetch(:symfony_roles)) do
33
34
  within fetch(:symfony_working_path) do
34
35
  execute :rm, "-f", *fetch(:symfony_clear_files)
35
36
  end
36
37
  end
38
+ Rake::Task[t.name].reenable
39
+ end
40
+
41
+ desc "Create Folders"
42
+ task :create_folders do |t|
43
+ next unless any? :symfony_create_folders
44
+ on release_roles(fetch(:symfony_roles)) do
45
+ within fetch(:symfony_working_path) do
46
+ unless test "[ -d #{fetch(:symfony_create_folders)} ]"
47
+ execute :mkdir, "-pv", fetch(:symfony_create_folders)
48
+ end
49
+ end
50
+ end
51
+ Rake::Task[t.name].reenable
37
52
  end
38
53
 
39
54
  namespace :assets do
40
55
  desc "Install assets"
41
56
  task :install, :options do |t, args|
42
57
  invoke "symfony:console", "assets:install", args[:options]
58
+ Rake::Task[t.name].reenable
43
59
  end
44
60
  end
45
61
 
@@ -47,6 +63,7 @@ namespace :symfony do
47
63
  desc "Dump assets with Assetic"
48
64
  task :dump, :options do |t, args|
49
65
  invoke "symfony:console", "assetic:dump", args[:options]
66
+ Rake::Task[t.name].reenable
50
67
  end
51
68
  end
52
69
 
@@ -54,11 +71,13 @@ namespace :symfony do
54
71
  desc "Clear the cache"
55
72
  task :clear, :options do |t, args|
56
73
  invoke "symfony:console", "cache:clear", args[:options]
74
+ Rake::Task[t.name].reenable
57
75
  end
58
76
 
59
77
  desc "Warumup the cache"
60
78
  task :warmup, :options do |t, args|
61
79
  invoke "symfony:console", "cache:warmup", args[:options]
80
+ Rake::Task[t.name].reenable
62
81
  end
63
82
  end
64
83
  end
metadata CHANGED
@@ -1,37 +1,37 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-symfony-light
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Remdan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-09 00:00:00.000000000 Z
11
+ date: 2016-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: '3.1'
19
+ version: 3.1.0
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: '3.1'
26
+ version: 3.1.0
27
27
  description: Provide some Symfony task for to use them in your capistrano project.
28
28
  email:
29
- - info@remdan.co
29
+ - hello@remdan.ch
30
30
  executables: []
31
31
  extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
- - ".gitignore"
34
+ - .gitignore
35
35
  - LICENCE.txt
36
36
  - README.md
37
37
  - capistrano-symfony-light.gemspec
@@ -50,18 +50,18 @@ require_paths:
50
50
  - lib
51
51
  required_ruby_version: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ">="
53
+ - - '>='
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  required_rubygems_version: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ">="
58
+ - - '>='
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0'
61
61
  requirements: []
62
62
  rubyforge_project:
63
- rubygems_version: 2.4.6
63
+ rubygems_version: 2.0.14
64
64
  signing_key:
65
65
  specification_version: 4
66
- summary: Symfony support for Capistrano 3.x
66
+ summary: Symfony support for Capistrano 3.4.x
67
67
  test_files: []