email_data 1732408289.0.0 → 1733617827.0.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: 1939ac50122c251a380e5f8a9c195f58b77f49e9ddb76da9ca7b53263e7a0eed
4
- data.tar.gz: ce24b3da966fb3b1527e0d655418b98501812b58108c4275fb246db8a9912016
3
+ metadata.gz: f322dddf7adcdaead53359ab2aa996c6ba5bcc6f55adbaa2afcf8270e771c19c
4
+ data.tar.gz: e983824f464b362cb8117b7374a88dceaa9af7085272ce59144d1376c9888751
5
5
  SHA512:
6
- metadata.gz: 12df0d566ee3dc79b4b8042985c4c2e549a545b6a6b5e94f5a63c9fb7151bd58c6cec5e1bfab48ef19b97b4eb156d5097c0779be719d9e0a2029a452b93b5508
7
- data.tar.gz: e7708f628fd904a3618718b937c0165fce4ea6b616a948488abb568a87540bef92ef5ca1c77eb161f5cca11a5e1544a96a3f65689efe1d665c6fa47d6544a336
6
+ metadata.gz: 58d6762fe9358d16a6d8b0e46001f71b4b31bb0bdb9a395493895e64ee86aacf5aa64f1855d647833f41f20c131e590a2079347b361c537f2b643b8047552121
7
+ data.tar.gz: 2216113e1754f03377b5247c3e0e2eb3c6f68ff4bfbc757d073ccfa997161e5b024f6af6451ff188eed3076297ed6d8539bac8c7c846db2f1467032470eae0ab
@@ -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