mailerlite 1.9.0 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +25 -4
- data/.rubocop.yml +3 -2
- data/Gemfile +2 -15
- data/LICENSE +1 -1
- data/README.md +3 -4
- data/examples/authentication.md +2 -2
- data/examples/create_campaign.md +2 -2
- data/lib/mailerlite/version.rb +1 -1
- data/mailerlite.gemspec +9 -3
- metadata +98 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ccc9f1ff0482360a7e4a1036ff3f67d646c3623402a1c05a777e3457a392e2e
|
4
|
+
data.tar.gz: 1c70b2e1e35e22c93d70d6edc623a5975ef735be37b23cfd295450a09f9a97ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69a04fe0dc9a5487e146102ddc7fe7debe86a1624f8d651856f0f2b33a0b2a8ed0bc9b8dfc3b90bb16c58eb0a7f454bc395ef62ab4387a4b167270e8147b420a
|
7
|
+
data.tar.gz: 04c904fc8dcb9a1cb200c098c0fc2e9cedc7e778fb6430299a1b2a3cfd8465ac8a66628d4f0e53c89ab1f0c0b1ca6171089c41d80e88ab4c68111dc9fb8c1af4
|
data/.github/workflows/test.yml
CHANGED
@@ -4,9 +4,10 @@ on: [push]
|
|
4
4
|
|
5
5
|
jobs:
|
6
6
|
test:
|
7
|
+
name: Test
|
7
8
|
strategy:
|
8
9
|
matrix:
|
9
|
-
ruby: [2.
|
10
|
+
ruby: [2.5, 2.6, 2.7]
|
10
11
|
|
11
12
|
runs-on: ubuntu-latest
|
12
13
|
|
@@ -16,10 +17,30 @@ jobs:
|
|
16
17
|
uses: actions/setup-ruby@v1
|
17
18
|
with:
|
18
19
|
ruby-version: ${{ matrix.ruby }}
|
19
|
-
- name:
|
20
|
+
- name: Install dependencies
|
21
|
+
run: |
|
22
|
+
gem install bundler
|
23
|
+
bundle install --jobs 4 --retry 3
|
24
|
+
- name: RSpec
|
20
25
|
env:
|
21
26
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
22
27
|
run: |
|
23
|
-
gem install bundler
|
24
|
-
bundle install --jobs 4 --retry 3 --without development
|
25
28
|
bundle exec rspec
|
29
|
+
|
30
|
+
rubocop:
|
31
|
+
name: RuboCop
|
32
|
+
runs-on: ubuntu-latest
|
33
|
+
|
34
|
+
steps:
|
35
|
+
- uses: actions/checkout@v1
|
36
|
+
- name: Set up Ruby
|
37
|
+
uses: actions/setup-ruby@v1
|
38
|
+
with:
|
39
|
+
ruby-version: 2.7
|
40
|
+
- name: Install dependencies
|
41
|
+
run: |
|
42
|
+
gem install bundler
|
43
|
+
bundle install --jobs 4 --retry 3
|
44
|
+
- name: RuboCop
|
45
|
+
run: |
|
46
|
+
bundle exec rubocop
|
data/.rubocop.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
AllCops:
|
2
|
-
TargetRubyVersion: 2.
|
2
|
+
TargetRubyVersion: 2.5
|
3
3
|
|
4
|
-
Layout/
|
4
|
+
Layout/ParameterAlignment:
|
5
5
|
Enabled: true
|
6
6
|
EnforcedStyle: with_fixed_indentation
|
7
7
|
|
@@ -33,4 +33,5 @@ Style/DoubleNegation:
|
|
33
33
|
|
34
34
|
Metrics/BlockLength:
|
35
35
|
Exclude:
|
36
|
+
- '*.gemspec'
|
36
37
|
- 'spec/**/*_spec.rb'
|
data/Gemfile
CHANGED
@@ -1,18 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
group :development do
|
4
|
-
gem 'rubocop', '~> 0.75'
|
5
|
-
end
|
1
|
+
# frozen_string_literal: true
|
6
2
|
|
7
|
-
|
8
|
-
gem 'pry'
|
9
|
-
end
|
10
|
-
|
11
|
-
group :test do
|
12
|
-
gem 'codecov', require: false
|
13
|
-
gem 'rspec', '~> 3.8'
|
14
|
-
gem 'simplecov', '~> 0.17', require: false
|
15
|
-
gem 'webmock', '~> 3.7'
|
16
|
-
end
|
3
|
+
source 'https://rubygems.org'
|
17
4
|
|
18
5
|
gemspec
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -32,7 +32,7 @@ client = MailerLite::Client.new(api_key: 'my-secret-api-key')
|
|
32
32
|
Example:
|
33
33
|
|
34
34
|
```ruby
|
35
|
-
client.
|
35
|
+
client.groups
|
36
36
|
```
|
37
37
|
|
38
38
|
Or create file under `config/initializers/mailerlite.rb`
|
@@ -59,13 +59,12 @@ See more documentation in [examples][examples] directory.
|
|
59
59
|
This library aims to support and is [tested against][github_actions] the following Ruby
|
60
60
|
implementations:
|
61
61
|
|
62
|
-
* Ruby 2.3.0
|
63
|
-
* Ruby 2.4.0
|
64
62
|
* Ruby 2.5.0
|
65
63
|
* Ruby 2.6.0
|
64
|
+
* Ruby 2.7.0
|
66
65
|
|
67
66
|
## Copyright
|
68
|
-
Copyright (c)
|
67
|
+
Copyright (c) 2020 Justas Palumickas. See [LICENSE][github_actions] for details.
|
69
68
|
|
70
69
|
[rubygems]: https://rubygems.org/gems/mailerlite
|
71
70
|
[codecov]: https://codecov.io/gh/jpalumickas/mailerlite-ruby
|
data/examples/authentication.md
CHANGED
@@ -13,7 +13,7 @@ client = MailerLite::Client.new(api_key: 'my-secret-api-key')
|
|
13
13
|
Example:
|
14
14
|
|
15
15
|
```ruby
|
16
|
-
client.
|
16
|
+
client.groups
|
17
17
|
```
|
18
18
|
|
19
19
|
## Using global class config
|
@@ -32,7 +32,7 @@ on `MailerLite` class directly.
|
|
32
32
|
Example:
|
33
33
|
|
34
34
|
```ruby
|
35
|
-
MailerLite.
|
35
|
+
MailerLite.groups
|
36
36
|
```
|
37
37
|
|
38
38
|
[mailerlite]: https://www.mailerlite.com
|
data/examples/create_campaign.md
CHANGED
@@ -33,8 +33,8 @@ html = "<div>Welcome,<br /><a href=\"{$unsubscribe}\">Unsubscribe</a></div>"
|
|
33
33
|
plain_text = 'Welcome, {$unsubscribe} {$url}'
|
34
34
|
client.update_campaign_content(campaign.id, html: html, plain: plain_text )
|
35
35
|
```
|
36
|
-
|
37
|
-
|
36
|
+
`{$url}` must be exist in plain text.
|
37
|
+
`{$unsubscribe}` must be exist in both plain text and html. See the [API documentation](http://developers.mailerlite.com/reference#put-custom-content-to-campaign).
|
38
38
|
|
39
39
|
##6. Send the campaign
|
40
40
|
```ruby
|
data/lib/mailerlite/version.rb
CHANGED
data/mailerlite.gemspec
CHANGED
@@ -30,11 +30,17 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.bindir = 'exe'
|
31
31
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
32
32
|
spec.require_paths = ['lib']
|
33
|
-
spec.required_ruby_version = '>= 2.
|
33
|
+
spec.required_ruby_version = '>= 2.5.0'
|
34
34
|
|
35
|
-
spec.add_dependency 'faraday', '~> 0.
|
36
|
-
spec.add_dependency 'faraday_middleware', '~> 0
|
35
|
+
spec.add_dependency 'faraday', '~> 1.0', '>= 1.0.1'
|
36
|
+
spec.add_dependency 'faraday_middleware', '~> 1.0'
|
37
37
|
spec.add_dependency 'hashie', '>= 3.5.5'
|
38
38
|
|
39
|
+
spec.add_development_dependency 'codecov', '~> 0.1'
|
40
|
+
spec.add_development_dependency 'pry', '~> 0.13'
|
39
41
|
spec.add_development_dependency 'rake', '~> 13.0'
|
42
|
+
spec.add_development_dependency 'rspec', '~> 3.9'
|
43
|
+
spec.add_development_dependency 'rubocop', '~> 0.82'
|
44
|
+
spec.add_development_dependency 'simplecov', '~> 0.18'
|
45
|
+
spec.add_development_dependency 'webmock', '~> 3.8'
|
40
46
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mailerlite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justas Palumickas
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -16,28 +16,34 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0
|
19
|
+
version: '1.0'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 1.0.1
|
20
23
|
type: :runtime
|
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: '0
|
29
|
+
version: '1.0'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.0.1
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: faraday_middleware
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
37
|
- - "~>"
|
32
38
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0
|
39
|
+
version: '1.0'
|
34
40
|
type: :runtime
|
35
41
|
prerelease: false
|
36
42
|
version_requirements: !ruby/object:Gem::Requirement
|
37
43
|
requirements:
|
38
44
|
- - "~>"
|
39
45
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0
|
46
|
+
version: '1.0'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: hashie
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,6 +58,34 @@ dependencies:
|
|
52
58
|
- - ">="
|
53
59
|
- !ruby/object:Gem::Version
|
54
60
|
version: 3.5.5
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: codecov
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0.1'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0.1'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: pry
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0.13'
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0.13'
|
55
89
|
- !ruby/object:Gem::Dependency
|
56
90
|
name: rake
|
57
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,6 +100,62 @@ dependencies:
|
|
66
100
|
- - "~>"
|
67
101
|
- !ruby/object:Gem::Version
|
68
102
|
version: '13.0'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: rspec
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '3.9'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '3.9'
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: rubocop
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - "~>"
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0.82'
|
124
|
+
type: :development
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - "~>"
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0.82'
|
131
|
+
- !ruby/object:Gem::Dependency
|
132
|
+
name: simplecov
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - "~>"
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0.18'
|
138
|
+
type: :development
|
139
|
+
prerelease: false
|
140
|
+
version_requirements: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - "~>"
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0.18'
|
145
|
+
- !ruby/object:Gem::Dependency
|
146
|
+
name: webmock
|
147
|
+
requirement: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - "~>"
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '3.8'
|
152
|
+
type: :development
|
153
|
+
prerelease: false
|
154
|
+
version_requirements: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - "~>"
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '3.8'
|
69
159
|
description: Ruby gem for MailerLite API v2
|
70
160
|
email:
|
71
161
|
- jpalumickas@gmail.com
|
@@ -131,14 +221,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
131
221
|
requirements:
|
132
222
|
- - ">="
|
133
223
|
- !ruby/object:Gem::Version
|
134
|
-
version: 2.
|
224
|
+
version: 2.5.0
|
135
225
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
226
|
requirements:
|
137
227
|
- - ">="
|
138
228
|
- !ruby/object:Gem::Version
|
139
229
|
version: '0'
|
140
230
|
requirements: []
|
141
|
-
rubygems_version: 3.
|
231
|
+
rubygems_version: 3.1.2
|
142
232
|
signing_key:
|
143
233
|
specification_version: 4
|
144
234
|
summary: Ruby wrapper for MailerLite API v2
|