gridium 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gridium/version.rb +1 -1
- data/lib/s3.rb +2 -7
- 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: 29702a2b000477e59951c7e9315709f3d618c9f7
|
4
|
+
data.tar.gz: 3ed9f52b829994d27f3ba5fd8c58b0bf923b3a39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 597f7e570bd0c101e39a70b6ddc2e5e2d4201ac76170631965bc73f7aa4dd2f512e66a53522641324b5121f2926905f921278feca23ec20441ea38009ecf6f30
|
7
|
+
data.tar.gz: 0246bf78cfed1fe1a6bd809a506b9c23b5d5ce486f01587a9134d59d0fb178a327e23431869dbc4ffe2877693da780e4fafd2f227321074ec33b17fa74c71c3c
|
data/lib/gridium/version.rb
CHANGED
data/lib/s3.rb
CHANGED
@@ -4,21 +4,16 @@ module Gridium
|
|
4
4
|
|
5
5
|
class GridiumS3
|
6
6
|
|
7
|
-
ACCESS_KEY_ID = ENV['S3_ACCESS_KEY_ID']
|
8
|
-
SECRET_ACCESS_KEY = ENV['S3_SECRET_ACCESS_KEY']
|
9
|
-
DEFAULT_REGION = ENV['S3_DEFAULT_REGION']
|
10
|
-
ROOT_BUCKET = ENV['S3_ROOT_BUCKET']
|
11
7
|
DELIMITER = "/"
|
12
8
|
|
13
|
-
|
14
9
|
def initialize(project_name, subdirectory_name='screenshots')
|
15
10
|
Log.debug("initializing GridiumS3 with #{project_name} and #{subdirectory_name}")
|
16
|
-
Aws.config.update({ credentials: Aws::Credentials.new(
|
11
|
+
Aws.config.update({ credentials: Aws::Credentials.new(ENV['S3_ACCESS_KEY_ID'], ENV['S3_SECRET_ACCESS_KEY']) ,region: ENV['S3_DEFAULT_REGION']})
|
17
12
|
_validate_string(project_name)
|
18
13
|
_validate_string(subdirectory_name)
|
19
14
|
@project_name = _sanitize_string(project_name)
|
20
15
|
@subdirectory_name = _sanitize_string(subdirectory_name)
|
21
|
-
@bucket = Aws::S3::Resource.new().bucket(
|
16
|
+
@bucket = Aws::S3::Resource.new().bucket(ENV['S3_ROOT_BUCKET'])
|
22
17
|
end
|
23
18
|
|
24
19
|
def save_file(absolute_path_of_file)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gridium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seth Urban
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|