lsst-git-lfs-s3 0.1.2 → 0.1.3
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/bin/git-lfs-s3 +1 -0
- data/lib/git-lfs-s3/application.rb +13 -10
- 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: ce34070d4f29b61cb8ae793bfdb97044191a2199
|
4
|
+
data.tar.gz: 7e14ad0f446ddd192ba519b528b3c709f0c38fa2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fbb2b135d1c3c701eb2329d59c5ee7bdfe2779e99e91cfab4ca50c6423f44604ef2d7b7d2e18d5568006f8e0a63b674260e906217df3b246258c5e63be86f27
|
7
|
+
data.tar.gz: d53d6da0258db3ceb3181bd2220e4513165b5e21fd6e063b4a957027f907d4baa3b60418412c96e4568b62f3cfc1d48fa38692b0d13133b9f8583fa4ddb7fb80
|
data/bin/git-lfs-s3
CHANGED
@@ -9,6 +9,7 @@ GitLfsS3::Application.set :aws_access_key_id, ENV['AWS_ACCESS_KEY_ID']
|
|
9
9
|
GitLfsS3::Application.set :aws_secret_access_key, ENV['AWS_SECRET_ACCESS_KEY']
|
10
10
|
GitLfsS3::Application.set :s3_bucket, ENV['S3_BUCKET']
|
11
11
|
GitLfsS3::Application.set :server_url, ENV['LFS_SERVER_URL']
|
12
|
+
GitLfsS3::Application.set :public_server, (ENV['LFS_PUBLIC_SERVER'] == 'true')
|
12
13
|
GitLfsS3::Application.set :logger, Logger.new(STDOUT)
|
13
14
|
|
14
15
|
GitLfsS3::Application.on_authenticate do |username, password, is_safe|
|
@@ -36,16 +36,7 @@ module GitLfsS3
|
|
36
36
|
@auth.credentials[0], @auth.credentials[1], request.safe?
|
37
37
|
)
|
38
38
|
end
|
39
|
-
|
40
|
-
def protected!
|
41
|
-
unless authorized?
|
42
|
-
response['WWW-Authenticate'] = %(Basic realm="Restricted Area")
|
43
|
-
throw(:halt, [401, "Invalid username or password"])
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
before { protected! }
|
48
|
-
|
39
|
+
|
49
40
|
get '/' do
|
50
41
|
"Git LFS S3 is online."
|
51
42
|
end
|
@@ -75,6 +66,18 @@ module GitLfsS3
|
|
75
66
|
body MultiJson.dump({message: 'Object not found'})
|
76
67
|
end
|
77
68
|
end
|
69
|
+
|
70
|
+
def protected!
|
71
|
+
unless authorized?
|
72
|
+
response['WWW-Authenticate'] = %(Basic realm="Restricted Area")
|
73
|
+
throw(:halt, [401, "Invalid username or password"])
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
before do
|
78
|
+
pass if request.safe? and settings.public_server
|
79
|
+
protected!
|
80
|
+
end
|
78
81
|
|
79
82
|
post "/objects", provides: 'application/vnd.git-lfs+json' do
|
80
83
|
logger.debug headers.inspect
|
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.1.
|
4
|
+
version: 0.1.3
|
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-09-
|
12
|
+
date: 2015-09-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk
|