onebox 1.8.41 → 1.8.42
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +4 -4
- data/.travis.yml +2 -0
- data/lib/onebox.rb +0 -1
- data/lib/onebox/helpers.rb +5 -3
- data/lib/onebox/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e52fe88336fbc24e837ac26085947b02d5be731a
|
4
|
+
data.tar.gz: 771027a17cb8e29343859f47b1fbf4c64feb47ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b692e6c0489a207e8c82bcdb337ae714e34526895d01f614eec5eae356ed5825ae9b80c00e65c4a7a1cc77f9f21ea414ea44ed7177bc7e9b4ae19130f62bf591
|
7
|
+
data.tar.gz: 2352ca96bc956ace63f1843997e47b75e4f50dbc6d4ff2202e7f3a3cb8e8488c64b1ed912aef35f14473a7f54fa84b10a73fba6ccdaebaf9da6a662468d9acc0
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
data/lib/onebox.rb
CHANGED
data/lib/onebox/helpers.rb
CHANGED
@@ -128,7 +128,7 @@ module Onebox
|
|
128
128
|
|
129
129
|
http.request_head([uri.path, uri.query].join("?")) do |response|
|
130
130
|
code = response.code.to_i
|
131
|
-
unless code === 200 || response.header['content-length']
|
131
|
+
unless code === 200 || Onebox::Helpers.blank?(response.header['content-length'])
|
132
132
|
return nil
|
133
133
|
end
|
134
134
|
return response.header['content-length']
|
@@ -159,8 +159,10 @@ module Onebox
|
|
159
159
|
end
|
160
160
|
|
161
161
|
def self.blank?(value)
|
162
|
-
if value.
|
163
|
-
|
162
|
+
if value.nil?
|
163
|
+
true
|
164
|
+
elsif String === value
|
165
|
+
value.empty? || !(/[[:^space:]]/ === value)
|
164
166
|
else
|
165
167
|
value.respond_to?(:empty?) ? !!value.empty? : !value
|
166
168
|
end
|
data/lib/onebox/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onebox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.42
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joanna Zeta
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-02-
|
13
|
+
date: 2018-02-27 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: multi_json
|