genderize-io 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +1 -3
- data/genderize-io.gemspec +0 -1
- data/lib/genderize/io.rb +9 -8
- data/lib/genderize/io/base.rb +4 -6
- data/lib/genderize/io/parser/header.rb +3 -3
- data/lib/genderize/io/parser/json.rb +3 -3
- data/lib/genderize/io/version.rb +1 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c1376818a13c76f350db58d37acf2f6145542720b4d2e5b9fd3bd286619bb2d
|
4
|
+
data.tar.gz: fcd99945a5facb96f66c5b99602362786cfe205c1abcbd75250a4edbba9f7650
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23b0804ed996d68791457cf741356f0a95eca590d0f76a9d4e829606a880dd6e7bdee1ef03fc996d457b1de4a7dfa014f2dcbab088d9a3acb16bfd9a787c68b9
|
7
|
+
data.tar.gz: 1cc74d398fabf1511354c46757aa204e82aec733e242515c727a1793a70e7b1d3513bac275f694a2a912bdd6ad0947e0ce482de929041a1bb833d97b2c04edd6
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [1.4.0] - 2021-07-22
|
10
|
+
### Changed
|
11
|
+
- Improved requirement initializations
|
12
|
+
### Removed
|
13
|
+
- Remove agents dependency
|
14
|
+
|
9
15
|
## [1.3.0] - 2021-07-19
|
10
16
|
### Added
|
11
17
|
- Added Ruby 3.0 support
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
genderize-io (1.
|
5
|
-
agents
|
4
|
+
genderize-io (1.4.0)
|
6
5
|
typhoeus
|
7
6
|
|
8
7
|
GEM
|
@@ -10,7 +9,6 @@ GEM
|
|
10
9
|
specs:
|
11
10
|
addressable (2.8.0)
|
12
11
|
public_suffix (>= 2.0.2, < 5.0)
|
13
|
-
agents (0.1.4)
|
14
12
|
ast (2.4.2)
|
15
13
|
colorize (0.8.1)
|
16
14
|
crack (0.4.5)
|
data/genderize-io.gemspec
CHANGED
@@ -37,7 +37,6 @@ Gem::Specification.new do |spec|
|
|
37
37
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
38
38
|
spec.require_paths = %w[lib]
|
39
39
|
|
40
|
-
spec.add_runtime_dependency 'agents'
|
41
40
|
spec.add_runtime_dependency 'typhoeus'
|
42
41
|
|
43
42
|
spec.add_development_dependency 'bundler'
|
data/lib/genderize/io.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
3
|
+
require 'genderize/io/version'
|
4
|
+
|
5
|
+
require 'genderize/io/parser/json'
|
6
|
+
require 'genderize/io/parser/header'
|
7
|
+
|
8
|
+
require 'genderize/io/base'
|
9
|
+
require 'genderize/io/lookup'
|
10
|
+
|
11
|
+
require 'genderize/io/batch/lookup'
|
data/lib/genderize/io/base.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
4
|
-
require 'typhoeus'
|
3
|
+
require 'typhoeus' unless defined?(Typhoeus)
|
5
4
|
|
6
5
|
module Genderize
|
7
6
|
module Io
|
@@ -23,9 +22,9 @@ module Genderize
|
|
23
22
|
end
|
24
23
|
|
25
24
|
def self.determine(name, host: DEFAULT_HOST, country_id: nil, language_id: nil)
|
26
|
-
|
27
|
-
|
28
|
-
|
25
|
+
instance = new(name, host: host, country_id: country_id, language_id: language_id)
|
26
|
+
instance.determine
|
27
|
+
instance
|
29
28
|
end
|
30
29
|
|
31
30
|
def url
|
@@ -57,7 +56,6 @@ module Genderize
|
|
57
56
|
def generate_request
|
58
57
|
return @request unless @request.nil?
|
59
58
|
|
60
|
-
Typhoeus::Config.user_agent = Agents.random_user_agent(:desktop)
|
61
59
|
Typhoeus.get(url, accept_encoding: 'gzip,deflate')
|
62
60
|
end
|
63
61
|
|
data/lib/genderize/io/version.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: genderize-io
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Gomez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-07-
|
11
|
+
date: 2021-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: agents
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: typhoeus
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|