Skip to content

Commit

Permalink
Remove '.gzip?' in favor of '.compression == "gz"'
Browse files Browse the repository at this point in the history
  • Loading branch information
fengb committed Aug 8, 2023
1 parent 2bd1572 commit d06c6c2
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
4 changes: 0 additions & 4 deletions lib/asset_sync/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,6 @@ def manifest_path
File.join(directory, "manifest.yml")
end

def gzip?
self.compression == 'gz'
end

def gzip_compression= bool
if bool
self.compression = 'gz'
Expand Down
4 changes: 2 additions & 2 deletions spec/unit/asset_sync_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@
AssetSync.config.gzip_compression = true
end

it "config.gzip? should be true" do
expect(AssetSync.config.gzip?).to be_truthy
it "config.compression should be 'gz'" do
expect(AssetSync.config.compression).to eq("gz")
end
end

Expand Down
4 changes: 2 additions & 2 deletions spec/unit/azure_rm_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@
AssetSync.config.gzip_compression = true
end

it "config.gzip? should be true" do
expect(AssetSync.config.gzip?).to be_truthy
it "config.compression should be 'gz'" do
expect(AssetSync.config.compression).to eq("gz")
end
end

Expand Down
4 changes: 2 additions & 2 deletions spec/unit/backblaze_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@
AssetSync.config.gzip_compression = true
end

it "config.gzip? should be true" do
expect(AssetSync.config.gzip?).to be_truthy
it "config.compression should be 'gz'" do
expect(AssetSync.config.compression).to eq("gz")
end
end

Expand Down
4 changes: 2 additions & 2 deletions spec/unit/google_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@
AssetSync.config.gzip_compression = true
end

it "config.gzip? should be true" do
expect(AssetSync.config.gzip?).to be_truthy
it "config.compression should be 'gz'" do
expect(AssetSync.config.compression).to eq("gz")
end
end

Expand Down

0 comments on commit d06c6c2

Please sign in to comment.