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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ca01644ce6480ed676c4504d960f1ef0cae185b
4
- data.tar.gz: 408a8a8bf6acf0d4ccaa5ccce175c1f10c021f63
3
+ metadata.gz: e52fe88336fbc24e837ac26085947b02d5be731a
4
+ data.tar.gz: 771027a17cb8e29343859f47b1fbf4c64feb47ef
5
5
  SHA512:
6
- metadata.gz: 3bce97b16c49fe46fec8640fbfadbeffb8ccb1a239cd311f68c1fe5c43171dfa6713afc07c36756583111fefd302d18c313f675ed2b64af9d3b364d1ceca7fef
7
- data.tar.gz: c98f8e212f4600b2a32653400e4d52d322a9eac8c22db92bd2a243feb684d8c94f24f8198d65fd6805ae9eca90a5246e7a7b455d5d8f4fd45e39dad1aec67b0a
6
+ metadata.gz: b692e6c0489a207e8c82bcdb337ae714e34526895d01f614eec5eae356ed5825ae9b80c00e65c4a7a1cc77f9f21ea414ea44ed7177bc7e9b4ae19130f62bf591
7
+ data.tar.gz: 2352ca96bc956ace63f1843997e47b75e4f50dbc6d4ff2202e7f3a3cb8e8488c64b1ed912aef35f14473a7f54fa84b10a73fba6ccdaebaf9da6a662468d9acc0
@@ -2,10 +2,10 @@ AllCops:
2
2
  TargetRubyVersion: 2.3
3
3
  DisabledByDefault: true
4
4
  Include:
5
- - '**/*.gemspec'
6
- - '**/Rakefile'
7
- Exclude: []
8
-
5
+ - 'onebox.gemspec'
6
+ - 'Rakefile'
7
+ Exclude:
8
+ - 'vendor/**/*'
9
9
 
10
10
  # Prefer &&/|| over and/or.
11
11
  Style/AndOr:
@@ -10,3 +10,5 @@ notifications:
10
10
  script:
11
11
  - bundle exec rubocop
12
12
  - bundle exec rspec
13
+ cache:
14
+ bundler: true
@@ -8,7 +8,6 @@ require "moneta"
8
8
  require "cgi"
9
9
  require "net/http"
10
10
  require "digest"
11
- require "fast_blank"
12
11
  require "sanitize"
13
12
  require_relative "onebox/sanitize_config"
14
13
 
@@ -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'].blank?
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.respond_to?(:blank?)
163
- value.blank?
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Onebox
4
- VERSION = "1.8.41"
4
+ VERSION = "1.8.42"
5
5
  end
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.41
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-25 00:00:00.000000000 Z
13
+ date: 2018-02-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: multi_json