asset_sync 2.9.0 → 2.9.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 +4 -4
- data/CHANGELOG.md +9 -1
- data/README.md +4 -0
- data/gemfiles/rails_6_0.gemfile +1 -1
- data/lib/asset_sync/config.rb +13 -1
- data/lib/asset_sync/version.rb +1 -1
- data/spec/unit/railsless_spec.rb +4 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 454e84d789424886800c6c11f0576701eba664d42cfbf929b3b223d6d60383d0
|
4
|
+
data.tar.gz: 349569046fa6e19ff1ac6a27527f6e7de300b5953b996ec04c8f2e9ecf272e13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8392af4e3c757f407b831b12ed76dc200da5a7aa5ddc9601c573be0fd965336fc9cfd4affb49d8420eb7edc95dcf1dba697e5ae59dfa5de7d445dd51efbf236
|
7
|
+
data.tar.gz: 4a4a1de27d7e42edc656e6ca792eaa62afe55484bfa76c1d565148af685698ad32265eb7c5752fa3ac1fe2f0216bfefb1c25e9ea3fd97fcb4796deef4cf3c689
|
data/CHANGELOG.md
CHANGED
@@ -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
|
```
|
data/gemfiles/rails_6_0.gemfile
CHANGED
@@ -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
|
8
|
+
gem "rails", "~> 6.0.0"
|
9
9
|
|
10
10
|
gemspec path: "../"
|
data/lib/asset_sync/config.rb
CHANGED
@@ -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"]
|
data/lib/asset_sync/version.rb
CHANGED
data/spec/unit/railsless_spec.rb
CHANGED
@@ -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 =
|
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
|
26
|
-
expect(AssetSync.config.public_path.to_s).to
|
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.
|
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-
|
14
|
+
date: 2020-02-20 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: fog-core
|