allow users to specify which item(s) of a resource can be pushed

did committed Jul 15, 2015
commit 1a0108c9d7cf9dd77c59a82cd0ea29dda60a933d
Showing 3 changed files with 3 additions and 2 deletions
locomotive/wagon/cli.rb b/lib/locomotive/wagon/cli.rb +1 -0
@@ @@ -300,6 +300,7 @@ module Locomotive
method_option :force, aliases: '-f', type: 'boolean', default: false, desc: 'Force the push of a resource'
method_option :translations, aliases: '-t', type: 'boolean', default: false, desc: 'Push the local translations (by default, they are not)'
method_option :data, aliases: '-d', type: 'boolean', default: false, desc: 'Push the content entries and the editable elements (by default, they are not)'
+ method_option :only_resource, aliases: '-o', type: 'array', default: [], desc: 'Push only the resources whose slug / fullpath matches the list of strings passed in argument'
method_option :shell, type: 'boolean', default: true, desc: 'Use shell to ask for missing connection information like the subdomain (in this case, take a random one)'
method_option :verbose, aliases: '-v', type: 'boolean', default: false, desc: 'display the full error stack trace if an error occurs'
def push(env, path = '.')
locomotivecms_wagon.gemspec +1 -1
@@ @@ -35,7 +35,7 @@ Gem::Specification.new do |gem|
gem.add_dependency 'httmultiparty', '0.3.10'
gem.add_dependency 'will_paginate', '~> 3.0.3'
- gem.add_dependency 'locomotivecms_mounter', '~> 1.5.5'
+ gem.add_dependency 'locomotivecms_mounter', '~> 1.5.6'
gem.add_dependency 'faker', '~> 0.9.5'
spec/fixtures/default/app/views/pages/layouts/simple.liquid.haml +1 -1
@@ @@ -10,4 +10,4 @@ is_layout: true
%body
%h1 {% editable_short_text title %}[TODO]{% endeditable_short_text %}
.text
- {% editable_text content, format: html, rows: 5 %}[TODO]{% editable_text %}
+ {% editable_text content, format: html, rows: 5 %}[TODO]{% endeditable_text %}