mailerlite 1.4.0 → 1.5.0
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 +5 -5
- data/.rubocop.yml +11 -11
- data/.travis.yml +21 -8
- data/Gemfile +4 -7
- data/LICENSE +1 -1
- data/README.md +9 -9
- data/examples/README.md +1 -0
- data/examples/account.md +13 -0
- data/lib/mailerlite/client.rb +2 -0
- data/lib/mailerlite/clients/account.rb +25 -0
- data/lib/mailerlite/version.rb +1 -1
- data/mailerlite.gemspec +2 -3
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: cd23dc2ec23c3c43f69100a4364552863c129120aba799d958469498fc496955
|
4
|
+
data.tar.gz: 859243ce1df88f9ebb72510c60c581c840428f27e9d9520a728955f01325f0fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab2d5eab31659e262abbfd75702bc6d2b2f75d62c596c0d2649cdcfea28ecfc552fd556538333463e2a0d8ba3483641b1de488e94fa69975bfdbddb7e4c585fe
|
7
|
+
data.tar.gz: 7b1b9ddfcce2ad70adce7bcbc954b1bada7c6da4d21eb4c21457156dddafc072dd793b4ae6cf484313d7ea1ab5914400afac960a1f27bddaa26074e8b32a1e0c
|
data/.rubocop.yml
CHANGED
@@ -1,39 +1,39 @@
|
|
1
1
|
AllCops:
|
2
|
-
TargetRubyVersion: 2.
|
2
|
+
TargetRubyVersion: 2.1
|
3
3
|
Include:
|
4
4
|
- '**/Rakefile'
|
5
5
|
- '**/Gemfile'
|
6
6
|
|
7
|
-
|
8
|
-
Enabled: false
|
9
|
-
|
10
|
-
Style/AlignParameters:
|
7
|
+
Layout/AlignParameters:
|
11
8
|
Enabled: true
|
12
9
|
EnforcedStyle: with_fixed_indentation
|
13
10
|
|
14
|
-
|
11
|
+
Layout/MultilineOperationIndentation:
|
15
12
|
Enabled: true
|
16
13
|
EnforcedStyle: indented
|
17
14
|
|
18
|
-
|
15
|
+
Layout/MultilineMethodCallIndentation:
|
19
16
|
Enabled: true
|
20
17
|
EnforcedStyle: indented
|
21
18
|
|
22
|
-
|
19
|
+
Layout/CaseIndentation:
|
23
20
|
Enabled: true
|
24
21
|
EnforcedStyle: end
|
25
22
|
|
26
|
-
|
23
|
+
Layout/EndAlignment:
|
27
24
|
Enabled: true
|
28
25
|
EnforcedStyleAlignWith: variable
|
29
26
|
|
30
27
|
Style/FrozenStringLiteralComment:
|
31
28
|
Enabled: false
|
32
29
|
|
30
|
+
Style/Documentation:
|
31
|
+
Enabled: false
|
32
|
+
|
33
33
|
Style/DoubleNegation:
|
34
34
|
Exclude:
|
35
35
|
- 'lib/mailerlite/utils.rb'
|
36
36
|
|
37
37
|
Metrics/BlockLength:
|
38
|
-
|
39
|
-
- '
|
38
|
+
Exclude:
|
39
|
+
- 'spec/**/*_spec.rb'
|
data/.travis.yml
CHANGED
@@ -1,23 +1,36 @@
|
|
1
1
|
sudo: false
|
2
|
-
|
3
|
-
before_install:
|
4
|
-
- gem install bundler
|
5
|
-
|
6
2
|
bundler_args: --without development
|
7
3
|
|
8
|
-
|
9
|
-
|
4
|
+
cache:
|
5
|
+
bundler: true
|
10
6
|
|
11
|
-
|
7
|
+
env:
|
8
|
+
global:
|
9
|
+
- CC_TEST_REPORTER_ID=1da21a01a5e29b3624aa81523fe36983a2b8d785f18046de30c17e1b6da1563a
|
12
10
|
|
11
|
+
language: ruby
|
13
12
|
rvm:
|
14
|
-
- 2.0.0
|
15
13
|
- 2.1.0
|
16
14
|
- 2.2.0
|
17
15
|
- 2.3.0
|
18
16
|
- 2.4.0
|
17
|
+
- 2.5.0
|
19
18
|
- ruby-head
|
20
19
|
|
20
|
+
before_install:
|
21
|
+
- gem update --system
|
22
|
+
|
23
|
+
before_script:
|
24
|
+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
25
|
+
- chmod +x ./cc-test-reporter
|
26
|
+
- ./cc-test-reporter before-build
|
27
|
+
|
28
|
+
script:
|
29
|
+
- bundle exec rspec
|
30
|
+
|
31
|
+
after_script:
|
32
|
+
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
33
|
+
|
21
34
|
matrix:
|
22
35
|
allow_failures:
|
23
36
|
- rvm: ruby-head
|
data/Gemfile
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
3
|
group :development do
|
4
|
-
gem '
|
5
|
-
gem 'rubocop', '~> 0.48'
|
4
|
+
gem 'rubocop', '~> 0.53'
|
6
5
|
end
|
7
6
|
|
8
7
|
group :development, :test do
|
@@ -10,12 +9,10 @@ group :development, :test do
|
|
10
9
|
end
|
11
10
|
|
12
11
|
group :test do
|
13
|
-
gem 'codeclimate-test-reporter', '~> 1.0', require: false
|
14
|
-
gem 'coveralls', '~> 0.8', require: false
|
15
12
|
gem 'rake' # For Travis CI
|
16
|
-
gem 'rspec', '~> 3.
|
17
|
-
gem 'simplecov', '~> 0.
|
18
|
-
gem 'webmock', '~>
|
13
|
+
gem 'rspec', '~> 3.7'
|
14
|
+
gem 'simplecov', '~> 0.15', require: false
|
15
|
+
gem 'webmock', '~> 3.3'
|
19
16
|
end
|
20
17
|
|
21
18
|
gemspec
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
A Ruby gem which helps to communicate with [MailerLite][mailerlite] API.
|
4
4
|
|
5
|
-
[][rubygems]
|
6
|
+
[][travis]
|
7
|
+
[][gemnasium]
|
8
|
+
[][codeclimate]
|
9
|
+
[][codeclimate_coverage]
|
10
10
|
|
11
11
|
## Installation
|
12
12
|
|
@@ -62,20 +62,20 @@ See more documentation in [examples][examples] directory.
|
|
62
62
|
This library aims to support and is [tested against][travis] the following Ruby
|
63
63
|
implementations:
|
64
64
|
|
65
|
-
* Ruby 2.0.0
|
66
65
|
* Ruby 2.1.0
|
67
66
|
* Ruby 2.2.0
|
68
67
|
* Ruby 2.3.0
|
69
68
|
* Ruby 2.4.0
|
69
|
+
* Ruby 2.5.0
|
70
70
|
|
71
71
|
## Copyright
|
72
|
-
Copyright (c)
|
72
|
+
Copyright (c) 2018 Justas Palumickas. See [LICENSE][license] for details.
|
73
73
|
|
74
74
|
[rubygems]: https://rubygems.org/gems/mailerlite
|
75
|
-
[travis]:
|
75
|
+
[travis]: https://travis-ci.org/jpalumickas/mailerlite-ruby
|
76
76
|
[gemnasium]: https://gemnasium.com/jpalumickas/mailerlite-ruby
|
77
|
-
[coveralls]: https://coveralls.io/r/jpalumickas/mailerlite-ruby
|
78
77
|
[codeclimate]: https://codeclimate.com/github/jpalumickas/mailerlite-ruby
|
78
|
+
[codeclimate_coverage]: https://codeclimate.com/github/jpalumickas/mailerlite-ruby/test_coverage
|
79
79
|
|
80
80
|
[license]: https://raw.githubusercontent.com/jpalumickas/mailerlite-ruby/master/LICENSE
|
81
81
|
[create_a_campaign]: https://raw.githubusercontent.com/jpalumickas/mailerlite-ruby/master/examples/create_campaign.md
|
data/examples/README.md
CHANGED
data/examples/account.md
ADDED
data/lib/mailerlite/client.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'mailerlite/connection'
|
2
2
|
require 'mailerlite/configuration'
|
3
3
|
|
4
|
+
require 'mailerlite/clients/account'
|
4
5
|
require 'mailerlite/clients/campaigns'
|
5
6
|
require 'mailerlite/clients/fields'
|
6
7
|
require 'mailerlite/clients/groups'
|
@@ -10,6 +11,7 @@ require 'mailerlite/clients/webhooks'
|
|
10
11
|
module MailerLite
|
11
12
|
# Wrapper class for all actions.
|
12
13
|
class Client
|
14
|
+
include MailerLite::Clients::Account
|
13
15
|
include MailerLite::Clients::Campaigns
|
14
16
|
include MailerLite::Clients::Fields
|
15
17
|
include MailerLite::Clients::Groups
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module MailerLite
|
2
|
+
module Clients
|
3
|
+
# MailerLite Account
|
4
|
+
module Account
|
5
|
+
# Get account information.
|
6
|
+
#
|
7
|
+
# @see https://developers.mailerlite.com/v2/reference#account
|
8
|
+
#
|
9
|
+
# @return [Hash] Response from API.
|
10
|
+
def account
|
11
|
+
result = connection.get('me')
|
12
|
+
result && result.account
|
13
|
+
end
|
14
|
+
|
15
|
+
# Get account information.
|
16
|
+
#
|
17
|
+
# @see https://developers.mailerlite.com/v2/reference#stats
|
18
|
+
#
|
19
|
+
# @return [Hash] Response from API.
|
20
|
+
def stats
|
21
|
+
connection.get('stats')
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/mailerlite/version.rb
CHANGED
data/mailerlite.gemspec
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
lib = File.expand_path('../lib', __FILE__)
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
4
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
3
|
require 'mailerlite/version'
|
6
4
|
|
@@ -23,6 +21,7 @@ Gem::Specification.new do |spec|
|
|
23
21
|
spec.bindir = 'exe'
|
24
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
23
|
spec.require_paths = ['lib']
|
24
|
+
spec.required_ruby_version = '>= 2.1.0'
|
26
25
|
|
27
26
|
spec.add_dependency 'faraday', '~> 0.10'
|
28
27
|
spec.add_dependency 'faraday_middleware', '~> 0.10'
|
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.5.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: 2018-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -100,6 +100,7 @@ files:
|
|
100
100
|
- bin/console
|
101
101
|
- bin/setup
|
102
102
|
- examples/README.md
|
103
|
+
- examples/account.md
|
103
104
|
- examples/authentication.md
|
104
105
|
- examples/campaigns.md
|
105
106
|
- examples/create_campaign.md
|
@@ -109,6 +110,7 @@ files:
|
|
109
110
|
- examples/webhooks.md
|
110
111
|
- lib/mailerlite.rb
|
111
112
|
- lib/mailerlite/client.rb
|
113
|
+
- lib/mailerlite/clients/account.rb
|
112
114
|
- lib/mailerlite/clients/campaigns.rb
|
113
115
|
- lib/mailerlite/clients/fields.rb
|
114
116
|
- lib/mailerlite/clients/groups.rb
|
@@ -136,7 +138,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
136
138
|
requirements:
|
137
139
|
- - ">="
|
138
140
|
- !ruby/object:Gem::Version
|
139
|
-
version:
|
141
|
+
version: 2.1.0
|
140
142
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
141
143
|
requirements:
|
142
144
|
- - ">="
|
@@ -144,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
146
|
version: '0'
|
145
147
|
requirements: []
|
146
148
|
rubyforge_project:
|
147
|
-
rubygems_version: 2.6
|
149
|
+
rubygems_version: 2.7.6
|
148
150
|
signing_key:
|
149
151
|
specification_version: 4
|
150
152
|
summary: Ruby wrapper for MailerLite API v2
|