asset_sync 2.16.0 → 2.17.0

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: b1cd4cc5ab6aa00a60de8cad39bd290f99e10f9c3884798af6dec1a495b5b722
4
- data.tar.gz: 06ca40f184d5d79ebe6aa54437a4e72f0a4e4841d944d58e77b742648d24e748
3
+ metadata.gz: 30fcfd0667904cde532ba24578e9bbc15f33051d5bde3e345226915c7135ccde
4
+ data.tar.gz: 67cff250568d8473c940733f182e425b811550be1c95e940498508fe5d81e656
5
5
  SHA512:
6
- metadata.gz: 7740b76eee405aba383ab9c8efdf54491288cd172b6f0d02a996b03b94b8b73685d579402bc8aa2af02993f0048b5aa6680944c1c34a3d9dca80b333af5e4484
7
- data.tar.gz: e73762db4dcd2b3b41acac66dcb12f731d578edc269a1ea0e0b8105a432fd9ea9ef487a4a8d755ff25927fd4eee6d056fb4a0693739eb94a9e07b0eb0f974a7c
6
+ metadata.gz: 6c2471c8dcad1fdd461fac5e7881723f012888e295e5f8bda6c13137ff1cb31f3aef2db669d71588a3a699dbd2d56366abacdf9ab0d0cae4b8e7b5dba2bff8f8
7
+ data.tar.gz: 1c5fb8a038bc21c0f8218a1dd74ec6cff47df3b43588e0b9599032559a639564341814f1576faa5b6a9f9378ca2e37de1c08f219748999f0e7a437f48e96fe22
@@ -0,0 +1,43 @@
1
+ name: "CodeQL"
2
+
3
+ on:
4
+ push:
5
+ branches: [ "master" ]
6
+ pull_request:
7
+ branches: [ "master" ]
8
+ schedule:
9
+ - cron: "11 12 * * 0"
10
+
11
+ jobs:
12
+ analyze:
13
+ name: Analyze
14
+ runs-on: ubuntu-latest
15
+ permissions:
16
+ actions: read
17
+ contents: read
18
+ security-events: write
19
+
20
+ strategy:
21
+ fail-fast: false
22
+ matrix:
23
+ language:
24
+ - javascript
25
+ - ruby
26
+
27
+ steps:
28
+ - name: Checkout
29
+ uses: actions/checkout@v3
30
+
31
+ - name: Initialize CodeQL
32
+ uses: github/codeql-action/init@v2
33
+ with:
34
+ languages: ${{ matrix.language }}
35
+ queries: +security-and-quality
36
+
37
+ - name: Autobuild
38
+ uses: github/codeql-action/autobuild@v2
39
+
40
+ - name: Perform CodeQL Analysis
41
+ uses: github/codeql-action/analyze@v2
42
+ with:
43
+ category: "/language:${{ matrix.language }}"
@@ -29,6 +29,7 @@ jobs:
29
29
  - 2.7
30
30
  - 3.0
31
31
  - 3.1
32
+ - 3.2
32
33
  - jruby
33
34
  gemfile:
34
35
  - gemfiles/rails_6_0.gemfile
data/CHANGELOG.md CHANGED
@@ -7,7 +7,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
7
7
 
8
8
  ### Added
9
9
 
10
- - Nothing
10
+ - Add `fog_options` configuration option.
11
11
 
12
12
  ### Changed
13
13
 
@@ -18,6 +18,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
18
18
  - Nothing
19
19
 
20
20
 
21
+ ## [2.17.0] - 2023-01-13
22
+
23
+ ### Added
24
+
25
+ - Add option `fog_options`
26
+ (https://github.com/AssetSync/asset_sync/pull/431)
27
+
28
+
21
29
  ## [2.16.0] - 2022-08-26
22
30
 
23
31
  ### Added
@@ -1062,7 +1070,8 @@ Changes:
1062
1070
  * Merge branch 'sinatra'
1063
1071
 
1064
1072
 
1065
- [Unreleased]: https://github.com/AssetSync/asset_sync/compare/v2.16.0...HEAD
1073
+ [Unreleased]: https://github.com/AssetSync/asset_sync/compare/v2.17.0...HEAD
1074
+ [2.17.0]: https://github.com/AssetSync/asset_sync/compare/v2.16.0...v2.17.0
1066
1075
  [2.16.0]: https://github.com/AssetSync/asset_sync/compare/v2.15.3...v2.16.0
1067
1076
  [2.15.3]: https://github.com/AssetSync/asset_sync/compare/v2.15.2...v2.15.3
1068
1077
  [2.15.2]: https://github.com/AssetSync/asset_sync/compare/v2.15.1...v2.15.2
data/README.md CHANGED
@@ -244,8 +244,8 @@ AssetSync.configure do |config|
244
244
  #
245
245
  # Change canned ACL of uploaded object. Default is unset. Will override fog_public if set.
246
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
247
+ # authenticated-read | bucket-owner-read | bucket-owner-full-control
248
+ # config.aws_acl = nil
249
249
  #
250
250
  # Change host option in fog (only if you need to)
251
251
  # config.fog_host = 's3.amazonaws.com'
@@ -256,6 +256,10 @@ AssetSync.configure do |config|
256
256
  # Use http instead of https.
257
257
  # config.fog_scheme = 'http'
258
258
  #
259
+ # Extra fog options.
260
+ # Overrides any existing value (even those set by AssetSync)
261
+ # config.fog_options = {}
262
+ #
259
263
  # Automatically replace files with their equivalent gzip compressed version
260
264
  # config.gzip_compression = true
261
265
  #
@@ -322,7 +326,7 @@ defaults: &defaults
322
326
  #
323
327
  # Change canned ACL of uploaded object. Default is unset. Will override fog_public if set.
324
328
  # Choose from: private | public-read | public-read-write | aws-exec-read |
325
- # authenticated-read | bucket-owner-read | bucket-owner-full-control
329
+ # authenticated-read | bucket-owner-read | bucket-owner-full-control
326
330
  # aws_acl: null
327
331
  #
328
332
  # Change host option in fog (only if you need to)
@@ -436,6 +440,7 @@ The blocks are run when local files are being scanned and uploaded
436
440
 
437
441
  * **fog\_region**: the region your storage bucket is in e.g. *eu-west-1* (AWS), *ord* (Rackspace), *japanwest* (Azure Blob)
438
442
  * **fog\_path\_style**: To use buckets with dot in names, check https://github.com/fog/fog/issues/2381#issuecomment-28088524
443
+ * **fog\_options**: For extra fog options. Overrides any existing value (even those set by AssetSync)
439
444
 
440
445
  #### AWS
441
446
 
@@ -35,6 +35,7 @@ module AssetSync
35
35
  attr_accessor :fog_directory # e.g. 'the-bucket-name'
36
36
  attr_accessor :fog_region # e.g. 'eu-west-1'
37
37
  attr_reader :fog_public # e.g. true, false, "default"
38
+ attr_accessor :fog_options # e.g. { enable_signature_v4_streaming: true }
38
39
 
39
40
  # Amazon AWS
40
41
  attr_accessor :aws_access_key_id
@@ -338,6 +339,7 @@ module AssetSync
338
339
  raise ArgumentError, "AssetSync Unknown provider: #{fog_provider} only AWS, Rackspace and Google are supported currently."
339
340
  end
340
341
 
342
+ options.merge!(@fog_options) if @fog_options
341
343
  options
342
344
  end
343
345
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AssetSync
4
- VERSION = "2.16.0"
4
+ VERSION = "2.17.0"
5
5
  end
@@ -278,6 +278,28 @@ describe AssetSync do
278
278
  end
279
279
  end
280
280
 
281
+ describe 'with fog_options' do
282
+ before(:each) do
283
+ AssetSync.config = AssetSync::Config.new
284
+ AssetSync.configure do |config|
285
+ config.fog_provider = 'AWS'
286
+ config.fog_region = 'eu-west-1'
287
+ config.fog_path_style = 'true'
288
+ config.fog_options = { enable_signature_v4_streaming: true }
289
+ end
290
+ end
291
+
292
+ it "assigns fog_options" do
293
+ AssetSync.config.fog_options = { enable_signature_v4_streaming: true }
294
+ expect(AssetSync.config.fog_options).to include(
295
+ provider: 'AWS',
296
+ region: 'eu-west-1',
297
+ path_style: 'true',
298
+ enable_signature_v4_streaming: true,
299
+ )
300
+ end
301
+ end
302
+
281
303
  describe 'with invalid yml' do
282
304
  before(:each) do
283
305
  set_rails_root('with_invalid_yml')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asset_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.16.0
4
+ version: 2.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Hamilton
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2022-08-26 00:00:00.000000000 Z
14
+ date: 2023-01-13 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: fog-core
@@ -221,6 +221,7 @@ extensions: []
221
221
  extra_rdoc_files: []
222
222
  files:
223
223
  - ".editorconfig"
224
+ - ".github/workflows/codeql.yml"
224
225
  - ".github/workflows/tests.yaml"
225
226
  - ".gitignore"
226
227
  - ".travis.yml"
@@ -287,7 +288,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
287
288
  - !ruby/object:Gem::Version
288
289
  version: '0'
289
290
  requirements: []
290
- rubygems_version: 3.3.17
291
+ rubygems_version: 3.4.3
291
292
  signing_key:
292
293
  specification_version: 4
293
294
  summary: Synchronises Assets in a Rails 3 application and Amazon S3/Cloudfront and