clientside_aws 0.0.20 → 0.0.21
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/clientside_aws_build +5 -4
- data/bin/clientside_aws_run +2 -4
- data/bin/clientside_aws_test +2 -3
- data/clientside_aws/s3.rb +18 -18
- data/clientside_aws.gemspec +1 -1
- data/lib/clientside_aws/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c57dd0c8d8d94dfcaa0ee7849b332371c660baab
|
4
|
+
data.tar.gz: 2eac8b8a64913b551feecb28efab278560a32a3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16441859625795c173345d4f5c43d36e52fee3819c53ce4e3f33d75eeefdd2a7b852ec56b607e1d78319a080222edb850c5bd2880551bdfd01b5a06318abfb8a
|
7
|
+
data.tar.gz: 881bb8e29fc22d45a23c383ff80fd795ac5919200de58458d1814e854d6f3b19f870b0c768db4a99cdf41e232d830ef624fad8a9acc386b6c6667df470a92327
|
data/bin/clientside_aws_build
CHANGED
@@ -1,6 +1,7 @@
|
|
1
|
-
#!/usr/bin/env
|
1
|
+
#!/usr/bin/env bash
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
# https://stackoverflow.com/a/246128/61072
|
4
|
+
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
5
|
+
PARENTDIR="$(dirname "$DIR")"
|
5
6
|
|
6
|
-
|
7
|
+
docker build -t=clientside_aws:latest $PARENTDIR
|
data/bin/clientside_aws_run
CHANGED
data/bin/clientside_aws_test
CHANGED
data/clientside_aws/s3.rb
CHANGED
@@ -203,21 +203,21 @@ delete %r{/(.*?)\.s3\.(.*?\.amazonaws\.com)?/(.+)} do
|
|
203
203
|
status 200
|
204
204
|
end
|
205
205
|
|
206
|
-
|
207
|
-
#
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
206
|
+
post %r{/s3(.*?\.amazonaws\.com)?/([^/]+)/?} do
|
207
|
+
# upload the file (chunking not implemented) to fake S3
|
208
|
+
bucket = params[:captures][1]
|
209
|
+
file_name = params[:key]
|
210
|
+
if file_name
|
211
|
+
file_name = file_name[1..-1] if file_name.start_with? '/'
|
212
|
+
body_send = params[:file]
|
213
|
+
body_send = body_send[:tempfile].read
|
214
|
+
|
215
|
+
AWS_REDIS.hset "s3:bucket:#{bucket}:#{file_name}", 'body', body_send
|
216
|
+
if env.key?('content-type')
|
217
|
+
AWS_REDIS.hset "s3:bucket:#{bucket}:#{file_name}", 'content-type', env['content-type']
|
218
|
+
elsif env.key?('CONTENT_TYPE')
|
219
|
+
AWS_REDIS.hset "s3:bucket:#{bucket}:#{file_name}", 'content-type', env['CONTENT_TYPE']
|
220
|
+
end
|
221
|
+
end
|
222
|
+
status 200
|
223
|
+
end
|
data/clientside_aws.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.license = 'MIT'
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
17
|
-
spec.executables = %w[clientside_aws_build clientside_aws_run]
|
17
|
+
spec.executables = %w[clientside_aws_build clientside_aws_run clientside_aws_test]
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clientside_aws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Perry Street Software, Inc.
|
@@ -157,6 +157,7 @@ email:
|
|
157
157
|
executables:
|
158
158
|
- clientside_aws_build
|
159
159
|
- clientside_aws_run
|
160
|
+
- clientside_aws_test
|
160
161
|
extensions: []
|
161
162
|
extra_rdoc_files: []
|
162
163
|
files:
|