eye-s3 0.0.1 → 0.0.2
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/lib/eye/notify/eye_s3/version.rb +1 -1
- data/lib/eye/notify/eye_s3.rb +3 -5
- 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: 9b5c9af05ce559cc10abe3c71f8ec6dcd6ca1881
|
4
|
+
data.tar.gz: 176aae2d397fdad652e80ecc145b5597d3824d0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4255c22e437d1fb10d9949e800c9b16c32c24637f926cbf26d6f4dab1c734a23a4b83d637ed51f70877073f928f8235733fa2544cab08755a73b7957c9939a70
|
7
|
+
data.tar.gz: 409d85ac7d0ebde72836c2723a0384fe03c9744a27659ec5fb05d5cf5b2d00c918b5fedc627b09de1d111311be1118a6919e8828151d46aa459098249f30e1a9
|
data/lib/eye/notify/eye_s3.rb
CHANGED
@@ -12,7 +12,6 @@ module Eye
|
|
12
12
|
|
13
13
|
param :bucket_name, String, true
|
14
14
|
param :region, String, false, 'us-east-1'
|
15
|
-
param :key, String, false, default_object_key
|
16
15
|
|
17
16
|
def execute
|
18
17
|
Aws::S3::Object.new(options).put object
|
@@ -30,9 +29,8 @@ module Eye
|
|
30
29
|
|
31
30
|
def object
|
32
31
|
{
|
33
|
-
acl: 'authenticated-read',
|
34
32
|
content_type: 'application/json',
|
35
|
-
body: body
|
33
|
+
body: body
|
36
34
|
}
|
37
35
|
end
|
38
36
|
|
@@ -47,14 +45,14 @@ module Eye
|
|
47
45
|
def event
|
48
46
|
{
|
49
47
|
host: msg_host,
|
50
|
-
timestamp: msg_at,
|
48
|
+
timestamp: msg_at.to_i,
|
51
49
|
message: msg_message,
|
52
50
|
name: msg_name,
|
53
51
|
level: msg_level
|
54
52
|
}
|
55
53
|
end
|
56
54
|
|
57
|
-
def
|
55
|
+
def key
|
58
56
|
now = Time.now
|
59
57
|
[now.year, now.month, now.day, "#{now.to_i}_#{msg_host}.json"].join '/'
|
60
58
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eye-s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ricardo Mota
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|