capistrano-magento 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: 0cb144aea96b241bc0c149983929af5d24779499
4
+ data.tar.gz: 7041e63d744f563265ba7c2f7db67809ca379df6
5
+ SHA512:
6
+ metadata.gz: 68f77cc9e7fc1b1da3a64fd5821368cc610096afddcd1d4f4dec34a0766041d2a423b7f0a5299be4a31fa89ca548de759a26bf1feedd04c226c9aff4697e5b67
7
+ data.tar.gz: 43113798e22dbe62f54aaf7013e53760f3ea2a477ba9f8a9921cf772d0d324ea571a73e8432400b3d22c1ecd78366c2de01f3b72b14d9ed044d0c0808ace6abb
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in capistrano-magento.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2013 Peter Rhoades
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ 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, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,60 @@
1
+ # Capistrano::Magento
2
+
3
+ [Magento](http://magento.com) specific tasks and defaults for [Capistrano](https://github.com/capistrano/capistrano) deployment.
4
+
5
+ ## Installation
6
+
7
+ $ gem install capistrano-magento
8
+
9
+ ## Usage
10
+
11
+ First install Capistrano into your Magneto project, this will create some new files and directories.
12
+
13
+ $ cd /my/magento/project
14
+ $ cap install
15
+
16
+ Now update your `Capfile`:
17
+
18
+ # Capfile
19
+ require 'capistrano/magento'
20
+
21
+ A number of defaults have been set on the following options, you can of course override these with your own values:
22
+
23
+ # config/deploy.rb
24
+ set :linked_dirs, [ "var", "media", "sitemaps" ]
25
+ set :linked_files, [ "app/etc/local.xml" ]
26
+
27
+ Configure your stages, check out the [getting started guide for Capistrano](http://capistranorb.com/documentation/getting-started/preparing-your-application/)
28
+
29
+ $ tree config/deploy
30
+ config/deploy
31
+ ├── production.rb
32
+ └── staging.rb
33
+
34
+ These are the available Magento specific tasks, most of these are shortcuts to the shell commands already available in Magento:
35
+
36
+ $ cap -T
37
+ ...
38
+ cap magento:clear_cache # Clear the Magento Cache
39
+ cap magento:compiler:clear # Disable compiler include path and remove compiled files
40
+ cap magento:compiler:compile # Run compilation process and enable compiler include path
41
+ cap magento:compiler:disable # Disable compiler include path
42
+ cap magento:compiler:enable # Enable compiler include path
43
+ cap magento:indexer:reindexall # Reindex data by all indexers
44
+ cap magento:logs:clean # Clean logs
45
+ cap magento:maintenance:off # Turn off maintenance mode by removing maintenance.flag file
46
+ cap magento:maintenance:on # Turn on maintenance mode by creating maintenance.flag file
47
+
48
+ Run them in the standard Capistrano way, for example
49
+
50
+ $ cap production magento:maintenance:on
51
+
52
+ Checkout the [Capistrano documentation](http://capistranorb.com/) and [Readme](https://github.com/capistrano/capistrano/blob/master/README.md) for more information about setting up deployment.
53
+
54
+ ## Contributing
55
+
56
+ 1. Fork it
57
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
58
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
59
+ 4. Push to the branch (`git push origin my-new-feature`)
60
+ 5. Create new Pull Request
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
+ Gem::Specification.new do |gem|
6
+ gem.name = "capistrano-magento"
7
+ gem.version = "0.0.1"
8
+ gem.authors = ["Peter Rhoades"]
9
+ gem.email = ["createdbypete@gmail.com"]
10
+ gem.description = %q{Magento specific tasks for Capistrano}
11
+ gem.summary = %q{Magento specific tasks for Capistrano}
12
+ gem.homepage = "http://github.com/createdbypete/capistrano-magento"
13
+ gem.license = "MIT"
14
+
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
17
+ gem.require_paths = ["lib"]
18
+
19
+ gem.add_dependency "capistrano", "~> 3.1"
20
+ end
@@ -0,0 +1 @@
1
+ load File.expand_path("../tasks/magento.rake", __FILE__)
@@ -0,0 +1,97 @@
1
+ namespace :magento do
2
+ desc "Clear the Magento Cache"
3
+ task :clear_cache do
4
+ on roles(:app) do
5
+ within release_path do
6
+ execute :php, "-r", "\"require_once('app/Mage.php'); Mage::app()->cleanCache(); \""
7
+ end
8
+ end
9
+ end
10
+
11
+ namespace :maintenance do
12
+ desc "Turn on maintenance mode by creating maintenance.flag file"
13
+ task :on do
14
+ on roles(:app) do
15
+ within release_path do
16
+ execute :touch, "#{release_path}/maintenance.flag"
17
+ end
18
+ end
19
+ end
20
+
21
+ desc "Turn off maintenance mode by removing maintenance.flag file"
22
+ task :off do
23
+ on roles(:app) do
24
+ within release_path do
25
+ execute :rm, "-f", "#{release_path}/maintenance.flag"
26
+ end
27
+ end
28
+ end
29
+ end
30
+
31
+ namespace :compiler do
32
+ desc "Run compilation process and enable compiler include path"
33
+ task :compile do
34
+ on roles(:app) do
35
+ within "#{release_path}/shell" do
36
+ execute :php, "-f", "compiler.php", "--", "compile"
37
+ end
38
+ end
39
+ end
40
+
41
+ desc "Enable compiler include path"
42
+ task :enable do
43
+ on roles(:app) do
44
+ within "#{release_path}/shell" do
45
+ execute :php, "-f", "compiler.php", "--", "enable"
46
+ end
47
+ end
48
+ end
49
+
50
+ desc "Disable compiler include path"
51
+ task :disable do
52
+ on roles(:app) do
53
+ within "#{release_path}/shell" do
54
+ execute :php, "-f", "compiler.php", "--", "disable"
55
+ end
56
+ end
57
+ end
58
+
59
+ desc "Disable compiler include path and remove compiled files"
60
+ task :clear do
61
+ on roles(:app) do
62
+ within "#{release_path}/shell" do
63
+ execute :php, "-f", "compiler.php", "--", "clear"
64
+ end
65
+ end
66
+ end
67
+ end
68
+
69
+ namespace :indexer do
70
+ desc "Reindex data by all indexers"
71
+ task :reindexall do
72
+ on roles(:db) do
73
+ within "#{release_path}/shell" do
74
+ execute :php, "-f", "indexer.php", "--", "reindexall"
75
+ end
76
+ end
77
+ end
78
+ end
79
+
80
+ namespace :logs do
81
+ desc "Clean logs"
82
+ task :clean do
83
+ on roles(:db) do
84
+ within "#{release_path}/shell" do
85
+ execute :php, "-f", "log.php", "--", "clean"
86
+ end
87
+ end
88
+ end
89
+ end
90
+ end
91
+
92
+ namespace :load do
93
+ task :defaults do
94
+ set :linked_dirs, fetch(:linked_dirs, []).push("var", "media", "sitemaps")
95
+ set :linked_files, fetch(:linked_files, []).push("app/etc/local.xml")
96
+ end
97
+ end
File without changes
metadata ADDED
@@ -0,0 +1,67 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-magento
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Peter Rhoades
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-02-05 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: Magento specific tasks for Capistrano
28
+ email:
29
+ - createdbypete@gmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - ".gitignore"
35
+ - Gemfile
36
+ - LICENSE
37
+ - README.md
38
+ - Rakefile
39
+ - capistrano-magento.gemspec
40
+ - lib/capistrano-magento.rb
41
+ - lib/capistrano/magento.rb
42
+ - lib/capistrano/tasks/magento.rake
43
+ homepage: http://github.com/createdbypete/capistrano-magento
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.2.0
64
+ signing_key:
65
+ specification_version: 4
66
+ summary: Magento specific tasks for Capistrano
67
+ test_files: []