Sha256: bbc785db273f932e38303eb9e88613e1644cec8a7e85c75f085687a22b541a02

Contents?: true

Size: 562 Bytes

Versions: 22

Compression:

Stored size: 562 Bytes

Contents

module Wordmove
  module SqlAdapter
    class Wpcli
      attr_accessor :sql_content
      attr_reader :from, :to

      def initialize(source_config, dest_config, config_key)
        @from = source_config[config_key]
        @to = dest_config[config_key]
      end

      def command
        unless system('which wp > /dev/null 2>&1')
          raise UnmetPeerDependencyError, "WP-CLI is not installed or not in your $PATH"
        end

        "wp search-replace #{from} #{to} --quiet --skip-columns=guid --all-tables --allow-root"
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
wordmove-4.0.2.pre4 lib/wordmove/sql_adapter/wpcli.rb
wordmove-4.0.2.pre3 lib/wordmove/sql_adapter/wpcli.rb
wordmove-4.0.2.pre2 lib/wordmove/sql_adapter/wpcli.rb
wordmove-4.0.2.pre1 lib/wordmove/sql_adapter/wpcli.rb
wordmove-4.0.1 lib/wordmove/sql_adapter/wpcli.rb
wordmove-4.0.0 lib/wordmove/sql_adapter/wpcli.rb
wordmove-3.2.3 lib/wordmove/sql_adapter/wpcli.rb
wordmove-3.2.3pre2 lib/wordmove/sql_adapter/wpcli.rb
wordmove-3.2.3pre lib/wordmove/sql_adapter/wpcli.rb
wordmove-3.2.2 lib/wordmove/sql_adapter/wpcli.rb
wordmove-3.2.1 lib/wordmove/sql_adapter/wpcli.rb
wordmove-3.2.0 lib/wordmove/sql_adapter/wpcli.rb
wordmove-3.1.2 lib/wordmove/sql_adapter/wpcli.rb
wordmove-3.1.2.pre3 lib/wordmove/sql_adapter/wpcli.rb
wordmove-3.1.2.pre2 lib/wordmove/sql_adapter/wpcli.rb
wordmove-3.1.2.pre lib/wordmove/sql_adapter/wpcli.rb
wordmove-3.1.1 lib/wordmove/sql_adapter/wpcli.rb
wordmove-3.1.0 lib/wordmove/sql_adapter/wpcli.rb
wordmove-3.0.2 lib/wordmove/sql_adapter/wpcli.rb
wordmove-3.0.1 lib/wordmove/sql_adapter/wpcli.rb