emailhunter 0.8.3 → 0.9.0

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: 919a594154aeb435ac204b170a8799d8b1d4fb32c0b904274bbf4e7d2f35c07d
4
- data.tar.gz: bbab42343b2c5de68957315eeb5ef2e4f8c24276d1ee162b7e3925eec32c919a
3
+ metadata.gz: d9cca816b859af71470e2f574c274e195f40957e90a2824874f6f674a39d0198
4
+ data.tar.gz: a77dff70b14ff58e51da7ba5593aa6b224dcfed6f15da4781a77c0e77ed4ff49
5
5
  SHA512:
6
- metadata.gz: bf92033afa890edd4b255d9c83510cdfba1a5ae3ec40afe97abfea46215a6e0bdab979909e79e6948f6ff6bf91d8615231964782bb1e955e798c312585d8fc09
7
- data.tar.gz: 100cf2f8fe30f45001563cfe2ad37adb5653c7d91b3b323bc2d257a45e04c344037f4ea16ec2ff1b9de427ac59722d9596a4948640e240d21b7130d569f51595
6
+ metadata.gz: 9b890e80434096d88af8414aaa387a28d1ff0afbbdc177eddd8284e191092d8335b06c50d874bbc48c23e5d80271b289db98ad85c63c5664e0819f90e3545227
7
+ data.tar.gz: fab3c8de09ef1c3ae7ad59c82519422123982e3f996d9b53b5f65bd6b7cb15e98139542d5541b2f6e289f394772b996a141bf89e01528c46a9934bb10ad42200
data/Rakefile CHANGED
@@ -1,2 +1 @@
1
- require "bundler/gem_tasks"
2
-
1
+ require 'bundler/gem_tasks'
data/bin/console CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "bundler/setup"
4
- require "emailhunter"
3
+ require 'bundler/setup'
4
+ require 'emailhunter'
5
5
 
6
6
  # You can add fixtures and/or initialization code here to make experimenting
7
7
  # with your gem easier. You can also use a different console, if you like.
@@ -10,5 +10,5 @@ require "emailhunter"
10
10
  # require "pry"
11
11
  # Pry.start
12
12
 
13
- require "irb"
13
+ require 'irb'
14
14
  IRB.start
data/emailhunter.gemspec CHANGED
@@ -1,32 +1,30 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require File.expand_path('../lib/email_hunter/version', __FILE__)
3
+ require File.expand_path('lib/email_hunter/version', __dir__)
5
4
 
6
5
  Gem::Specification.new do |spec|
7
- spec.name = "emailhunter"
6
+ spec.name = 'emailhunter'
8
7
  spec.version = EmailHunter::VERSION
9
- spec.authors = ["Davide Santangelo"]
10
- spec.email = ["davide.santangelo@gmail.com"]
8
+ spec.authors = ['Davide Santangelo']
9
+ spec.email = ['davide.santangelo@gmail.com']
11
10
 
12
-
13
- spec.summary = %q{A tiny ruby wrapper around Email Hunter API }
14
- spec.description = %q{A tiny ruby wrapper around Email Hunter API. Email Hunter helps sales people reach their targets and increase their sales. }
15
- spec.license = "MIT"
11
+ spec.summary = 'A tiny ruby wrapper around Hunter.io API '
12
+ spec.description = 'A tiny ruby wrapper around Hunter.io API. Hunter.io helps sales people reach their targets and increase their sales. '
13
+ spec.license = 'MIT'
16
14
 
17
15
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
- spec.bindir = "exe"
16
+ spec.bindir = 'exe'
19
17
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
- spec.require_paths = ["lib"]
18
+ spec.require_paths = ['lib']
21
19
 
22
- spec.add_development_dependency "bundler", "~> 1.8"
23
- spec.add_development_dependency "rake", "~> 10.0"
20
+ spec.add_development_dependency 'bundler', '~> 1.8'
21
+ spec.add_development_dependency 'rake', '~> 10.0'
24
22
  spec.add_development_dependency 'rspec'
25
- spec.add_development_dependency "vcr"
26
- spec.add_development_dependency "typhoeus"
23
+ spec.add_development_dependency 'typhoeus'
24
+ spec.add_development_dependency 'vcr'
27
25
 
28
- spec.required_ruby_version = ">= 1.9.3"
26
+ spec.required_ruby_version = '>= 1.9.3'
29
27
 
30
- spec.add_dependency "faraday"
31
- spec.add_dependency "json"
28
+ spec.add_dependency 'faraday'
29
+ spec.add_dependency 'json'
32
30
  end
@@ -7,7 +7,7 @@ API_ACCOUNT_URL = 'https://api.hunter.io/v2/account?'
7
7
 
8
8
  module EmailHunter
9
9
  class Account
10
- attr_reader :result, :first_name, :last_name, :email, :plan_name, :plan_level, :reset_date, :team_id, :calls
10
+ attr_reader :result, :first_name, :last_name, :email, :plan_name, :plan_level, :reset_date, :team_id, :calls, :requests
11
11
 
12
12
  def initialize(key)
13
13
  @key = key
@@ -21,8 +21,7 @@ module EmailHunter
21
21
  private
22
22
 
23
23
  def apiresponse
24
- url = URI.parse(URI.encode("#{API_ACCOUNT_URL}&api_key=#{@key}"))
25
- response = Faraday.new(url).get
24
+ response = Faraday.new("#{API_ACCOUNT_URL}&api_key=#{@key}").get
26
25
  response.success? ? JSON.parse(response.body, { symbolize_names: true }) : []
27
26
  end
28
27
  end
@@ -1,7 +1,7 @@
1
1
  require 'faraday'
2
2
  require 'json'
3
3
 
4
- API_COUNT_URL = 'https://api.hunter.io/v2/email-count?'
4
+ API_COUNT_URL = 'https://api.hunter.io/v2/email-count?'.freeze
5
5
 
6
6
  module EmailHunter
7
7
  class Count
@@ -19,9 +19,8 @@ module EmailHunter
19
19
  private
20
20
 
21
21
  def apiresponse
22
- url = URI.parse(URI.encode("#{API_COUNT_URL}domain=#{@domain}"))
23
- response = Faraday.new(url).get
24
- response.success? ? JSON.parse(response.body, {symbolize_names: true}) : []
22
+ response = Faraday.new("#{API_COUNT_URL}domain=#{@domain}").get
23
+ response.success? ? JSON.parse(response.body, { symbolize_names: true }) : []
25
24
  end
26
25
  end
27
26
  end
@@ -22,8 +22,7 @@ module EmailHunter
22
22
  private
23
23
 
24
24
  def apiresponse
25
- url = URI.parse(URI.encode("#{API_EXIST_URL}email=#{@email}&api_key=#{@key}"))
26
- response = Faraday.new(url).get
25
+ response = Faraday.new("#{API_EXIST_URL}email=#{@email}&api_key=#{@key}").get
27
26
  response.success? ? JSON.parse(response.body, { symbolize_names: true }) : []
28
27
  end
29
28
  end
@@ -24,8 +24,7 @@ module EmailHunter
24
24
  private
25
25
 
26
26
  def apiresponse
27
- url = URI.parse(URI.encode("#{API_FINDER_URL}domain=#{@domain}&first_name=#{@first_name}&last_name=#{@last_name}&api_key=#{@key}"))
28
- response = Faraday.new(url).get
27
+ response = Faraday.new("#{API_FINDER_URL}domain=#{@domain}&first_name=#{@first_name}&last_name=#{@last_name}&api_key=#{@key}").get
29
28
  response.success? ? JSON.parse(response.body, { symbolize_names: true }) : []
30
29
  end
31
30
  end
@@ -23,8 +23,7 @@ module EmailHunter
23
23
  private
24
24
 
25
25
  def apiresponse
26
- url = URI.parse(URI.encode("#{API_SEARCH_URL}domain=#{@domain}&api_key=#{@key}&type=#{@params[:type]}&offset=#{@params[:offset]}&limit=#{@params[:limit]}"))
27
- response = Faraday.new(url).get
26
+ response = Faraday.new("#{API_SEARCH_URL}domain=#{@domain}&api_key=#{@key}&type=#{@params[:type]}&offset=#{@params[:offset]}&limit=#{@params[:limit]}").get
28
27
  response.success? ? JSON.parse(response.body, { symbolize_names: true }) : []
29
28
  end
30
29
  end
@@ -22,8 +22,7 @@ module EmailHunter
22
22
  private
23
23
 
24
24
  def apiresponse
25
- url = URI.parse(URI.encode("#{API_VERIFY_URL}email=#{@email}&api_key=#{@key}"))
26
- response = Faraday.new(url).get
25
+ response = Faraday.new("#{API_VERIFY_URL}email=#{@email}&api_key=#{@key}").get
27
26
  response.success? ? JSON.parse(response.body, { symbolize_names: true }) : []
28
27
  end
29
28
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EmailHunter
4
- VERSION = '0.8.3'
4
+ VERSION = '0.9.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emailhunter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Davide Santangelo
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-15 00:00:00.000000000 Z
11
+ date: 2021-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: vcr
56
+ name: typhoeus
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
@@ -67,7 +67,7 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: typhoeus
70
+ name: vcr
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ">="
@@ -108,8 +108,8 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
- description: 'A tiny ruby wrapper around Email Hunter API. Email Hunter helps sales
112
- people reach their targets and increase their sales. '
111
+ description: 'A tiny ruby wrapper around Hunter.io API. Hunter.io helps sales people
112
+ reach their targets and increase their sales. '
113
113
  email:
114
114
  - davide.santangelo@gmail.com
115
115
  executables: []
@@ -137,11 +137,11 @@ files:
137
137
  - lib/email_hunter/verify.rb
138
138
  - lib/email_hunter/version.rb
139
139
  - lib/emailhunter.rb
140
- homepage:
140
+ homepage:
141
141
  licenses:
142
142
  - MIT
143
143
  metadata: {}
144
- post_install_message:
144
+ post_install_message:
145
145
  rdoc_options: []
146
146
  require_paths:
147
147
  - lib
@@ -157,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
157
  version: '0'
158
158
  requirements: []
159
159
  rubygems_version: 3.0.8
160
- signing_key:
160
+ signing_key:
161
161
  specification_version: 4
162
- summary: A tiny ruby wrapper around Email Hunter API
162
+ summary: A tiny ruby wrapper around Hunter.io API
163
163
  test_files: []