Sha256: 684753b75948091f9e96b4f9474b0881db99e569e6747a76eb60ec797c5fcc12

Contents?: true

Size: 656 Bytes

Versions: 100

Compression:

Stored size: 656 Bytes

Contents

# frozen_string_literal: true

require 'avm/instances/entry_keys'
require 'avm/eac_webapp_base0/instance'

module Avm
  module EacWordpressBase0
    class Instance < ::Avm::EacWebappBase0::Instance
      FILES_UNITS = { uploads: 'wp-content/uploads', themes: 'wp-content/themes' }.freeze

      def database_unit
        web_url = read_entry(::Avm::Instances::EntryKeys::WEB_URL)
        super.after_load do
          info 'Fixing web addresses...'
          run_sql(<<~SQL)
            update wp_options
            set option_value = '#{web_url}'
            where option_name in ('siteurl', 'home')
          SQL
        end
      end
    end
  end
end

Version data entries

100 entries across 100 versions & 2 rubygems

Version Path
avm-tools-0.128.0 lib/avm/eac_wordpress_base0/instance.rb
eac_tools-0.15.0 sub/avm-tools/lib/avm/eac_wordpress_base0/instance.rb
eac_tools-0.14.0 sub/avm-tools/lib/avm/eac_wordpress_base0/instance.rb
eac_tools-0.13.0 sub/avm-tools/lib/avm/eac_wordpress_base0/instance.rb
avm-tools-0.127.0 lib/avm/eac_wordpress_base0/instance.rb
eac_tools-0.12.0 sub/avm-tools/lib/avm/eac_wordpress_base0/instance.rb
avm-tools-0.126.0 lib/avm/eac_wordpress_base0/instance.rb
eac_tools-0.11.1 sub/avm-tools/lib/avm/eac_wordpress_base0/instance.rb
avm-tools-0.125.0 lib/avm/eac_wordpress_base0/instance.rb
eac_tools-0.11.0 sub/avm-tools/lib/avm/eac_wordpress_base0/instance.rb
avm-tools-0.124.0 lib/avm/eac_wordpress_base0/instance.rb
eac_tools-0.10.0 sub/avm-tools/lib/avm/eac_wordpress_base0/instance.rb
avm-tools-0.123.0 lib/avm/eac_wordpress_base0/instance.rb
eac_tools-0.9.0 sub/avm-tools/lib/avm/eac_wordpress_base0/instance.rb
avm-tools-0.122.0 lib/avm/eac_wordpress_base0/instance.rb
eac_tools-0.8.0 sub/avm-tools/lib/avm/eac_wordpress_base0/instance.rb
eac_tools-0.7.0 sub/avm-tools/lib/avm/eac_wordpress_base0/instance.rb
eac_tools-0.6.0 sub/avm-tools/lib/avm/eac_wordpress_base0/instance.rb
avm-tools-0.121.2 lib/avm/eac_wordpress_base0/instance.rb
eac_tools-0.5.0 sub/avm-tools/lib/avm/eac_wordpress_base0/instance.rb