asset_sync 2.14.2 → 2.15.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56414f299dce966e768266fd6a06f73896a95fbd7747be08bf94481dcd25f6ce
4
- data.tar.gz: 906057c77eca271b2042aa174de7644c235f58cbd36db95dbec6eae17180f3d0
3
+ metadata.gz: 637e59bd4543dca69ef7f27a5bb8e6759e1ab082d4279ac9fa34c93dfbb249f8
4
+ data.tar.gz: b6855c7789d2ab8ae49abf0d9606204239ab1949574af540b8e1aec60d79de87
5
5
  SHA512:
6
- metadata.gz: f45ce18cf34f17ab8fb9fcfffe2ab9746fe8642fe02b779d8ed53b94f8ba884e23fae6c2180ee2b5478d756c5dd3510ae12b4055a4bd8a46e2447fee0f9e6d38
7
- data.tar.gz: 37b916a3e8531351719b209c58660a7e26438689ea5bc8c0ca059af83c879b764ec7333c4a9612db629a89ee381796535ee53a71af8dea0c2cbfdaa3c83c77dc
6
+ metadata.gz: '0947b76c9abcd8aea09106f954f76acabbf3b35a782d6b9af531325590359b66a89d9cf8fdd608a9f763e8c7d63d707780993713f667d9a8be9c144a3e7641f7'
7
+ data.tar.gz: 50255f748090ce2c2923344b4878bf875e9886d59929dd2888ef91416ec86063988ca3e16ee6f71a94cda540a779e3474a6468a49af8901fbd3b19bc7cdeee24
data/CHANGELOG.md CHANGED
@@ -18,8 +18,35 @@ This project adheres to [Semantic Versioning](http://semver.org/).
18
18
  - Nothing
19
19
 
20
20
 
21
- =======
22
- ## [2.14.2]
21
+ ## [2.15.2] - 2022-06-02
22
+
23
+ ### Fixed
24
+
25
+ - Fix incorrect commented code in asset_sync.yml
26
+ (https://github.com/AssetSync/asset_sync/pull/426)
27
+
28
+
29
+ ## [2.15.1] - 2021-11-22
30
+
31
+ ### Changed
32
+
33
+ - Update dev dependency `fog-azure-rm` to become `gitlab-fog-azure-rm`
34
+
35
+ ### Fixed
36
+
37
+ - Fix YAML config file parsing with Psych v4
38
+ (https://github.com/AssetSync/asset_sync/pull/422)
39
+
40
+
41
+ ## [2.15.0] - 2021-08-05
42
+
43
+ ### Added
44
+
45
+ - Add support for option `aws_acl`
46
+ (https://github.com/AssetSync/asset_sync/pull/420)
47
+
48
+
49
+ ## [2.14.2] - 2021-05-31
23
50
 
24
51
  ### Added
25
52
 
@@ -27,8 +54,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
27
54
  (https://github.com/AssetSync/asset_sync/pull/419)
28
55
 
29
56
 
30
- =======
31
- ## [2.14.1]
57
+ ## [2.14.1] - 2021-05-14
32
58
 
33
59
  ### Added
34
60
 
@@ -1020,7 +1046,10 @@ Changes:
1020
1046
  * Merge branch 'sinatra'
1021
1047
 
1022
1048
 
1023
- [Unreleased]: https://github.com/AssetSync/asset_sync/compare/v2.14.2...HEAD
1049
+ [Unreleased]: https://github.com/AssetSync/asset_sync/compare/v2.15.2...HEAD
1050
+ [2.15.2]: https://github.com/AssetSync/asset_sync/compare/v2.15.1...v2.15.2
1051
+ [2.15.1]: https://github.com/AssetSync/asset_sync/compare/v2.15.0...v2.15.1
1052
+ [2.15.0]: https://github.com/AssetSync/asset_sync/compare/v2.14.2...v2.15.0
1024
1053
  [2.14.2]: https://github.com/AssetSync/asset_sync/compare/v2.14.1...v2.14.2
1025
1054
  [2.14.1]: https://github.com/AssetSync/asset_sync/compare/v2.14.0...v2.14.1
1026
1055
  [2.14.0]: https://github.com/AssetSync/asset_sync/compare/v2.13.1...v2.14.0
data/README.md CHANGED
@@ -35,7 +35,10 @@ Or, to use Azure Blob storage, configure as this.
35
35
 
36
36
  ``` ruby
37
37
  gem "asset_sync"
38
- gem "fog-azure-rm"
38
+ gem "gitlab-fog-azure-rm"
39
+
40
+ # This gem seems unmaintianed
41
+ # gem "fog-azure-rm"
39
42
  ```
40
43
 
41
44
  To use Backblaze B2, insert these.
@@ -239,6 +242,11 @@ AssetSync.configure do |config|
239
242
  # Change AWS signature version. Default is 4
240
243
  # config.aws_signature_version = 4
241
244
  #
245
+ # Change canned ACL of uploaded object. Default is unset. Will override fog_public if set.
246
+ # Choose from: private | public-read | public-read-write | aws-exec-read |
247
+ # authenticated-read | bucket-owner-read | bucket-owner-full-control
248
+ # config.aws_acl = nil
249
+ #
242
250
  # Change host option in fog (only if you need to)
243
251
  # config.fog_host = 's3.amazonaws.com'
244
252
  #
@@ -309,6 +317,11 @@ defaults: &defaults
309
317
  # Change AWS signature version. Default is 4
310
318
  # aws_signature_version: 4
311
319
  #
320
+ # Change canned ACL of uploaded object. Default is unset. Will override fog_public if set.
321
+ # Choose from: private | public-read | public-read-write | aws-exec-read |
322
+ # authenticated-read | bucket-owner-read | bucket-owner-full-control
323
+ # aws_acl: null
324
+ #
312
325
  # Change host option in fog (only if you need to)
313
326
  # fog_host: "s3.amazonaws.com"
314
327
  #
@@ -420,6 +433,7 @@ The blocks are run when local files are being scanned and uploaded
420
433
 
421
434
  * **aws\_access\_key\_id**: your Amazon S3 access key
422
435
  * **aws\_secret\_access\_key**: your Amazon S3 access secret
436
+ * **aws\_acl**: set [canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl) of uploaded object, will override fog_public if set
423
437
 
424
438
  #### Rackspace
425
439
 
data/asset_sync.gemspec CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |s|
27
27
  s.add_development_dependency('mime-types', ">= 3.0")
28
28
 
29
29
  s.add_development_dependency "fog-aws"
30
- s.add_development_dependency "fog-azure-rm"
30
+ s.add_development_dependency "gitlab-fog-azure-rm"
31
31
  s.add_development_dependency "fog-backblaze"
32
32
 
33
33
  s.add_development_dependency "uglifier"
@@ -1,3 +1,5 @@
1
+ require "yaml"
2
+
1
3
  module AssetSync
2
4
 
3
5
  class << self
@@ -60,6 +62,14 @@ module AssetSync
60
62
  stdout.puts msg unless config.log_silently?
61
63
  end
62
64
 
65
+ def load_yaml(yaml)
66
+ if YAML.respond_to?(:unsafe_load)
67
+ YAML.unsafe_load(yaml)
68
+ else
69
+ YAML.load(yaml)
70
+ end
71
+ end
72
+
63
73
  def enabled?
64
74
  config.enabled?
65
75
  end
@@ -2,7 +2,6 @@
2
2
 
3
3
  require "active_model"
4
4
  require "erb"
5
- require "yaml"
6
5
 
7
6
  module AssetSync
8
7
  class Config
@@ -37,7 +36,15 @@ module AssetSync
37
36
  attr_reader :fog_public # e.g. true, false, "default"
38
37
 
39
38
  # Amazon AWS
40
- attr_accessor :aws_access_key_id, :aws_secret_access_key, :aws_session_token, :aws_reduced_redundancy, :aws_iam_roles, :aws_signature_version
39
+ attr_accessor :aws_access_key_id
40
+ attr_accessor :aws_secret_access_key
41
+ attr_accessor :aws_session_token
42
+ attr_accessor :aws_reduced_redundancy
43
+ attr_accessor :aws_iam_roles
44
+ attr_accessor :aws_signature_version
45
+ attr_accessor :aws_acl
46
+
47
+ # Fog
41
48
  attr_accessor :fog_host # e.g. 's3.amazonaws.com'
42
49
  attr_accessor :fog_port # e.g. '9000'
43
50
  attr_accessor :fog_path_style # e.g. true
@@ -176,7 +183,7 @@ module AssetSync
176
183
  end
177
184
 
178
185
  def yml
179
- @yml ||= ::YAML.load(::ERB.new(IO.read(yml_path)).result)[::Rails.env] || {}
186
+ @yml ||= ::AssetSync.load_yaml(::ERB.new(IO.read(yml_path)).result)[::Rails.env] || {}
180
187
  end
181
188
 
182
189
  def yml_path
@@ -221,6 +228,7 @@ module AssetSync
221
228
  self.aws_reduced_redundancy = yml["aws_reduced_redundancy"]
222
229
  self.aws_iam_roles = yml["aws_iam_roles"]
223
230
  self.aws_signature_version = yml["aws_signature_version"]
231
+ self.aws_acl = yml["aws_acl"]
224
232
  self.rackspace_username = yml["rackspace_username"]
225
233
  self.rackspace_auth_url = yml["rackspace_auth_url"] if yml.has_key?("rackspace_auth_url")
226
234
  self.rackspace_api_key = yml["rackspace_api_key"]
@@ -25,6 +25,7 @@ module AssetSync
25
25
  config.aws_secret_access_key = ENV['AWS_SECRET_ACCESS_KEY'] if ENV.has_key?('AWS_SECRET_ACCESS_KEY')
26
26
  config.aws_session_token = ENV['AWS_SESSION_TOKEN'] if ENV.has_key?('AWS_SESSION_TOKEN')
27
27
  config.aws_signature_version = ENV['AWS_SIGNATURE_VERSION'] if ENV.has_key?('AWS_SIGNATURE_VERSION')
28
+ config.aws_acl = ENV['AWS_ACL'] if ENV.has_key?('AWS_ACL')
28
29
  config.aws_reduced_redundancy = ENV['AWS_REDUCED_REDUNDANCY'] == true if ENV.has_key?('AWS_REDUCED_REDUNDANCY')
29
30
 
30
31
  config.rackspace_username = ENV['RACKSPACE_USERNAME'] if ENV.has_key?('RACKSPACE_USERNAME')
@@ -117,7 +117,7 @@ module AssetSync
117
117
  return manifest.assets.values.map { |f| File.join(self.config.assets_prefix, f) }
118
118
  elsif File.exist?(self.config.manifest_path)
119
119
  log "Using: Manifest #{self.config.manifest_path}"
120
- yml = YAML.load(IO.read(self.config.manifest_path))
120
+ yml = AssetSync.load_yaml(IO.read(self.config.manifest_path))
121
121
 
122
122
  return yml.map do |original, compiled|
123
123
  # Upload font originals and compiled
@@ -195,7 +195,9 @@ module AssetSync
195
195
 
196
196
  # region fog_public
197
197
 
198
- if config.fog_public.use_explicit_value?
198
+ if config.aws? && config.aws_acl
199
+ file[:acl] = config.aws_acl
200
+ elsif config.fog_public.use_explicit_value?
199
201
  file[:public] = config.fog_public.to_bool
200
202
  end
201
203
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AssetSync
4
- VERSION = "2.14.2"
4
+ VERSION = "2.15.2"
5
5
  end
@@ -11,6 +11,11 @@ if defined?(AssetSync)
11
11
  # Change AWS signature version. Default is 4
12
12
  # config.aws_signature_version = 4
13
13
  #
14
+ # Change canned ACL of uploaded object. Default is unset. Will override fog_public if set.
15
+ # Choose from: private | public-read | public-read-write | aws-exec-read |
16
+ # authenticated-read | bucket-owner-read | bucket-owner-full-control
17
+ # config.aws_acl = nil
18
+ #
14
19
  # Change host option in fog (only if you need to)
15
20
  # config.fog_host = "s3.amazonaws.com"
16
21
  #
@@ -10,11 +10,16 @@ defaults: &defaults
10
10
  # Change AWS signature version. Default is 4
11
11
  # aws_signature_version: 4
12
12
  #
13
+ # Change canned ACL of uploaded object. Default is unset. Will override fog_public if set.
14
+ # Choose from: private | public-read | public-read-write | aws-exec-read |
15
+ # authenticated-read | bucket-owner-read | bucket-owner-full-control
16
+ # aws_acl: null
17
+ #
13
18
  # Change host option in fog (only if you need to)
14
19
  # fog_host: "s3.amazonaws.com"
15
20
  #
16
21
  # Change port option in fog (only if you need to)
17
- # config.fog_port = "9000"
22
+ # fog_port: "9000"
18
23
  #
19
24
  # Use http instead of https. Default should be "https" (at least for fog-aws)
20
25
  # fog_scheme: "http"
@@ -48,7 +53,7 @@ defaults: &defaults
48
53
  # Set `public` option when uploading file depending on value,
49
54
  # Setting to "default" makes asset sync skip setting the option
50
55
  # Possible values: true, false, "default" (default: true)
51
- # config.fog_public = true
56
+ # fog_public: "true"
52
57
 
53
58
  existing_remote_files: keep
54
59
  # To delete existing remote files.
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asset_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.14.2
4
+ version: 2.15.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Hamilton
8
8
  - David Rice
9
9
  - Phil McClure
10
10
  - Toby Osbourn
11
- autorequire:
11
+ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2021-05-31 00:00:00.000000000 Z
14
+ date: 2022-06-02 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: fog-core
@@ -140,7 +140,7 @@ dependencies:
140
140
  - !ruby/object:Gem::Version
141
141
  version: '0'
142
142
  - !ruby/object:Gem::Dependency
143
- name: fog-azure-rm
143
+ name: gitlab-fog-azure-rm
144
144
  requirement: !ruby/object:Gem::Requirement
145
145
  requirements:
146
146
  - - ">="
@@ -272,7 +272,7 @@ homepage: https://github.com/rumblelabs/asset_sync
272
272
  licenses:
273
273
  - MIT
274
274
  metadata: {}
275
- post_install_message:
275
+ post_install_message:
276
276
  rdoc_options: []
277
277
  require_paths:
278
278
  - lib
@@ -287,8 +287,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
287
287
  - !ruby/object:Gem::Version
288
288
  version: '0'
289
289
  requirements: []
290
- rubygems_version: 3.2.18
291
- signing_key:
290
+ rubygems_version: 3.3.15
291
+ signing_key:
292
292
  specification_version: 4
293
293
  summary: Synchronises Assets in a Rails 3 application and Amazon S3/Cloudfront and
294
294
  Rackspace Cloudfiles