crunchbase-ruby-library 0.1.7 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +66 -0
  3. data/.rubocop_todo.yml +47 -0
  4. data/.travis.yml +12 -0
  5. data/Gemfile +4 -0
  6. data/README.md +44 -54
  7. data/Rakefile +4 -1
  8. data/bin/console +15 -0
  9. data/bin/setup +8 -0
  10. data/crunchbase-ruby-library.gemspec +15 -12
  11. data/lib/crunchbase.rb +12 -3
  12. data/lib/crunchbase/api.rb +110 -102
  13. data/lib/crunchbase/client.rb +50 -0
  14. data/lib/crunchbase/exception.rb +13 -11
  15. data/lib/crunchbase/model.rb +50 -48
  16. data/lib/crunchbase/model/acquired_by.rb +23 -20
  17. data/lib/crunchbase/model/acquiree.rb +2 -1
  18. data/lib/crunchbase/model/acquirer.rb +2 -1
  19. data/lib/crunchbase/model/acquisition.rb +16 -19
  20. data/lib/crunchbase/model/address.rb +4 -6
  21. data/lib/crunchbase/model/advisory_role.rb +2 -2
  22. data/lib/crunchbase/model/board_members_and_advisor.rb +10 -9
  23. data/lib/crunchbase/model/category.rb +6 -7
  24. data/lib/crunchbase/model/competitor.rb +3 -2
  25. data/lib/crunchbase/model/current_team.rb +7 -11
  26. data/lib/crunchbase/model/customer.rb +3 -2
  27. data/lib/crunchbase/model/degree.rb +4 -5
  28. data/lib/crunchbase/model/entity.rb +98 -108
  29. data/lib/crunchbase/model/error.rb +3 -4
  30. data/lib/crunchbase/model/featured_team.rb +19 -0
  31. data/lib/crunchbase/model/founded_company.rb +2 -3
  32. data/lib/crunchbase/model/founder.rb +3 -4
  33. data/lib/crunchbase/model/fund.rb +8 -11
  34. data/lib/crunchbase/model/fund_raise.rb +7 -8
  35. data/lib/crunchbase/model/funding_round.rb +29 -24
  36. data/lib/crunchbase/model/headquarter.rb +2 -1
  37. data/lib/crunchbase/model/image.rb +6 -7
  38. data/lib/crunchbase/model/investment.rb +20 -27
  39. data/lib/crunchbase/model/investor.rb +6 -7
  40. data/lib/crunchbase/model/ipo.rb +12 -12
  41. data/lib/crunchbase/model/job.rb +11 -10
  42. data/lib/crunchbase/model/location.rb +20 -11
  43. data/lib/crunchbase/model/member.rb +3 -4
  44. data/lib/crunchbase/model/membership.rb +7 -8
  45. data/lib/crunchbase/model/new.rb +5 -6
  46. data/lib/crunchbase/model/office.rb +3 -4
  47. data/lib/crunchbase/model/organization.rb +39 -38
  48. data/lib/crunchbase/model/organization_summary.rb +7 -8
  49. data/lib/crunchbase/model/owned_by.rb +4 -5
  50. data/lib/crunchbase/model/parent_location.rb +3 -3
  51. data/lib/crunchbase/model/past_team.rb +7 -11
  52. data/lib/crunchbase/model/person.rb +53 -46
  53. data/lib/crunchbase/model/person_summary.rb +13 -14
  54. data/lib/crunchbase/model/primary_affiliation.rb +6 -6
  55. data/lib/crunchbase/model/primary_image.rb +3 -3
  56. data/lib/crunchbase/model/primary_location.rb +8 -7
  57. data/lib/crunchbase/model/product.rb +14 -13
  58. data/lib/crunchbase/model/product_summary.rb +4 -5
  59. data/lib/crunchbase/model/school.rb +3 -2
  60. data/lib/crunchbase/model/search.rb +39 -40
  61. data/lib/crunchbase/model/search_result.rb +7 -6
  62. data/lib/crunchbase/model/simple_organization.rb +9 -10
  63. data/lib/crunchbase/model/sub_organization.rb +3 -4
  64. data/lib/crunchbase/model/video.rb +4 -5
  65. data/lib/crunchbase/model/website.rb +7 -11
  66. data/lib/crunchbase/request.rb +8 -0
  67. data/lib/crunchbase/request/client.rb +69 -0
  68. data/lib/crunchbase/version.rb +2 -1
  69. data/spec/crunchbase.yml.example +2 -2
  70. data/spec/crunchbase/client_spec.rb +25 -0
  71. data/spec/crunchbase/data/board_members_and_advisors/facebook.json +462 -0
  72. data/spec/crunchbase/data/categories/facebook.json +67 -0
  73. data/spec/crunchbase/data/current_team/facebook.json +4335 -0
  74. data/spec/crunchbase/data/featured_team/facebook.json +286 -0
  75. data/spec/crunchbase/data/funding_rounds/37bd05f961af726ba3c1b279da842805.json +484 -0
  76. data/spec/crunchbase/data/funding_rounds/facebook.json +2049 -0
  77. data/spec/crunchbase/data/headquarters/facebook.json +50 -0
  78. data/spec/crunchbase/data/investors/facebook.json +776 -0
  79. data/spec/crunchbase/data/news/facebook.json +1426 -0
  80. data/spec/crunchbase/data/news/facebook_2.json +1426 -0
  81. data/spec/crunchbase/data/offices/facebook.json +50 -0
  82. data/spec/crunchbase/data/organizations/crunchbase.json +2845 -0
  83. data/spec/crunchbase/data/organizations/ekohe.json +654 -0
  84. data/spec/crunchbase/data/organizations/facebook-without-relationships.json +45 -0
  85. data/spec/crunchbase/data/organizations/facebook.json +6723 -0
  86. data/spec/crunchbase/data/organizations/mx-media-llc.json +7 -0
  87. data/spec/crunchbase/data/past_team/facebook.json +4336 -0
  88. data/spec/crunchbase/data/people/facebook_founders.json +148 -0
  89. data/spec/crunchbase/data/people/mark-zuckerberg.json +2602 -0
  90. data/spec/crunchbase/data/websites/facebook.json +74 -0
  91. data/spec/crunchbase/model/board_members_and_advisor_spec.rb +39 -11
  92. data/spec/crunchbase/model/category_spec.rb +47 -0
  93. data/spec/crunchbase/model/current_team_spec.rb +50 -0
  94. data/spec/crunchbase/model/featured_team_spec.rb +40 -0
  95. data/spec/crunchbase/model/founders_spec.rb +49 -0
  96. data/spec/crunchbase/model/fund_raise_spec.rb +4 -24
  97. data/spec/crunchbase/model/funding_round_spec.rb +75 -32
  98. data/spec/crunchbase/model/headquarter_spec.rb +37 -0
  99. data/spec/crunchbase/model/investment_spec.rb +4 -15
  100. data/spec/crunchbase/model/investor_spec.rb +37 -0
  101. data/spec/crunchbase/model/new_spec.rb +86 -0
  102. data/spec/crunchbase/model/office_spec.rb +29 -9
  103. data/spec/crunchbase/model/organization_spec.rb +160 -34
  104. data/spec/crunchbase/model/past_team_spec.rb +36 -14
  105. data/spec/crunchbase/model/person_spec.rb +21 -19
  106. data/spec/crunchbase/model/product_spec.rb +4 -31
  107. data/spec/crunchbase/model/search_spec.rb +25 -49
  108. data/spec/crunchbase/model/website_spec.rb +36 -9
  109. data/spec/crunchbase/support/api_helper.rb +19 -0
  110. data/spec/spec_helper.rb +14 -4
  111. metadata +103 -6
@@ -1,7 +1,8 @@
1
1
  # encoding: utf-8
2
+ # frozen_string_literal: true
2
3
 
3
4
  module Crunchbase::Model
4
- class Customer < Crunchbase::Model::Organization
5
+ class Customer < Organization
5
6
  RESOURCE_LIST = 'customers'
6
7
  end
7
- end
8
+ end
@@ -1,8 +1,8 @@
1
1
  # encoding: utf-8
2
+ # frozen_string_literal: true
2
3
 
3
4
  module Crunchbase::Model
4
- class Degree < Crunchbase::Model::Entity
5
-
5
+ class Degree < Entity
6
6
  RESOURCE_LIST = 'degrees'
7
7
 
8
8
  attr_reader :degree_type_name, :degree_subject, :started_on, :started_on_trust_code, :is_completed,
@@ -20,12 +20,11 @@ module Crunchbase::Model
20
20
  end
21
21
 
22
22
  def property_keys
23
- %w[
23
+ %w(
24
24
  degree_type_name degree_subject started_on started_on_trust_code is_completed
25
25
  completed_on completed_on_trust_code
26
26
  created_at updated_at
27
- ]
27
+ )
28
28
  end
29
-
30
29
  end
31
30
  end
@@ -1,144 +1,134 @@
1
1
  # encoding: utf-8
2
+ # frozen_string_literal: true
2
3
 
3
- module Crunchbase::Model
4
- class Entity
4
+ module Crunchbase
5
+ module Model
6
+ class Entity
7
+ extend Request::Client
5
8
 
6
- attr_reader :type_name, :uuid
9
+ attr_reader :type_name, :uuid
7
10
 
8
- def initialize(json)
9
- instance_variable_set("@type_name", json['type'] || nil)
10
- instance_variable_set("@uuid", json['uuid'] || nil)
11
+ def initialize(json)
12
+ instance_variable_set('@type_name', json['type'] || nil)
13
+ instance_variable_set('@uuid', json['uuid'] || nil)
11
14
 
12
- property_keys.each { |v|
13
- instance_variable_set("@#{v}", json['properties'][v] || nil)
14
- }
15
+ properties = json['properties'] || {}
16
+ property_keys.each { |v| instance_variable_set("@#{v}", properties[v]) }
17
+ date_keys.each { |v| instance_variable_set("@#{v}", properties[v].nil? ? nil : Date.parse(properties[v])) }
15
18
 
16
- date_keys.each { |v|
17
- instance_variable_set("@#{v}", json['properties'][v].nil? ? nil : Date.parse(json['properties'][v]))
18
- }
19
+ instance_timestamps(properties)
19
20
 
20
- %w[created_at updated_at].each { |v|
21
- if json['properties'][v].kind_of?(String)
22
- instance_variable_set( "@#{v}", begin Time.parse(json['properties'][v]) rescue nil end )
23
- else
24
- instance_variable_set( "@#{v}", begin Time.at(json['properties'][v]) rescue nil end )
25
- end
26
- }
27
- end
28
-
29
- # Factory method to return an instance from a permalink
30
- def self.get(permalink)
31
- result = Crunchbase::API.single_entity(permalink, self::RESOURCE_NAME)
32
-
33
- return self.new( result )
34
- end
35
-
36
- def self.list(page=nil)
37
- model_name = get_model_name(self::RESOURCE_LIST)
21
+ relationships = json['relationships']
22
+ return if relationships.nil? || relationship_lists.empty?
38
23
 
39
- return Crunchbase::API.list( { page: page, model_name: model_name }, self::RESOURCE_LIST )
40
- end
41
-
42
- def self.organization_lists(permalink, options={})
43
- options = options.merge({ model_name: self })
44
-
45
- return Crunchbase::API.organization_lists(permalink, self::RESOURCE_LIST, options)
46
- end
24
+ setup_relationships_data!(relationships)
25
+ end
47
26
 
48
- def self.person_lists(permalink, options={})
49
- options = options.merge({ model_name: self })
27
+ def setup_relationships_data!(relationships)
28
+ relationship_lists.each do |key, kclass|
29
+ set_relationships_object(kclass, key, relationships[key])
30
+ end
31
+ end
50
32
 
51
- return Crunchbase::API.person_lists(permalink, self::RESOURCE_LIST, options)
52
- end
33
+ def instance_timestamps(properties)
34
+ %w(created_at updated_at).each do |v|
35
+ instance_variable_set("@#{v}", convert_date!(properties[v]))
36
+ end
37
+ end
53
38
 
54
- def self.funding_rounds_lists(permalink, options={})
55
- options = options.merge({ model_name: self })
39
+ def convert_date!(date)
40
+ return Time.parse(date) if date.is_a?(String)
56
41
 
57
- return Crunchbase::API.funding_rounds_lists(permalink, self::RESOURCE_LIST.gsub('_', '-'), options)
58
- end
42
+ Time.at(date)
43
+ rescue
44
+ nil
45
+ end
59
46
 
60
- def fetch
61
- fetch_object = get_fetch_object
62
- return [] if fetch_object.empty?
47
+ def fetch
48
+ fetch_object = get_fetch_object
49
+ return [] if fetch_object.empty?
63
50
 
64
- return fetch_object[0].new API.fetch(self.permalink, fetch_object[1])
65
- end
51
+ fetch_object[0].new Crunchbase::API.fetch(permalink, fetch_object[1])
52
+ end
66
53
 
67
- def self.array_from_list(list)
68
- return [] if list.nil?
54
+ # TODO: need to be implement
55
+ def property_keys
56
+ []
57
+ end
69
58
 
70
- list['items'].map do |l|
71
- self.new l if l.kind_of?(Hash)
72
- end.compact
73
- end
59
+ def date_keys
60
+ []
61
+ end
74
62
 
75
- def self.parsing_from_list(list)
76
- return [] if list.nil?
63
+ def relationship_lists
64
+ { }
65
+ end
77
66
 
78
- list.map do |l|
79
- self.new l if l.kind_of?(Hash)
80
- end.compact
81
- end
67
+ def set_relationships_object(kclass, key, list)
68
+ return if list.nil? || list.empty?
69
+ return unless list
82
70
 
83
- def self.total_items_from_list(list)
84
- return 0 if list.nil?
71
+ if list.is_a?(Array)
72
+ set_variables(kclass, key, list)
73
+ elsif list.is_a?(Hash)
74
+ parse_hash_items(kclass, key, list)
75
+ end
76
+ end
85
77
 
86
- list['paging']['total_items']
87
- end
78
+ def parse_hash_items(kclass, key, list)
79
+ one_to_one(kclass, key, list)
80
+ one_to_one(kclass, key, list['item']) if list['item']
81
+ one_to_many(kclass, key, list) if list['items']
82
+ end
88
83
 
89
- private
84
+ def one_to_one(kclass, key, item)
85
+ return unless item
90
86
 
91
- def property_keys
92
- []
93
- end
87
+ result = special_relationship(kclass, item)
88
+ instance_variable_set "@#{key}", result[:item]
89
+ instance_variable_set "@#{key}_total_items", result[:count]
90
+ end
94
91
 
95
- def date_keys
96
- []
97
- end
92
+ # {
93
+ # "cardinality"=>"OneToOne",
94
+ # "paging"=>{"total_items"=>0,
95
+ # "first_page_url"=>"https://api.crunchbase.com/v3.1/organizations/facebook/acquired_by",
96
+ # "sort_order"=>"not_ordered"
97
+ # }
98
+ def special_relationship(kclass, item)
99
+ return { item: nil, count: 0 } if verify_item?(item)
98
100
 
99
- def set_relationships_object(object_name, key, list)
100
- return unless list
101
+ { item: (kclass.new(item) || nil), count: (item ? 1 : 0) }
102
+ end
101
103
 
102
- one_to_one(object_name, key, list['item']) if list['item']
103
- one_to_many(object_name, key, list) if list['items']
104
- end
104
+ def verify_item?(item)
105
+ item['cardinality'] == 'OneToOne' && (item['paging']['total_items']).zero?
106
+ end
105
107
 
106
- def one_to_one(object_name, key, item)
107
- return unless item
108
+ def one_to_many(kclass, key, list)
109
+ return unless list['items'].respond_to?(:each)
108
110
 
109
- instance_variable_set "@#{key}", ( object_name.new( item ) || nil )
110
- instance_variable_set "@#{key}_total_items", (item ? 1 : 0)
111
- end
111
+ set_variables(kclass, key, list['items'])
112
+ instance_variable_set "@#{key}_total_items", list['paging']['total_items']
113
+ end
112
114
 
113
- def one_to_many(object_name, key, list)
114
- return unless list['items'].respond_to?(:each)
115
+ def set_variables(kclass, key, items)
116
+ instance_variable_set "@#{key}", items.inject([]) { |v, i| v << kclass.new(i) }
117
+ end
115
118
 
116
- instance_variable_set "@#{key}", list['items'].inject([]) { |v, i| v << object_name.new(i) }
117
- instance_variable_set "@#{key}_total_items", list['paging']['total_items']
118
- end
119
+ def instance_relationships_object(kclass, key, item)
120
+ return unless item
119
121
 
120
- def instance_relationships_object(object_name, key, item)
121
- return unless item
122
+ instance_variable_set "@#{key}", (kclass.new(item) || nil)
123
+ end
122
124
 
123
- instance_variable_set "@#{key}", ( object_name.new(item) || nil )
124
- end
125
+ def instance_multi_relationship_objects(kclass, key, items)
126
+ multi_items = []
125
127
 
126
- def self.get_model_name(resource_list)
127
- return nil unless ['organizations', 'people', 'products', 'ipos'].include?(resource_list)
128
-
129
- case resource_list
130
- when 'organizations'
131
- OrganizationSummary
132
- when 'people'
133
- PersonSummary
134
- when 'products'
135
- ProductSummary
136
- when 'ipos'
137
- Ipo
138
- else
139
- nil
128
+ items.map { |item| multi_items << kclass.new(item || nil) }
129
+ instance_variable_set "@#{key}", multi_items
130
+ instance_variable_set "@#{key}_total_items", multi_items.size
140
131
  end
141
132
  end
142
-
143
133
  end
144
134
  end
@@ -1,14 +1,13 @@
1
1
  # encoding: utf-8
2
+ # frozen_string_literal: true
2
3
 
3
4
  module Crunchbase::Model
4
- class Error < Crunchbase::Model::Entity
5
-
5
+ class Error < Entity
6
6
  attr_reader :message, :code
7
7
 
8
8
  def initialize(json)
9
9
  @message = json['message']
10
10
  @code = json['code']
11
11
  end
12
-
13
12
  end
14
- end
13
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Crunchbase::Model
4
+ class FeaturedTeam < Job
5
+ RESOURCE_LIST = 'featured_team'
6
+
7
+ attr_reader :person
8
+
9
+ def initialize(json)
10
+ super
11
+ end
12
+
13
+ def relationship_lists
14
+ {
15
+ 'person' => Person
16
+ }
17
+ end
18
+ end
19
+ end
@@ -1,8 +1,8 @@
1
1
  # encoding: utf-8
2
+ # frozen_string_literal: true
2
3
 
3
4
  module Crunchbase::Model
4
- class FoundedCompany < Crunchbase::Model::Organization
5
-
5
+ class FoundedCompany < Organization
6
6
  RESOURCE_LIST = 'founded_companies'
7
7
 
8
8
  #
@@ -25,6 +25,5 @@ module Crunchbase::Model
25
25
  # type name path created_at updated_at
26
26
  # ]
27
27
  # end
28
-
29
28
  end
30
29
  end
@@ -1,9 +1,8 @@
1
1
  # encoding: utf-8
2
+ # frozen_string_literal: true
2
3
 
3
4
  module Crunchbase::Model
4
- class Founder < Crunchbase::Model::Person
5
-
5
+ class Founder < Person
6
6
  RESOURCE_LIST = 'founders'
7
-
8
7
  end
9
- end
8
+ end
@@ -1,26 +1,23 @@
1
+ # frozen_string_literal: true
1
2
  # encoding utf-8
2
3
 
3
4
  module Crunchbase::Model
4
- class Fund < Crunchbase::Model::Entity
5
-
5
+ class Fund < Entity
6
6
  RESOURCE_LIST = 'funds'
7
7
 
8
- attr_reader :api_path, :web_path, :name, :announced_on, :announced_on_trust_code, :money_raised, :money_raised_currency_code, :money_raised_usd, :created_at, :updated_at
9
-
10
- # attr_reader :venture_firm, :investor, :images, :videos, :news
11
-
12
- # attr_reader :venture_firm_total_items, :investor_total_items, :images_total_items, :videos_total_items, :news_total_items
8
+ attr_reader :api_path, :web_path, :name, :announced_on, :announced_on_trust_code,
9
+ :money_raised, :money_raised_currency_code, :money_raised_usd,
10
+ :created_at, :updated_at
13
11
 
14
12
  def property_keys
15
- %w[
13
+ %w(
16
14
  api_path web_path name announced_on announced_on_trust_code
17
15
  money_raised money_raised_currency_code money_raised_usd created_at updated_at
18
- ]
16
+ )
19
17
  end
20
18
 
21
19
  def date_keys
22
- %w[ announced_on ]
20
+ %w(announced_on)
23
21
  end
24
-
25
22
  end
26
23
  end
@@ -1,25 +1,24 @@
1
+ # frozen_string_literal: true
1
2
  # encoding utf-8
2
3
 
3
4
  module Crunchbase::Model
4
- class FundRaise < Crunchbase::Model::Entity
5
-
5
+ class FundRaise < Entity
6
6
  RESOURCE_LIST = 'funds'
7
7
 
8
8
  attr_reader :name, :path, :created_at, :updated_at
9
9
 
10
10
  def initialize(json)
11
- property_keys.each { |v|
11
+ property_keys.each do |v|
12
12
  instance_variable_set("@#{v}", json[v] || nil)
13
- }
13
+ end
14
14
 
15
- %w[created_at updated_at].each { |v|
15
+ %w(created_at updated_at).each do |v|
16
16
  instance_variable_set("@#{v}", Time.at(json[v]))
17
- }
17
+ end
18
18
  end
19
19
 
20
20
  def property_keys
21
- %w[ name path created_at updated_at ]
21
+ %w(name path created_at updated_at)
22
22
  end
23
-
24
23
  end
25
24
  end
@@ -1,8 +1,8 @@
1
1
  # encoding: utf-8
2
+ # frozen_string_literal: true
2
3
 
3
4
  module Crunchbase::Model
4
- class FundingRound < Crunchbase::Model::Entity
5
-
5
+ class FundingRound < Entity
6
6
  RESOURCE_LIST = 'funding_rounds'
7
7
  RESOURCE_NAME = 'funding-rounds'
8
8
 
@@ -12,49 +12,54 @@ module Crunchbase::Model
12
12
  :target_money_raised, :target_money_raised_currency_code, :target_money_raised_usd,
13
13
  :created_at, :updated_at
14
14
 
15
- attr_reader :investments, :funded_organization, :images, :videos, :news
15
+ attr_reader :investments, :funded_organization, :images, :videos, :news, :investors
16
16
 
17
17
  attr_reader :investments_total_items, :funded_organization_total_items, :images_total_items,
18
- :videos_total_items, :news_total_items
18
+ :videos_total_items, :news_total_items, :investors_total_items
19
19
 
20
20
  def initialize(json)
21
- super
22
-
23
- unless (relationships = json['relationships']).nil?
24
- set_relationships_object(Crunchbase::Model::Investment, 'investments', relationships['investments'])
21
+ super(json)
25
22
 
26
- unless relationships['funded_organization'].nil?
27
- if relationships['funded_organization']['item'].nil?
23
+ relationships = json['relationships']
24
+ return if relationships.nil?
25
+ relationship_with_funded(relationships['funded_organization'])
26
+ end
28
27
 
29
- # Get organization's (investments - funding - organization)
30
- instance_relationships_object(Crunchbase::Model::Organization, 'funded_organization', relationships['funded_organization'])
31
- else
32
- # Get funding-rounds (funded_organization - item)
28
+ def relationship_with_funded(funded_organization)
29
+ return if funded_organization.nil?
33
30
 
34
- set_relationships_object(Crunchbase::Model::Organization, 'funded_organization', relationships['funded_organization'])
35
- end
36
- end
31
+ if funded_organization['item'].nil?
32
+ # Get organization's (investments - funding - organization)
33
+ instance_relationships_object(Organization, 'funded_organization', funded_organization)
34
+ else
35
+ # Get funding-rounds (funded_organization - item)
37
36
 
38
- set_relationships_object(Crunchbase::Model::Image, 'images', relationships['images'])
39
- set_relationships_object(Crunchbase::Model::Video, 'videos', relationships['videos'])
40
- set_relationships_object(Crunchbase::Model::New, 'news', relationships['news'])
37
+ set_relationships_object(Organization, 'funded_organization', funded_organization)
41
38
  end
39
+ end
42
40
 
41
+ def relationship_lists
42
+ {
43
+ 'investments' => Investment,
44
+ 'images' => Image,
45
+ 'videos' => Video,
46
+ 'news' => New,
47
+ 'investors' => Investor
48
+ }
43
49
  end
44
50
 
45
51
  def property_keys
46
- %w[
52
+ %w(
47
53
  permalink api_path web_path funding_type series series_qualifier
48
54
  announced_on announced_on_trust_code closed_on closed_on_trust_code
49
55
  money_raised money_raised_currency_code money_raised_usd
50
56
  target_money_raised target_money_raised_currency_code target_money_raised_usd
51
57
  created_at updated_at
52
- ]
58
+ )
53
59
  end
54
60
 
55
61
  def date_keys
56
- %w[ announced_on closed_on ]
62
+ %w(announced_on closed_on)
57
63
  end
58
-
59
64
  end
60
65
  end