asset_sync 2.14.0 → 2.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb865a74b05c9a16ce39367906e4b4e98e95aa1ee6513cce217c84bea8a832b6
4
- data.tar.gz: 4684411bd7bddcf9daf4e6e9c1ba0b92fbf85cf67f2c9a42825b3c910e151c49
3
+ metadata.gz: 3b257792e6446e212ee50bb6913aa3aee7ffad9dec336995580e4f88355386a7
4
+ data.tar.gz: fbddb3142c4a27aa5f0f8f04f32d3addf1719e7df841a23e85f6765ea252146b
5
5
  SHA512:
6
- metadata.gz: f02951393035ba6db862849187d74f41d49529206d6d8a13b84ccca91b7d7c533fee6f0ea2440ea4b4e35ed72967d2d7489cfb6118c9fb8895e201964f146f64
7
- data.tar.gz: 51e1bd03d2acd5a528fa5960ff5986c29303bb8ec03ce643cb57bce30958fc5d1fab981de815459fc9b16eab176a1717ad1873a9b4f08a7659b94f5ed8b7bd5d
6
+ metadata.gz: f4a78f501ad9a2e219f9992b97a8b4a4130b13bea18fb7068a5fb47018f51b7b74fa3cfea110ef76d2897df5e19716d19cc594edb540fd95ca6f32a30ba07384
7
+ data.tar.gz: cac00fd92e51292ff02b1428ff81db52350d2cc2cf2101fc08bc1964661a163c7d3f89d240eb0fb6be298b7f8438a18e94f768024699d0146ea54d732c3f8da1
@@ -6,16 +6,20 @@ on:
6
6
  - master
7
7
  paths-ignore:
8
8
  - 'README.md'
9
+ - 'CHANGELOG.md'
9
10
  push:
10
11
  branches:
11
12
  - master
12
13
  paths-ignore:
13
14
  - 'README.md'
15
+ - 'CHANGELOG.md'
14
16
 
15
17
  jobs:
16
18
  unit_tests:
17
19
  name: Unit Tests
18
- if: "contains(github.event.commits[0].message, '[ci skip]') == false"
20
+ # Homemade support for [ci skip] no longer needed
21
+ # https://github.blog/changelog/2021-02-08-github-actions-skip-pull-request-and-push-workflows-with-skip-ci/
22
+ # if: "contains(github.event.commits[0].message, '[ci skip]') == false"
19
23
  strategy:
20
24
  fail-fast: false
21
25
  matrix:
data/CHANGELOG.md CHANGED
@@ -18,7 +18,43 @@ This project adheres to [Semantic Versioning](http://semver.org/).
18
18
  - Nothing
19
19
 
20
20
 
21
- ## [2.14.0] - 2020-03-31
21
+ ## [2.15.1] - 2021-11-22
22
+
23
+ ### Changed
24
+
25
+ - Update dev dependency `fog-azure-rm` to become `gitlab-fog-azure-rm`
26
+
27
+ ### Fixed
28
+
29
+ - Fix YAML config file parsing with Psych v4
30
+ (https://github.com/AssetSync/asset_sync/pull/422)
31
+
32
+
33
+ ## [2.15.0] - 2021-08-05
34
+
35
+ ### Added
36
+
37
+ - Add support for option `aws_acl`
38
+ (https://github.com/AssetSync/asset_sync/pull/420)
39
+
40
+
41
+ ## [2.14.2] - 2021-05-31
42
+
43
+ ### Added
44
+
45
+ - Add support for setting option `google_json_key_string` in YML (not new option)
46
+ (https://github.com/AssetSync/asset_sync/pull/419)
47
+
48
+
49
+ ## [2.14.1] - 2021-05-14
50
+
51
+ ### Added
52
+
53
+ - Add support for setting option `log_silently` in YML (not new option)
54
+ (https://github.com/AssetSync/asset_sync/pull/417)
55
+
56
+
57
+ ## [2.14.0] - 2021-03-31
22
58
 
23
59
  ### Added
24
60
 
@@ -1002,7 +1038,11 @@ Changes:
1002
1038
  * Merge branch 'sinatra'
1003
1039
 
1004
1040
 
1005
- [Unreleased]: https://github.com/AssetSync/asset_sync/compare/v2.14.0...HEAD
1041
+ [Unreleased]: https://github.com/AssetSync/asset_sync/compare/v2.15.1...HEAD
1042
+ [2.15.1]: https://github.com/AssetSync/asset_sync/compare/v2.15.0...v2.15.1
1043
+ [2.15.0]: https://github.com/AssetSync/asset_sync/compare/v2.14.2...v2.15.0
1044
+ [2.14.2]: https://github.com/AssetSync/asset_sync/compare/v2.14.1...v2.14.2
1045
+ [2.14.1]: https://github.com/AssetSync/asset_sync/compare/v2.14.0...v2.14.1
1006
1046
  [2.14.0]: https://github.com/AssetSync/asset_sync/compare/v2.13.1...v2.14.0
1007
1047
  [2.13.1]: https://github.com/AssetSync/asset_sync/compare/v2.13.0...v2.13.1
1008
1048
  [2.13.0]: https://github.com/AssetSync/asset_sync/compare/v2.12.1...v2.13.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,12 +27,14 @@ 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"
34
34
  s.add_development_dependency "appraisal"
35
35
 
36
+ s.add_development_dependency "gem-release"
37
+
36
38
  s.files = `git ls-files`.split("\n")
37
39
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
38
40
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
@@ -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"]
@@ -228,13 +236,15 @@ module AssetSync
228
236
  self.google_project = yml["google_project"] if yml.has_key?("google_project")
229
237
  self.google_storage_secret_access_key = yml["google_storage_secret_access_key"] if yml.has_key?("google_storage_secret_access_key")
230
238
  self.google_storage_access_key_id = yml["google_storage_access_key_id"] if yml.has_key?("google_storage_access_key_id")
239
+ self.google_json_key_string = yml["google_json_key_string"] if yml.has_key?("google_json_key_string")
231
240
  self.existing_remote_files = yml["existing_remote_files"] if yml.has_key?("existing_remote_files")
232
241
  self.gzip_compression = yml["gzip_compression"] if yml.has_key?("gzip_compression")
233
242
  self.manifest = yml["manifest"] if yml.has_key?("manifest")
234
243
  self.fail_silently = yml["fail_silently"] if yml.has_key?("fail_silently")
244
+ self.log_silently = yml["log_silently"] if yml.has_key?("log_silently")
235
245
  self.always_upload = yml["always_upload"] if yml.has_key?("always_upload")
236
246
  self.ignored_files = yml["ignored_files"] if yml.has_key?("ignored_files")
237
- self.custom_headers = yml["custom_headers"] if yml.has_key?("custom_headers")
247
+ self.custom_headers = yml["custom_headers"] if yml.has_key?("custom_headers")
238
248
  self.run_on_precompile = yml["run_on_precompile"] if yml.has_key?("run_on_precompile")
239
249
  self.invalidate = yml["invalidate"] if yml.has_key?("invalidate")
240
250
  self.cdn_distribution_id = yml['cdn_distribution_id'] if yml.has_key?("cdn_distribution_id")
@@ -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.0"
4
+ VERSION = "2.15.1"
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,6 +10,11 @@ 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
  #
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.0
4
+ version: 2.15.1
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-03-31 00:00:00.000000000 Z
14
+ date: 2021-11-22 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
  - - ">="
@@ -195,6 +195,20 @@ dependencies:
195
195
  - - ">="
196
196
  - !ruby/object:Gem::Version
197
197
  version: '0'
198
+ - !ruby/object:Gem::Dependency
199
+ name: gem-release
200
+ requirement: !ruby/object:Gem::Requirement
201
+ requirements:
202
+ - - ">="
203
+ - !ruby/object:Gem::Version
204
+ version: '0'
205
+ type: :development
206
+ prerelease: false
207
+ version_requirements: !ruby/object:Gem::Requirement
208
+ requirements:
209
+ - - ">="
210
+ - !ruby/object:Gem::Version
211
+ version: '0'
198
212
  description: After you run assets:precompile your compiled assets will be synchronised
199
213
  with your S3 bucket.
200
214
  email:
@@ -258,7 +272,7 @@ homepage: https://github.com/rumblelabs/asset_sync
258
272
  licenses:
259
273
  - MIT
260
274
  metadata: {}
261
- post_install_message:
275
+ post_install_message:
262
276
  rdoc_options: []
263
277
  require_paths:
264
278
  - lib
@@ -273,8 +287,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
273
287
  - !ruby/object:Gem::Version
274
288
  version: '0'
275
289
  requirements: []
276
- rubygems_version: 3.2.15
277
- signing_key:
290
+ rubygems_version: 3.2.31
291
+ signing_key:
278
292
  specification_version: 4
279
293
  summary: Synchronises Assets in a Rails 3 application and Amazon S3/Cloudfront and
280
294
  Rackspace Cloudfiles