wp-capistrano3 0.0.24 → 0.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 0a98c821bb086e17f0e7f575d50a0500b26d6871c48d060e4e2f491a92367687
         | 
| 4 | 
            +
              data.tar.gz: cda4a6fd4c4f5e5386e88d902cab5116a083cac93c677f9642812cb868f01b4d
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 10f898c1d5966af2b558c037d51e95cef67982456798923df2b81f5f409c7f5e5edbe0a32e5d5db253480b55371ce7dee51811957f5ce14ca0f86bb82ebe597a
         | 
| 7 | 
            +
              data.tar.gz: 89e159484feb520eec4ddeefdbbc3e7290ba185cde6bd483426897e6b4d437067e65ce075780b28f4367582fd6ec792a94a733162f0a0d21c3d845e1c44965b4
         | 
| @@ -3,7 +3,7 @@ namespace "wp-capistrano" do | |
| 3 3 | 
             
              task :install_wordpress do
         | 
| 4 4 | 
             
                on roles(:app), filter: :no_release do
         | 
| 5 5 | 
             
                      puts "#{shared_path}/wp-config.php exist ?"
         | 
| 6 | 
            -
                      if ( | 
| 6 | 
            +
                      if test("[ -f #{shared_path}/wp-config.php ]") == false
         | 
| 7 7 | 
             
                      	execute "php #{fetch(:tmp_dir)}/wp-cli.phar config create --dbname=#{fetch(:wp_db_name)} --dbuser=#{fetch(:wp_db_user)} --dbpass=#{fetch(:wp_db_password)} --dbhost='#{fetch(:wp_db_host)}'  --locale=#{fetch(:wp_locale)} --path=#{release_path}"
         | 
| 8 8 | 
             
                      	execute "cp #{release_path}/wp-config.php #{shared_path}/"
         | 
| 9 9 | 
             
                      end
         | 
| @@ -0,0 +1,29 @@ | |
| 1 | 
            +
            namespace "wp-capistrano" do
         | 
| 2 | 
            +
              desc 'Install plugins dependencies using composer'
         | 
| 3 | 
            +
              task :plugins_composer_install do
         | 
| 4 | 
            +
                  on roles(:app) do
         | 
| 5 | 
            +
                    pluginDirectory = "#{release_path}/wp-content/plugins/"
         | 
| 6 | 
            +
             | 
| 7 | 
            +
                    Dir.foreach(pluginDirectory) { |directory| 
         | 
| 8 | 
            +
                      if (directory != "." and directory != "..")
         | 
| 9 | 
            +
                        puts "#################################\n# Plugin #{directory}\n#################################" 
         | 
| 10 | 
            +
                        Dir.chdir(pluginDirectory + directory) do
         | 
| 11 | 
            +
                          puts 
         | 
| 12 | 
            +
                          if (Dir.exist?(Dir.pwd + '/vendor') == false && File.exist?(Dir.pwd + '/composer.lock') == true)
         | 
| 13 | 
            +
                            puts '=> NEED INSTALL : There is no vendor installed and composer.lock'
         | 
| 14 | 
            +
                            execute "ls #{release_path}/wp-content/plugins/"
         | 
| 15 | 
            +
                            execute "composer install --working-dir=#{release_path}/wp-content/plugins/" + directory
         | 
| 16 | 
            +
                          else
         | 
| 17 | 
            +
                            puts '=> NO NEED INSTALL'
         | 
| 18 | 
            +
                          end
         | 
| 19 | 
            +
                        end
         | 
| 20 | 
            +
             | 
| 21 | 
            +
                        puts ' '
         | 
| 22 | 
            +
                      end
         | 
| 23 | 
            +
                    }
         | 
| 24 | 
            +
                    
         | 
| 25 | 
            +
                    puts "#################################\n#End Install Plugins\n#################################"
         | 
| 26 | 
            +
                  end
         | 
| 27 | 
            +
              end
         | 
| 28 | 
            +
            end
         | 
| 29 | 
            +
             | 
| @@ -1,6 +1,7 @@ | |
| 1 1 | 
             
            # Default Flow
         | 
| 2 2 | 
             
            #before 'deploy:check:linked_files', 'wp-capistrano:create_wp_config'
         | 
| 3 | 
            -
            before 'deploy: | 
| 3 | 
            +
            before 'deploy:updated', 'wp-capistrano:download_wordpress'
         | 
| 4 4 | 
             
            after 'wp-capistrano:download_wordpress', 'wp-capistrano:install_wordpress'
         | 
| 5 5 | 
             
            after 'wp-capistrano:install_plugins', 'wp-capistrano:update_wordpress'
         | 
| 6 | 
            -
            after ' | 
| 6 | 
            +
            after 'wp-capistrano:install_wordpress', 'plugins_composer_install'
         | 
| 7 | 
            +
            after 'plugins_composer_install', 'wp-capistrano:install_plugins'
         | 
| @@ -3,6 +3,7 @@ load File.expand_path("../tasks/download_wordpress.rake", __FILE__) | |
| 3 3 | 
             
            load File.expand_path("../tasks/install_wordpress.rake", __FILE__)
         | 
| 4 4 | 
             
            load File.expand_path("../tasks/update_wordpress.rake", __FILE__)
         | 
| 5 5 | 
             
            load File.expand_path("../tasks/install_plugins.rake", __FILE__)
         | 
| 6 | 
            +
            load File.expand_path("../tasks/plugins_composer_install.rake", __FILE__)
         | 
| 6 7 |  | 
| 7 8 | 
             
            namespace :load do
         | 
| 8 9 | 
             
              task :defaults do
         | 
    
        data/wp-capistrano.gemspec
    CHANGED
    
    | @@ -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          = 'wp-capistrano3'
         | 
| 7 | 
            -
              spec.version       = '0.0. | 
| 7 | 
            +
              spec.version       = '0.0.28'
         | 
| 8 8 | 
             
              spec.authors       = ['Nicolas RENAULT']
         | 
| 9 9 | 
             
              spec.email         = ['nrenault@tangkoko.com']
         | 
| 10 10 | 
             
              spec.description   = %q{Wordpress tasks for Capistrano 3.x}
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: wp-capistrano3
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.0. | 
| 4 | 
            +
              version: 0.0.28
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Nicolas RENAULT
         | 
| @@ -71,6 +71,7 @@ files: | |
| 71 71 | 
             
            - lib/capistrano/tasks/download_wordpress.rake
         | 
| 72 72 | 
             
            - lib/capistrano/tasks/install_plugins.rake
         | 
| 73 73 | 
             
            - lib/capistrano/tasks/install_wordpress.rake
         | 
| 74 | 
            +
            - lib/capistrano/tasks/plugins_composer_install.rake
         | 
| 74 75 | 
             
            - lib/capistrano/tasks/update_wordpress.rake
         | 
| 75 76 | 
             
            - lib/capistrano/wp-capistrano.rb
         | 
| 76 77 | 
             
            - lib/capistrano/wp-capistrano/defaults.rb
         |