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 +4 -4
- data/Gemfile.lock +5 -4
- data/lib/locomotive/coal.rb +1 -0
- data/lib/locomotive/coal/upload_io.rb +9 -1
- data/lib/locomotive/coal/version.rb +1 -1
- data/locomotivecms_coal.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 175b0d7b475cd00f783328880c9329625b1e5e2b832971c1df42becbf2374ec8
|
4
|
+
data.tar.gz: 7905604dc94110af0a2dd4226402181d3f3ed2e628348f200b14d0e7b35ab993
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
14
|
+
activesupport (5.1.6)
|
14
15
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
15
|
-
i18n (
|
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.
|
46
|
+
i18n (1.0.1)
|
46
47
|
concurrent-ruby (~> 1.0)
|
47
48
|
json (2.1.0)
|
48
49
|
json_spec (1.1.5)
|
data/lib/locomotive/coal.rb
CHANGED
@@ -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
|
-
|
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
|
data/locomotivecms_coal.gemspec
CHANGED
@@ -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.
|
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
|
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
|