dpl 1.8.19.travis.1574.3 → 1.8.19.travis.1576.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +1 -0
- data/lib/dpl/provider/s3.rb +1 -0
- data/spec/provider/s3_spec.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
M2QzYjI1N2Q4M2FkYTBmZWQyZWFmYjk4YjJmYzNmNWNiODAxMWNiMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YWY1NjI3NTEzNjVjMDg4MGIzMTYzNmI3OWE0MDk1NzIyOTAzNWRkYw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTlmNGFjNTU5OGY1ZmJkYjQwYjIwODlmOTMyZGUzNDY4M2VlNzQ2ZjcwZTZh
|
10
|
+
Y2ZiOGQ1MTYyNjM4N2I4Njg4OTkzZjIxNTIwOGRkNDBlNjg0YWQ3NmIwM2Fh
|
11
|
+
Nzk5NjU3MTNkNjY3ZjUxNDJkNDc2NDM2M2RjYjU2NjZmMGY0MTI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzA4N2Q2Y2UzYWRlYmY0ZTc1ZTEzNWZlZmMwMzRmOTZkMTJhNTg2M2ZhNzRm
|
14
|
+
MWNlMjY1NjMxMDBiZDE1YmMxNDQ4N2FiZDk5NTEyZDFkMTIxZWZlMzk4MWRj
|
15
|
+
NzY4MTUyY2ExMzY4OGU5ZTQzODMzNDM4NTFkMTM3MmM4YmEyYzU=
|
data/README.md
CHANGED
@@ -316,6 +316,7 @@ For authentication you can also use Travis CI secure environment variable:
|
|
316
316
|
* **bucket**: S3 Bucket.
|
317
317
|
* **region**: S3 Region. Defaults to us-east-1.
|
318
318
|
* **upload-dir**: S3 directory to upload to. Defaults to root directory.
|
319
|
+
* **storage-class**: S3 storage class to upload as. Defaults to "STANDARD". Other values are "STANDARD_IA" or "REDUCED_REDUNDANCY". Details can be found [here](https://aws.amazon.com/s3/storage-classes/).
|
319
320
|
* **local-dir**: Local directory to upload from. Can be set from a global perspective (~/travis/build) or relative perspective (build) Defaults to project root.
|
320
321
|
* **detect-encoding**: Set HTTP header `Content-Encoding` for files compressed with `gzip` and `compress` utilities. Defaults to not set.
|
321
322
|
* **cache_control**: Set HTTP header `Cache-Control` to suggest that the browser cache the file. Defaults to `no-cache`. Valid options are `no-cache`, `no-store`, `max-age=<seconds>`,`s-maxage=<seconds>` `no-transform`, `public`, `private`.
|
data/lib/dpl/provider/s3.rb
CHANGED
@@ -50,6 +50,7 @@ module DPL
|
|
50
50
|
opts[:cache_control] = get_option_value_by_filename(options[:cache_control], filename) if options[:cache_control]
|
51
51
|
opts[:acl] = options[:acl].gsub(/_/, '-') if options[:acl]
|
52
52
|
opts[:expires] = get_option_value_by_filename(options[:expires], filename) if options[:expires]
|
53
|
+
opts[:storage_class] = options[:storage_class] if options[:storage_class]
|
53
54
|
unless File.directory?(filename)
|
54
55
|
log "uploading #{filename.inspect} with #{opts.inspect}"
|
55
56
|
result = api.bucket(option(:bucket)).object(upload_path(filename)).upload_file(filename, opts)
|
data/spec/provider/s3_spec.rb
CHANGED
@@ -127,6 +127,13 @@ describe DPL::Provider::S3 do
|
|
127
127
|
provider.push_app
|
128
128
|
end
|
129
129
|
|
130
|
+
example "Sets Storage Class" do
|
131
|
+
provider.options.update(:storage_class => "STANDARD_AI")
|
132
|
+
expect(Dir).to receive(:glob).and_yield(__FILE__)
|
133
|
+
expect_any_instance_of(Aws::S3::Object).to receive(:upload_file).with(anything(), hash_including(:storage_class => "STANDARD_AI"))
|
134
|
+
provider.push_app
|
135
|
+
end
|
136
|
+
|
130
137
|
example "Sets Website Index Document" do
|
131
138
|
provider.options.update(:index_document_suffix => "test/index.html")
|
132
139
|
expect(Dir).to receive(:glob).and_yield(__FILE__)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dpl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.19.travis.
|
4
|
+
version: 1.8.19.travis.1576.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konstantin Haase
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|