truemail-client 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +59 -18
- data/CHANGELOG.md +12 -0
- data/Gemfile.lock +12 -12
- data/README.md +8 -6
- data/lib/truemail/client/configuration.rb +3 -3
- data/lib/truemail/client/http.rb +4 -4
- data/lib/truemail/client/version.rb +1 -1
- data/truemail-client.gemspec +1 -1
- metadata +10 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d66b2f543cf4acf6562c363f578aaba256ce6b99192fbe46b0f5fb36514fea63
|
4
|
+
data.tar.gz: eaeb5cd3df955be353f7f1ca26df296e8d3762a29bdbc8cda7a9fddd3a3db334
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f57b43e1a5439aa20da4423b08a4bf64975be817292e1022d26b3259c51c3b2ebc2762bbdabd5da11f91e247a77bb652590deb1d8ea538d0988013ee8927920
|
7
|
+
data.tar.gz: e026b94182d868f77b73c56af596799b6bbbf42a25a1c2aeb000af87ed8fe686a59f059daa6afe511b8406813aa425bcf1618a7351c8cfa7cb0e5babf9f21aae
|
data/.circleci/config.yml
CHANGED
@@ -1,11 +1,21 @@
|
|
1
|
+
version: 2.1
|
2
|
+
|
1
3
|
defaults: &defaults
|
2
4
|
working_directory: ~/truemail-ruby-client
|
3
5
|
docker:
|
4
|
-
- image:
|
6
|
+
- image: cimg/ruby:<< parameters.ruby-version >>
|
5
7
|
environment:
|
6
8
|
CC_TEST_REPORTER_ID: 183d1173cc05e4e5dbd07ddb60a04b9c4115ed11a4bacda0e1834572eb168c51
|
7
9
|
|
10
|
+
orbs:
|
11
|
+
ruby: circleci/ruby@1.1.3
|
12
|
+
|
8
13
|
references:
|
14
|
+
install_bundler: &install_bundler
|
15
|
+
run:
|
16
|
+
name: Installing Bundler
|
17
|
+
command: gem i bundler -v $(tail -1 Gemfile.lock | tr -d ' ')
|
18
|
+
|
9
19
|
restore_bundle_cache: &restore_bundle_cache
|
10
20
|
restore_cache:
|
11
21
|
keys:
|
@@ -24,66 +34,97 @@ references:
|
|
24
34
|
|
25
35
|
install_codeclimate_reporter: &install_codeclimate_reporter
|
26
36
|
run:
|
27
|
-
name:
|
37
|
+
name: Installing CodeClimate test reporter
|
28
38
|
command: |
|
29
39
|
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
30
40
|
chmod +x ./cc-test-reporter
|
31
41
|
|
32
|
-
version: 2
|
33
42
|
jobs:
|
34
|
-
linters:
|
43
|
+
linters-ruby:
|
44
|
+
parameters:
|
45
|
+
ruby-version:
|
46
|
+
type: string
|
47
|
+
|
35
48
|
<<: *defaults
|
36
49
|
|
37
50
|
steps:
|
38
51
|
- checkout
|
39
52
|
|
53
|
+
- <<: *install_bundler
|
40
54
|
- <<: *restore_bundle_cache
|
41
55
|
- <<: *bundle_install
|
42
56
|
- <<: *save_bundle_cache
|
43
57
|
|
44
58
|
- run:
|
45
|
-
name: Running
|
59
|
+
name: Running Overcommit
|
46
60
|
command: |
|
47
61
|
bundle exec overcommit -s
|
48
62
|
SKIP=AuthorEmail,AuthorName bundle exec overcommit -r
|
49
63
|
|
50
|
-
tests:
|
64
|
+
tests-ruby:
|
65
|
+
parameters:
|
66
|
+
ruby-version:
|
67
|
+
type: string
|
68
|
+
|
51
69
|
<<: *defaults
|
52
70
|
|
53
71
|
steps:
|
54
72
|
- checkout
|
55
73
|
|
74
|
+
- <<: *install_bundler
|
56
75
|
- <<: *restore_bundle_cache
|
57
76
|
- <<: *bundle_install
|
58
77
|
- <<: *save_bundle_cache
|
59
78
|
- <<: *install_codeclimate_reporter
|
60
79
|
|
61
80
|
- run:
|
62
|
-
name: Running
|
81
|
+
name: Running RSpec
|
63
82
|
command: |
|
64
|
-
mkdir /tmp/test-results
|
65
83
|
./cc-test-reporter before-build
|
66
84
|
bundle exec rspec
|
67
85
|
|
68
86
|
- run:
|
69
|
-
name:
|
87
|
+
name: Creating CodeClimate test coverage report
|
70
88
|
command: |
|
71
89
|
./cc-test-reporter format-coverage -t simplecov -o "coverage/codeclimate.$CIRCLE_NODE_INDEX.json"
|
72
90
|
|
73
|
-
- store_test_results:
|
74
|
-
path: /tmp/test-results
|
75
|
-
|
76
91
|
- store_artifacts:
|
77
|
-
|
78
|
-
|
92
|
+
name: Saving Simplecov coverage artifacts
|
93
|
+
path: ~/truemail-ruby-client/coverage
|
94
|
+
destination: coverage
|
79
95
|
|
80
96
|
- deploy:
|
97
|
+
name: Uploading CodeClimate test coverage report
|
81
98
|
command: |
|
82
99
|
./cc-test-reporter sum-coverage --output - --parts $CIRCLE_NODE_TOTAL coverage/codeclimate.*.json | ./cc-test-reporter upload-coverage --debug --input -
|
83
100
|
|
101
|
+
compatibility-ruby:
|
102
|
+
parameters:
|
103
|
+
ruby-version:
|
104
|
+
type: string
|
105
|
+
docker:
|
106
|
+
- image: cimg/ruby:<< parameters.ruby-version >>
|
107
|
+
steps:
|
108
|
+
- checkout
|
109
|
+
- ruby/install-deps:
|
110
|
+
with-cache: false
|
111
|
+
path: './vendor/custom_bundle'
|
112
|
+
- run:
|
113
|
+
name: Running compatibility tests
|
114
|
+
command: bundle exec rspec
|
115
|
+
|
84
116
|
workflows:
|
85
|
-
|
86
|
-
build:
|
117
|
+
build_and_test:
|
87
118
|
jobs:
|
88
|
-
- linters
|
89
|
-
|
119
|
+
- linters-ruby:
|
120
|
+
matrix:
|
121
|
+
parameters:
|
122
|
+
ruby-version: ["2.5"]
|
123
|
+
- tests-ruby:
|
124
|
+
matrix:
|
125
|
+
parameters:
|
126
|
+
ruby-version: ["2.5"]
|
127
|
+
- compatibility-ruby:
|
128
|
+
matrix:
|
129
|
+
parameters:
|
130
|
+
ruby-version: ["2.6", "2.7", "3.0"]
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,18 @@
|
|
2
2
|
|
3
3
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
4
4
|
|
5
|
+
## [0.3.2] - 2021-05-19
|
6
|
+
|
7
|
+
### Fixed
|
8
|
+
|
9
|
+
- Gem syntax compatibility with Ruby 3.x
|
10
|
+
|
11
|
+
### Changed
|
12
|
+
|
13
|
+
- Updated gem dependencies
|
14
|
+
- Updated rubocop/codeclimate config
|
15
|
+
- Updated gem version
|
16
|
+
|
5
17
|
## [0.3.1] - 2021-05-08
|
6
18
|
|
7
19
|
### Changed
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
truemail-client (0.3.
|
4
|
+
truemail-client (0.3.2)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -20,8 +20,8 @@ GEM
|
|
20
20
|
crack (0.4.5)
|
21
21
|
rexml
|
22
22
|
diff-lcs (1.4.4)
|
23
|
-
docile (1.
|
24
|
-
faker (2.
|
23
|
+
docile (1.4.0)
|
24
|
+
faker (2.18.0)
|
25
25
|
i18n (>= 1.6, < 2)
|
26
26
|
fasterer (0.9.0)
|
27
27
|
colorize (~> 0.7)
|
@@ -48,7 +48,7 @@ GEM
|
|
48
48
|
pry-byebug (3.9.0)
|
49
49
|
byebug (~> 11.0)
|
50
50
|
pry (~> 0.13.0)
|
51
|
-
psych (3.3.
|
51
|
+
psych (3.3.2)
|
52
52
|
public_suffix (4.0.6)
|
53
53
|
rainbow (3.0.0)
|
54
54
|
rake (13.0.3)
|
@@ -72,7 +72,7 @@ GEM
|
|
72
72
|
diff-lcs (>= 1.2.0, < 2.0)
|
73
73
|
rspec-support (~> 3.10.0)
|
74
74
|
rspec-support (3.10.2)
|
75
|
-
rubocop (1.
|
75
|
+
rubocop (1.15.0)
|
76
76
|
parallel (~> 1.10)
|
77
77
|
parser (>= 3.0.0.0)
|
78
78
|
rainbow (>= 2.2.2, < 4.0)
|
@@ -90,9 +90,9 @@ GEM
|
|
90
90
|
rubocop (~> 1.0)
|
91
91
|
rubocop-ast (>= 1.1.0)
|
92
92
|
ruby-progressbar (1.11.0)
|
93
|
-
ruby_parser (3.
|
94
|
-
sexp_processor (~> 4.
|
95
|
-
sexp_processor (4.15.
|
93
|
+
ruby_parser (3.16.0)
|
94
|
+
sexp_processor (~> 4.15, >= 4.15.1)
|
95
|
+
sexp_processor (4.15.3)
|
96
96
|
simplecov (0.17.1)
|
97
97
|
docile (~> 1.1)
|
98
98
|
json (>= 1.8, < 3)
|
@@ -100,16 +100,16 @@ GEM
|
|
100
100
|
simplecov-html (0.10.2)
|
101
101
|
thor (1.1.0)
|
102
102
|
unicode-display_width (2.0.0)
|
103
|
-
webmock (3.
|
103
|
+
webmock (3.13.0)
|
104
104
|
addressable (>= 2.3.6)
|
105
105
|
crack (>= 0.3.2)
|
106
106
|
hashdiff (>= 0.4.0, < 2.0.0)
|
107
107
|
|
108
108
|
PLATFORMS
|
109
|
-
|
109
|
+
x86_64-darwin-19
|
110
110
|
|
111
111
|
DEPENDENCIES
|
112
|
-
bundler (~>
|
112
|
+
bundler (~> 2.2, >= 2.2.17)
|
113
113
|
bundler-audit (~> 0.8.0)
|
114
114
|
faker (~> 2.17)
|
115
115
|
fasterer (~> 0.9.0)
|
@@ -127,4 +127,4 @@ DEPENDENCIES
|
|
127
127
|
webmock (~> 3.12, >= 3.12.2)
|
128
128
|
|
129
129
|
BUNDLED WITH
|
130
|
-
|
130
|
+
2.2.17
|
data/README.md
CHANGED
@@ -59,17 +59,17 @@ To have an access for `Truemail::Client` you must configure it first as in the e
|
|
59
59
|
require 'truemail/client'
|
60
60
|
|
61
61
|
Truemail::Client.configure do |config|
|
62
|
-
# Optional parameter (Boolean). By default it is equal false
|
63
|
-
config.secure_connection = true
|
64
|
-
|
65
62
|
# Required parameter (String). It should be a hostname or an ip address where Truemail server runs
|
66
63
|
config.host = 'example.com'
|
67
64
|
|
68
|
-
# Optional parameter (Integer). By default it is equal 9292
|
69
|
-
config.port = 80
|
70
|
-
|
71
65
|
# Required parameter (String). It should be valid Truemail server access token
|
72
66
|
config.token = 'token'
|
67
|
+
|
68
|
+
# Optional parameter (Boolean). By default it is equal false
|
69
|
+
config.secure_connection = true
|
70
|
+
|
71
|
+
# Optional parameter (Integer). By default it is equal 9292
|
72
|
+
config.port = 80
|
73
73
|
end
|
74
74
|
```
|
75
75
|
|
@@ -94,6 +94,8 @@ Truemail::Client.validate('admin@bestweb.com.ua')
|
|
94
94
|
"whitelist_validation": false,
|
95
95
|
"whitelisted_domains": null,
|
96
96
|
"blacklisted_domains": null,
|
97
|
+
"blacklisted_mx_ip_addresses": null,
|
98
|
+
"dns": null,
|
97
99
|
"smtp_safe_check": false,
|
98
100
|
"email_pattern": "default gem value",
|
99
101
|
"smtp_error_body_pattern": "default gem value",
|
@@ -5,8 +5,8 @@ module Truemail
|
|
5
5
|
class Configuration
|
6
6
|
DEFAULT_PORT = 9292
|
7
7
|
|
8
|
-
Error = Class.new(StandardError)
|
9
|
-
ArgumentError = Class.new(StandardError) do
|
8
|
+
Error = ::Class.new(::StandardError)
|
9
|
+
ArgumentError = ::Class.new(::StandardError) do
|
10
10
|
def initialize(arg_value, arg_name)
|
11
11
|
super("#{arg_value} is not a valid #{arg_name[0..-2]}")
|
12
12
|
end
|
@@ -26,7 +26,7 @@ module Truemail
|
|
26
26
|
raise_unless(
|
27
27
|
argument,
|
28
28
|
__method__,
|
29
|
-
method.eql?(:port) ? argument.is_a?(Integer) && argument.positive? : argument.is_a?(String)
|
29
|
+
method.eql?(:port) ? argument.is_a?(::Integer) && argument.positive? : argument.is_a?(::String)
|
30
30
|
)
|
31
31
|
instance_variable_set(:"@#{method}", argument)
|
32
32
|
end
|
data/lib/truemail/client/http.rb
CHANGED
@@ -22,8 +22,8 @@ module Truemail
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def run
|
25
|
-
Net::HTTP.start(uri.host, uri.port, use_ssl: secure_connection) do |http|
|
26
|
-
request = Net::HTTP::Get.new(uri)
|
25
|
+
::Net::HTTP.start(uri.host, uri.port, use_ssl: secure_connection) do |http|
|
26
|
+
request = ::Net::HTTP::Get.new(uri)
|
27
27
|
request['User-Agent'] = Truemail::Client::Http::USER_AGENT
|
28
28
|
request['Accept'] = Truemail::Client::Http::MIME_TYPE
|
29
29
|
request['Content-Type'] = Truemail::Client::Http::MIME_TYPE
|
@@ -41,9 +41,9 @@ module Truemail
|
|
41
41
|
attr_reader(*Truemail::Client::Http::URI_ATTRS)
|
42
42
|
|
43
43
|
def request_uri
|
44
|
-
URI::HTTP.build(
|
44
|
+
::URI::HTTP.build(
|
45
45
|
path: endpoint,
|
46
|
-
query: uri_params.empty? ? nil : URI.encode_www_form(uri_params)
|
46
|
+
query: uri_params.empty? ? nil : ::URI.encode_www_form(uri_params)
|
47
47
|
).request_uri
|
48
48
|
end
|
49
49
|
|
data/truemail-client.gemspec
CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
32
32
|
spec.require_paths = ['lib']
|
33
33
|
|
34
|
-
spec.add_development_dependency 'bundler', '~>
|
34
|
+
spec.add_development_dependency 'bundler', '~> 2.2', '>= 2.2.17'
|
35
35
|
spec.add_development_dependency 'bundler-audit', '~> 0.8.0'
|
36
36
|
spec.add_development_dependency 'faker', '~> 2.17'
|
37
37
|
spec.add_development_dependency 'fasterer', '~> 0.9.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: truemail-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladislav Trotsenko
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05-
|
11
|
+
date: 2021-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,14 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.2'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 2.2.17
|
20
23
|
type: :development
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
27
|
- - "~>"
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
29
|
+
version: '2.2'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 2.2.17
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: bundler-audit
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|