mailerlite 1.12.0 → 1.13.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: 04f57fa638110e54a96f4c7a0cf9f9027736d3237663074ededcd614fd86af81
4
- data.tar.gz: 5562645c220260c6b5350bcfdca83595d6cbb6f7559cb4a69da75c09f6e6cc25
3
+ metadata.gz: 359210ce363c788f0ad34e533a7d50a9a919f19da5bad287e6515257cad743b2
4
+ data.tar.gz: 1ce825edb310b2c63fa9c7d764c15ddfdf6996d344fafdc618af2c036ca1510d
5
5
  SHA512:
6
- metadata.gz: d0c1f531cd080e115e341609764ed7192e3ca9cdebcb1fa4e0088e465388f73502dde00103443d3dbbea8553edfc2fc543fcd2041c103c8de6296f31f1c18882
7
- data.tar.gz: d3e3f86c1a70719330ff1e9cacaa53180522c58ff7a95eb636df51c1b7b27ad14ad2b83a7443756a435e54d5b093f5100accb2baf402798cc55df77a766897bb
6
+ metadata.gz: d8e88a6dcd36f6bd11c64fd3fadf3ca20a19408097a9ecb860d94645d0cc804cfd434768bf31ec000333407118b2a59da5032d01cabbaa7ccaa6703121898c90
7
+ data.tar.gz: f33f19f0b3bab8bba2dd540ba29000e6c34119e20aca63ea088b17f7cfc9bc3624117440435eba5d56c0c82d057b64ee2502b3831eb640f3af3d6020c279e2c8
@@ -0,0 +1,11 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "bundler"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "daily"
7
+
8
+ - package-ecosystem: "github-actions"
9
+ directory: "/"
10
+ schedule:
11
+ interval: "daily"
@@ -7,20 +7,18 @@ jobs:
7
7
  name: Test
8
8
  strategy:
9
9
  matrix:
10
- ruby: [2.5, 2.6, 2.7]
10
+ ruby: [2.5, 2.6, 2.7, '3.0', head, truffleruby]
11
11
 
12
12
  runs-on: ubuntu-latest
13
13
 
14
14
  steps:
15
- - uses: actions/checkout@v1
15
+ - uses: actions/checkout@v2
16
16
  - name: Set up Ruby ${{ matrix.ruby }}
17
- uses: actions/setup-ruby@v1
17
+ uses: ruby/setup-ruby@v1
18
18
  with:
19
19
  ruby-version: ${{ matrix.ruby }}
20
- - name: Install dependencies
21
- run: |
22
- gem install bundler
23
- bundle install --jobs 4 --retry 3
20
+ bundler-cache: true
21
+
24
22
  - name: RSpec
25
23
  env:
26
24
  CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
@@ -32,11 +30,13 @@ jobs:
32
30
  runs-on: ubuntu-latest
33
31
 
34
32
  steps:
35
- - uses: actions/checkout@v1
33
+ - uses: actions/checkout@v2.3.4
36
34
  - name: Set up Ruby
37
- uses: actions/setup-ruby@v1
35
+ uses: ruby/setup-ruby@v1
38
36
  with:
39
- ruby-version: 2.7
37
+ ruby-version: '3.0'
38
+ bundler-cache: true
39
+
40
40
  - name: Install dependencies
41
41
  run: |
42
42
  gem install bundler
@@ -32,7 +32,13 @@ Style/DoubleNegation:
32
32
  Exclude:
33
33
  - 'lib/mailerlite/utils.rb'
34
34
 
35
+ Style/OptionalBooleanParameter:
36
+ Enabled: false
37
+
35
38
  Metrics/BlockLength:
36
39
  Exclude:
37
40
  - '*.gemspec'
38
41
  - 'spec/**/*_spec.rb'
42
+
43
+ Lint/MissingSuper:
44
+ Enabled: false
data/README.md CHANGED
@@ -63,10 +63,12 @@ implementations:
63
63
  * Ruby 2.5.0
64
64
  * Ruby 2.6.0
65
65
  * Ruby 2.7.0
66
+ * Ruby 3.0.0
67
+ * Truffleruby
66
68
 
67
69
  ## License
68
70
 
69
- The package is available as open source under the terms of the [MIT License][license].
71
+ The gem is available as open source under the terms of the [MIT License][license].
70
72
 
71
73
  [rubygems]: https://rubygems.org/gems/mailerlite
72
74
  [codecov]: https://codecov.io/gh/jpalumickas/mailerlite-ruby
@@ -33,7 +33,7 @@ client.create_subscriber(email: 'john@example.com', name: 'John Smith')
33
33
  ## Update single subscriber
34
34
 
35
35
  ```ruby
36
- client.update_subscriber(subscriber_id options)
36
+ client.update_subscriber(subscriber_id, options)
37
37
  ```
38
38
 
39
39
  or with email
@@ -37,12 +37,10 @@ module MailerLite
37
37
  private
38
38
 
39
39
  def request(method, path, query_params = {}, body_params = {})
40
- response = connection.send(method, path) do |request|
40
+ connection.send(method, path) do |request|
41
41
  request.params = query_params unless query_params.empty?
42
42
  request.body = body_params.to_json unless body_params.empty?
43
43
  end
44
-
45
- response
46
44
  end
47
45
 
48
46
  def connection
@@ -4,10 +4,10 @@ module MailerLite
4
4
  module Middleware
5
5
  # This middleware will convert empty response to {}
6
6
  class FixUnparsedJson < Faraday::Response::Middleware
7
- private
7
+ def parse(body)
8
+ return '{}' if body == ''
8
9
 
9
- def on_complete(response)
10
- response[:body] = {} if response[:body] == ''
10
+ body
11
11
  end
12
12
  end
13
13
  end
@@ -6,8 +6,6 @@ module MailerLite
6
6
  # This class raises an exception based HTTP status codes returned
7
7
  # by the API.
8
8
  class RaiseError < Faraday::Response::Middleware
9
- private
10
-
11
9
  def on_complete(response)
12
10
  error = MailerLite::Error.from_response(response)
13
11
  raise error if error
@@ -4,12 +4,12 @@ module MailerLite
4
4
  module Middleware
5
5
  # This class will underscore all response keys from CamelCase.
6
6
  class UnderscoreKeys < Faraday::Response::Middleware
7
- private
8
-
9
7
  def on_complete(response)
10
8
  response[:body] = updated_response(response[:body])
11
9
  end
12
10
 
11
+ private
12
+
13
13
  def updated_response(response)
14
14
  if response.is_a?(Hash)
15
15
  underscore_hash_keys(response)
@@ -2,5 +2,5 @@
2
2
 
3
3
  module MailerLite
4
4
  # @return [String] Version number.
5
- VERSION = '1.12.0'
5
+ VERSION = '1.13.0'
6
6
  end
@@ -34,13 +34,13 @@ Gem::Specification.new do |spec|
34
34
 
35
35
  spec.add_dependency 'faraday', '~> 1.0', '>= 1.0.1'
36
36
  spec.add_dependency 'faraday_middleware', '~> 1.0'
37
- spec.add_dependency 'hashie', '>= 3.5.5'
37
+ spec.add_dependency 'hashie', '~> 4.0'
38
38
 
39
- spec.add_development_dependency 'codecov', '~> 0.1'
39
+ # spec.add_development_dependency 'codecov', '~> 0.2', '>= 0.2.12'
40
40
  spec.add_development_dependency 'pry', '~> 0.13'
41
41
  spec.add_development_dependency 'rake', '~> 13.0'
42
- spec.add_development_dependency 'rspec', '~> 3.9'
43
- spec.add_development_dependency 'rubocop', '~> 0.86'
44
- spec.add_development_dependency 'simplecov', '~> 0.18'
45
- spec.add_development_dependency 'webmock', '~> 3.8'
42
+ spec.add_development_dependency 'rspec', '~> 3.10'
43
+ spec.add_development_dependency 'rubocop', '~> 1.8'
44
+ spec.add_development_dependency 'simplecov', '~> 0.20'
45
+ spec.add_development_dependency 'webmock', '~> 3.11'
46
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.12.0
4
+ version: 1.13.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: 2020-06-29 00:00:00.000000000 Z
11
+ date: 2021-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -46,32 +46,18 @@ dependencies:
46
46
  version: '1.0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: hashie
49
- requirement: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - ">="
52
- - !ruby/object:Gem::Version
53
- version: 3.5.5
54
- type: :runtime
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- version: 3.5.5
61
- - !ruby/object:Gem::Dependency
62
- name: codecov
63
49
  requirement: !ruby/object:Gem::Requirement
64
50
  requirements:
65
51
  - - "~>"
66
52
  - !ruby/object:Gem::Version
67
- version: '0.1'
68
- type: :development
53
+ version: '4.0'
54
+ type: :runtime
69
55
  prerelease: false
70
56
  version_requirements: !ruby/object:Gem::Requirement
71
57
  requirements:
72
58
  - - "~>"
73
59
  - !ruby/object:Gem::Version
74
- version: '0.1'
60
+ version: '4.0'
75
61
  - !ruby/object:Gem::Dependency
76
62
  name: pry
77
63
  requirement: !ruby/object:Gem::Requirement
@@ -106,56 +92,56 @@ dependencies:
106
92
  requirements:
107
93
  - - "~>"
108
94
  - !ruby/object:Gem::Version
109
- version: '3.9'
95
+ version: '3.10'
110
96
  type: :development
111
97
  prerelease: false
112
98
  version_requirements: !ruby/object:Gem::Requirement
113
99
  requirements:
114
100
  - - "~>"
115
101
  - !ruby/object:Gem::Version
116
- version: '3.9'
102
+ version: '3.10'
117
103
  - !ruby/object:Gem::Dependency
118
104
  name: rubocop
119
105
  requirement: !ruby/object:Gem::Requirement
120
106
  requirements:
121
107
  - - "~>"
122
108
  - !ruby/object:Gem::Version
123
- version: '0.86'
109
+ version: '1.8'
124
110
  type: :development
125
111
  prerelease: false
126
112
  version_requirements: !ruby/object:Gem::Requirement
127
113
  requirements:
128
114
  - - "~>"
129
115
  - !ruby/object:Gem::Version
130
- version: '0.86'
116
+ version: '1.8'
131
117
  - !ruby/object:Gem::Dependency
132
118
  name: simplecov
133
119
  requirement: !ruby/object:Gem::Requirement
134
120
  requirements:
135
121
  - - "~>"
136
122
  - !ruby/object:Gem::Version
137
- version: '0.18'
123
+ version: '0.20'
138
124
  type: :development
139
125
  prerelease: false
140
126
  version_requirements: !ruby/object:Gem::Requirement
141
127
  requirements:
142
128
  - - "~>"
143
129
  - !ruby/object:Gem::Version
144
- version: '0.18'
130
+ version: '0.20'
145
131
  - !ruby/object:Gem::Dependency
146
132
  name: webmock
147
133
  requirement: !ruby/object:Gem::Requirement
148
134
  requirements:
149
135
  - - "~>"
150
136
  - !ruby/object:Gem::Version
151
- version: '3.8'
137
+ version: '3.11'
152
138
  type: :development
153
139
  prerelease: false
154
140
  version_requirements: !ruby/object:Gem::Requirement
155
141
  requirements:
156
142
  - - "~>"
157
143
  - !ruby/object:Gem::Version
158
- version: '3.8'
144
+ version: '3.11'
159
145
  description: Ruby gem for MailerLite API v2
160
146
  email:
161
147
  - jpalumickas@gmail.com
@@ -163,6 +149,7 @@ executables: []
163
149
  extensions: []
164
150
  extra_rdoc_files: []
165
151
  files:
152
+ - ".github/dependabot.yml"
166
153
  - ".github/workflows/test.yml"
167
154
  - ".gitignore"
168
155
  - ".hound.yml"
@@ -228,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
228
215
  - !ruby/object:Gem::Version
229
216
  version: '0'
230
217
  requirements: []
231
- rubygems_version: 3.1.2
218
+ rubygems_version: 3.2.5
232
219
  signing_key:
233
220
  specification_version: 4
234
221
  summary: Ruby wrapper for MailerLite API v2