capistrano-pimcore 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.rubocop.yml +5 -0
- data/.travis.yml +5 -0
- data/Gemfile +4 -0
- data/LICENSE +21 -0
- data/README.md +40 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/capistrano-pimcore.gemspec +31 -0
- data/lib/capistrano/pimcore/defaults.rb +18 -0
- data/lib/capistrano/pimcore/deploy.rb +4 -0
- data/lib/capistrano/pimcore/version.rb +5 -0
- data/lib/capistrano/pimcore.rb +22 -0
- data/lib/capistrano/tasks/deploy.rake +7 -0
- data/lib/capistrano/tasks/pimcore.rake +147 -0
- metadata +136 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a049a862a20dd7524a8f2410e3c9076571dd1394
|
4
|
+
data.tar.gz: ef6a03b1998bbd70b5e8a7af5aa8437346af5c13
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: db5b32fce45c2f82455673ff9f5a685c07c5923a6d780f259974c25fe6a5a863dabde3173aecb086a6067350d335f1111f0732631d2c174d1381437b359dcc9e
|
7
|
+
data.tar.gz: a2da113026d0f541741da6063768a5b377abe37f17daf499a9761c06a0b214928d4ede6ca72e51f857fbe9cc7d23e0a1c13aef88fb6332bb5a3d6a90f9be852a
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2017 Divante Ltd.
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, 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,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# Capistrano::Pimcore
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/capistrano/pimcore`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'capistrano-pimcore'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install capistrano-pimcore
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
Pimcore env
|
26
|
+
```bash
|
27
|
+
bundle exec cap test pimcore:cache:clear env=production
|
28
|
+
```
|
29
|
+
|
30
|
+
TODO: write mora about default env and places where env can be setted
|
31
|
+
|
32
|
+
## Development
|
33
|
+
|
34
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
35
|
+
|
36
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
37
|
+
|
38
|
+
## Contributing
|
39
|
+
|
40
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/capistrano-pimcore.
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'capistrano/pimcore'
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require 'irb'
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
|
6
|
+
require 'capistrano/pimcore/version'
|
7
|
+
|
8
|
+
Gem::Specification.new do |spec|
|
9
|
+
spec.name = 'capistrano-pimcore'
|
10
|
+
spec.version = Capistrano::Pimcore::VERSION
|
11
|
+
spec.authors = ['Mateusz Koszutowski']
|
12
|
+
spec.email = ['mkoszutowski@divante.pl']
|
13
|
+
|
14
|
+
spec.summary = 'Pimcore plugin for capistrano'
|
15
|
+
spec.description = 'Pimcore plugin for capistrano'
|
16
|
+
spec.homepage = 'https://github.com/DivanteLtd/capistrano-pimcore'
|
17
|
+
|
18
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
19
|
+
f.match(%r{^(test|spec|features)/})
|
20
|
+
end
|
21
|
+
spec.bindir = 'exe'
|
22
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
|
+
spec.require_paths = ['lib']
|
24
|
+
|
25
|
+
spec.add_runtime_dependency 'capistrano-composer', '~> 0.0', '>= 0.0.6'
|
26
|
+
|
27
|
+
spec.add_development_dependency 'bundler', '~> 1.13'
|
28
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
29
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
30
|
+
spec.add_development_dependency 'rubocop', '~> 0.48'
|
31
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
set :env, 'development'
|
2
|
+
|
3
|
+
set :linked_files, fetch(:linked_files, []).push
|
4
|
+
|
5
|
+
set :linked_dirs, fetch(:linked_dirs, []).push(
|
6
|
+
'vendor',
|
7
|
+
'website/var/areas',
|
8
|
+
'website/var/assets',
|
9
|
+
'website/var/backup',
|
10
|
+
'website/var/classes',
|
11
|
+
'website/var/config',
|
12
|
+
'website/var/log',
|
13
|
+
'website/var/plugins',
|
14
|
+
'website/var/recyclebin',
|
15
|
+
'website/var/system',
|
16
|
+
'website/var/versions',
|
17
|
+
'website/var/webdav'
|
18
|
+
)
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'capistrano/composer'
|
2
|
+
|
3
|
+
SSHKit.config.command_map[:pimcore] = '/usr/bin/env php -f pimcore/cli/console.php --'
|
4
|
+
|
5
|
+
module Capistrano
|
6
|
+
module Pimcore
|
7
|
+
# Pimcore Helpers
|
8
|
+
module Helpers
|
9
|
+
def pimcore_environment
|
10
|
+
ENV['env'] || fetch(:env)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
load File.expand_path('../tasks/pimcore.rake', __FILE__)
|
17
|
+
|
18
|
+
namespace :load do
|
19
|
+
task :defaults do
|
20
|
+
load 'capistrano/pimcore/defaults.rb'
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,147 @@
|
|
1
|
+
include Capistrano::Pimcore::Helpers
|
2
|
+
|
3
|
+
namespace :pimcore do # rubocop:disable Metrics/BlockLength
|
4
|
+
desc 'Reset Pimcore user password'
|
5
|
+
task :'reset-password' do
|
6
|
+
on release_roles :all do
|
7
|
+
within release_path do
|
8
|
+
raise 'Pleas set user name or id' unless ENV['user']
|
9
|
+
raise 'Pleas set password' unless ENV['pass']
|
10
|
+
|
11
|
+
user = ENV['user']
|
12
|
+
pass = ENV['pass']
|
13
|
+
|
14
|
+
execute :pimcore, "--environment=#{pimcore_environment}", 'reset-password', "-u#{user}", "-p#{pass}"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
desc 'Generate class maps to improve performance'
|
20
|
+
task :'classmap-generator' do
|
21
|
+
on release_roles :all do
|
22
|
+
within release_path do
|
23
|
+
execute :pimcore, "--environment=#{pimcore_environment}", 'classmap-generator'
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
desc 'Optimize and warmup mysql database'
|
29
|
+
task :'mysql-tools' do
|
30
|
+
on release_roles :all do
|
31
|
+
within release_path do
|
32
|
+
execute :pimcore, "--environment=#{pimcore_environment}", 'mysql-tools'
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
desc 'Update pimcore to the desired version/build'
|
38
|
+
task :update do
|
39
|
+
on release_roles :all do
|
40
|
+
within release_path do
|
41
|
+
execute :pimcore, "--environment=#{pimcore_environment}", 'update'
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
desc 'Re-indexes the backend search of pimcore'
|
47
|
+
task :'search-backend-reindex' do
|
48
|
+
on release_roles :all do
|
49
|
+
within release_path do
|
50
|
+
execute :pimcore, "--environment=#{pimcore_environment}", 'search-backend-reindex'
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
namespace :cache do
|
56
|
+
desc 'Flush Pimcore cache storage'
|
57
|
+
task :clear do
|
58
|
+
on release_roles :all do
|
59
|
+
within release_path do
|
60
|
+
execute :pimcore, "--environment=#{pimcore_environment}", 'cache:clear'
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
task :warming do
|
66
|
+
desc 'Warmup Pimcore cache storage'
|
67
|
+
on release_roles :all do
|
68
|
+
within release_path do
|
69
|
+
execute :pimcore, "--environment=#{pimcore_environment}", 'cache:warming'
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
namespace :deployment do
|
76
|
+
desc 'Rebuild Pimcore classes'
|
77
|
+
task :'classes-rebuild' do
|
78
|
+
on release_roles :all do
|
79
|
+
within release_path do
|
80
|
+
execute :pimcore, "--environment=#{pimcore_environment}", 'deployment:classes-rebuild --create-classes'
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
namespace :thumbnails do
|
87
|
+
desc 'Generate Pimcore image thumbnails'
|
88
|
+
task :image do
|
89
|
+
on release_roles :all do
|
90
|
+
within release_path do
|
91
|
+
execute :pimcore, "--environment=#{pimcore_environment}", 'thumbnails:image'
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
desc 'Optimize Pimcore filesize of all images'
|
97
|
+
task :'optimize-images' do
|
98
|
+
on release_roles :all do
|
99
|
+
within release_path do
|
100
|
+
execute :pimcore, "--environment=#{pimcore_environment}", 'thumbnails:optimize-images'
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
desc 'Generate Pimcore video thumbnails'
|
106
|
+
task :video do
|
107
|
+
on release_roles :all do
|
108
|
+
within release_path do
|
109
|
+
execute :pimcore, "--environment=#{pimcore_environment}", 'thumbnails:video'
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
# rubocop:disable Metrics/BlockLength
|
116
|
+
namespace :definition do
|
117
|
+
namespace :import do
|
118
|
+
desc 'Import Class definition from a JSON export'
|
119
|
+
task :class do
|
120
|
+
on release_roles :all do
|
121
|
+
within release_path do
|
122
|
+
execute :pimcore, "--environment=#{pimcore_environment}", 'definition:import:class'
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
desc 'Import FieldCollection definition from a JSON export'
|
128
|
+
task :fieldcollection do
|
129
|
+
on release_roles :all do
|
130
|
+
within release_path do
|
131
|
+
execute :pimcore, "--environment=#{pimcore_environment}", 'definition:import:fieldcollection'
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
desc 'Import ObjectBrick definition from a JSON export'
|
137
|
+
task :objectbrick do
|
138
|
+
on release_roles :all do
|
139
|
+
within release_path do
|
140
|
+
execute :pimcore, "--environment=#{pimcore_environment}", 'definition:import:objectbrick'
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
147
|
+
# rubocop:enable Metrics/BlockLength
|
metadata
ADDED
@@ -0,0 +1,136 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano-pimcore
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Mateusz Koszutowski
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-05-12 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: capistrano-composer
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.0'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 0.0.6
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0.0'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 0.0.6
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: bundler
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '1.13'
|
40
|
+
type: :development
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '1.13'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rake
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '10.0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '10.0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: rspec
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '3.0'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '3.0'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: rubocop
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0.48'
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0.48'
|
89
|
+
description: Pimcore plugin for capistrano
|
90
|
+
email:
|
91
|
+
- mkoszutowski@divante.pl
|
92
|
+
executables: []
|
93
|
+
extensions: []
|
94
|
+
extra_rdoc_files: []
|
95
|
+
files:
|
96
|
+
- ".gitignore"
|
97
|
+
- ".rspec"
|
98
|
+
- ".rubocop.yml"
|
99
|
+
- ".travis.yml"
|
100
|
+
- Gemfile
|
101
|
+
- LICENSE
|
102
|
+
- README.md
|
103
|
+
- Rakefile
|
104
|
+
- bin/console
|
105
|
+
- bin/setup
|
106
|
+
- capistrano-pimcore.gemspec
|
107
|
+
- lib/capistrano/pimcore.rb
|
108
|
+
- lib/capistrano/pimcore/defaults.rb
|
109
|
+
- lib/capistrano/pimcore/deploy.rb
|
110
|
+
- lib/capistrano/pimcore/version.rb
|
111
|
+
- lib/capistrano/tasks/deploy.rake
|
112
|
+
- lib/capistrano/tasks/pimcore.rake
|
113
|
+
homepage: https://github.com/DivanteLtd/capistrano-pimcore
|
114
|
+
licenses: []
|
115
|
+
metadata: {}
|
116
|
+
post_install_message:
|
117
|
+
rdoc_options: []
|
118
|
+
require_paths:
|
119
|
+
- lib
|
120
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - ">="
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '0'
|
130
|
+
requirements: []
|
131
|
+
rubyforge_project:
|
132
|
+
rubygems_version: 2.4.6
|
133
|
+
signing_key:
|
134
|
+
specification_version: 4
|
135
|
+
summary: Pimcore plugin for capistrano
|
136
|
+
test_files: []
|