email_data 1733013134.0.0 → 1734222646.0.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: d2217e75928ed1fd95e42d64b3b58cd841c551210b6b971db20e6cff34643565
4
- data.tar.gz: a5abbc4c71a0dc86639f7ea7c5b9443a8701d46e7a3e74b74458589a777efcde
3
+ metadata.gz: c340c5ee5553cf1c0db27f084ba97b0dc90000da256e5a2e5001db5f83645d76
4
+ data.tar.gz: da5a2d7cc9407704b78c2c451abc998bcaf7ad62f9e54a75e66bd0e56db81adb
5
5
  SHA512:
6
- metadata.gz: 6d5cf22a957ac56238daaa77e0cee17bf86a1c251a81903b9574bf47a24d6f984d4bfc9fdb5f76f50e8177c2d7b828e99f8eb3feeab85eae1abbca0160b97c5a
7
- data.tar.gz: 7dbfadf0f1686f93cc12e8c6b2bdad9d065deb4423f40d596a81d94252648b4fe453a8ce25346a2627e50d907b17a42d0aace8c0ccda758219dc0dcb8d3ea813
6
+ metadata.gz: d08f51917f63c65aefe33877c72ff28d946f15f477ea00fb65dc5768f4eaf6d14b7abd4ede7260036096d2843557b2fabb43224d3b777cc61522c208857f45e8
7
+ data.tar.gz: f55aaa391e4838c6e9948fb7701352ade7ffe885e879662dee1523d2f50f987e1e4aeee8707b56b417fa15bbd05c2ad72162adf45cb45df0490e9904d8b25bdc
@@ -9,6 +9,10 @@ on:
9
9
  workflow_dispatch:
10
10
  inputs: {}
11
11
 
12
+ env:
13
+ PGUSER: postgres
14
+ PGHOST: localhost
15
+
12
16
  jobs:
13
17
  build:
14
18
  name: Tests with Ruby ${{ matrix.ruby }} and ${{ matrix.gemfile }}
@@ -19,13 +23,17 @@ jobs:
19
23
  strategy:
20
24
  fail-fast: false
21
25
  matrix:
22
- ruby: ["2.7", "3.0", "3.1"]
26
+ ruby: ["3.1", "3.2", "3.3"]
23
27
  gemfile:
24
28
  - Gemfile
25
29
  services:
26
30
  postgres:
27
- image: postgres:11.5
31
+ image: postgres
28
32
  ports: ["5432:5432"]
33
+ env:
34
+ POSTGRES_HOST: localhost
35
+ POSTGRES_PORT: 5432
36
+ POSTGRES_HOST_AUTH_METHOD: trust
29
37
  options:
30
38
  --health-cmd pg_isready --health-interval 10s --health-timeout 5s
31
39
  --health-retries 5
@@ -33,14 +41,14 @@ jobs:
33
41
  steps:
34
42
  - uses: actions/checkout@v4
35
43
 
36
- - uses: actions/cache@v3
44
+ - uses: actions/cache@v4
37
45
  with:
38
46
  path: vendor/bundle
39
47
  key: >
40
48
  ${{ runner.os }}-${{ matrix.ruby }}-gems-${{
41
49
  hashFiles(matrix.gemfile) }}
42
50
 
43
- - name: Install PostgreSQL 11 client
51
+ - name: Install PostgreSQL client
44
52
  run: |
45
53
  sudo apt -y install libpq-dev
46
54
 
@@ -59,8 +67,6 @@ jobs:
59
67
 
60
68
  - name: Run Tests
61
69
  env:
62
- PGHOST: localhost
63
- PGUSER: postgres
64
70
  BUNDLE_GEMFILE: ${{ matrix.gemfile }}
65
71
  run: |
66
72
  psql -U postgres -c "create database test"
data/.rubocop.yml CHANGED
@@ -3,7 +3,7 @@ inherit_gem:
3
3
  rubocop-fnando: .rubocop.yml
4
4
 
5
5
  AllCops:
6
- TargetRubyVersion: 2.7
6
+ TargetRubyVersion: 3.1
7
7
  NewCops: enable
8
8
  Exclude:
9
9
  - vendor/**/*
data/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # email_data
2
2
 
3
3
  [![Tests](https://github.com/fnando/email_data/workflows/ruby-tests/badge.svg)](https://github.com/fnando/email_data)
4
- [![Code Climate](https://codeclimate.com/github/fnando/email_data/badges/gpa.svg)](https://codeclimate.com/github/fnando/email_data)
5
4
  [![Gem version](https://img.shields.io/gem/v/email_data.svg?label=Gem%20version)](https://rubygems.org/gems/email_data)
6
5
  [![Gem downloads](https://img.shields.io/gem/dt/email_data.svg?label=Gem%20downloads)](https://rubygems.org/gems/email_data)
7
6
  [![NPM version](https://img.shields.io/npm/v/%40fnando%2Femail_data.svg?label=NPM%20version)](https://npmjs.org/package/@fnando/email_data)
data/bin/helpers.rb CHANGED
@@ -182,7 +182,8 @@ def http_request(verb, url, params = nil)
182
182
  "Origin" => referer
183
183
  }
184
184
 
185
- Aitch.public_send(verb, url: url, headers: headers, params: params, options: {expect: 200})
185
+ Aitch.public_send(verb, url: url, headers: headers, params: params,
186
+ options: {expect: 200})
186
187
  end
187
188
 
188
189
  def root_domains(domains)
@@ -190,7 +191,7 @@ def root_domains(domains)
190
191
  RootDomain.call(domain)
191
192
  end
192
193
 
193
- processed_domains.reject(&:nil?)
194
+ processed_domains.compact
194
195
  end
195
196
 
196
197
  def thread
@@ -204,7 +205,8 @@ end
204
205
  def load_github_url(url)
205
206
  puts "=> Fetching #{url}"
206
207
 
207
- basename = URI.parse(url).path[%r{/([^/]+/[^/]+)}, 1].tr("/", "_").tr("-", "_")
208
+ basename = URI.parse(url).path[%r{/([^/]+/[^/]+)}, 1].tr("/", "_").tr("-",
209
+ "_")
208
210
  path = "disposable/#{basename}.txt"
209
211
  domains = load_file(path)
210
212
 
@@ -227,5 +229,5 @@ rescue StandardError => error
227
229
  end
228
230
 
229
231
  def normalize_list(list)
230
- list.flatten.map(&:chomp).compact.reject(&:empty?) - EXCEPTIONS
232
+ list.flatten.filter_map(&:chomp).reject(&:empty?) - EXCEPTIONS
231
233
  end