asset_sync 2.18.0 → 2.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -1
- data/README.md +16 -10
- data/lib/asset_sync/config.rb +16 -7
- data/lib/asset_sync/engine.rb +2 -1
- data/lib/asset_sync/storage.rb +38 -30
- data/lib/asset_sync/version.rb +1 -1
- data/spec/unit/asset_sync_spec.rb +11 -6
- data/spec/unit/azure_rm_spec.rb +6 -6
- data/spec/unit/backblaze_spec.rb +6 -6
- data/spec/unit/google_spec.rb +6 -6
- data/spec/unit/railsless_spec.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9cdf3c86a21ba63d0de80b07420b5c4f1833f25dbbcefbc92a740599d2d166da
|
4
|
+
data.tar.gz: a4c394ecc38feadf42e70643c7485a9dc68d6cccb9e86d8c9d00b99f41e5064f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cf38f1aa03aa20864cd1b6afadffff78bb032cfe7f15bea92c3f196c034c603d2a1d79e4393ace6f9fda35b8759b2ac5108efb86c9fdf260b898478fc0c3a2f
|
7
|
+
data.tar.gz: b26de287f9164b653e7404723672bd746cf899c57df8ed2b7100ba5a1470f0ca6619d6e7ed9b3bbb1c12f6af358e30665e449f4cfc235ff9db55b2b52c179c1a
|
data/CHANGELOG.md
CHANGED
@@ -18,6 +18,22 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
18
18
|
- Nothing
|
19
19
|
|
20
20
|
|
21
|
+
## [2.19.0] - 2023-08-15
|
22
|
+
|
23
|
+
### Added
|
24
|
+
|
25
|
+
- Add brotli support (new option `compression` which supports both gzip/brotli to replace now deprecated `gzip_compression`)
|
26
|
+
(https://github.com/AssetSync/asset_sync/pull/435)
|
27
|
+
|
28
|
+
|
29
|
+
## [2.18.1] - 2023-08-02
|
30
|
+
|
31
|
+
### Changed
|
32
|
+
|
33
|
+
- Respect explicitly set `Rails.application.config.assets.manifest`
|
34
|
+
(https://github.com/AssetSync/asset_sync/pull/434)
|
35
|
+
|
36
|
+
|
21
37
|
## [2.18.0] - 2023-01-30
|
22
38
|
|
23
39
|
### Added
|
@@ -1078,7 +1094,10 @@ Changes:
|
|
1078
1094
|
* Merge branch 'sinatra'
|
1079
1095
|
|
1080
1096
|
|
1081
|
-
[Unreleased]: https://github.com/AssetSync/asset_sync/compare/v2.
|
1097
|
+
[Unreleased]: https://github.com/AssetSync/asset_sync/compare/v2.19.0...HEAD
|
1098
|
+
[2.19.0]: https://github.com/AssetSync/asset_sync/compare/v2.18.1...v2.19.0
|
1099
|
+
[2.18.1]: https://github.com/AssetSync/asset_sync/compare/v2.18.0...v2.18.1
|
1100
|
+
[2.18.0]: https://github.com/AssetSync/asset_sync/compare/v2.17.0...v2.18.0
|
1082
1101
|
[2.17.0]: https://github.com/AssetSync/asset_sync/compare/v2.16.0...v2.17.0
|
1083
1102
|
[2.16.0]: https://github.com/AssetSync/asset_sync/compare/v2.15.3...v2.16.0
|
1084
1103
|
[2.15.3]: https://github.com/AssetSync/asset_sync/compare/v2.15.2...v2.15.3
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
2
|
[![Gem Version](https://img.shields.io/gem/v/asset_sync.svg?style=flat-square)](http://badge.fury.io/rb/asset_sync)
|
3
|
-
[![
|
3
|
+
[![GitHub Build Status](https://img.shields.io/github/actions/workflow/status/AssetSync/asset_sync/tests.yaml?branch=master&style=flat-square)](https://github.com/AssetSync/asset_sync/actions/workflows/tests.yaml)
|
4
4
|
[![Coverage Status](http://img.shields.io/coveralls/AssetSync/asset_sync.svg?style=flat-square)](https://coveralls.io/r/AssetSync/asset_sync)
|
5
5
|
|
6
6
|
|
@@ -165,7 +165,7 @@ heroku config:add FOG_DIRECTORY=xxxx
|
|
165
165
|
heroku config:add FOG_PROVIDER=AWS
|
166
166
|
# and optionally:
|
167
167
|
heroku config:add FOG_REGION=eu-west-1
|
168
|
-
heroku config:add
|
168
|
+
heroku config:add ASSET_SYNC_COMPRESSION=gz
|
169
169
|
heroku config:add ASSET_SYNC_MANIFEST=true
|
170
170
|
heroku config:add ASSET_SYNC_EXISTING_REMOTE_FILES=keep
|
171
171
|
```
|
@@ -260,8 +260,8 @@ AssetSync.configure do |config|
|
|
260
260
|
# Overrides any existing value (even those set by AssetSync)
|
261
261
|
# config.fog_options = {}
|
262
262
|
#
|
263
|
-
# Automatically replace files with their equivalent gzip compressed version
|
264
|
-
# config.
|
263
|
+
# Automatically replace files with their equivalent gzip/brotli compressed version
|
264
|
+
# config.compression = 'gz'
|
265
265
|
#
|
266
266
|
# Use the Rails generated 'manifest.yml' file to produce the list of files to
|
267
267
|
# upload instead of searching the assets directory.
|
@@ -340,8 +340,8 @@ defaults: &defaults
|
|
340
340
|
# existing_remote_files: delete
|
341
341
|
# To ignore existing remote files and overwrite.
|
342
342
|
# existing_remote_files: ignore
|
343
|
-
# Automatically replace files with their equivalent gzip compressed version
|
344
|
-
#
|
343
|
+
# Automatically replace files with their equivalent gzip/brotli compressed version
|
344
|
+
# compression: "gz"
|
345
345
|
# Fail silently. Useful for environments such as Heroku
|
346
346
|
# fail_silently: true
|
347
347
|
# Always upload. Useful if you want to overwrite specific remote assets regardless of their existence
|
@@ -379,13 +379,14 @@ AssetSync.config.fog_provider == ENV['FOG_PROVIDER']
|
|
379
379
|
Simply **upcase** the ruby attribute names to get the equivalent environment variable to set. The only exception to that rule are the internal **AssetSync** config variables, they must be prepended with `ASSET_SYNC_*` e.g.
|
380
380
|
|
381
381
|
```ruby
|
382
|
-
AssetSync.config.
|
382
|
+
AssetSync.config.compression == ENV['ASSET_SYNC_COMPRESSION']
|
383
383
|
```
|
384
384
|
|
385
385
|
#### AssetSync (optional)
|
386
386
|
|
387
387
|
* **existing_remote_files**: (`'keep', 'delete', 'ignore'`) what to do with previously precompiled files. **default:** `'keep'`
|
388
|
-
* **gzip\_compression**: (
|
388
|
+
* **gzip\_compression**: (deprecated, can still be used but use `compression` when possible)
|
389
|
+
* **compression**: (`'gz', 'br'`) when enabled (non `nil` value set), will automatically replace files that have a gzip/brotli compressed equivalent with the compressed version. **default:** `nil`
|
389
390
|
* **manifest**: (`true, false`) when enabled, will use the `manifest.yml` generated by Rails to get the list of local files to upload. **experimental**. **default:** `'false'`
|
390
391
|
* **include_manifest**: (`true, false`) when enabled, will upload the `manifest.yml` generated by Rails. **default:** `'false'`
|
391
392
|
* **concurrent_uploads**: (`true, false`) when enabled, will upload the files in different Threads, this greatly improves the upload speed. **default:** `'false'`
|
@@ -540,12 +541,17 @@ end
|
|
540
541
|
```
|
541
542
|
|
542
543
|
|
543
|
-
## Automatic gzip compression
|
544
|
+
## Automatic gzip/brotli compression
|
544
545
|
|
545
|
-
With the `
|
546
|
+
With the `compression` option enabled, when uploading your assets. If a file has a gzip/brotli (only 1 of them, depending on the option value set) compressed equivalent we will replace that asset with the compressed version and sets the correct headers for S3 to serve it. For example, if you have a file **master.css** and it was compressed to **master.css.gz** we will upload the **.gz** file to S3 in place of the uncompressed file.
|
546
547
|
|
547
548
|
If the compressed file is actually larger than the uncompressed file we will ignore this rule and upload the standard uncompressed version.
|
548
549
|
|
550
|
+
Option `compression` supported values:
|
551
|
+
- `nil` => Disabled
|
552
|
+
- `'gz'` => Only consider gzip compressed one
|
553
|
+
- `'br'` => Only consider brotli compressed one
|
554
|
+
|
549
555
|
## Fail Silently
|
550
556
|
|
551
557
|
With the `fail_silently` option enabled, when running `rake assets:precompile` AssetSync will never throw an error due to missing configuration variables.
|
data/lib/asset_sync/config.rb
CHANGED
@@ -11,7 +11,7 @@ module AssetSync
|
|
11
11
|
|
12
12
|
# AssetSync
|
13
13
|
attr_accessor :existing_remote_files # What to do with your existing remote files? (keep or delete)
|
14
|
-
attr_accessor :
|
14
|
+
attr_accessor :compression
|
15
15
|
attr_accessor :manifest
|
16
16
|
attr_accessor :fail_silently
|
17
17
|
attr_accessor :log_silently
|
@@ -94,7 +94,7 @@ module AssetSync
|
|
94
94
|
self.fog_region = nil
|
95
95
|
self.fog_public = true
|
96
96
|
self.existing_remote_files = 'keep'
|
97
|
-
self.
|
97
|
+
self.compression = nil
|
98
98
|
self.manifest = false
|
99
99
|
self.fail_silently = false
|
100
100
|
self.log_silently = true
|
@@ -117,13 +117,21 @@ module AssetSync
|
|
117
117
|
end
|
118
118
|
|
119
119
|
def manifest_path
|
120
|
-
|
120
|
+
if defined?(ActionView) && ActionView::Base.respond_to?(:assets_manifest)
|
121
|
+
::Rails.application.config.assets.manifest
|
122
|
+
else
|
123
|
+
directory =
|
121
124
|
::Rails.application.config.assets.manifest || default_manifest_directory
|
122
|
-
|
125
|
+
File.join(directory, "manifest.yml")
|
126
|
+
end
|
123
127
|
end
|
124
128
|
|
125
|
-
def
|
126
|
-
|
129
|
+
def gzip_compression= bool
|
130
|
+
if bool
|
131
|
+
self.compression = 'gz'
|
132
|
+
else
|
133
|
+
self.compression = nil
|
134
|
+
end
|
127
135
|
end
|
128
136
|
|
129
137
|
def existing_remote_files?
|
@@ -242,7 +250,8 @@ module AssetSync
|
|
242
250
|
self.google_storage_access_key_id = yml["google_storage_access_key_id"] if yml.has_key?("google_storage_access_key_id")
|
243
251
|
self.google_json_key_string = yml["google_json_key_string"] if yml.has_key?("google_json_key_string")
|
244
252
|
self.existing_remote_files = yml["existing_remote_files"] if yml.has_key?("existing_remote_files")
|
245
|
-
self.
|
253
|
+
self.compression = 'gz' if yml.has_key?("gzip_compression")
|
254
|
+
self.compression = yml["compression"] if yml.has_key?("compression")
|
246
255
|
self.manifest = yml["manifest"] if yml.has_key?("manifest")
|
247
256
|
self.fail_silently = yml["fail_silently"] if yml.has_key?("fail_silently")
|
248
257
|
self.log_silently = yml["log_silently"] if yml.has_key?("log_silently")
|
data/lib/asset_sync/engine.rb
CHANGED
@@ -44,7 +44,8 @@ module AssetSync
|
|
44
44
|
config.enabled = (ENV['ASSET_SYNC_ENABLED'] == 'true') if ENV.has_key?('ASSET_SYNC_ENABLED')
|
45
45
|
|
46
46
|
config.existing_remote_files = ENV['ASSET_SYNC_EXISTING_REMOTE_FILES'] || "keep"
|
47
|
-
config.
|
47
|
+
config.compression = 'gz' if ENV.has_key?('ASSET_SYNC_GZIP_COMPRESSION') && ENV['ASSET_SYNC_GZIP_COMPRESSION'] == 'true'
|
48
|
+
config.compression = ENV['ASSET_SYNC_COMPRESSION'] if ENV.has_key?('ASSET_SYNC_COMPRESSION')
|
48
49
|
config.manifest = (ENV['ASSET_SYNC_MANIFEST'] == 'true') if ENV.has_key?('ASSET_SYNC_MANIFEST')
|
49
50
|
config.prefix = ENV['ASSET_SYNC_PREFIX'] if ENV.has_key?('ASSET_SYNC_PREFIX')
|
50
51
|
config.include_manifest = (ENV['ASSET_SYNC_INCLUDE_MANIFEST'] == 'true') if ENV.has_key?('ASSET_SYNC_INCLUDE_MANIFEST')
|
data/lib/asset_sync/storage.rb
CHANGED
@@ -7,6 +7,11 @@ module AssetSync
|
|
7
7
|
REGEXP_FINGERPRINTED_FILES = /\A(.*)\/(.+)-[^\.]+\.([^\.]+)\z/m
|
8
8
|
REGEXP_ASSETS_TO_CACHE_CONTROL = /-[0-9a-fA-F]{32,}$/
|
9
9
|
|
10
|
+
CONTENT_ENCODING = {
|
11
|
+
'gz' => 'gzip',
|
12
|
+
'br' => 'br',
|
13
|
+
}.freeze
|
14
|
+
|
10
15
|
class BucketNotFound < StandardError;
|
11
16
|
end
|
12
17
|
|
@@ -59,7 +64,7 @@ module AssetSync
|
|
59
64
|
return [] unless self.config.include_manifest
|
60
65
|
|
61
66
|
if ActionView::Base.respond_to?(:assets_manifest)
|
62
|
-
manifest = Sprockets::Manifest.new(ActionView::Base.assets_manifest.environment, ActionView::Base.assets_manifest.dir)
|
67
|
+
manifest = Sprockets::Manifest.new(ActionView::Base.assets_manifest.environment, ActionView::Base.assets_manifest.dir, self.config.manifest_path)
|
63
68
|
manifest_path = manifest.filename
|
64
69
|
else
|
65
70
|
manifest_path = self.config.manifest_path
|
@@ -139,7 +144,7 @@ module AssetSync
|
|
139
144
|
if self.config.manifest
|
140
145
|
if ActionView::Base.respond_to?(:assets_manifest)
|
141
146
|
log "Using: Rails 4.0 manifest access"
|
142
|
-
manifest = Sprockets::Manifest.new(ActionView::Base.assets_manifest.environment, ActionView::Base.assets_manifest.dir)
|
147
|
+
manifest = Sprockets::Manifest.new(ActionView::Base.assets_manifest.environment, ActionView::Base.assets_manifest.dir, self.config.manifest_path)
|
143
148
|
return manifest.assets.values.map { |f| File.join(self.config.assets_prefix, f) }
|
144
149
|
elsif File.exist?(self.config.manifest_path)
|
145
150
|
log "Using: Manifest #{self.config.manifest_path}"
|
@@ -211,7 +216,7 @@ module AssetSync
|
|
211
216
|
one_year = 31557600
|
212
217
|
ext = File.extname(f)[1..-1]
|
213
218
|
mime = MultiMime.lookup(ext)
|
214
|
-
|
219
|
+
compressed_file_handle = nil
|
215
220
|
file_handle = File.open("#{path}/#{f}")
|
216
221
|
file = {
|
217
222
|
:key => f,
|
@@ -255,41 +260,44 @@ module AssetSync
|
|
255
260
|
end
|
256
261
|
|
257
262
|
|
258
|
-
gzipped = "#{path}/#{f}.gz"
|
259
263
|
ignore = false
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
264
|
+
if config.compression
|
265
|
+
compressed_name = "#{path}/#{f}.#{config.compression}"
|
266
|
+
|
267
|
+
if File.extname(f) == config.compression
|
268
|
+
# Don't bother uploading compressed assets if we are in compression mode
|
269
|
+
# as we will overwrite file.css with file.css.gz if it exists.
|
270
|
+
log "Ignoring: #{f}"
|
271
|
+
ignore = true
|
272
|
+
elsif File.exist?(compressed)
|
273
|
+
original_size = File.size("#{path}/#{f}")
|
274
|
+
compressed_size = File.size(compressed_name)
|
275
|
+
|
276
|
+
if compressed_size < original_size
|
277
|
+
percentage = ((compressed_size.to_f/original_size.to_f)*100).round(2)
|
278
|
+
compressed_file_handle = File.open(compressed_name)
|
279
|
+
file.merge!({
|
280
|
+
:key => f,
|
281
|
+
:body => compressed_file_handle,
|
282
|
+
:content_encoding => CONTENT_ENCODING[config.compression]
|
283
|
+
})
|
284
|
+
log "Uploading: #{compressed_name} in place of #{f} saving #{percentage}%"
|
285
|
+
else
|
286
|
+
percentage = ((original_size.to_f/compressed_size.to_f)*100).round(2)
|
287
|
+
log "Uploading: #{f} instead of #{compressed_name} (compression increases this file by #{percentage}%)"
|
288
|
+
end
|
282
289
|
end
|
283
290
|
else
|
284
|
-
|
285
|
-
|
291
|
+
compressed_encoding = CONTENT_ENCODING[File.extname(f).delete('.')]
|
292
|
+
if compressed_encoding
|
293
|
+
# set content encoding for compressed files this allows cloudfront to properly handle requests with Accept-Encoding
|
286
294
|
# http://docs.amazonwebservices.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html
|
287
295
|
uncompressed_filename = f[0..-4]
|
288
296
|
ext = File.extname(uncompressed_filename)[1..-1]
|
289
297
|
mime = MultiMime.lookup(ext)
|
290
298
|
file.merge!({
|
291
299
|
:content_type => mime,
|
292
|
-
:content_encoding =>
|
300
|
+
:content_encoding => compressed_encoding
|
293
301
|
})
|
294
302
|
end
|
295
303
|
log "Uploading: #{f}"
|
@@ -303,7 +311,7 @@ module AssetSync
|
|
303
311
|
|
304
312
|
bucket.files.create( file ) unless ignore
|
305
313
|
file_handle.close
|
306
|
-
|
314
|
+
compressed_file_handle.close if compressed_file_handle
|
307
315
|
end
|
308
316
|
|
309
317
|
def upload_files
|
data/lib/asset_sync/version.rb
CHANGED
@@ -59,8 +59,8 @@ describe AssetSync do
|
|
59
59
|
expect(AssetSync.config.existing_remote_files).to eq("keep")
|
60
60
|
end
|
61
61
|
|
62
|
-
it "should default
|
63
|
-
expect(AssetSync.config.
|
62
|
+
it "should default compression to nil" do
|
63
|
+
expect(AssetSync.config.compression).to be_nil
|
64
64
|
end
|
65
65
|
|
66
66
|
it "should default manifest to false" do
|
@@ -139,8 +139,8 @@ describe AssetSync do
|
|
139
139
|
expect(AssetSync.config.existing_remote_files).to eq("keep")
|
140
140
|
end
|
141
141
|
|
142
|
-
it "should default
|
143
|
-
expect(AssetSync.config.
|
142
|
+
it "should default compression to nil" do
|
143
|
+
expect(AssetSync.config.compression).to be_nil
|
144
144
|
end
|
145
145
|
|
146
146
|
it "should default manifest to false" do
|
@@ -230,8 +230,8 @@ describe AssetSync do
|
|
230
230
|
AssetSync.config.gzip_compression = true
|
231
231
|
end
|
232
232
|
|
233
|
-
it "config.
|
234
|
-
expect(AssetSync.config.
|
233
|
+
it "config.compression should be 'gz'" do
|
234
|
+
expect(AssetSync.config.compression).to eq("gz")
|
235
235
|
end
|
236
236
|
end
|
237
237
|
|
@@ -258,6 +258,11 @@ describe AssetSync do
|
|
258
258
|
Rails.application.config.assets.prefix = 'custom_assets'
|
259
259
|
expect(AssetSync.config.manifest_path).to match(/public\/custom_assets\/manifest.yml/)
|
260
260
|
end
|
261
|
+
|
262
|
+
it "config.manifest_path should point to explicit path" do
|
263
|
+
Rails.application.config.assets.manifest = 'config/manifest.json'
|
264
|
+
expect(AssetSync.config.manifest_path).to start_with('config/manifest.json')
|
265
|
+
end
|
261
266
|
end
|
262
267
|
|
263
268
|
describe 'with cache_asset_regexps' do
|
data/spec/unit/azure_rm_spec.rb
CHANGED
@@ -40,8 +40,8 @@ describe AssetSync do
|
|
40
40
|
expect(AssetSync.config.existing_remote_files).to eq("keep")
|
41
41
|
end
|
42
42
|
|
43
|
-
it "should default
|
44
|
-
expect(AssetSync.config.
|
43
|
+
it "should default compression to nil" do
|
44
|
+
expect(AssetSync.config.compression).to be_nil
|
45
45
|
end
|
46
46
|
|
47
47
|
it "should default manifest to false" do
|
@@ -71,8 +71,8 @@ describe AssetSync do
|
|
71
71
|
expect(AssetSync.config.existing_remote_files).to eq("keep")
|
72
72
|
end
|
73
73
|
|
74
|
-
it "should default
|
75
|
-
expect(AssetSync.config.
|
74
|
+
it "should default compression to nil" do
|
75
|
+
expect(AssetSync.config.compression).to be_nil
|
76
76
|
end
|
77
77
|
|
78
78
|
it "should default manifest to false" do
|
@@ -110,8 +110,8 @@ describe AssetSync do
|
|
110
110
|
AssetSync.config.gzip_compression = true
|
111
111
|
end
|
112
112
|
|
113
|
-
it "config.
|
114
|
-
expect(AssetSync.config.
|
113
|
+
it "config.compression should be 'gz'" do
|
114
|
+
expect(AssetSync.config.compression).to eq("gz")
|
115
115
|
end
|
116
116
|
end
|
117
117
|
|
data/spec/unit/backblaze_spec.rb
CHANGED
@@ -44,8 +44,8 @@ describe AssetSync do
|
|
44
44
|
expect(AssetSync.config.existing_remote_files).to eq("keep")
|
45
45
|
end
|
46
46
|
|
47
|
-
it "should default
|
48
|
-
expect(AssetSync.config.
|
47
|
+
it "should default compression to nil" do
|
48
|
+
expect(AssetSync.config.compression).to be_nil
|
49
49
|
end
|
50
50
|
|
51
51
|
it "should default manifest to false" do
|
@@ -79,8 +79,8 @@ describe AssetSync do
|
|
79
79
|
expect(AssetSync.config.existing_remote_files).to eq("keep")
|
80
80
|
end
|
81
81
|
|
82
|
-
it "should default
|
83
|
-
expect(AssetSync.config.
|
82
|
+
it "should default compression to nil" do
|
83
|
+
expect(AssetSync.config.compression).to be_nil
|
84
84
|
end
|
85
85
|
|
86
86
|
it "should default manifest to false" do
|
@@ -118,8 +118,8 @@ describe AssetSync do
|
|
118
118
|
AssetSync.config.gzip_compression = true
|
119
119
|
end
|
120
120
|
|
121
|
-
it "config.
|
122
|
-
expect(AssetSync.config.
|
121
|
+
it "config.compression should be 'gz'" do
|
122
|
+
expect(AssetSync.config.compression).to eq("gz")
|
123
123
|
end
|
124
124
|
end
|
125
125
|
|
data/spec/unit/google_spec.rb
CHANGED
@@ -30,8 +30,8 @@ describe AssetSync do
|
|
30
30
|
expect(AssetSync.config.existing_remote_files).to eq("keep")
|
31
31
|
end
|
32
32
|
|
33
|
-
it "should default
|
34
|
-
expect(AssetSync.config.
|
33
|
+
it "should default compression to nil" do
|
34
|
+
expect(AssetSync.config.compression).to be_nil
|
35
35
|
end
|
36
36
|
|
37
37
|
it "should default manifest to false" do
|
@@ -174,8 +174,8 @@ describe AssetSync do
|
|
174
174
|
expect(AssetSync.config.existing_remote_files).to eq("keep")
|
175
175
|
end
|
176
176
|
|
177
|
-
it "should default
|
178
|
-
expect(AssetSync.config.
|
177
|
+
it "should default compression to nil" do
|
178
|
+
expect(AssetSync.config.compression).to be_nil
|
179
179
|
end
|
180
180
|
|
181
181
|
it "should default manifest to false" do
|
@@ -229,8 +229,8 @@ describe AssetSync do
|
|
229
229
|
AssetSync.config.gzip_compression = true
|
230
230
|
end
|
231
231
|
|
232
|
-
it "config.
|
233
|
-
expect(AssetSync.config.
|
232
|
+
it "config.compression should be 'gz'" do
|
233
|
+
expect(AssetSync.config.compression).to eq("gz")
|
234
234
|
end
|
235
235
|
end
|
236
236
|
|
data/spec/unit/railsless_spec.rb
CHANGED
@@ -61,8 +61,8 @@ describe AssetSync do
|
|
61
61
|
expect(AssetSync.config.existing_remote_files).to eq("keep")
|
62
62
|
end
|
63
63
|
|
64
|
-
it "should default
|
65
|
-
expect(AssetSync.config.
|
64
|
+
it "should default compression to nil" do
|
65
|
+
expect(AssetSync.config.compression).to be_nil
|
66
66
|
end
|
67
67
|
|
68
68
|
it "should default manifest to false" do
|
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.
|
4
|
+
version: 2.19.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: 2023-
|
14
|
+
date: 2023-08-15 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: fog-core
|
@@ -288,7 +288,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
288
288
|
- !ruby/object:Gem::Version
|
289
289
|
version: '0'
|
290
290
|
requirements: []
|
291
|
-
rubygems_version: 3.4.
|
291
|
+
rubygems_version: 3.4.18
|
292
292
|
signing_key:
|
293
293
|
specification_version: 4
|
294
294
|
summary: Synchronises Assets in a Rails 3 application and Amazon S3/Cloudfront and
|