locomotivecms_coal 1.5.0 → 1.5.1

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: 5daa158e509bbec4d804bd4fc76c607df5d961b97f391d30388263ee6457206b
4
- data.tar.gz: 1b2356d582526092b37f05c647345ffd3351be55f6a548057fa7d985ca079a5e
3
+ metadata.gz: 175b0d7b475cd00f783328880c9329625b1e5e2b832971c1df42becbf2374ec8
4
+ data.tar.gz: 7905604dc94110af0a2dd4226402181d3f3ed2e628348f200b14d0e7b35ab993
5
5
  SHA512:
6
- metadata.gz: c2a39681db0d2688a56cfaa590174069b005584a03adf7aab69770f9062283672b177fd6e422955b8606ed7d2593f1257df0fe6460349c3113648705233ab373
7
- data.tar.gz: 00dcb802d9e21d67d9f987f01b2e70897d9e3ca58e24e5d9a7a515625784bd81a0e0835a2ec14a162dd24286adf7afc1fa73c2544dc1a34ac84477ac9f463ffe
6
+ metadata.gz: 6ebb8690d146ab6c23be41a2268115fbaadb0c767b9465b167069bebae94c534260007a14fbb8ef28d8578d8317e67727924e89b0113fd86f418688084acbbcf
7
+ data.tar.gz: '082bc3a750bf08208b647b5cee0ae83105fc0a326984910192c90967eafeb580ba1c22dabc86412fb4f45d1e84afd487c9ef23a72bbc1bd2c33906762787d8f9'
data/Gemfile.lock CHANGED
@@ -1,18 +1,19 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- locomotivecms_coal (1.5.0)
4
+ locomotivecms_coal (1.5.1)
5
5
  activesupport (~> 5.1.5)
6
6
  faraday (~> 0.14.0)
7
7
  faraday_middleware (~> 0.12.2)
8
8
  httpclient (~> 2.8.3)
9
+ mime-types (~> 3.1.0)
9
10
 
10
11
  GEM
11
12
  remote: https://rubygems.org/
12
13
  specs:
13
- activesupport (5.1.5)
14
+ activesupport (5.1.6)
14
15
  concurrent-ruby (~> 1.0, >= 1.0.2)
15
- i18n (~> 0.7)
16
+ i18n (>= 0.7, < 2)
16
17
  minitest (~> 5.1)
17
18
  tzinfo (~> 1.1)
18
19
  addressable (2.5.2)
@@ -42,7 +43,7 @@ GEM
42
43
  http-cookie (1.0.3)
43
44
  domain_name (~> 0.5)
44
45
  httpclient (2.8.3)
45
- i18n (0.9.5)
46
+ i18n (1.0.1)
46
47
  concurrent-ruby (~> 1.0)
47
48
  json (2.1.0)
48
49
  json_spec (1.1.5)
@@ -4,6 +4,7 @@ require 'active_support/deprecation'
4
4
  require 'active_support/core_ext'
5
5
  require 'faraday'
6
6
  require 'faraday_middleware'
7
+ require 'mime-types'
7
8
 
8
9
  module Locomotive
9
10
  module Coal
@@ -3,7 +3,15 @@ module Locomotive::Coal
3
3
  class UploadIO < ::Faraday::UploadIO
4
4
 
5
5
  def initialize(filename_or_io, content_type = nil, filename = nil)
6
- super(filename_or_io, content_type || 'application/octet-stream', filename)
6
+ if filename.blank? && filename_or_io.is_a?(String)
7
+ filename = File.basename(filename_or_io)
8
+ end
9
+
10
+ super(
11
+ filename_or_io,
12
+ content_type || MIME::Types.type_for(filename).first || 'application/octet-stream',
13
+ filename
14
+ )
7
15
  end
8
16
 
9
17
  end
@@ -3,6 +3,6 @@
3
3
  # 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta < 1.0.0-beta < 1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 < 1.0.0
4
4
  module Locomotive
5
5
  module Coal
6
- VERSION = '1.5.0'
6
+ VERSION = '1.5.1'
7
7
  end
8
8
  end
@@ -22,6 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.add_dependency 'faraday', '~> 0.14.0'
23
23
  spec.add_dependency 'faraday_middleware', '~> 0.12.2'
24
24
  spec.add_dependency 'activesupport', '~> 5.1.5'
25
+ spec.add_dependency 'mime-types', '~> 3.1.0'
25
26
 
26
27
  spec.required_ruby_version = '>= 2.0'
27
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: locomotivecms_coal
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Didier Lafforgue
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-08 00:00:00.000000000 Z
11
+ date: 2018-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -94,6 +94,20 @@ dependencies:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: 5.1.5
97
+ - !ruby/object:Gem::Dependency
98
+ name: mime-types
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 3.1.0
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 3.1.0
97
111
  description: The LocomotiveCMS Coal is the API ruby client for the LocomotiveCMS platform
98
112
  email:
99
113
  - didier@nocoffee.fr