s3lite 0.0.2 → 0.0.3.pre.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/s3lite/s3.rb +5 -21
- data/lib/s3lite/version.rb +1 -1
- data/lib/s3lite.rb +2 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 719d4dd381f4e9280d225aa1b36d651985f41ee86f066da310242fd99f37d479
|
4
|
+
data.tar.gz: 5dcf1a3ef4b44c21fe2ce80452bd81a4a5c68b3d2603a40e650654902928370e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95dcf20515add182b77ad22a36e254f36da6b18f32eccb2928221662d5b659f32f5a862d989bae70a0e7129558b6f3362143eff501f9f95bbc42e943f084b764
|
7
|
+
data.tar.gz: 80bbb52bc07f592ab73bff2087f1efc793084987b97b29c6c434e85112eea3aff904d4818e979ff969186205007d171ad880a186a6537718691ef2e4bb540f0f
|
data/lib/s3lite/s3.rb
CHANGED
@@ -1,30 +1,14 @@
|
|
1
1
|
module S3lite::S3
|
2
2
|
def s3_get(path)
|
3
|
-
s3_resource_object(path).get
|
4
|
-
end
|
5
|
-
|
6
|
-
def s3_list(bucket)
|
7
|
-
s3_resource.bucket(bucket)
|
3
|
+
S3lite::S3Helper.s3_resource_object(path).get
|
8
4
|
end
|
9
5
|
|
10
6
|
def s3_put(path:, body:)
|
11
|
-
s3_resource_object(path).put(body: body)
|
12
|
-
end
|
13
|
-
|
14
|
-
private
|
15
|
-
|
16
|
-
def s3_resource_object(path)
|
17
|
-
raise 'No AWS S3 Bucket Set' if S3lite.s3_bucket.nil?
|
18
|
-
s3_resource.bucket(S3lite.s3_bucket).object(path)
|
7
|
+
S3lite::S3Helper.s3_resource_object(path).put(body: body)
|
19
8
|
end
|
20
9
|
|
21
|
-
def
|
22
|
-
|
23
|
-
|
24
|
-
Aws::S3::Resource.new(
|
25
|
-
region: S3lite.region || 'us-east-1',
|
26
|
-
access_key_id: S3lite.aws_key,
|
27
|
-
secret_access_key: S3lite.aws_secret_key
|
28
|
-
)
|
10
|
+
def self.s3_list(prefix)
|
11
|
+
S3lite::S3Helper.s3_resource.bucket(S3lite.s3_bucket)
|
12
|
+
.objects(prefix: "#{S3lite.env}/#{prefix}")
|
29
13
|
end
|
30
14
|
end
|
data/lib/s3lite/version.rb
CHANGED
data/lib/s3lite.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
require 's3lite/version'
|
2
2
|
require 's3lite/parse'
|
3
|
+
require 's3lite/s3_helper'
|
3
4
|
require 's3lite/s3'
|
4
5
|
require 's3lite/base'
|
5
6
|
|
6
7
|
module S3lite
|
7
8
|
class << self
|
8
|
-
attr_accessor :s3_bucket, :region, :aws_key, :aws_secret_key
|
9
|
+
attr_accessor :s3_bucket, :region, :aws_key, :aws_secret_key, :env
|
9
10
|
end
|
10
11
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: s3lite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3.pre.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Richey
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -117,9 +117,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
117
117
|
version: '0'
|
118
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
119
|
requirements:
|
120
|
-
- - "
|
120
|
+
- - ">"
|
121
121
|
- !ruby/object:Gem::Version
|
122
|
-
version:
|
122
|
+
version: 1.3.1
|
123
123
|
requirements: []
|
124
124
|
rubyforge_project:
|
125
125
|
rubygems_version: 2.7.6
|