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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f3b4fc39257c331e78bdf3f05dd4e08c96c67b34c8e0627c2c7bc5a583f5a7f6
4
- data.tar.gz: 22f753ee2a2b785247c8311fd126ef826853028c542bbae010e55a391aa59e6e
3
+ metadata.gz: 21f1d6c0bae981ebb5f54925d0db9a577c39e0e620bad32de9ba471cf4249545
4
+ data.tar.gz: fff8a1bf44fd50e44eda6b099c9eaf1cf091ab1e259dcaee2bbd4c1c86779d0d
5
5
  SHA512:
6
- metadata.gz: 13c65190a96019e452efe17a6f0173c4cc3f1cbf28ca067fc56da2c394377f5b3f48176d3c34383e242bfa25ead36a9a70156ba0c243e23381ab7c39ba9bbcfd
7
- data.tar.gz: c13e836e817f2509dac847db8c8f733eb680d0eb69e81961cab23288d9bf3190479481bd5fe9b67a1402d0f164195ba3097601a9c3a7bade0bfb78561380e2e3
6
+ metadata.gz: b77c39ab92e4610365f65cded56e13100ee58deaf76247531c5983e1fdb5c22d744c6f3d71bb6745a3effd83baac722079e87da6ce367f5a9dd5d6c712dcd3bb
7
+ data.tar.gz: 8d355c0fc87a2b70db8af8a02b0473f909a45573a2b3495a58c21a799465f92369892432db9c5e03dd2bb47a77b4f38b9955e144b1a50ee01659ee9ebee667eb
data/.gitignore CHANGED
@@ -10,3 +10,4 @@
10
10
 
11
11
  # rspec failure tracking
12
12
  .rspec_status
13
+ .ruby-version
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.basis_fields, data)
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)
@@ -18,6 +18,7 @@ module Crunchbase
18
18
  funded_organization_identifier
19
19
  funded_organization_location
20
20
  funded_organization_revenue_range
21
+ funded_organization_diversity_spotlights
21
22
  identifier
22
23
  image_id
23
24
  investor_identifiers
@@ -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'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Crunchbase
4
- VERSION = '0.1.7'
4
+ VERSION = '0.1.8'
5
5
  end
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.7
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: 2020-12-02 00:00:00.000000000 Z
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.0.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