snov 0.6.5 → 0.7.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e5669a1d374d9fe76187d55d1e05334e8181b6d2f098554f945cc7739b41eb18
4
- data.tar.gz: f63b6f9ddac58b651feaeee330d3ec7c91132afeca014d9b461ef4611c17aa89
3
+ metadata.gz: 131fdcd69839dbfc9750b07998c8cfb0ec4b3db96702a5966da16ea19e0bd7f9
4
+ data.tar.gz: 6d9a688dafb17017027cd85f8c808be574cea32d4f45b4418f5db057445eccd3
5
5
  SHA512:
6
- metadata.gz: 63194879dec0fa07b8d41041b184124584e9106777c3ca4691802346e9743a502e090965bd2374fd5d554fd5f76884120f2244a50f41552f62e4bc77575fb5d5
7
- data.tar.gz: ca3c501f9ea8ecdc0e9d774bc0959394083be9edadf04d542a2128b58f8a183080daf6d09dbcf59e48834cc745a91fc5af3baef5442bf86bdf3028f204e30d5c
6
+ metadata.gz: be8e9660b5cf55183a60548302dbf8f82c73b40d5320f7aabb1d57060fb014d2b04ffc701049c43b237eaa316b4862418e921ae765690189413350f7b9277f5b
7
+ data.tar.gz: b24c50312d2ee7c6184daa52f0d8768a59cb06d7dca3e41ee096815ffacfc4c0d80b7fcd0bd690e06732d3a0f66da8d29a1ba0cc64adb3b18ab6cb032d18644b
@@ -0,0 +1,36 @@
1
+ version: 2.1
2
+
3
+ jobs:
4
+ max_versions:
5
+ docker:
6
+ - image: cimg/ruby:3.1.1
7
+ steps:
8
+ - checkout
9
+ - run:
10
+ name: Which bundler?
11
+ command: bundle -v
12
+ - run:
13
+ command: bundle install
14
+ - run:
15
+ command: bin/rspec
16
+ min_versions:
17
+ docker:
18
+ - image: cimg/ruby:2.5.9
19
+ environment:
20
+ GEM_VERSIONS: 'min'
21
+ steps:
22
+ - checkout
23
+ - run:
24
+ name: Which bundler?
25
+ command: bundle -v
26
+ - run:
27
+ command: bundle install
28
+ - run:
29
+ command: bin/rspec
30
+
31
+ workflows:
32
+ version: 2
33
+ build:
34
+ jobs:
35
+ - max_versions
36
+ - min_versions
data/.gitignore CHANGED
@@ -8,7 +8,8 @@
8
8
  /tmp/
9
9
 
10
10
  /.rspec_status
11
- /gems.locked
11
+ /Gemfile.lock
12
12
  /vendor/bundle
13
13
  /.vscode
14
- /spec/snov/moved
14
+ /spec/snov/moved
15
+ .byebug_history
data/CHANGELOG.md CHANGED
@@ -1,4 +1,6 @@
1
+ * allow token to be stored and reused
1
2
  * add OutOfCreditsError
3
+ * remove "\u0000" from response
2
4
 
3
5
  ## [0.5.0]
4
6
  * support for https://snov.io/api#EmailFinder (GetEmailsFromName)
@@ -4,6 +4,7 @@ source "https://rubygems.org"
4
4
  gemspec
5
5
 
6
6
  gem "byebug"
7
+ gem 'mock_redis'
7
8
  gem "rake", "~> 12.0"
8
9
  gem "rspec", "~> 3.0"
9
10
  gem "rubocop"
@@ -14,6 +15,7 @@ gem "webmock"
14
15
  if ENV['GEM_VERSIONS'] == 'min'
15
16
  gem 'activemodel', '~> 4.1.0'
16
17
  gem 'activesupport', '~> 4.1.0'
18
+ gem 'camel_snake_struct', '~> 0.1.0'
17
19
  gem 'faraday', '~> 0.10.0'
18
20
  gem 'multi_json', '~> 1.4.0'
19
21
  end
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Build Status](https://travis-ci.org/NEXL-LTS/snov-ruby.svg?branch=main)](https://travis-ci.org/NEXL-LTS/snov-ruby)
1
+ [![CircleCI](https://circleci.com/gh/NEXL-LTS/snov-ruby.svg?style=svg)](https://circleci.com/gh/NEXL-LTS/snov-ruby)
2
2
 
3
3
  ## Installation
4
4
 
@@ -211,6 +211,33 @@ see https://snov.io/api#AddNamestoFindEmails
211
211
  puts added_name.success
212
212
  ```
213
213
 
214
+ ### can setup snov to be able to reuse access tokens
215
+
216
+ ```ruby
217
+ Snov.token_storage = Snov::InMemoryTokenStorage.new
218
+ # or
219
+ Snov.token_storage = Snov::RedisTokenStorage.new(Redis.new)
220
+ ```
221
+
222
+ Simple example implementation of your own token storage.
223
+
224
+ ```ruby
225
+ class TokenStorage
226
+ def initialize
227
+ @stored_token = nil
228
+ end
229
+
230
+ def get
231
+ @stored_token
232
+ end
233
+
234
+ def set(token_hash)
235
+ @stored_token = token_hash
236
+ end
237
+ end
238
+
239
+ ```
240
+
214
241
  ## Development
215
242
 
216
243
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
data/bin/rspec CHANGED
@@ -9,7 +9,7 @@
9
9
  #
10
10
 
11
11
  require "pathname"
12
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../gems.rb",
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
13
  Pathname.new(__FILE__).realpath)
14
14
 
15
15
  bundle_binstub = File.expand_path("../bundle", __FILE__)
data/bin/rubocop CHANGED
@@ -9,7 +9,7 @@
9
9
  #
10
10
 
11
11
  require "pathname"
12
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../gems.rb",
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
13
  Pathname.new(__FILE__).realpath)
14
14
 
15
15
  bundle_binstub = File.expand_path("../bundle", __FILE__)
@@ -18,13 +18,16 @@ module Snov
18
18
  "firstName" => @first_name,
19
19
  "lastName" => @last_name,
20
20
  "domain" => @domain)
21
- .deep_transform_keys! { |key| key.underscore }
22
21
  end
23
22
 
24
- class ProspectResult
25
- include ActiveModel::Model
26
-
27
- attr_accessor :success, :first_name, :last_name, :domain, :user_id, :sent, :access_token
28
- end
23
+ ProspectResult = Class.new(CamelSnakeStruct)
24
+ ProspectResult.example(
25
+ 'success' => true,
26
+ 'firstName' => "bapu",
27
+ 'lastName' => "sethi",
28
+ 'domain' => "nexl.io",
29
+ 'userId' => 666871,
30
+ 'sent' => true
31
+ )
29
32
  end
30
33
  end
data/lib/snov/client.rb CHANGED
@@ -79,21 +79,32 @@ module Snov
79
79
  error_class = Client.select_error_class(resp, fallback: ResponseError)
80
80
  raise error_class.new("#{path} (#{resp.status})", response: resp&.body)
81
81
  end
82
- MultiJson.load(resp.body)
82
+ MultiJson.load(resp.body.gsub("\u0000", ''))
83
83
  end
84
84
 
85
85
  attr_accessor :client_id, :client_secret, :timeout_seconds
86
86
 
87
87
  def access_token
88
- return @access_token if @access_token
89
-
90
- @access_token = generate_access_token
88
+ if @access_token.nil? || @access_token.fetch("expires_at") < Time.now.to_i + 60
89
+ @access_token = load_access_token
90
+ end
91
+ @access_token.fetch('access_token')
91
92
  end
92
93
 
93
94
  def access_token_params
94
95
  { 'grant_type' => 'client_credentials', 'client_id' => client_id, 'client_secret' => client_secret }
95
96
  end
96
97
 
98
+ def load_access_token
99
+ current_access_token = Snov.token_storage&.get || {}
100
+ if current_access_token.fetch("expires_at", 0) < Time.now.to_i + 60
101
+ current_access_token = generate_access_token
102
+ current_access_token['expires_at'] = Time.now.to_i + current_access_token.fetch('expires_in')
103
+ Snov.token_storage&.put(current_access_token)
104
+ end
105
+ current_access_token
106
+ end
107
+
97
108
  def generate_access_token
98
109
  resp = conn.post('/v1/oauth/access_token') do |req|
99
110
  req.body = MultiJson.dump(access_token_params)
@@ -103,7 +114,7 @@ module Snov
103
114
  handle_error(resp, "POST /v1/oauth/access_token")
104
115
  raise AuthError, 'Snov auth failed' if resp.body.blank?
105
116
 
106
- MultiJson.load(resp.body).fetch("access_token")
117
+ MultiJson.load(resp.body)
107
118
  rescue Timeout::Error => e
108
119
  raise TimedOut, e.message
109
120
  end
@@ -1,5 +1,4 @@
1
1
  require 'active_support/core_ext/array'
2
- require 'camel_snake_struct'
3
2
 
4
3
  module Snov
5
4
  class DomainSearch
@@ -1 +1 @@
1
- {"success":true,"domain":"","webmail":false,"result":0,"lastId":0,"limit":10,"companyName":"","emails":[]}
1
+ {"success":false,"domain":"","webmail":false,"result":0,"lastId":0,"limit":10,"companyName":"","emails":[]}
@@ -0,0 +1,4 @@
1
+ {
2
+ "success": false,
3
+ "message": "We couldn't find profile with this url"
4
+ }
@@ -0,0 +1,69 @@
1
+ {
2
+ "success": true,
3
+ "data":
4
+ {
5
+ "id": "xusD3-T_K5IktGoaa8Jc8A==",
6
+ "name": "Gavin Vanrooyen",
7
+ "firstName": "John",
8
+ "lastName": "Doe",
9
+ "sourcePage": "https://www.linkedin.com/in/john-doe-123456/",
10
+ "source": "linkedIn",
11
+ "industry": "Entertainment",
12
+ "country": "United States",
13
+ "locality": "Greater Atlanta Area",
14
+ "lastUpdateDate": {
15
+ "date": "2019-09-11 12:37:58.000000",
16
+ "timezone_type": 3,
17
+ "timezone": "UTC"
18
+ },
19
+ "currentJob": [
20
+ {
21
+ "companyName": "Octagon",
22
+ "position": "Senior Brand Director",
23
+ "socialLink": "https:\/\/www.linkedin.com\/company\/659333",
24
+ "site": "http:\/\/octagon.com",
25
+ "locality": "United States",
26
+ "state": null,
27
+ "city": null,
28
+ "street": null,
29
+ "street2": null,
30
+ "postal": null,
31
+ "founded": null,
32
+ "startDate": "2018-07-31",
33
+ "endDate": null,
34
+ "size": "1-10",
35
+ "industry": "Entertainment",
36
+ "companyType": "Public Company",
37
+ "country": "United States"
38
+ }
39
+ ],
40
+ "previousJob": [
41
+ {
42
+ "companyName": "UPS",
43
+ "position": "Manager, Sponsorships and Events",
44
+ "socialLink": "https:\/\/www.linkedin.com\/company\/1523574",
45
+ "site": "http:\/\/www.ups.com\/",
46
+ "locality": "United States",
47
+ "state": "GA",
48
+ "city": "Atlanta",
49
+ "street": "55 Glenlake Parkway, NE",
50
+ "street2": null,
51
+ "postal": "30328",
52
+ "founded": "1907",
53
+ "startDate": null,
54
+ "endDate": null,
55
+ "size": "10001+",
56
+ "industry": "Logistics and Supply Chain",
57
+ "companyType": "Public Company",
58
+ "country": "United States"
59
+ }
60
+ ],
61
+ "social": [],
62
+ "emails": [
63
+ {
64
+ "email": "johndoe@octagon.com",
65
+ "status": "valid"
66
+ }
67
+ ]
68
+ }
69
+ }
@@ -1,4 +1,4 @@
1
1
  {
2
- "success": true,
2
+ "success": false,
3
3
  "message": "We couldn't find profile with this email"
4
4
  }
@@ -38,7 +38,8 @@
38
38
  "size": "1-10",
39
39
  "industry": "Entertainment",
40
40
  "companyType": "Public Company",
41
- "country": "United States"
41
+ "country": "United States",
42
+ "hqPhone": "4343-344-33"
42
43
  }
43
44
  ],
44
45
  "previousJob": [
@@ -59,7 +60,8 @@
59
60
  "size": "10001+",
60
61
  "industry": "Logistics and Supply Chain",
61
62
  "companyType": "Public Company",
62
- "country": "United States"
63
+ "country": "United States",
64
+ "hqPhone": "4343-344-33"
63
65
  }
64
66
  ],
65
67
  "lists": [
@@ -3,8 +3,10 @@ module Snov
3
3
  def self.folder=(val)
4
4
  @folder = val
5
5
  FileUtils.mkdir_p(@folder)
6
- ["post_v1_get-profile-by-email", "get_v2_domain-emails-with-info",
6
+ ["post_v1_get-profile-by-email", "get_v2_domain-emails-with-info", "post_v1_get-emails-from-url",
7
7
  "post_v1_get-prospects-by-email", "post_v1_prospect-list", "get_v1_get-user-lists"].each do |sub_folder|
8
+ next if File.exist?("#{@folder}/#{sub_folder}")
9
+
8
10
  FileUtils.cp_r "#{default_folder}/#{sub_folder}", @folder
9
11
  end
10
12
  end
@@ -30,12 +32,13 @@ module Snov
30
32
  end
31
33
 
32
34
  def post(path, payload_hash = {})
33
- data = File.read(filename("post", path, payload_hash))
35
+ file_loc = filename("post", path, payload_hash)
36
+ data = File.read(file_loc)
34
37
  MultiJson.load(data)
35
38
  rescue Errno::ENOENT => e
36
39
  file = filename("post", path, 'not_found' => 'true')
37
40
  if File.exist?(file)
38
- MultiJson.load(File.read(file))
41
+ MultiJson.load(File.read(file)).merge('message' => "no file found at #{file_loc}")
39
42
  else
40
43
  raise Snov::Client::BadRequest, e.message
41
44
  end
@@ -9,6 +9,8 @@ module Snov
9
9
 
10
10
  def prospect
11
11
  @prospect ||= ProspectResult.new(raw_result)
12
+ rescue ActiveModel::UnknownAttributeError, ArgumentError, NoMethodError => e
13
+ raise InvalidResponseError.new(e.message, response: raw_result)
12
14
  end
13
15
 
14
16
  def raw_result
@@ -16,13 +18,7 @@ module Snov
16
18
  .deep_transform_keys! { |key| key.underscore }
17
19
  end
18
20
 
19
- class ProspectJob
20
- include ActiveModel::Model
21
-
22
- attr_accessor :company_name, :company_type, :position, :social_link, :site, :locality, :state,
23
- :city, :street, :street2, :country, :start_date, :end_date, :postal, :founded, :size,
24
- :industry
25
- end
21
+ ProspectJob = Class.new(CamelSnakeStruct)
26
22
 
27
23
  class ProspectJobList
28
24
  include ActiveModel::Model
@@ -2,6 +2,8 @@ module Snov
2
2
  class GetEmailsFromName
3
3
  attr_reader :client
4
4
 
5
+ InvalidProspectResultError = Class.new(InvalidResponseError)
6
+
5
7
  def initialize(client: Snov.client, first_name:, last_name:, domain:)
6
8
  @client = client
7
9
  @first_name = first_name
@@ -11,8 +13,8 @@ module Snov
11
13
 
12
14
  def prospect
13
15
  @prospect ||= ProspectResult.new(raw_result)
14
- rescue ArgumentError => e
15
- raise ArgumentError.new("#{@raw_result} searching prospect with #{@first_name} #{@last_name} #{@domain}")
16
+ rescue ArgumentError, NoMethodError => e
17
+ raise InvalidProspectResultError.new(e.message, response: raw_result)
16
18
  end
17
19
 
18
20
  def raw_result
@@ -23,24 +25,13 @@ module Snov
23
25
  .deep_transform_keys! { |key| key.underscore }
24
26
  end
25
27
 
26
- class ProspectData
27
- include ActiveModel::Model
28
-
29
- attr_accessor :first_name, :last_name, :domain, :name
30
- attr_reader :emails
31
-
32
- def emails=(val)
33
- @emails = Array.wrap(val).map do |rel|
34
- ProspectEmail.new(rel)
35
- end
36
- end
37
- end
38
-
39
- class ProspectEmail
40
- include ActiveModel::Model
41
-
42
- attr_accessor :email, :email_status
43
- end
28
+ ProspectData = Class.new(CamelSnakeStruct)
29
+ ProspectData.example(
30
+ "first_name" => "text",
31
+ "last_name" => "text",
32
+ "domain" => "text",
33
+ "emails" => [{ "email" => "text", "email_status" => "valid" }]
34
+ )
44
35
 
45
36
  class ProspectStatus
46
37
  include ActiveModel::Model
@@ -15,6 +15,8 @@ module Snov
15
15
 
16
16
  def prospect
17
17
  @prospect ||= ProspectResult.new(raw_result)
18
+ rescue ActiveModel::UnknownAttributeError, ArgumentError, NoMethodError => e
19
+ raise InvalidResponseError.new(e.message, response: raw_result)
18
20
  end
19
21
 
20
22
  def method_missing(method_name, *arguments, &block)
@@ -35,13 +37,7 @@ module Snov
35
37
  .deep_transform_keys! { |key| key.underscore }
36
38
  end
37
39
 
38
- class Job
39
- include ActiveModel::Model
40
-
41
- attr_accessor :company_name, :position, :social_link, :site, :locality, :state, :city
42
- attr_accessor :street, :street2, :postal, :founded, :start_date, :end_date, :size
43
- attr_accessor :industry, :company_type, :country
44
- end
40
+ Job = Class.new(CamelSnakeStruct)
45
41
 
46
42
  class Social
47
43
  include ActiveModel::Model
@@ -59,7 +55,7 @@ module Snov
59
55
  include ActiveModel::Model
60
56
 
61
57
  attr_accessor :id, :name, :first_name, :last_name, :industry, :country, :locality, :success, :source
62
- attr_accessor :logo, :last_update_date, :message
58
+ attr_accessor :logo, :last_update_date, :message, :result
63
59
 
64
60
  def social
65
61
  Array.wrap(@social)
@@ -21,6 +21,8 @@ module Snov
21
21
  @prospects ||= raw_result.fetch('prospects').map do |result|
22
22
  ProspectResult.new(result)
23
23
  end
24
+ rescue ActiveModel::UnknownAttributeError, ArgumentError, NoMethodError => e
25
+ raise InvalidResponseError.new(e.message, response: raw_result)
24
26
  end
25
27
 
26
28
  def raw_result
@@ -20,6 +20,8 @@ module Snov
20
20
  @prospects ||= raw_result.fetch('data', []).map do |result|
21
21
  ProspectResult.new(result)
22
22
  end
23
+ rescue ActiveModel::UnknownAttributeError, ArgumentError, NoMethodError => e
24
+ raise InvalidResponseError.new(e.message, response: raw_result)
23
25
  end
24
26
 
25
27
  def raw_result
@@ -28,13 +30,7 @@ module Snov
28
30
  .deep_transform_keys! { |key| key.underscore }
29
31
  end
30
32
 
31
- class Job
32
- include ActiveModel::Model
33
-
34
- attr_accessor :company_name, :position, :social_link, :site, :locality, :state, :city
35
- attr_accessor :street, :street2, :postal, :founded, :start_date, :end_date, :size
36
- attr_accessor :industry, :company_type, :country
37
- end
33
+ Job = Class.new(CamelSnakeStruct)
38
34
 
39
35
  class Social
40
36
  include ActiveModel::Model
@@ -16,6 +16,8 @@ module Snov
16
16
 
17
17
  def all
18
18
  @all ||= raw_result.map { |result| UserList.new(result) }
19
+ rescue ActiveModel::UnknownAttributeError, ArgumentError, NoMethodError => e
20
+ raise InvalidResponseError.new(e.message, response: raw_result)
19
21
  end
20
22
 
21
23
  def raw_result
@@ -0,0 +1,15 @@
1
+ module Snov
2
+ class InMemoryTokenStorage
3
+ def initialize(token = nil)
4
+ @stored_token = token
5
+ end
6
+
7
+ def get
8
+ @stored_token
9
+ end
10
+
11
+ def put(token_hash)
12
+ @stored_token = token_hash
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,18 @@
1
+ module Snov
2
+ class RedisTokenStorage
3
+ def initialize(redis, token = nil)
4
+ @redis = redis
5
+ put(token) if token
6
+ end
7
+
8
+ def get
9
+ result = @redis.get("snov/access_token")
10
+ result = MultiJson.load(result) if result
11
+ result
12
+ end
13
+
14
+ def put(token_hash)
15
+ @redis.set("snov/access_token", MultiJson.dump(token_hash))
16
+ end
17
+ end
18
+ end
data/lib/snov/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Snov
2
- VERSION = "0.6.5"
2
+ VERSION = "0.7.0"
3
3
  end
data/lib/snov.rb CHANGED
@@ -1,8 +1,18 @@
1
1
  require "snov/version"
2
+ require 'active_support/core_ext/module/attribute_accessors'
2
3
 
3
4
  module Snov
4
5
  class Error < StandardError; end
5
6
 
7
+ class InvalidResponseError < Error
8
+ attr_accessor :response
9
+
10
+ def initialize(message, _response = nil)
11
+ self.response = nil
12
+ super(message)
13
+ end
14
+ end
15
+
6
16
  def self.client
7
17
  if !use_fake?
8
18
  Client.new(client_id: ENV['SNOV_USER_ID'], client_secret: ENV['SNOV_SECRET'])
@@ -14,11 +24,16 @@ module Snov
14
24
  def self.use_fake?
15
25
  ENV['SNOV_USE_FAKE'].present? || (!ENV.key?('SNOV_USER_ID') && !ENV.key?('SNOV_SECRET'))
16
26
  end
27
+
28
+ mattr_accessor :token_storage
17
29
  end
18
30
 
19
31
  require 'active_model'
20
32
  require 'snov/client'
33
+ require 'snov/in_memory_token_storage'
34
+ require 'snov/redis_token_storage'
21
35
  require 'snov/fake_client'
36
+ require 'camel_snake_struct'
22
37
  require 'snov/get_profile_by_email'
23
38
  require 'snov/get_all_prospects_from_list'
24
39
  require 'snov/get_prospects_by_email'
data/snov.gemspec CHANGED
@@ -24,9 +24,10 @@ Gem::Specification.new do |spec|
24
24
  spec.bindir = "exe"
25
25
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
26
  spec.require_paths = ["lib"]
27
- spec.add_dependency 'activemodel', '>= 4.1.0', '< 7.0'
28
- spec.add_dependency 'activesupport', '>= 4.1.0', '< 7.0'
27
+ spec.add_dependency 'activemodel', '>= 4.1.0', '< 9.0'
28
+ spec.add_dependency 'activesupport', '>= 4.1.0', '< 9.0'
29
29
  spec.add_dependency 'camel_snake_struct', '>= 0.1.0', '< 2.0'
30
- spec.add_dependency 'faraday', '>= 0.10.0', '< 2.0'
30
+ spec.add_dependency 'faraday', '>= 0.10.0', '< 3.0'
31
31
  spec.add_dependency 'multi_json', '>= 1.4.0', '< 2.0'
32
+ spec.metadata['rubygems_mfa_required'] = 'true'
32
33
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snov
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.5
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grant Petersen-Speelman
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2021-10-22 00:00:00.000000000 Z
12
+ date: 2025-05-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemodel
@@ -20,7 +20,7 @@ dependencies:
20
20
  version: 4.1.0
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
- version: '7.0'
23
+ version: '9.0'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
@@ -30,7 +30,7 @@ dependencies:
30
30
  version: 4.1.0
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: '7.0'
33
+ version: '9.0'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: activesupport
36
36
  requirement: !ruby/object:Gem::Requirement
@@ -40,7 +40,7 @@ dependencies:
40
40
  version: 4.1.0
41
41
  - - "<"
42
42
  - !ruby/object:Gem::Version
43
- version: '7.0'
43
+ version: '9.0'
44
44
  type: :runtime
45
45
  prerelease: false
46
46
  version_requirements: !ruby/object:Gem::Requirement
@@ -50,7 +50,7 @@ dependencies:
50
50
  version: 4.1.0
51
51
  - - "<"
52
52
  - !ruby/object:Gem::Version
53
- version: '7.0'
53
+ version: '9.0'
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: camel_snake_struct
56
56
  requirement: !ruby/object:Gem::Requirement
@@ -80,7 +80,7 @@ dependencies:
80
80
  version: 0.10.0
81
81
  - - "<"
82
82
  - !ruby/object:Gem::Version
83
- version: '2.0'
83
+ version: '3.0'
84
84
  type: :runtime
85
85
  prerelease: false
86
86
  version_requirements: !ruby/object:Gem::Requirement
@@ -90,7 +90,7 @@ dependencies:
90
90
  version: 0.10.0
91
91
  - - "<"
92
92
  - !ruby/object:Gem::Version
93
- version: '2.0'
93
+ version: '3.0'
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: multi_json
96
96
  requirement: !ruby/object:Gem::Requirement
@@ -119,12 +119,12 @@ executables: []
119
119
  extensions: []
120
120
  extra_rdoc_files: []
121
121
  files:
122
- - ".byebug_history"
122
+ - ".circleci/config.yml"
123
123
  - ".gitignore"
124
124
  - ".rspec"
125
125
  - ".rubocop.yml"
126
- - ".travis.yml"
127
126
  - CHANGELOG.md
127
+ - Gemfile
128
128
  - LICENSE
129
129
  - README.md
130
130
  - Rakefile
@@ -132,7 +132,6 @@ files:
132
132
  - bin/rspec
133
133
  - bin/rubocop
134
134
  - bin/setup
135
- - gems.rb
136
135
  - lib/snov.rb
137
136
  - lib/snov/add_names_to_find_emails.rb
138
137
  - lib/snov/client.rb
@@ -141,6 +140,8 @@ files:
141
140
  - lib/snov/fake_client/get_v1_get-user-lists/default.json
142
141
  - lib/snov/fake_client/get_v2_domain-emails-with-info/domain=octagon_com.json
143
142
  - lib/snov/fake_client/get_v2_domain-emails-with-info/not_found=true.json
143
+ - lib/snov/fake_client/post_v1_get-emails-from-url/not_found=true.json
144
+ - lib/snov/fake_client/post_v1_get-emails-from-url/url=https:--www_linkedin_com-in-john-doe-123456-.json
144
145
  - lib/snov/fake_client/post_v1_get-profile-by-email/email=lizi_hamer@octagon_com.json
145
146
  - lib/snov/fake_client/post_v1_get-profile-by-email/not_found=true.json
146
147
  - lib/snov/fake_client/post_v1_get-prospects-by-email/email=gavin_vanrooyen@octagon_com.json
@@ -155,6 +156,8 @@ files:
155
156
  - lib/snov/get_prospect_list.rb
156
157
  - lib/snov/get_prospects_by_email.rb
157
158
  - lib/snov/get_user_lists.rb
159
+ - lib/snov/in_memory_token_storage.rb
160
+ - lib/snov/redis_token_storage.rb
158
161
  - lib/snov/types/date_details.rb
159
162
  - lib/snov/version.rb
160
163
  - snov.gemspec
@@ -165,6 +168,7 @@ metadata:
165
168
  homepage_uri: https://github.com/NEXL-LTS/snov-ruby
166
169
  source_code_uri: https://github.com/NEXL-LTS/snov-ruby
167
170
  changelog_uri: https://github.com/NEXL-LTS/snov-ruby/blob/main/CHANGELOG.md
171
+ rubygems_mfa_required: 'true'
168
172
  post_install_message:
169
173
  rdoc_options: []
170
174
  require_paths:
@@ -180,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
180
184
  - !ruby/object:Gem::Version
181
185
  version: '0'
182
186
  requirements: []
183
- rubygems_version: 3.2.22
187
+ rubygems_version: 3.5.22
184
188
  signing_key:
185
189
  specification_version: 4
186
190
  summary: Snov client to interact with snov api
data/.byebug_history DELETED
@@ -1,5 +0,0 @@
1
- continue
2
- subject
3
- exit
4
- val["emails"]
5
- val
data/.travis.yml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- language: ruby
3
- gemfile: gems.rb
4
- cache: bundler
5
- rvm:
6
- - 2.5
7
- - 2.7
8
- before_install:
9
- - yes | gem update --system --force
10
- - gem install bundler
11
-
12
- script:
13
- - bundle install
14
- - bundle exec rake
15
- - bin/rubocop