Sha256: 598b28a663a30eaceb162e464aefebc1f0c00b99a3341778dfde56192ec3d2c5

Contents?: true

Size: 432 Bytes

Versions: 15

Compression:

Stored size: 432 Bytes

Contents

module Locomotive::Wagon

  class PushSnippetsCommand < PushBaseCommand

    def entities
      repositories.snippet.all
    end

    def decorate(entity)
      SnippetDecorator.new(entity, locale, default_locale)
    end

    def persist(decorated_entity)
      api_client.snippets.update(decorated_entity.slug, decorated_entity.to_hash)
    end

    def label_for(decorated_entity)
      decorated_entity.name
    end

  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
locomotivecms_wagon-2.0.0 lib/locomotive/wagon/commands/push_sub_commands/push_snippets_command.rb
locomotivecms_wagon-2.0.0.rc8 lib/locomotive/wagon/commands/push_sub_commands/push_snippets_command.rb
locomotivecms_wagon-2.0.0.rc7 lib/locomotive/wagon/commands/push_sub_commands/push_snippets_command.rb
locomotivecms_wagon-2.0.0.rc6 lib/locomotive/wagon/commands/push_sub_commands/push_snippets_command.rb
locomotivecms_wagon-2.0.0.rc5 lib/locomotive/wagon/commands/push_sub_commands/push_snippets_command.rb
locomotivecms_wagon-2.0.0.rc4 lib/locomotive/wagon/commands/push_sub_commands/push_snippets_command.rb
locomotivecms_wagon-2.0.0.rc3 lib/locomotive/wagon/commands/push_sub_commands/push_snippets_command.rb
locomotivecms_wagon-2.0.0.rc2 lib/locomotive/wagon/commands/push_sub_commands/push_snippets_command.rb
locomotivecms_wagon-2.0.0.rc1 lib/locomotive/wagon/commands/push_sub_commands/push_snippets_command.rb
locomotivecms_wagon-2.0.0.pre.beta.2 lib/locomotive/wagon/commands/push_sub_commands/push_snippets_command.rb
locomotivecms_wagon-2.0.0.pre.beta.1 lib/locomotive/wagon/commands/push_sub_commands/push_snippets_command.rb
locomotivecms_wagon-2.0.0.pre.alpha.3 lib/locomotive/wagon/commands/push_sub_commands/push_snippets_command.rb
locomotivecms_wagon-2.0.0.pre.alpha.2 lib/locomotive/wagon/commands/push_sub_commands/push_snippets_command.rb
locomotivecms_wagon-2.0.0.pre.alpha.1 lib/locomotive/wagon/commands/push_sub_commands/push_snippets_command.rb
locomotivecms_wagon-2.0.0.pre.alpha lib/locomotive/wagon/commands/push_sub_commands/push_snippets_command.rb