Skip to content

Commit

Permalink
new site property: overwrite_same_content_assets + prepare a new rele…
Browse files Browse the repository at this point in the history
…ase (WIP)
  • Loading branch information
did committed Sep 6, 2021
1 parent 3df263c commit 1bb0698
Show file tree
Hide file tree
Showing 10 changed files with 3,575 additions and 3,576 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ gem 'wdm', '~> 0.1.1', require: 'wdm' if RUBY_PLATFORM =~ /mswin|mingw/i
# Development
gem 'locomotivecms_common', github: 'locomotivecms/common', ref: '2f9ba59' , require: false
gem 'locomotivecms_coal', github: 'locomotivecms/coal', ref: '3c5f8f8', require: false
gem 'locomotivecms_steam', github: 'locomotivecms/steam', ref: 'db1ad38', require: false
# gem 'locomotivecms_steam', github: 'locomotivecms/steam', ref: 'db1ad38', require: false
# gem 'duktape', github: 'judofyr/duktape.rb', ref: '20ef6a5'

# Local development
# gem 'locomotivecms_coal', path: '../coal', require: false
# gem 'locomotivecms_steam', path: '../steam', require: false
gem 'locomotivecms_steam', path: '../steam', require: false
# gem 'locomotivecms_common', path: '../common', require: false

group :development, :test do
Expand Down
6 changes: 1 addition & 5 deletions lib/locomotive/wagon/decorators/content_type_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __attributes__
public_submission_title_template
public_submission_email_attachments
recaptcha_required entry_template display_settings filter_fields
import_enabled overwrite_same_content_assets)
import_enabled)
end

def fields
Expand Down Expand Up @@ -88,10 +88,6 @@ def import_enabled
self[:import_enabled]
end

def overwrite_same_content_assets
self[:overwrite_same_content_assets]
end

def with_relationships?
__getobj__.fields.associations.count > 0
end
Expand Down
9 changes: 6 additions & 3 deletions lib/locomotive/wagon/decorators/site_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,19 @@ def picture
end
end

def overwrite_same_content_assets
self[:overwrite_same_content_assets]
end

%i(robots_txt timezone seo_title meta_keywords meta_description asset_host routes).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 metafields_schema metafields metafields_ui asset_host sections_content routes)
%i(name handle robots_txt locales timezone seo_title meta_keywords meta_description picture metafields_schema metafields metafields_ui asset_host sections_content routes overwrite_same_content_assets)
end

end

class RemoteSiteDecorator < SimpleDelegator
Expand All @@ -71,7 +74,7 @@ def edited?
class UpdateSiteDecorator < SiteDecorator

def __attributes__
%i(picture timezone locales metafields_schema metafields metafields_ui asset_host sections_content routes)
%i(picture timezone locales metafields_schema metafields metafields_ui asset_host sections_content routes overwrite_same_content_assets)
end

end
Expand Down
2 changes: 1 addition & 1 deletion lib/locomotive/wagon/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Locomotive
module Wagon
VERSION = '3.0.5'
VERSION = '3.1.0.beta1'
end
end
2 changes: 1 addition & 1 deletion locomotivecms_wagon.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Gem::Specification.new do |gem|

gem.add_dependency 'locomotivecms_common', '~> 0.4.0'
gem.add_dependency 'locomotivecms_coal', '~> 1.7.0'
gem.add_dependency 'locomotivecms_steam', '~> 1.5.3'
gem.add_dependency 'locomotivecms_steam', '~> 1.6.0.beta1'

gem.add_dependency 'haml', '~> 5.1.2'
gem.add_dependency 'listen', '~> 3.3.1'
Expand Down
64 changes: 32 additions & 32 deletions spec/fixtures/cassettes/authenticate.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1bb0698

Please sign in to comment.