piplapis-ruby 4.0.2 → 4.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/pipl/client.rb CHANGED
@@ -116,6 +116,7 @@ module Pipl
116
116
  uri = URI(opts[:api_endpoint])
117
117
  keys = %w(minimum_probability minimum_match hide_sponsored live_feeds show_sources)
118
118
  query_params = ["key=#{opts[:api_key]}"] + keys.map { |k| "#{k}=#{opts[k.to_sym]}" unless opts[k.to_sym].nil? }
119
+ query_params << opts[:extra] or []
119
120
  uri.query = query_params.compact.join('&')
120
121
 
121
122
  req = Net::HTTP::Post.new(uri.request_uri)
data/lib/pipl/fields.rb CHANGED
@@ -157,8 +157,7 @@ module Pipl
157
157
  end
158
158
 
159
159
  def is_searchable?
160
- (@raw and not @raw.empty?) or
161
- (is_valid_country? and (@state.nil? or @state.empty? or is_valid_state?))
160
+ [@raw, @country, @state, @city].any? {|x| x and not x.empty?}
162
161
  end
163
162
 
164
163
  def country_full
data/lib/pipl/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pipl
2
- VERSION = '4.0.2'.freeze
2
+ VERSION = '4.0.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: piplapis-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.2
4
+ version: 4.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-08-06 00:00:00.000000000 Z
12
+ date: 2015-12-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler