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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6de299d6fd6488b24f851914c38bf4a85dcd312a156445f2f357da4228a63c6f
4
- data.tar.gz: 8f5a7c9a5208a689b5bc404d4b08f4745829ed4099b5335ba278823f2568b5b4
3
+ metadata.gz: c425f778c050e471a59f52d8101bc7d5b2bd926e333292525ebe9ad67d4dce65
4
+ data.tar.gz: b98238083a2c65ec56cf6d45e82141c2b2f70a9ffde7eaa6be46a989f0c30a01
5
5
  SHA512:
6
- metadata.gz: 832239e6396f1ddcfff488575bec81676d096e96e3b4b14d15edc5f5b92f9032b4e0d918759b59ddf36ed35672a4b275f8f46233745bce88d9fd829be6c30aa9
7
- data.tar.gz: fbec2f0e813005424144a1f50591dd7057edf8f7bbe961571ee05fb8a4fb0afc4b6b299967aa58dc4849491ef07a3e8c22ef97bd38745c9234e66133e3e986b4
6
+ metadata.gz: b5b33a6b315e789588f09039cd5b62d1e038833019f2ada2b31b9eff4f99e967745db6a65698a5f4226e6bdaa3d47a62492d916e990f6ba3815a926da5526418
7
+ data.tar.gz: 17be5421cb1d3008de1248befc059f9e481424b966106a80afc4622f375e594ca65e98b071522b970955b2692d9634efd4f53e4d14db028bc6827b5aa3b042ec
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sourcescrub (0.0.6)
4
+ sourcescrub (0.0.7)
5
5
  faraday
6
6
 
7
7
  GEM
@@ -90,7 +90,8 @@ module Sourcescrub
90
90
  'financials' => 'financial',
91
91
  'investments' => 'investment',
92
92
  'employees' => 'employee',
93
- 'tags' => 'tag'
93
+ 'tags' => 'tag',
94
+ 'employeerange' => 'employee_range'
94
95
  }
95
96
  end
96
97
  end
@@ -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
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sourcescrub
4
+ # Models
5
+ module Models
6
+ # Employee
7
+ class EmployeeRange < Entity
8
+ ENDPOINT = 'employeerange'
9
+
10
+ def field_ids
11
+ %w[
12
+ employeeRange
13
+ date
14
+ ]
15
+ end
16
+ end
17
+ end
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
- response_body = {} if response_body.is_a?(Array) && response_body.empty?
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sourcescrub
4
- VERSION = '0.0.6'
4
+ VERSION = '0.0.7'
5
5
  end
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.6
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-04 00:00:00.000000000 Z
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