asset_sync 2.9.0 → 2.9.1

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: 76d23b058e01eb57bee9ae81d0a64eb9c36a9f46b00d33909ba41f0f19bb1665
4
- data.tar.gz: d3693e883569e95091090c80a8d0d071e90c7d59f2763d690adf837ab14a5388
3
+ metadata.gz: 454e84d789424886800c6c11f0576701eba664d42cfbf929b3b223d6d60383d0
4
+ data.tar.gz: 349569046fa6e19ff1ac6a27527f6e7de300b5953b996ec04c8f2e9ecf272e13
5
5
  SHA512:
6
- metadata.gz: 77a8932affc52ed2f4bdedd6e3328ed84ad5442e109959f952cb09aa0414354ab263b8f0a381f678b87c29545668a052767d78ce0b26bd2443f8d80e919e18b3
7
- data.tar.gz: 52d878bc1cc42e22d171884cb794a6c4479625a7f4184de982b3956e4d614d7d365091ee0273b406f2b81b619a093d747c1464b7b81beab1f96791536e817836
6
+ metadata.gz: e8392af4e3c757f407b831b12ed76dc200da5a7aa5ddc9601c573be0fd965336fc9cfd4affb49d8420eb7edc95dcf1dba697e5ae59dfa5de7d445dd51efbf236
7
+ data.tar.gz: 4a4a1de27d7e42edc656e6ca792eaa62afe55484bfa76c1d565148af685698ad32265eb7c5752fa3ac1fe2f0216bfefb1c25e9ea3fd97fcb4796deef4cf3c689
@@ -18,11 +18,19 @@ This project adheres to [Semantic Versioning](http://semver.org/).
18
18
  - Nothing
19
19
 
20
20
 
21
+ ## [2.9.1] - 2020-02-20
22
+
23
+ ### Fixed
24
+
25
+ - Fix uploading of sprockets manifest file
26
+ (https://github.com/AssetSync/asset_sync/pull/397)
27
+
28
+
21
29
  ## [2.9.0] - 2020-01-15
22
30
 
23
31
  ### Added
24
32
 
25
- - Add option `concurrent_uploads` to improve speed of uploading
33
+ - Add option `concurrent_uploads` to improve speed of uploading
26
34
  (https://github.com/AssetSync/asset_sync/pull/393)
27
35
 
28
36
 
data/README.md CHANGED
@@ -540,6 +540,10 @@ AssetSync.configure do |config|
540
540
  config.aws_access_key_id = ENV['AWS_ACCESS_KEY_ID']
541
541
  config.aws_secret_access_key = ENV['AWS_SECRET_ACCESS_KEY']
542
542
  config.prefix = 'assets'
543
+ # Can be a `Pathname` or `String`
544
+ # Will be converted into an `Pathname`
545
+ # If relative, will be converted into an absolute path
546
+ # via `::Rails.root` or `::Dir.pwd`
543
547
  config.public_path = Pathname('./public')
544
548
  end
545
549
  ```
@@ -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", "~> 6.0.0.beta1"
8
+ gem "rails", "~> 6.0.0"
9
9
 
10
10
  gemspec path: "../"
@@ -27,7 +27,6 @@ module AssetSync
27
27
  attr_accessor :cache_asset_regexps
28
28
  attr_accessor :include_manifest
29
29
  attr_accessor :concurrent_uploads
30
- attr_writer :public_path
31
30
 
32
31
  # FOG configuration
33
32
  attr_accessor :fog_provider # Currently Supported ['AWS', 'Rackspace']
@@ -175,6 +174,19 @@ module AssetSync
175
174
  @public_path || ::Rails.public_path
176
175
  end
177
176
 
177
+ def public_path=(path)
178
+ # Generate absolute path even when relative path passed in
179
+ # Required for generating relative sprockets manifest path
180
+ pathname = Pathname(path)
181
+ @public_path = if pathname.absolute?
182
+ pathname
183
+ elsif defined?(::Rails.root)
184
+ ::Rails.root.join(pathname)
185
+ else
186
+ Pathname(::Dir.pwd).join(pathname)
187
+ end
188
+ end
189
+
178
190
  def load_yml!
179
191
  self.enabled = yml["enabled"] if yml.has_key?('enabled')
180
192
  self.fog_provider = yml["fog_provider"]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AssetSync
4
- VERSION = "2.9.0"
4
+ VERSION = "2.9.1"
5
5
  end
@@ -14,7 +14,7 @@ describe AssetSync do
14
14
  config.fog_region = 'eu-west-1'
15
15
  config.existing_remote_files = "keep"
16
16
  config.prefix = "assets"
17
- config.public_path = Pathname("./public")
17
+ config.public_path = "./public"
18
18
  end
19
19
  end
20
20
 
@@ -22,8 +22,9 @@ describe AssetSync do
22
22
  expect(AssetSync.config.prefix).to eq("assets")
23
23
  end
24
24
 
25
- it "should have prefix of assets" do
26
- expect(AssetSync.config.public_path.to_s).to eq("./public")
25
+ it "should have public_path" do
26
+ expect(AssetSync.config.public_path.to_s).to be_end_with("/public")
27
+ expect(AssetSync.config.public_path).to be_absolute
27
28
  end
28
29
 
29
30
  it "should default AssetSync to enabled" 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.9.0
4
+ version: 2.9.1
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: 2020-01-15 00:00:00.000000000 Z
14
+ date: 2020-02-20 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: fog-core