blinka-reporter 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/blinka_client.rb +8 -2
- data/lib/blinka_reporter/version.rb +1 -1
- metadata +5 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06c9c5c7a1de551d63e7b5c847e8f63141b3947b2e2438bb99682df7533dbf65
|
4
|
+
data.tar.gz: 04efe62851c48eb4b956f9ab749a3c9910edaa13fdb910e3e21ab1b8687815ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2f18d7a70bec74bfa5df5777f3a31b0b87ec7d957d74a1571e1f6ee25c2e71b897f4ce89314c808579ae3448e28c98263dfe3cdbe03d262a6223d6a821a0c90
|
7
|
+
data.tar.gz: 9212e1935d61b03e366407c0a964fa5726c2d523031a61066f8b19233c9f1da23f38de3b21d5ade2e123f60498402dae054a16c8416856c6f338d81e07c5a725
|
data/lib/blinka_client.rb
CHANGED
@@ -1,8 +1,12 @@
|
|
1
|
-
require 'mimemagic'
|
2
1
|
require 'httparty'
|
3
2
|
|
4
3
|
class BlinkaClient
|
5
4
|
DEFAULT_HOST = 'https://www.blinka.app'.freeze
|
5
|
+
SUPPORTED_MIME_TYPES = {
|
6
|
+
jpg: 'image/jpeg',
|
7
|
+
jpeg: 'image/jpeg',
|
8
|
+
png: 'image/png'
|
9
|
+
}
|
6
10
|
|
7
11
|
include HTTParty
|
8
12
|
|
@@ -112,7 +116,9 @@ class BlinkaClient
|
|
112
116
|
|
113
117
|
file = File.open(filepath)
|
114
118
|
filename = File.basename(filepath)
|
115
|
-
|
119
|
+
extension = File.extname(filepath).delete('.').to_sym
|
120
|
+
content_type = SUPPORTED_MIME_TYPES[extension]
|
121
|
+
return if content_type.nil?
|
116
122
|
|
117
123
|
presigned_post =
|
118
124
|
BlinkaClient.presign_image(filename: filename, content_type: content_type)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blinka-reporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Wessman
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.18.1
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: mimemagic
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 0.3.5
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 0.3.5
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: dotenv
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -127,7 +113,7 @@ metadata:
|
|
127
113
|
documentation_uri: https://github.com/davidwessman/blinka_reporter
|
128
114
|
changelog_uri: https://github.com/davidwessman/blinka_reporter/main/CHANGELOG.md
|
129
115
|
source_code_uri: https://github.com/davidwessman/blinka_reporter
|
130
|
-
post_install_message:
|
116
|
+
post_install_message:
|
131
117
|
rdoc_options: []
|
132
118
|
require_paths:
|
133
119
|
- lib
|
@@ -143,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
129
|
version: '0'
|
144
130
|
requirements: []
|
145
131
|
rubygems_version: 3.2.7
|
146
|
-
signing_key:
|
132
|
+
signing_key:
|
147
133
|
specification_version: 4
|
148
134
|
summary: Format tests for Blinka
|
149
135
|
test_files: []
|