crunchbase-ruby-library 0.0.9 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8bf49d940d959e46b782508592b88087ebcbabc5
4
+ data.tar.gz: 8f56b76a25d1d82b2fda6753a39284ef44933336
5
+ SHA512:
6
+ metadata.gz: 2436a0468afe5776377e4dff2feecf4d542c05171a00228a9ef432dcc9f2cd94853d451b3e64161c02784a6cdc643f29ce978f08e5291fe1ae8c1651edd9a3cb
7
+ data.tar.gz: 61a46fd870ee0dbb8503b49ec1cb1ab619c2ee2161a08db1211e51f9707b99d02d4d3169fc460137529f51e15ff0709b91ef641f256568e1d1e70d245a355cfa
@@ -3,7 +3,7 @@
3
3
  module Crunchbase::Model
4
4
  class Search < Crunchbase::Model::Entity
5
5
  include Enumerable
6
-
6
+
7
7
  attr_reader :total_items, :per_page, :pages, :current_page, :prev_page_url, :next_page_url, :sort_order, :results
8
8
 
9
9
  alias :length :total_items
@@ -21,8 +21,12 @@ module Crunchbase::Model
21
21
 
22
22
 
23
23
  def populate_results(json, _model)
24
- @results = json["items"].map{|r| _model.new(r)}
25
-
24
+ @results = if json["items"].nil?
25
+ []
26
+ else
27
+ json["items"].map{|r| _model.new(r)}
28
+ end
29
+
26
30
  @total_items = json['paging']['total_items']
27
31
  @per_page = json['paging']['items_per_page']
28
32
  @pages = json['paging']['number_of_pages']
@@ -42,7 +46,7 @@ module Crunchbase::Model
42
46
  return Search.new options, Crunchbase::API.search( options, resource_list ), model_name
43
47
  end
44
48
 
45
- # Factory method to return an instance from a permalink
49
+ # Factory method to return an instance from a permalink
46
50
  def self.get(permalink)
47
51
  nil
48
52
  end
@@ -1,3 +1,3 @@
1
1
  module Crunchbase
2
- VERSION = "0.0.9"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,89 +1,80 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crunchbase-ruby-library
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
5
- prerelease:
4
+ version: 0.1.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Encore Shao
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2015-07-03 00:00:00.000000000 Z
11
+ date: 2015-10-10 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bundler
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
19
  version: '1.6'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
26
  version: '1.6'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - ">="
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rspec
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ~>
45
+ - - "~>"
52
46
  - !ruby/object:Gem::Version
53
47
  version: '3.0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ~>
52
+ - - "~>"
60
53
  - !ruby/object:Gem::Version
61
54
  version: '3.0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rspec-its
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - ">="
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - ">="
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
- description: ! ' Ruby wrapper for Crunchbase API version 3 '
69
+ description: " Ruby wrapper for Crunchbase API version 3 "
79
70
  email:
80
71
  - encore.shao@gmail.com
81
72
  executables: []
82
73
  extensions: []
83
74
  extra_rdoc_files: []
84
75
  files:
85
- - .gitignore
86
- - .rspec
76
+ - ".gitignore"
77
+ - ".rspec"
87
78
  - Gemfile
88
79
  - LICENSE.txt
89
80
  - README.md
@@ -158,33 +149,26 @@ files:
158
149
  homepage: https://github.com/encoreshao/crunchbase-ruby-library
159
150
  licenses:
160
151
  - MIT
152
+ metadata: {}
161
153
  post_install_message:
162
154
  rdoc_options: []
163
155
  require_paths:
164
156
  - lib
165
157
  required_ruby_version: !ruby/object:Gem::Requirement
166
- none: false
167
158
  requirements:
168
- - - ! '>='
159
+ - - ">="
169
160
  - !ruby/object:Gem::Version
170
161
  version: '0'
171
- segments:
172
- - 0
173
- hash: -1931453387482519061
174
162
  required_rubygems_version: !ruby/object:Gem::Requirement
175
- none: false
176
163
  requirements:
177
- - - ! '>='
164
+ - - ">="
178
165
  - !ruby/object:Gem::Version
179
166
  version: '0'
180
- segments:
181
- - 0
182
- hash: -1931453387482519061
183
167
  requirements: []
184
168
  rubyforge_project:
185
- rubygems_version: 1.8.23.2
169
+ rubygems_version: 2.4.5
186
170
  signing_key:
187
- specification_version: 3
171
+ specification_version: 4
188
172
  summary: Ruby wrapper for Crunchbase API version 3
189
173
  test_files:
190
174
  - spec/crunchbase.yml.example