benchmark_email 0.1.1 → 0.1.2
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 +4 -4
- data/.travis.yml +9 -0
- data/Gemfile.lock +53 -0
- data/LICENSE +21 -0
- data/README.md +17 -3
- data/benchmark_email.gemspec +4 -0
- data/lib/benchmark_email/version.rb +1 -1
- data/lib/benchmark_email.rb +3 -2
- metadata +22 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a45db84d87a46561e17014612881960fd7b49f1e7a60b476c1acaf2bfbc79f3
|
4
|
+
data.tar.gz: 1e2402b9031a0f0994f5215750de565efd58e469393fba37523b3dc781895b3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb20aef6fbbf09c270182f36d21cb96e5d064d0aefadc4b200e00f5b92bad04cd8e42d02a39223fe9d4f6a95fbd681ae69c682e67815a76a792e544c7392b483
|
7
|
+
data.tar.gz: d6c6e361f4fd2623ff2fda423fa72d6556ee47709b974e6ab5175aa4aa309826fd72e090fe03ed0747ba2658df3e5d58da4f35b0f2b6b170fdfe779fe9836a0e
|
data/.travis.yml
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
benchmark_email (0.1.1)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
coveralls (0.8.22)
|
10
|
+
json (>= 1.8, < 3)
|
11
|
+
simplecov (~> 0.16.1)
|
12
|
+
term-ansicolor (~> 1.3)
|
13
|
+
thor (~> 0.19.4)
|
14
|
+
tins (~> 1.6)
|
15
|
+
diff-lcs (1.3)
|
16
|
+
docile (1.3.1)
|
17
|
+
json (2.2.0)
|
18
|
+
rake (10.5.0)
|
19
|
+
rspec (3.8.0)
|
20
|
+
rspec-core (~> 3.8.0)
|
21
|
+
rspec-expectations (~> 3.8.0)
|
22
|
+
rspec-mocks (~> 3.8.0)
|
23
|
+
rspec-core (3.8.0)
|
24
|
+
rspec-support (~> 3.8.0)
|
25
|
+
rspec-expectations (3.8.2)
|
26
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
27
|
+
rspec-support (~> 3.8.0)
|
28
|
+
rspec-mocks (3.8.0)
|
29
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
30
|
+
rspec-support (~> 3.8.0)
|
31
|
+
rspec-support (3.8.0)
|
32
|
+
simplecov (0.16.1)
|
33
|
+
docile (~> 1.1)
|
34
|
+
json (>= 1.8, < 3)
|
35
|
+
simplecov-html (~> 0.10.0)
|
36
|
+
simplecov-html (0.10.2)
|
37
|
+
term-ansicolor (1.7.1)
|
38
|
+
tins (~> 1.0)
|
39
|
+
thor (0.19.4)
|
40
|
+
tins (1.20.2)
|
41
|
+
|
42
|
+
PLATFORMS
|
43
|
+
ruby
|
44
|
+
|
45
|
+
DEPENDENCIES
|
46
|
+
benchmark_email!
|
47
|
+
bundler (~> 2.0)
|
48
|
+
coveralls
|
49
|
+
rake (~> 10.0)
|
50
|
+
rspec (~> 3.8.0)
|
51
|
+
|
52
|
+
BUNDLED WITH
|
53
|
+
2.0.1
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2019 alea12
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
# BenchmarkEmail
|
1
|
+
# BenchmarkEmail [](https://badge.fury.io/rb/benchmark_email) [](https://travis-ci.org/alea12/benchmark_email) [](https://coveralls.io/github/alea12/benchmark_email?branch=master)
|
2
2
|
|
3
|
-
Ruby client to interact with Benchmark Email API v3.
|
3
|
+
Ruby client to interact with Benchmark Email API v3. This gem is heavily under construction and supports only limited endpoints of [Benchmark Email API](https://developer.benchmarkemail.com/). Your help is always welcome 😍
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -20,12 +20,26 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
23
|
+
Before using this gem, you have to [sign up to Benchmark Email](https://ui.benchmarkemail.com/register) and [obtain your API Token](https://ui.benchmarkemail.com/Integrate#API).
|
24
|
+
|
23
25
|
```ruby
|
24
26
|
require 'benchmark_email'
|
25
|
-
client = BenchmarkEmail::Client.new('
|
27
|
+
client = BenchmarkEmail::Client.new('YOUR_API_TOKEN')
|
26
28
|
puts client.get_contact_lists
|
27
29
|
```
|
28
30
|
|
31
|
+
Alternatively, you can provide your API Token using environment variable:
|
32
|
+
|
33
|
+
```sh
|
34
|
+
$ export BENCHMARK_EMAIL_API_TOKEN='YOUR_API_TOKEN'
|
35
|
+
```
|
36
|
+
|
37
|
+
With environment variable being set, you can initialize `BenchmarkEmail::Client` without parameters:
|
38
|
+
|
39
|
+
```ruby
|
40
|
+
client = BenchmarkEmail::Client.new
|
41
|
+
```
|
42
|
+
|
29
43
|
## Development
|
30
44
|
|
31
45
|
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/benchmark_email.gemspec
CHANGED
@@ -36,4 +36,8 @@ Gem::Specification.new do |spec|
|
|
36
36
|
spec.add_development_dependency "bundler", "~> 2.0"
|
37
37
|
spec.add_development_dependency "rake", "~> 10.0"
|
38
38
|
spec.add_development_dependency "rspec", "~> 3.8.0"
|
39
|
+
spec.add_development_dependency "coveralls"
|
40
|
+
|
41
|
+
spec.required_ruby_version = '>= 2.4'
|
42
|
+
spec.licenses = ['MIT']
|
39
43
|
end
|
data/lib/benchmark_email.rb
CHANGED
@@ -4,14 +4,15 @@ require "benchmark_email/version"
|
|
4
4
|
|
5
5
|
module BenchmarkEmail
|
6
6
|
class Error < StandardError; end
|
7
|
-
|
7
|
+
class EmptyTokenError < StandardError; end
|
8
8
|
|
9
9
|
class Client
|
10
10
|
API_URL = 'https://clientapi.benchmarkemail.com'
|
11
11
|
attr_accessor :access_token
|
12
12
|
|
13
13
|
def initialize(access_token = nil)
|
14
|
-
@access_token = access_token || ENV['
|
14
|
+
@access_token = access_token || ENV['BENCHMARK_EMAIL_API_TOKEN']
|
15
|
+
raise EmptyTokenError if @access_token.nil? || @access_token.empty?
|
15
16
|
end
|
16
17
|
|
17
18
|
def get_contact_lists
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: benchmark_email
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- alea12
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 3.8.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: coveralls
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
description:
|
56
70
|
email:
|
57
71
|
- mail@alea12.net
|
@@ -60,7 +74,10 @@ extensions: []
|
|
60
74
|
extra_rdoc_files: []
|
61
75
|
files:
|
62
76
|
- ".gitignore"
|
77
|
+
- ".travis.yml"
|
63
78
|
- Gemfile
|
79
|
+
- Gemfile.lock
|
80
|
+
- LICENSE
|
64
81
|
- README.md
|
65
82
|
- Rakefile
|
66
83
|
- benchmark_email.gemspec
|
@@ -69,7 +86,8 @@ files:
|
|
69
86
|
- lib/benchmark_email.rb
|
70
87
|
- lib/benchmark_email/version.rb
|
71
88
|
homepage: https://github.com/alea12/benchmark_email
|
72
|
-
licenses:
|
89
|
+
licenses:
|
90
|
+
- MIT
|
73
91
|
metadata:
|
74
92
|
allowed_push_host: https://rubygems.org
|
75
93
|
homepage_uri: https://github.com/alea12/benchmark_email
|
@@ -82,7 +100,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
82
100
|
requirements:
|
83
101
|
- - ">="
|
84
102
|
- !ruby/object:Gem::Version
|
85
|
-
version: '
|
103
|
+
version: '2.4'
|
86
104
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
105
|
requirements:
|
88
106
|
- - ">="
|