Sha256: 78ea11ee3ed3e57b0c73af23cad9d336219a879ce0e961aacf9b95f6e2bab710

Contents?: true

Size: 691 Bytes

Versions: 12

Compression:

Stored size: 691 Bytes

Contents

# frozen_string_literal: true

require 'avm/stereotypes/eac_webapp_base0/instance'

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

        def database_unit
          self_instance = self
          super.after_load do
            info 'Fixing web addresses...'
            run_sql(<<~SQL)
              update wp_options
              set option_value = '#{self_instance.read_entry('url')}'
              where option_name in ('siteurl', 'home')
            SQL
          end
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
avm-tools-0.30.0 lib/avm/stereotypes/eac_wordpress_base0/instance.rb
avm-tools-0.28.0 lib/avm/stereotypes/eac_wordpress_base0/instance.rb
avm-tools-0.27.0 lib/avm/stereotypes/eac_wordpress_base0/instance.rb
avm-tools-0.26.0 lib/avm/stereotypes/eac_wordpress_base0/instance.rb
avm-tools-0.25.0 lib/avm/stereotypes/eac_wordpress_base0/instance.rb
avm-tools-0.24.0 lib/avm/stereotypes/eac_wordpress_base0/instance.rb
avm-tools-0.23.0 lib/avm/stereotypes/eac_wordpress_base0/instance.rb
avm-tools-0.22.0 lib/avm/stereotypes/eac_wordpress_base0/instance.rb
avm-tools-0.21.0 lib/avm/stereotypes/eac_wordpress_base0/instance.rb
avm-tools-0.20.0 lib/avm/stereotypes/eac_wordpress_base0/instance.rb
avm-tools-0.19.0 lib/avm/stereotypes/eac_wordpress_base0/instance.rb
avm-tools-0.18.0 lib/avm/stereotypes/eac_wordpress_base0/instance.rb