asset_sync 2.15.0 → 2.15.3

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: a42f7c7165955b9d333a17c2c734948699b76dfdc1682c37f3188af87896d72d
4
- data.tar.gz: 7b0cec36a35ace13ceac1aa6e1681c608b3a4ef688ba8870d1d32e9c7d8160b1
3
+ metadata.gz: bd0deada18130ef42d80d6f05d5ff0611a7587dd33d177bbc38641e6b6cad3a9
4
+ data.tar.gz: cd514b4901f6a3859a00b80282139d9d712db8414ed03ab115de2c7a3dfd3c78
5
5
  SHA512:
6
- metadata.gz: 2d6ff1f9c5b9c9fa8dd53ee0000d00d42d9746801e9c5dd10400b8c18ae177c2dfd9f5f749bae52553c79550e71c5940771a069bfbe807af437744a61fc6fe72
7
- data.tar.gz: 565480826f1820bbb8b4438886fa92d6f49369209ddbb0981f5cdb948b03d73ee5bbb4803febef56907d279a434cc819f2877804a7e5135ad28beb412c6a91ac
6
+ metadata.gz: eb9cabad00c3dfd61c1ca47c3ba9d6a768375d3dcd6a6798e97a55cc91ee1dd5a030ebd85eeab1f2018dbcc6e6ea18f43591f09bc02f2cd0558a361a13efafb9
7
+ data.tar.gz: 0c13d03567e9773383179cdfda43699e70352a0ec20c7a7c980017f32b6164eb89e4a4957e6480f1ee1a6a5cc41e270f75bcc0d5fa0dd92363129e0f227c76c7
@@ -26,30 +26,31 @@ jobs:
26
26
  os:
27
27
  - ubuntu
28
28
  ruby:
29
- - 2.5
30
- - 2.6
31
29
  - 2.7
32
30
  - 3.0
31
+ - 3.1
33
32
  - jruby
34
33
  gemfile:
35
- - gemfiles/rails_5_2.gemfile
36
34
  - gemfiles/rails_6_0.gemfile
37
35
  - gemfiles/rails_6_1.gemfile
36
+ - gemfiles/rails_7_0.gemfile
38
37
  allow_failures:
39
38
  - false
40
39
  include:
41
40
  - os: ubuntu
42
41
  ruby: ruby-head
43
- gemfile: gemfiles/rails_6_1.gemfile
42
+ gemfile: gemfiles/rails_7_0.gemfile
44
43
  allow_failures: true
45
44
  - os: ubuntu
46
45
  ruby: jruby-head
47
- gemfile: gemfiles/rails_6_1.gemfile
46
+ gemfile: gemfiles/rails_7_0.gemfile
48
47
  allow_failures: true
49
48
  exclude:
50
49
  - os: ubuntu
51
- ruby: 3.0
52
- gemfile: gemfiles/rails_5_2.gemfile
50
+ ruby: jruby
51
+ # Rails 7 requires Ruby 2.7
52
+ # `jruby-9.3.7.0` only supports 2.6.x
53
+ gemfile: gemfiles/rails_7_0.gemfile
53
54
  allow_failures: false
54
55
  env:
55
56
  BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
@@ -58,7 +59,7 @@ jobs:
58
59
  continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' }}
59
60
  steps:
60
61
  - name: Checkout
61
- uses: actions/checkout@v2
62
+ uses: actions/checkout@v3
62
63
  - name: Setup Ruby
63
64
  uses: ruby/setup-ruby@v1
64
65
  with:
data/Appraisals CHANGED
@@ -1,8 +1,4 @@
1
1
 
2
- appraise "rails_5_2" do
3
- gem "rails", "~> 5.2.0"
4
- end
5
-
6
2
  appraise "rails_6_0" do
7
3
  gem "rails", "~> 6.0.0"
8
4
  end
@@ -10,3 +6,7 @@ end
10
6
  appraise "rails_6_1" do
11
7
  gem "rails", "~> 6.1.0"
12
8
  end
9
+
10
+ appraise "rails_7_0" do
11
+ gem "rails", "~> 7.0.0"
12
+ end
data/CHANGELOG.md CHANGED
@@ -18,6 +18,34 @@ This project adheres to [Semantic Versioning](http://semver.org/).
18
18
  - Nothing
19
19
 
20
20
 
21
+ ## [2.15.3] - 2022-08-25
22
+
23
+ ### Fixed
24
+
25
+ - Fix config `prefix` about env var & YAML support
26
+ (https://github.com/AssetSync/asset_sync/pull/427)
27
+
28
+
29
+ ## [2.15.2] - 2022-06-02
30
+
31
+ ### Fixed
32
+
33
+ - Fix incorrect commented code in asset_sync.yml
34
+ (https://github.com/AssetSync/asset_sync/pull/426)
35
+
36
+
37
+ ## [2.15.1] - 2021-11-22
38
+
39
+ ### Changed
40
+
41
+ - Update dev dependency `fog-azure-rm` to become `gitlab-fog-azure-rm`
42
+
43
+ ### Fixed
44
+
45
+ - Fix YAML config file parsing with Psych v4
46
+ (https://github.com/AssetSync/asset_sync/pull/422)
47
+
48
+
21
49
  ## [2.15.0] - 2021-08-05
22
50
 
23
51
  ### Added
@@ -1026,7 +1054,10 @@ Changes:
1026
1054
  * Merge branch 'sinatra'
1027
1055
 
1028
1056
 
1029
- [Unreleased]: https://github.com/AssetSync/asset_sync/compare/v2.15.0...HEAD
1057
+ [Unreleased]: https://github.com/AssetSync/asset_sync/compare/v2.15.3...HEAD
1058
+ [2.15.3]: https://github.com/AssetSync/asset_sync/compare/v2.15.2...v2.15.3
1059
+ [2.15.2]: https://github.com/AssetSync/asset_sync/compare/v2.15.1...v2.15.2
1060
+ [2.15.1]: https://github.com/AssetSync/asset_sync/compare/v2.15.0...v2.15.1
1030
1061
  [2.15.0]: https://github.com/AssetSync/asset_sync/compare/v2.14.2...v2.15.0
1031
1062
  [2.14.2]: https://github.com/AssetSync/asset_sync/compare/v2.14.1...v2.14.2
1032
1063
  [2.14.1]: https://github.com/AssetSync/asset_sync/compare/v2.14.0...v2.14.1
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.
@@ -340,6 +343,10 @@ defaults: &defaults
340
343
  # always_upload: ['application.js', 'application.css', !ruby/regexp '/application-/\d{32}\.css/']
341
344
  # Ignored files. Useful if there are some files that are created dynamically on the server and you don't want to upload on deploy.
342
345
  # ignored_files: ['ignore_me.js', !ruby/regexp '/ignore_some/\d{32}\.css/']
346
+ # Public path. To change the public directory.
347
+ # public_path: 'public'
348
+ # Prefix. To change the directory to sync relative to public_path.
349
+ # prefix: 'assets'
343
350
  # Allow custom assets to be cacheable. Note: The base filename will be matched
344
351
  # If you have an asset with name "app.0b1a4cd3.js", only "app.0b1a4cd3" will need to be matched
345
352
  # cache_asset_regexps: ['cache_me.js', !ruby/regexp '/cache_some\.\d{8}\.css/']
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"
@@ -5,6 +5,6 @@ source "https://rubygems.org"
5
5
  gem "rcov", platforms: :mri_18, group: [:development, :test]
6
6
  gem "simplecov", platforms: [:jruby, :mri_19, :ruby_19, :mri_20, :rbx], group: [:development, :test], require: false
7
7
  gem "jruby-openssl", platform: :jruby
8
- gem "rails", "~> 5.2.0"
8
+ gem "rails", "~> 7.0.0"
9
9
 
10
10
  gemspec path: "../"
@@ -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
@@ -184,7 +183,7 @@ module AssetSync
184
183
  end
185
184
 
186
185
  def yml
187
- @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] || {}
188
187
  end
189
188
 
190
189
  def yml_path
@@ -245,6 +244,7 @@ module AssetSync
245
244
  self.log_silently = yml["log_silently"] if yml.has_key?("log_silently")
246
245
  self.always_upload = yml["always_upload"] if yml.has_key?("always_upload")
247
246
  self.ignored_files = yml["ignored_files"] if yml.has_key?("ignored_files")
247
+ self.prefix = yml["prefix"] if yml.has_key?("prefix")
248
248
  self.custom_headers = yml["custom_headers"] if yml.has_key?("custom_headers")
249
249
  self.run_on_precompile = yml["run_on_precompile"] if yml.has_key?("run_on_precompile")
250
250
  self.invalidate = yml["invalidate"] if yml.has_key?("invalidate")
@@ -44,21 +44,13 @@ 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
-
48
47
  config.gzip_compression = (ENV['ASSET_SYNC_GZIP_COMPRESSION'] == 'true') if ENV.has_key?('ASSET_SYNC_GZIP_COMPRESSION')
49
48
  config.manifest = (ENV['ASSET_SYNC_MANIFEST'] == 'true') if ENV.has_key?('ASSET_SYNC_MANIFEST')
49
+ config.prefix = ENV['ASSET_SYNC_PREFIX'] if ENV.has_key?('ASSET_SYNC_PREFIX')
50
50
  config.include_manifest = (ENV['ASSET_SYNC_INCLUDE_MANIFEST'] == 'true') if ENV.has_key?('ASSET_SYNC_INCLUDE_MANIFEST')
51
51
  config.concurrent_uploads = (ENV['ASSET_SYNC_CONCURRENT_UPLOADS'] == 'true') if ENV.has_key?('ASSET_SYNC_CONCURRENT_UPLOADS')
52
52
  config.remote_file_list_cache_file_path = ENV['ASSET_SYNC_REMOTE_FILE_LIST_CACHE_FILE_PATH'] if ENV.has_key?('ASSET_SYNC_REMOTE_FILE_LIST_CACHE_FILE_PATH')
53
53
  end
54
-
55
- config.prefix = ENV['ASSET_SYNC_PREFIX'] if ENV.has_key?('ASSET_SYNC_PREFIX')
56
-
57
- config.existing_remote_files = ENV['ASSET_SYNC_EXISTING_REMOTE_FILES'] || "keep"
58
-
59
- config.gzip_compression = (ENV['ASSET_SYNC_GZIP_COMPRESSION'] == 'true') if ENV.has_key?('ASSET_SYNC_GZIP_COMPRESSION')
60
- config.manifest = (ENV['ASSET_SYNC_MANIFEST'] == 'true') if ENV.has_key?('ASSET_SYNC_MANIFEST')
61
-
62
54
  end
63
55
 
64
56
  if File.exist?( app_yaml )
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AssetSync
4
- VERSION = "2.15.0"
4
+ VERSION = "2.15.3"
5
5
  end
@@ -19,7 +19,7 @@ defaults: &defaults
19
19
  # fog_host: "s3.amazonaws.com"
20
20
  #
21
21
  # Change port option in fog (only if you need to)
22
- # config.fog_port = "9000"
22
+ # fog_port: "9000"
23
23
  #
24
24
  # Use http instead of https. Default should be "https" (at least for fog-aws)
25
25
  # fog_scheme: "http"
@@ -53,7 +53,7 @@ defaults: &defaults
53
53
  # Set `public` option when uploading file depending on value,
54
54
  # Setting to "default" makes asset sync skip setting the option
55
55
  # Possible values: true, false, "default" (default: true)
56
- # config.fog_public = true
56
+ # fog_public: "true"
57
57
 
58
58
  existing_remote_files: keep
59
59
  # To delete existing remote files.
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.15.0
4
+ version: 2.15.3
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: 2021-08-05 00:00:00.000000000 Z
14
+ date: 2022-08-25 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
  - - ">="
@@ -232,9 +232,9 @@ files:
232
232
  - UPGRADING.md
233
233
  - asset_sync.gemspec
234
234
  - docs/heroku.md
235
- - gemfiles/rails_5_2.gemfile
236
235
  - gemfiles/rails_6_0.gemfile
237
236
  - gemfiles/rails_6_1.gemfile
237
+ - gemfiles/rails_7_0.gemfile
238
238
  - lib/asset_sync.rb
239
239
  - lib/asset_sync/asset_sync.rb
240
240
  - lib/asset_sync/config.rb
@@ -287,7 +287,7 @@ 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.25
290
+ rubygems_version: 3.3.17
291
291
  signing_key:
292
292
  specification_version: 4
293
293
  summary: Synchronises Assets in a Rails 3 application and Amazon S3/Cloudfront and