mailerlite-ruby 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.env.example +1 -0
- data/.github/workflows/main.yml +17 -0
- data/.github/workflows/publish_gem.yml +21 -0
- data/.gitignore +60 -0
- data/.rspec +1 -0
- data/.rubocop.yml +36 -0
- data/CHANGELOG.md +1 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +801 -0
- data/Rakefile +8 -0
- data/bin/console +8 -0
- data/bin/setup +8 -0
- data/fixtures/automations/fetch.yml +61 -0
- data/fixtures/automations/get.yml +68 -0
- data/fixtures/automations/get_subscriber_activity.yml +71 -0
- data/fixtures/batch/request.yml +59 -0
- data/fixtures/campaigns/activity.yml +64 -0
- data/fixtures/campaigns/create.yml +65 -0
- data/fixtures/campaigns/delete.yml +53 -0
- data/fixtures/campaigns/fetch.yml +64 -0
- data/fixtures/campaigns/get.yml +68 -0
- data/fixtures/campaigns/languages.yml +60 -0
- data/fixtures/campaigns/schedule.yml +160 -0
- data/fixtures/campaigns/update.yml +159 -0
- data/fixtures/fields/create.yml +57 -0
- data/fixtures/fields/delete.yml +53 -0
- data/fixtures/fields/get.yml +60 -0
- data/fixtures/fields/update.yml +57 -0
- data/fixtures/forms/delete.yml +53 -0
- data/fixtures/forms/fetch.yml +60 -0
- data/fixtures/forms/fetch_subscribers.yml +59 -0
- data/fixtures/forms/list.yml +62 -0
- data/fixtures/forms/update.yml +60 -0
- data/fixtures/groups/assign_subscriber.yml +58 -0
- data/fixtures/groups/create.yml +58 -0
- data/fixtures/groups/delete.yml +53 -0
- data/fixtures/groups/get.yml +63 -0
- data/fixtures/groups/get_subscribers.yml +62 -0
- data/fixtures/groups/unassign_subscriber.yml +53 -0
- data/fixtures/groups/update.yml +58 -0
- data/fixtures/segments/delete.yml +53 -0
- data/fixtures/segments/get_subscribers.yml +61 -0
- data/fixtures/segments/list.yml +60 -0
- data/fixtures/segments/update.yml +58 -0
- data/fixtures/subscribers/create.yml +57 -0
- data/fixtures/subscribers/delete.yml +51 -0
- data/fixtures/subscribers/fetch.yml +68 -0
- data/fixtures/subscribers/fetch_count.yml +55 -0
- data/fixtures/subscribers/get.yml +62 -0
- data/fixtures/timezones/list.yml +575 -0
- data/fixtures/webhooks/create.yml +58 -0
- data/fixtures/webhooks/delete.yml +53 -0
- data/fixtures/webhooks/get.yml +58 -0
- data/fixtures/webhooks/list.yml +61 -0
- data/fixtures/webhooks/update.yml +58 -0
- data/lib/mailerlite/automations/automations.rb +62 -0
- data/lib/mailerlite/batch/batch.rb +24 -0
- data/lib/mailerlite/campaigns/campaigns.rb +216 -0
- data/lib/mailerlite/client.rb +35 -0
- data/lib/mailerlite/fields/fields.rb +61 -0
- data/lib/mailerlite/forms/forms.rb +73 -0
- data/lib/mailerlite/groups/groups.rb +90 -0
- data/lib/mailerlite/segments/segments.rb +62 -0
- data/lib/mailerlite/subscribers/subscribers.rb +116 -0
- data/lib/mailerlite/timezones/timezones.rb +22 -0
- data/lib/mailerlite/version.rb +5 -0
- data/lib/mailerlite/webhooks/webhooks.rb +67 -0
- data/lib/mailerlite-ruby.rb +3 -0
- data/lib/mailerlite.rb +13 -0
- data/mailerlite-ruby.gemspec +42 -0
- data/renovate.json +5 -0
- data/spec/automations_rspec.rb +63 -0
- data/spec/batches_rspec.rb +41 -0
- data/spec/campaigns_rspec.rb +155 -0
- data/spec/fields_rspec.rb +70 -0
- data/spec/forms_rspec.rb +81 -0
- data/spec/groups_rspec.rb +97 -0
- data/spec/segments_rspec.rb +70 -0
- data/spec/spec_helper.rb +101 -0
- data/spec/subscribers_rspec.rb +84 -0
- data/spec/timezones_rspec.rb +36 -0
- data/spec/webhooks_rspec.rb +86 -0
- metadata +303 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7d5f532e0ab219dc826f2a5cda903ab683f270525335e58d2b615a0d737421a7
|
4
|
+
data.tar.gz: f1dca6e4e42b67cc04c7be3145aef81eb742d2e5d128fa0613eb5e4c1a0bf74b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 70fb10981c957b5b8eb6d3e476e5e3d08bd6d66a62bca007c0f66da9aacc5c85b0cb7c25ffbc4e4fe2c96839205a5a1774ff4cc7ecfaabe4e7558e65b8db2d07
|
7
|
+
data.tar.gz: 5489f2134e17d7197880e09762df17e7e737fb89b20a6a88d5b7cdc0dbbc61364de7820e96459b13034b386b987049eaa34402dc9f00a0900b020218caa58f8d
|
data/.env.example
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
MAILERLITE_API_TOKEN="superlongkey"
|
@@ -0,0 +1,17 @@
|
|
1
|
+
name: Ruby
|
2
|
+
|
3
|
+
on: [push,pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
steps:
|
9
|
+
- uses: actions/checkout@v3
|
10
|
+
- name: Set up Ruby
|
11
|
+
uses: ruby/setup-ruby@v1
|
12
|
+
with:
|
13
|
+
ruby-version: 3.0
|
14
|
+
- name: Install bundle deps
|
15
|
+
run: bundle i
|
16
|
+
- name: Run tests
|
17
|
+
run: export MAILERLITE_API_TOKEN=dummy_token && bundle exec rspec spec/*rspec.rb
|
@@ -0,0 +1,21 @@
|
|
1
|
+
name: Publish Gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- v*
|
7
|
+
jobs:
|
8
|
+
build:
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@v3
|
13
|
+
|
14
|
+
- name: Release Gem
|
15
|
+
if: contains(github.ref, 'refs/tags/v')
|
16
|
+
uses: cadwallion/publish-rubygems-action@master
|
17
|
+
env:
|
18
|
+
GITHUB_TOKEN: ${{secrets.GITHUBTOKEN}}
|
19
|
+
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
|
20
|
+
RELEASE_COMMAND: rake release
|
21
|
+
|
data/.gitignore
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
.env
|
2
|
+
.idea
|
3
|
+
.DS_Store
|
4
|
+
|
5
|
+
*.gem
|
6
|
+
*.rbc
|
7
|
+
/.config
|
8
|
+
/coverage/
|
9
|
+
/InstalledFiles
|
10
|
+
/pkg/
|
11
|
+
/spec/reports/
|
12
|
+
/spec/examples.txt
|
13
|
+
/test/tmp/
|
14
|
+
/test/version_tmp/
|
15
|
+
/tmp/
|
16
|
+
|
17
|
+
# Used by dotenv library to load environment variables.
|
18
|
+
# .env
|
19
|
+
|
20
|
+
# Ignore Byebug command history file.
|
21
|
+
.byebug_history
|
22
|
+
|
23
|
+
## Specific to RubyMotion:
|
24
|
+
.dat*
|
25
|
+
.repl_history
|
26
|
+
build/
|
27
|
+
*.bridgesupport
|
28
|
+
build-iPhoneOS/
|
29
|
+
build-iPhoneSimulator/
|
30
|
+
|
31
|
+
## Specific to RubyMotion (use of CocoaPods):
|
32
|
+
#
|
33
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
34
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
35
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
36
|
+
#
|
37
|
+
# vendor/Pods/
|
38
|
+
|
39
|
+
## Documentation cache and generated files:
|
40
|
+
/.yardoc/
|
41
|
+
/_yardoc/
|
42
|
+
/doc/
|
43
|
+
/rdoc/
|
44
|
+
|
45
|
+
## Environment normalization:
|
46
|
+
/.bundle/
|
47
|
+
/vendor/bundle
|
48
|
+
/lib/bundler/man/
|
49
|
+
|
50
|
+
# for a library or gem, you might want to ignore these files since the code is
|
51
|
+
# intended to run in multiple environments; otherwise, check them in:
|
52
|
+
# Gemfile.lock
|
53
|
+
# .ruby-version
|
54
|
+
# .ruby-gemset
|
55
|
+
|
56
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
57
|
+
.rvmrc
|
58
|
+
|
59
|
+
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
|
60
|
+
# .rubocop-https?--*
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--require spec_helper
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 2.5
|
3
|
+
SuggestExtensions: false
|
4
|
+
NewCops: enable
|
5
|
+
|
6
|
+
Style/StringLiterals:
|
7
|
+
Enabled: true
|
8
|
+
|
9
|
+
Style/StringLiteralsInInterpolation:
|
10
|
+
Enabled: true
|
11
|
+
EnforcedStyle: double_quotes
|
12
|
+
|
13
|
+
Layout/LineLength:
|
14
|
+
Enabled: false
|
15
|
+
|
16
|
+
Metrics/ParameterLists:
|
17
|
+
Enabled: false
|
18
|
+
Metrics/MethodLength:
|
19
|
+
Enabled: false
|
20
|
+
|
21
|
+
Metrics/AbcSize:
|
22
|
+
Enabled: false
|
23
|
+
|
24
|
+
Naming/FileName:
|
25
|
+
Enabled: false
|
26
|
+
|
27
|
+
Metrics/BlockLength:
|
28
|
+
AllowedMethods: ['describe', 'context']
|
29
|
+
|
30
|
+
Metrics/CyclomaticComplexity:
|
31
|
+
Max: 16
|
32
|
+
Metrics/PerceivedComplexity:
|
33
|
+
Max: 16
|
34
|
+
Metrics/ClassLength:
|
35
|
+
Max: 150
|
36
|
+
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
## [Unreleased]
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2021 Nikola Milojević
|
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
|
13
|
+
all 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
|
21
|
+
THE SOFTWARE.
|