lsst-git-lfs-s3 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/git-lfs-s3/application.rb +9 -2
- data/lib/git-lfs-s3/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ba5d40163f92542e7c934d5a755911f769d7903
|
4
|
+
data.tar.gz: f77dd021ea75fc075007f80ad009c547f68956db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56dbf305a4b992ae9919139156aba41d85460bb4bcd2ccc1bbc0a3656f86372edb72cb9de233d20dc810bc0ae849abbcbc96fa40bc5900ec1fe455121cb4f032
|
7
|
+
data.tar.gz: 69852595fa41ed2361c2044ec27275719c2185e6b89455c9889306b18c68159198743af93835cc79f16a001eef5a3979c0d8ef7cb518cf696d705384d5b4f9a5
|
@@ -73,6 +73,13 @@ module GitLfsS3
|
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
76
|
+
def public_read_grant
|
77
|
+
grantee = Aws::S3::Types::Grantee.new(
|
78
|
+
display_name: nil, email_address: nil, id: nil, type: nil,
|
79
|
+
uri: "http://acs.amazonaws.com/groups/global/AllUsers")
|
80
|
+
Aws::S3::Types::Grant.new(grantee: grantee, permission: "READ")
|
81
|
+
end
|
82
|
+
|
76
83
|
before do
|
77
84
|
pass if request.safe? and settings.public_server
|
78
85
|
protected!
|
@@ -86,12 +93,12 @@ module GitLfsS3
|
|
86
93
|
status service.status
|
87
94
|
body MultiJson.dump(service.response)
|
88
95
|
end
|
89
|
-
|
96
|
+
|
90
97
|
post '/verify', provides: 'application/vnd.git-lfs+json' do
|
91
98
|
data = MultiJson.load(request.body.tap { |b| b.rewind }.read)
|
92
99
|
object = object_data(data['oid'])
|
93
100
|
if settings.public_server and settings.ceph_s3
|
94
|
-
if object.exists?
|
101
|
+
if object.exists? and not object.acl.grants.include?(public_read_grant)
|
95
102
|
object.acl.put(acl: "public-read")
|
96
103
|
end
|
97
104
|
end
|
data/lib/git-lfs-s3/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lsst-git-lfs-s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan LeFevre
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-10-
|
12
|
+
date: 2015-10-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk
|