genderize-io 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.reek.yml +28 -0
- data/.rubocop.yml +7 -1
- data/genderize-io.gemspec +2 -4
- data/lib/genderize/io/base.rb +4 -0
- data/lib/genderize/io/version.rb +1 -1
- metadata +7 -7
- data/.reek +0 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8173ca2c1c13fdd8f6aae7e961b4b29c286e0ae58691e3596200f01197f89f50
|
4
|
+
data.tar.gz: d0c28804b2c3bd1952f63f44cb722f77b4c88b4ab2a35805f1a336260cdc7f07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28cf9de1c8aec590c13cccc92d88fe83cb236d68d9d5d3c672ddc58f975c35f68a4f79182e4a90566ac33729db3f1620f4a3f4a1a70d5ba81eade7db0b73a405
|
7
|
+
data.tar.gz: 85137d5edb1b05b7c7377c77431cec64d2ba3599077b791b018957c039f8ea377f110d936cca9579e5e74afeb261b5db0341ff7b60ebc3926d0cebd5ae4fbc0b
|
data/.reek.yml
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
---
|
2
|
+
detectors:
|
3
|
+
BooleanParameter:
|
4
|
+
enabled: false
|
5
|
+
DuplicateMethodCall:
|
6
|
+
enabled: false
|
7
|
+
FeatureEnvy:
|
8
|
+
enabled: false
|
9
|
+
InstanceVariableAssumption:
|
10
|
+
enabled: false
|
11
|
+
IrresponsibleModule:
|
12
|
+
enabled: false
|
13
|
+
LongParameterList:
|
14
|
+
enabled: false
|
15
|
+
NilCheck:
|
16
|
+
enabled: false
|
17
|
+
RepeatedConditional:
|
18
|
+
enabled: false
|
19
|
+
TooManyInstanceVariables:
|
20
|
+
enabled: false
|
21
|
+
TooManyStatements:
|
22
|
+
enabled: false
|
23
|
+
UnusedParameters:
|
24
|
+
enabled: false
|
25
|
+
UncommunicativeVariableName:
|
26
|
+
enabled: false
|
27
|
+
UtilityFunction:
|
28
|
+
enabled: false
|
data/.rubocop.yml
CHANGED
@@ -14,9 +14,15 @@ LineLength:
|
|
14
14
|
Max: 100
|
15
15
|
Lint/ScriptPermission:
|
16
16
|
Enabled: false
|
17
|
+
Naming/FileName:
|
18
|
+
Enabled: false
|
17
19
|
Style/Documentation:
|
18
20
|
Enabled: false
|
19
|
-
Style/
|
21
|
+
Style/ExpandPathArguments:
|
22
|
+
Enabled: false
|
23
|
+
Style/MethodMissingSuper:
|
24
|
+
Enabled: false
|
25
|
+
Style/MissingRespondToMissing:
|
20
26
|
Enabled: false
|
21
27
|
Style/PerlBackrefs:
|
22
28
|
Enabled: false
|
data/genderize-io.gemspec
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# coding: utf-8
|
4
|
-
|
5
3
|
lib = File.expand_path('../lib', __FILE__)
|
6
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
7
5
|
require 'genderize/io/version'
|
@@ -26,10 +24,10 @@ Gem::Specification.new do |spec|
|
|
26
24
|
spec.add_runtime_dependency 'user_agent_db'
|
27
25
|
|
28
26
|
spec.add_development_dependency 'bundler'
|
29
|
-
spec.add_development_dependency 'rake'
|
30
|
-
spec.add_development_dependency 'rspec'
|
31
27
|
spec.add_development_dependency 'fasterer'
|
28
|
+
spec.add_development_dependency 'rake'
|
32
29
|
spec.add_development_dependency 'reek'
|
30
|
+
spec.add_development_dependency 'rspec'
|
33
31
|
spec.add_development_dependency 'rubocop'
|
34
32
|
spec.add_development_dependency 'vcr'
|
35
33
|
spec.add_development_dependency 'webmock'
|
data/lib/genderize/io/base.rb
CHANGED
@@ -35,22 +35,26 @@ module Genderize
|
|
35
35
|
|
36
36
|
def generate_data
|
37
37
|
return if @request.nil?
|
38
|
+
|
38
39
|
Genderize::Io::Parser::Json.parse(@request.response_body)
|
39
40
|
end
|
40
41
|
|
41
42
|
def generate_headers
|
42
43
|
return if @request.nil?
|
44
|
+
|
43
45
|
Genderize::Io::Parser::Header.parse(@request.response_headers)
|
44
46
|
end
|
45
47
|
|
46
48
|
def generate_rate_limits
|
47
49
|
headers = generate_headers
|
48
50
|
return if headers.nil?
|
51
|
+
|
49
52
|
HEADER_KEYS.each_with_object({}) { |key, hash| hash[key] = headers.send(key).to_i }
|
50
53
|
end
|
51
54
|
|
52
55
|
def generate_request
|
53
56
|
return @request unless @request.nil?
|
57
|
+
|
54
58
|
Typhoeus::Config.user_agent = UserAgentDB.random
|
55
59
|
Typhoeus.get(url, accept_encoding: 'gzip,deflate')
|
56
60
|
end
|
data/lib/genderize/io/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: genderize-io
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.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: 2018-
|
11
|
+
date: 2018-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: fasterer
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
@@ -81,7 +81,7 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: reek
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
@@ -95,7 +95,7 @@ dependencies:
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: rspec
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - ">="
|
@@ -159,7 +159,7 @@ extra_rdoc_files: []
|
|
159
159
|
files:
|
160
160
|
- ".fasterer.yml"
|
161
161
|
- ".gitignore"
|
162
|
-
- ".reek"
|
162
|
+
- ".reek.yml"
|
163
163
|
- ".rspec"
|
164
164
|
- ".rubocop.yml"
|
165
165
|
- ".travis.yml"
|
data/.reek
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
---
|
2
|
-
BooleanParameter:
|
3
|
-
enabled: false
|
4
|
-
DuplicateMethodCall:
|
5
|
-
enabled: false
|
6
|
-
FeatureEnvy:
|
7
|
-
enabled: false
|
8
|
-
InstanceVariableAssumption:
|
9
|
-
enabled: false
|
10
|
-
IrresponsibleModule:
|
11
|
-
enabled: false
|
12
|
-
LongParameterList:
|
13
|
-
enabled: false
|
14
|
-
NilCheck:
|
15
|
-
enabled: false
|
16
|
-
RepeatedConditional:
|
17
|
-
enabled: false
|
18
|
-
TooManyInstanceVariables:
|
19
|
-
enabled: false
|
20
|
-
TooManyStatements:
|
21
|
-
enabled: false
|
22
|
-
UnusedParameters:
|
23
|
-
enabled: false
|
24
|
-
UncommunicativeVariableName:
|
25
|
-
enabled: false
|
26
|
-
UtilityFunction:
|
27
|
-
enabled: false
|