locomotivecms 4.0.0 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,6 +22,7 @@ module Locomotive
22
22
  end
23
23
 
24
24
  def bulk_create
25
+ authorize Locomotive::ContentAsset, :create?
25
26
  @content_assets = service.bulk_create(content_assets_params)
26
27
  respond_with @content_assets, location: content_assets_path
27
28
  end
@@ -14,6 +14,7 @@ module Locomotive
14
14
  end
15
15
 
16
16
  def update
17
+ authorize ContentEntry
17
18
  @options = service.update_select_options(options_params.map(&:to_h))
18
19
  respond_with @custom_field, location: -> { last_saved_location!(default_back_location) }
19
20
  end
@@ -16,10 +16,11 @@ module Locomotive
16
16
  _options = options.deep_symbolize_keys
17
17
 
18
18
  _options[:via] = _options[:via].to_sym if _options[:via]
19
+ _options[:via_options] ||= {}
19
20
 
20
- if _options[:via_options] && (value = _options[:via_options][:authentication])
21
- _options[:via_options][:authentication] = value.to_sym
22
- end
21
+ _options[:via_options][:authentication] = _options.dig(:via_options, :authentication).presence&.to_sym
22
+ _options[:via_options][:user_name] = _options.dig(:via_options, :user_name).presence
23
+ _options[:via_options][:password] = _options.dig(:via_options, :password).presence
23
24
 
24
25
  # if attachments, decode them because they were enccoding in base64
25
26
  if attachments = _options.delete(:attachments)
@@ -9,6 +9,6 @@ ul.navigation-links
9
9
  li= link_to t(:sites, scope: 'locomotive.shared.header'), sites_path
10
10
  - if policy(current_locomotive_account).edit?
11
11
  li= link_to t(:account, scope: 'locomotive.shared.header'), edit_my_account_path(_location: request.fullpath)
12
- li= link_to t(:help, scope: 'locomotive.shared.header'), 'http://locomotive-v3.readme.io', target: '_blank'
12
+ li= link_to t(:help, scope: 'locomotive.shared.header'), 'https://doc.locomotivecms.com', target: '_blank'
13
13
  li class="divider"
14
14
  li= link_to t(:logout, scope: 'locomotive.shared.header'), sign_out_path, data: { method: 'delete' }
@@ -32,6 +32,7 @@ module Locomotive
32
32
  end
33
33
 
34
34
  RUBY
35
+ end
35
36
  else
36
37
  template 'carrierwave.rb', 'config/initializers/carrierwave.rb'
37
38
  end
@@ -22,6 +22,11 @@ CarrierWave.configure do |config|
22
22
  region: ENV['S3_BUCKET_REGION']
23
23
  }
24
24
 
25
+ # Use a different endpoint (eg: another provider such as Exoscale)
26
+ if ENV['S3_ENDPOINT'].present?
27
+ config.aws_credentials[:endpoint] = ENV['S3_ENDPOINT']
28
+ end
29
+
25
30
  # Put your CDN host below instead
26
31
  if ENV['S3_ASSET_HOST_URL'].present?
27
32
  config.asset_host = ENV['S3_ASSET_HOST_URL']
@@ -3,7 +3,7 @@ module Locomotive
3
3
 
4
4
  class LiquidParserWithCacheService < LiquidParserService
5
5
 
6
- UNMARSHALABLE_OPTIONS = %i(parser page parent_finder snippet_finder section_finder locale).freeze
6
+ UNMARSHALABLE_OPTIONS = %i(parser page parent_finder snippet_finder section_finder).freeze
7
7
 
8
8
  attr_accessor_initialize :current_site, :parent_finder, :snippet_finder, :locale
9
9
 
@@ -1,3 +1,3 @@
1
1
  module Locomotive
2
- VERSION = '4.0.0'
2
+ VERSION = '4.0.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: locomotivecms
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Didier Lafforgue
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-20 00:00:00.000000000 Z
11
+ date: 2020-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 5.2.3
19
+ version: 5.2.4.1
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '6.0'
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 5.2.3
29
+ version: 5.2.4.1
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '6.0'
@@ -176,14 +176,14 @@ dependencies:
176
176
  requirements:
177
177
  - - "~>"
178
178
  - !ruby/object:Gem::Version
179
- version: 1.5.0
179
+ version: 1.5.1
180
180
  type: :runtime
181
181
  prerelease: false
182
182
  version_requirements: !ruby/object:Gem::Requirement
183
183
  requirements:
184
184
  - - "~>"
185
185
  - !ruby/object:Gem::Version
186
- version: 1.5.0
186
+ version: 1.5.1
187
187
  - !ruby/object:Gem::Dependency
188
188
  name: slim
189
189
  requirement: !ruby/object:Gem::Requirement
@@ -1413,7 +1413,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1413
1413
  - !ruby/object:Gem::Version
1414
1414
  version: '0'
1415
1415
  requirements: []
1416
- rubygems_version: 3.0.3
1416
+ rubygems_version: 3.0.6
1417
1417
  signing_key:
1418
1418
  specification_version: 4
1419
1419
  summary: A platform to create, publish and edit sites