Sha256: 5efd7b60142f740d0ff0d0e28ec79dc6323f212b65bfa398790fe63e062005bf

Contents?: true

Size: 704 Bytes

Versions: 10

Compression:

Stored size: 704 Bytes

Contents

module ThreeScaleToolbox
  module Commands
    module UpdateCommand
      module ServiceCommand
        class CopyServiceSettingsTask
          attr_reader :context

          def initialize(context)
            @context = context
          end

          def call
            target.update source_attrs

            puts "updated service settings for service id #{source.id}..."
          end

          private

          def source
            context[:source]
          end

          def target
            context[:target]
          end

          def source_attrs
            source.attrs.reject { |k, _| %w[system_name id links].include? k }
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
3scale_toolbox-0.19.3 lib/3scale_toolbox/commands/update_command/service_command/copy_service_settings_task.rb
3scale_toolbox-0.19.2 lib/3scale_toolbox/commands/update_command/service_command/copy_service_settings_task.rb
3scale_toolbox-0.19.1 lib/3scale_toolbox/commands/update_command/service_command/copy_service_settings_task.rb
3scale_toolbox-0.19.0 lib/3scale_toolbox/commands/update_command/service_command/copy_service_settings_task.rb
3scale_toolbox-0.18.3 lib/3scale_toolbox/commands/update_command/service_command/copy_service_settings_task.rb
3scale_toolbox-0.18.2 lib/3scale_toolbox/commands/update_command/service_command/copy_service_settings_task.rb
3scale_toolbox-0.18.0 lib/3scale_toolbox/commands/update_command/service_command/copy_service_settings_task.rb
3scale_toolbox-0.17.1 lib/3scale_toolbox/commands/update_command/service_command/copy_service_settings_task.rb
3scale_toolbox-0.17.0 lib/3scale_toolbox/commands/update_command/service_command/copy_service_settings_task.rb
3scale_toolbox-0.16.0 lib/3scale_toolbox/commands/update_command/service_command/copy_service_settings_task.rb