crunchbase4 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +5 -0
- data/lib/crunchbase/models/concerns/entity.rb +1 -1
- data/lib/crunchbase/models/funding_round.rb +1 -0
- data/lib/crunchbase/utilities/response.rb +3 -0
- data/lib/crunchbase/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21f1d6c0bae981ebb5f54925d0db9a577c39e0e620bad32de9ba471cf4249545
|
4
|
+
data.tar.gz: fff8a1bf44fd50e44eda6b099c9eaf1cf091ab1e259dcaee2bbd4c1c86779d0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b77c39ab92e4610365f65cded56e13100ee58deaf76247531c5983e1fdb5c22d744c6f3d71bb6745a3effd83baac722079e87da6ce367f5a9dd5d6c712dcd3bb
|
7
|
+
data.tar.gz: 8d355c0fc87a2b70db8af8a02b0473f909a45573a2b3495a58c21a799465f92369892432db9c5e03dd2bb47a77b4f38b9955e144b1a50ee01659ee9ebee667eb
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## [0.1.8] - 2021-02-23
|
4
|
+
|
5
|
+
### Add new fields on funding_rounds
|
6
|
+
- Adding diversity_spotlights and pre_money_valuation on raised_funding_rounds endpoint
|
7
|
+
|
3
8
|
## [0.1.7] - 2020-12-02
|
4
9
|
|
5
10
|
### Improve press_reference API response for activity_entities
|
@@ -30,7 +30,7 @@ module Crunchbase
|
|
30
30
|
card_objects = if card_data.is_a?(Array)
|
31
31
|
card_data.each_with_object([]) do |data, objects|
|
32
32
|
new_card_instance = card_model.new
|
33
|
-
objects << dynamic_attributes(new_card_instance, new_card_instance.
|
33
|
+
objects << dynamic_attributes(new_card_instance, new_card_instance.field_ids, data)
|
34
34
|
end
|
35
35
|
else
|
36
36
|
card_data.nil? ? nil : dynamic_attributes(card_model.new, extract_fields, data)
|
@@ -52,15 +52,18 @@ module Crunchbase
|
|
52
52
|
%w[identifier]
|
53
53
|
end
|
54
54
|
|
55
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
55
56
|
def field_value(name, data)
|
56
57
|
value = data.dig(name)
|
57
58
|
|
58
59
|
return value if value.nil? || value.is_a?(String)
|
59
60
|
return parse_items(value, name) if value.is_a?(Array) && value[0].is_a?(Hash) && value[0].keys.include?('value')
|
61
|
+
return value.dig('value_usd') if value.is_a?(Hash) && value.keys.include?('value_usd')
|
60
62
|
return value.dig('value') if value.is_a?(Hash) && value.keys.include?('value')
|
61
63
|
|
62
64
|
value
|
63
65
|
end
|
66
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
64
67
|
|
65
68
|
def parse_items(items, field_name)
|
66
69
|
return items.collect { |e| e.dig('value') } unless field_name == 'activity_entities'
|
data/lib/crunchbase/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crunchbase4
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Encore Shao
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -195,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
195
195
|
- !ruby/object:Gem::Version
|
196
196
|
version: '0'
|
197
197
|
requirements: []
|
198
|
-
rubygems_version: 3.
|
198
|
+
rubygems_version: 3.1.2
|
199
199
|
signing_key:
|
200
200
|
specification_version: 4
|
201
201
|
summary: Crunchbase is a ruby wrapper base on Crunchbase V4 API
|