Remove commented and useless old code

did committed Jan 25, 2016
commit 11a27fe2d48ebe7f47ecad39e9564160a17cfb98
Showing 3 changed files with 5 additions and 8 deletions
locomotive/wagon/cli.rb b/lib/locomotive/wagon/cli.rb +0 -5
@@ @@ -270,15 +270,10 @@ module Locomotive
option :force, aliases: '-f', type: 'boolean', default: false, desc: 'Stop the current daemonized Thin server if found before starting a new one'
option :verbose, aliases: '-v', type: 'boolean', default: false, desc: 'display the full error stack trace if an error occurs'
def serve(path = '.')
- # parent_pid = Process.pid
force_color_if_asked(options)
if check_path!(path)
begin
Locomotive::Wagon.serve(path, options, shell)
- # rescue SystemExit => e
- # if parent_pid == Process.pid
- # say "Your site is served now.", :green
- # end
rescue Exception => e
self.print_exception(e, options[:verbose])
exit(1)
locomotive/wagon/commands/push_sub_commands/push_site_command.rb b/lib/locomotive/wagon/commands/push_sub_commands/push_site_command.rb +2 -0
@@ @@ -19,6 +19,8 @@ module Locomotive::Wagon
# push the locales as long as there is no content on the remote site yet
_attributes.delete(:locales) if remote_site.edited?
+ _attributes.delete(:metafields) unless with_data?
+
if _attributes.present?
api_client.current_site.update(_attributes)
else
locomotive/wagon/decorators/site_decorator.rb b/lib/locomotive/wagon/decorators/site_decorator.rb +3 -3
@@ @@ -18,14 +18,14 @@ module Locomotive
end
end
- %i(robots_txt timezone seo_title meta_keywords meta_description).each do |name|
+ %i(robots_txt timezone seo_title meta_keywords meta_description metafields_schema metafields).each do |name|
define_method(name) do
self[name]
end
end
def __attributes__
- %i(name handle robots_txt locales timezone seo_title meta_keywords meta_description picture)
+ %i(name handle robots_txt locales timezone seo_title meta_keywords meta_description picture metafields_schema metafields)
end
def edited?
@@ @@ -37,7 +37,7 @@ module Locomotive
class UpdateSiteDecorator < SiteDecorator
def __attributes__
- %i(picture locales)
+ %i(picture locales metafields_schema metafields)
end
end