sourcescrub 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/sourcescrub/client.rb +2 -1
- data/lib/sourcescrub/models.rb +3 -0
- data/lib/sourcescrub/models/employee_range.rb +18 -0
- data/lib/sourcescrub/utils/request.rb +12 -1
- data/lib/sourcescrub/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c425f778c050e471a59f52d8101bc7d5b2bd926e333292525ebe9ad67d4dce65
|
4
|
+
data.tar.gz: b98238083a2c65ec56cf6d45e82141c2b2f70a9ffde7eaa6be46a989f0c30a01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5b33a6b315e789588f09039cd5b62d1e038833019f2ada2b31b9eff4f99e967745db6a65698a5f4226e6bdaa3d47a62492d916e990f6ba3815a926da5526418
|
7
|
+
data.tar.gz: 17be5421cb1d3008de1248befc059f9e481424b966106a80afc4622f375e594ca65e98b071522b970955b2692d9634efd4f53e4d14db028bc6827b5aa3b042ec
|
data/Gemfile.lock
CHANGED
data/lib/sourcescrub/client.rb
CHANGED
data/lib/sourcescrub/models.rb
CHANGED
@@ -11,5 +11,8 @@ module Sourcescrub
|
|
11
11
|
autoload :Tag, 'sourcescrub/models/tag'
|
12
12
|
autoload :Person, 'sourcescrub/models/person'
|
13
13
|
autoload :Financial, 'sourcescrub/models/financial'
|
14
|
+
autoload :Investment, 'sourcescrub/models/investment'
|
15
|
+
autoload :Employee, 'sourcescrub/models/employee'
|
16
|
+
autoload :EmployeeRange, 'sourcescrub/models/employee_range'
|
14
17
|
end
|
15
18
|
end
|
@@ -32,7 +32,18 @@ module Sourcescrub
|
|
32
32
|
raise Error, response_body unless response.status == 200
|
33
33
|
|
34
34
|
response_body = JSON.parse(response_body)
|
35
|
-
|
35
|
+
# Processing different cases for investments
|
36
|
+
if response_body.is_a?(Array)
|
37
|
+
response_body = if response_body.empty?
|
38
|
+
{}
|
39
|
+
else
|
40
|
+
{
|
41
|
+
'total' => response_body.size,
|
42
|
+
'items' => response_body
|
43
|
+
}
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
36
47
|
response_body.merge('headers' => response.headers)
|
37
48
|
end
|
38
49
|
|
data/lib/sourcescrub/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sourcescrub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Encore Shao
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -112,6 +112,7 @@ files:
|
|
112
112
|
- lib/sourcescrub/models/concerns/entity.rb
|
113
113
|
- lib/sourcescrub/models/concerns/source_items.rb
|
114
114
|
- lib/sourcescrub/models/employee.rb
|
115
|
+
- lib/sourcescrub/models/employee_range.rb
|
115
116
|
- lib/sourcescrub/models/financial.rb
|
116
117
|
- lib/sourcescrub/models/investment.rb
|
117
118
|
- lib/sourcescrub/models/person.rb
|