dpl 1.6.5.travis.468.1 → 1.6.5.travis.470.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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NjY2ZjcwMGE3MWYyMDFkMzYxMjdkMGM4OTgyYTZlMGQzNmE3MmIzMw==
4
+ MzkxOWMxZTdkYzkzNmY5YjYyYmFlYzMzZGZhYzkxMzZkMjVjMDVlMg==
5
5
  data.tar.gz: !binary |-
6
- ODM2N2IwNjhjYTM0NDY1YTFkYjY1NTZjOWY0Y2FiYjM4ZDA2ZTJiMA==
6
+ MTJjZGNlMzI0OWU3N2NjNDdhOTBkMjZjZWU5MmU5OWEyY2ZkZTExOA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDY2NWI4NzRjYTBhZjBkMGMyMDdmMDU1NGYzMWRjZDcyMjRjYmY2YjU0MDhl
10
- YmVhZGY0YjQyMjFkMjg0YWEyMmRkNGJjZTg1MWI2NDk1NzEwNmU0ZTFkYWZl
11
- NjQ5MzlmNDE5MjgxYWVjOGY0NTg0NDk1N2VkMDY1ZWEwMmM3NTE=
9
+ ZDUxNzYwNTk4ZDRkYWY2Yjc0YThhYzk0MmRlNDk5NDJmNGU4NmY0YjQwNmI4
10
+ Mzg1YzUxMzM3ZThlYjc1NjE3NjZhZGZiZDg1YjViMDZkMGM1MzliZTk0NzFj
11
+ NTQ5YTQ5YmU0MjM2NmEyZDk5MWY4MmViZGIxZjBhODlkZmMwYzQ=
12
12
  data.tar.gz: !binary |-
13
- ODA4ZGZjNDAwNDEzYzMyMjAxNTdmZmUyMjU0YzNjOTZlMDc3ZDc1ODQxN2Uy
14
- NDE1MjNiYzYzYWZmMGI0NDFmMDIwZGQ3ZjE2ZTgzYmY3ZDYyMGNkMGJlOTU1
15
- MDE0OThjNDI5ZGU1ZWMyYmIwZWQ0NzU4YTE1MzRmMmNlMmVhODU=
13
+ MGEzYzU1OGNiZWU2YjljYWVjYzliOTMyYWFiOWE0NTJhOTg1N2Y0MTE4NDI2
14
+ YTJlNzgyZDAzZWMxMGVjNjIyMTg0NWYyZjUyZTUwOTY0YzViZGVjN2ViZjVh
15
+ YzZiYzc1NWQyZGI0OWRiMjg3Y2I5NzI5MmQ5ODIxZWJiNTVhZTU=
data/README.md CHANGED
@@ -184,10 +184,11 @@ As a rule of thumb, you should switch to the Git strategy if you run into issues
184
184
  * **detect-encoding**: Set HTTP header `Content-Encoding` for files compressed with `gzip` and `compress` utilities. Defaults to not set.
185
185
  * **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`.
186
186
  * **expires**: This sets the date and time that the cached object is no longer cacheable. Defaults to not set. The date must be in the format `YYYY-MM-DD HH:MM:SS -ZONE`.
187
+ * **acl**: Sets the access control for the uploaded objects. Defaults to `private`. Valid options are `private`, `public_read`, `public_read_write`, `authenticated_read`, `bucket_owner_read`, `bucket_owner_full_controll`.
187
188
 
188
189
  #### Examples:
189
190
 
190
- dpl --provider=s3 --access-key-id=<access-key-id> --secret-access-key=<secret-access-key> --bucket=<bucket>
191
+ dpl --provider=s3 --access-key-id=<access-key-id> --secret-access-key=<secret-access-key> --bucket=<bucket> --acl=public_read
191
192
  dpl --provider=s3 --access-key-id=<access-key-id> --secret-access-key=<secret-access-key> --bucket=<bucket> --detect-encoding --cache_control=max-age=99999 --expires="2012-12-21 00:00:00 -0000"
192
193
  dpl --provider=s3 --access-key-id=<access-key-id> --secret-access-key=<secret-access-key> --bucket=<bucket> --region:us-west-2 --local-dir= BUILD --upload-dir=BUILDS
193
194
 
@@ -37,7 +37,8 @@ module DPL
37
37
  content_type = MIME::Types.type_for(filename).first.to_s
38
38
  opts = { :content_type => content_type }.merge(encoding_option_for(filename))
39
39
  opts[:cache_control] = options[:cache_control] if options[:cache_control]
40
- opts[:expires] = options[:expires] if options[:expires]
40
+ opts[:acl] = options[:acl] if options[:acl]
41
+ opts[:expires] = options[:expires] if options[:expires]
41
42
  unless File.directory?(filename)
42
43
  api.buckets[option(:bucket)].objects.create(upload_path(filename), File.read(filename), opts)
43
44
  end
@@ -80,6 +80,13 @@ describe DPL::Provider::S3 do
80
80
  provider.push_app
81
81
  end
82
82
 
83
+ example "Sets Cache and Expiration" do
84
+ provider.options.update(:acl => "public_read")
85
+ expect(Dir).to receive(:glob).and_yield(__FILE__)
86
+ expect_any_instance_of(AWS::S3::ObjectCollection).to receive(:create).with(anything(), anything(), hash_including(:acl => "public_read"))
87
+ provider.push_app
88
+ end
89
+
83
90
  example "when detect_encoding is set" do
84
91
  path = 'foo.js'
85
92
  provider.options.update(:detect_encoding => true)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dpl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.5.travis.468.1
4
+ version: 1.6.5.travis.470.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Haase