skynet_ruby 0.2.1 → 0.3.0

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: 2d551980fa895ea84db75b6d51681cc7c69323b4dcadfb97875400efdf589437
4
- data.tar.gz: d5b077d9ea4372f318f1882b08811d496ddd3775232ba3cecf65ee0b6f4c21a5
3
+ metadata.gz: 57575c5a9d188be33f4bb758608834ee9e8b262b13fd72b929d7226c58f1ceca
4
+ data.tar.gz: 1ea06346742242072e6c5df5062d518288bd59652bc2f53000e1c6eb47801332
5
5
  SHA512:
6
- metadata.gz: eece0304da18dbd3c31bcb2396041fa19f36096f5e01fbf28f0e7530625a15afdcace0a4bb510fe826311932c35687a128f6148b272e82aca72b0ca2b2f740ee
7
- data.tar.gz: 9b5f6f9d84196e1ee94fe5d61b0d9ef73bf6f84ee60c0fd7a3ea2c2f466bf051d047240d92b552764402655b553d995d59922def215124ba84de982b3bf55cd8
6
+ metadata.gz: 8c635a7e4106d53ef4be1647081267d5b8ca8f0ec8e3773092c0ec4149e993e09937b70fdfb53aa7329c42a1c9e8e79d90e76a37f17af33a44b0bc0a5c141f4c
7
+ data.tar.gz: aa7a3d83372f6348226c9d5527618eb2e4e269b60e1de48c0cbd90daed43304d67c2c40a364fc5b846ae8570fd98a863e32fe5238e944ec8f3c8d9baa08adc75
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- skynet_ruby (0.1.1)
5
- mimemagic (~> 0.4.3)
4
+ skynet_ruby (0.2.1)
5
+ mime-types (~> 3.3.0)
6
6
  multipart_body (~> 0.2.1)
7
7
  typhoeus (~> 1.4.0)
8
8
 
@@ -20,19 +20,14 @@ GEM
20
20
  ffi (>= 1.15.0)
21
21
  ffi (1.15.0)
22
22
  hashdiff (1.0.1)
23
- mimemagic (0.4.3)
24
- nokogiri (~> 1)
25
- rake
26
- mini_portile2 (2.5.1)
23
+ mime-types (3.3.1)
24
+ mime-types-data (~> 3.2015)
25
+ mime-types-data (3.2021.0225)
27
26
  multipart_body (0.2.1)
28
- nokogiri (1.11.3)
29
- mini_portile2 (~> 2.5.0)
30
- racc (~> 1.4)
31
27
  parallel (1.20.1)
32
28
  parser (3.0.1.0)
33
29
  ast (~> 2.4.1)
34
30
  public_suffix (4.0.6)
35
- racc (1.5.2)
36
31
  rainbow (3.0.0)
37
32
  rake (12.3.3)
38
33
  regexp_parser (2.1.1)
data/lib/skynet/client.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  require 'json'
4
4
  require 'typhoeus'
5
5
  require 'multipart_body'
6
- require 'mimemagic'
6
+ require 'mime/types'
7
7
 
8
8
  module Skynet
9
9
  # Client for interacting with Skynet
@@ -223,7 +223,8 @@ module Skynet
223
223
  files = files_to_upload(directory)
224
224
 
225
225
  file_parts = files.inject([]) do |parts, file|
226
- ct = MimeMagic.by_path(file[:path])&.type
226
+ ct = MIME::Types.type_for(file[:path]).first&.to_s
227
+
227
228
  begin
228
229
  f = File.open(file[:path], 'r')
229
230
  parts << Part.new(name: config[:portal_directory_file_fieldname],
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Skynet
4
- VERSION = '0.2.1'
4
+ VERSION = '0.3.0'
5
5
  end
data/sia_skynet.gemspec CHANGED
@@ -30,6 +30,6 @@ Gem::Specification.new do |spec|
30
30
  spec.require_paths = ['lib']
31
31
 
32
32
  spec.add_dependency 'typhoeus', '~> 1.4.0'
33
- spec.add_dependency 'mimemagic', '~> 0.4.3'
33
+ spec.add_dependency 'mime-types', '~> 3.3.0'
34
34
  spec.add_dependency 'multipart_body', '~> 0.2.1'
35
35
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skynet_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christoph Klocker
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-14 00:00:00.000000000 Z
11
+ date: 2021-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -25,19 +25,19 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.4.0
27
27
  - !ruby/object:Gem::Dependency
28
- name: mimemagic
28
+ name: mime-types
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.4.3
33
+ version: 3.3.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.4.3
40
+ version: 3.3.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: multipart_body
43
43
  requirement: !ruby/object:Gem::Requirement