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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 18126165bf1e12fccca242964c2086abcab1ad37f1ca6b089b5e02edcb0a64b5
4
- data.tar.gz: fc47b4d956f56d7c7572e8fd11b4cd9d119d4e14929ac6f73ba35ee20a66abfd
3
+ metadata.gz: 06c9c5c7a1de551d63e7b5c847e8f63141b3947b2e2438bb99682df7533dbf65
4
+ data.tar.gz: 04efe62851c48eb4b956f9ab749a3c9910edaa13fdb910e3e21ab1b8687815ce
5
5
  SHA512:
6
- metadata.gz: d362519ba45683ad4cddc22c9fbe7e2f5f72e4281ff5369bda0056789b90ae77d3ddf529728a7c5b305d55a633e719a297e6389c79e4f923138311be1777ce75
7
- data.tar.gz: 34416bc8b028746deb93b11a684cfed331c0f7fcb0b0210cc216721faec0c41d99caf3b335a9750db3bc11c131850f04964372b50481a680a6cf1368ee7a1649
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
- content_type = MimeMagic.by_magic(file).type
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)
@@ -1,3 +1,3 @@
1
1
  module BlinkaReporter
2
- VERSION = '0.3.5'.freeze
2
+ VERSION = '0.3.6'.freeze
3
3
  end
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.5
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 00:00:00.000000000 Z
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: []