gibbon 2.0.0 → 3.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +10 -6
- data/CHANGELOG.md +110 -2
- data/CODE_OF_CONDUCT.md +76 -0
- data/Gemfile +1 -2
- data/LICENSE.txt +1 -1
- data/README.markdown +445 -49
- data/gibbon.gemspec +6 -11
- data/lib/gibbon/api_request.rb +77 -44
- data/lib/gibbon/export.rb +93 -0
- data/lib/gibbon/gibbon_helpers.rb +19 -0
- data/lib/gibbon/mailchimp_error.rb +25 -1
- data/lib/gibbon/request.rb +39 -6
- data/lib/gibbon/response.rb +10 -0
- data/lib/gibbon/version.rb +2 -2
- data/lib/gibbon.rb +5 -1
- data/spec/gibbon/api_request_spec.rb +69 -0
- data/spec/gibbon/export_spec.rb +39 -0
- data/spec/gibbon/gibbon_spec.rb +130 -7
- data/spec/gibbon/mailchimp_error_spec.rb +49 -0
- data/spec/gibbon/upsert_spec.rb +28 -0
- metadata +39 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a078fe9c806ec8909a1f808a6d6983de6f1d1414c361a9b54156b66f8a796bb3
|
4
|
+
data.tar.gz: d0ded539be8f09eae933da1d20cace7ee804529668add90f8c892e672c61c362
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9963ae0173d0189cfe674e1547313ad6570f3dc6f502198e77118e67f067bb842478b36dc46ed72bd675f692b42067f1bda0db59c47e43f8f215364818ac1d33
|
7
|
+
data.tar.gz: 6f855c6ad7a73d447ed9c3219ba6383cd624dfa33abf3effbb655207b888e4eb2006297413aabb62f481f0adfde56dc67c863c47eb287a599c9f907db5c29aa9
|
data/.travis.yml
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
language: ruby
|
2
|
-
|
3
|
-
|
2
|
+
sudo: false
|
3
|
+
cache: bundler
|
4
|
+
before_install:
|
5
|
+
- gem install bundler # -v 1.7.14 if a specific version is needed
|
4
6
|
rvm:
|
5
|
-
- 2.
|
6
|
-
- 2.
|
7
|
-
- 2.
|
8
|
-
-
|
7
|
+
- 2.4.5
|
8
|
+
- 2.5.7
|
9
|
+
- 2.6.5
|
10
|
+
- 2.7
|
11
|
+
- 3.0.0
|
12
|
+
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,98 @@
|
|
1
1
|
## [Unreleased][unreleased]
|
2
2
|
|
3
|
+
## [3.4.4] - 2022-02-24
|
4
|
+
- Remove non-alpha characters when parsing datacenter from API keys to prevent potential attackers from injecting a domain via the API key. This would only be possible if one were using user-provided API keys (e.g. from a form, etc.).
|
5
|
+
|
6
|
+
## [3.4.3] - 2022-01-19
|
7
|
+
- Support for Faraday 2.0, which requires new syntax for basic auth
|
8
|
+
|
9
|
+
## [3.4.2] - 2021-09-21
|
10
|
+
- Fixing the deprecation warning in version 3.4.2 requires moving to a minimum version of Faraday 1.0.0 (more than 2 years old).
|
11
|
+
|
12
|
+
## [3.4.1] - 2021-09-12
|
13
|
+
- Fix deprecation warning for upcoming versions of Faraday (2.x.x)
|
14
|
+
|
15
|
+
## [3.4.0] - 2021-03-12
|
16
|
+
- Support for Faraday 1.x.x and higer
|
17
|
+
|
18
|
+
## [3.3.4] - 2020-04-01
|
19
|
+
- Added support for setting API key via environment variable for Export API
|
20
|
+
- Updated webmock
|
21
|
+
|
22
|
+
## [3.3.3] - 2020-02-07
|
23
|
+
- Removes bit of extra conditional logic that was part of supporting older versions of Faraday
|
24
|
+
|
25
|
+
## [3.3.2] - 2020-01-19
|
26
|
+
- Bumped minimum version of Faraday 0.16.0 due to compatibility issues with legacy versions
|
27
|
+
|
28
|
+
## [3.3.1] - 2019-11-08
|
29
|
+
- Fix statically setting `faraday_adapter` did not set adapter on new requests
|
30
|
+
|
31
|
+
## [3.3.0] - 2019-10-02
|
32
|
+
- Fixed compatibility with Faraday 0.16.2+
|
33
|
+
- Set minimum Ruby to 2.3.8
|
34
|
+
|
35
|
+
## [3.2.1] - 2017-11-08
|
36
|
+
- Set minimum Ruby to 2.1
|
37
|
+
|
38
|
+
## [3.2.0] - 2017-11-08
|
39
|
+
- Force TLS version 1.2
|
40
|
+
|
41
|
+
## [3.1.1] - 2017-09-25
|
42
|
+
- Fix MailChimpError initialization
|
43
|
+
|
44
|
+
## [3.1.0] - 2017-07-27
|
45
|
+
- Add back support for Export API until MailChimp stops supporting it
|
46
|
+
- Implement `responds_to_missing`
|
47
|
+
|
48
|
+
## [3.0.2] - 2017-05-08
|
49
|
+
- Fix subtle bug in `symbolize_keys` when parsing error
|
50
|
+
|
51
|
+
## [3.0.1] - 2017-01-13
|
52
|
+
- Gibbon::Request (API 3.0) now returns a `Gibbon::Response` object that exposes `headers` and the parsed response `body`
|
53
|
+
- Remove Export API support (this is deprected after all)
|
54
|
+
- Adds `symbolize_keys`, `debug`, and `faraday_adapter` as class vars
|
55
|
+
- Bump version to 3.0.1 (not sticking to semver here so folks who downloaded 3.0.0 have a way to easily move forward)
|
56
|
+
|
57
|
+
## [3.0.0] - 2017-01-13
|
58
|
+
- Gibbon::Request (API 3.0) now returns a `Gibbon::Response` object that exposes `headers` and the parsed response `body`
|
59
|
+
- Adds Export API support
|
60
|
+
- Adds `symbolize_keys`, `debug`, and `faraday_adapter` as class vars
|
61
|
+
- Bump version to 3.0.0 due to breaking API change
|
62
|
+
|
63
|
+
## [2.2.5] - 2016-12-23
|
64
|
+
- Adds open_timeout
|
65
|
+
- Adds `symbolize_keys`
|
66
|
+
- Change default timeout from 30 to 60 seconds
|
67
|
+
|
68
|
+
## [2.2.4] - 2016-05-21
|
69
|
+
- Add debug logging
|
70
|
+
|
71
|
+
## [2.2.3] - 2016-03-16
|
72
|
+
- Capture status code and raw body when response is not json.
|
73
|
+
|
74
|
+
## [2.2.2] - 2016-03-15
|
75
|
+
- Update dependencies
|
76
|
+
|
77
|
+
## [2.2.1] - 2016-01-01
|
78
|
+
- Improve MailChimpError logging
|
79
|
+
|
80
|
+
## [2.2.0] - 2015-12-01
|
81
|
+
- Adds support for proxies
|
82
|
+
- Adds support for faraday_adapters
|
83
|
+
|
84
|
+
## [2.1.3] - 2015-11-26
|
85
|
+
- Fixes issue #159, which prevented sending campaigns from working. Thanks to @q3-tech for the bug report.
|
86
|
+
|
87
|
+
## [2.1.2] - 2015-11-11
|
88
|
+
- Allow Faraday default\_connection\_options to be set
|
89
|
+
|
90
|
+
## [2.1.1] - 2015-11-05
|
91
|
+
- Fix surfacing unparseable Faraday request exception.
|
92
|
+
|
93
|
+
## [2.1.0] - 2015-10-12
|
94
|
+
- Upsert support
|
95
|
+
|
3
96
|
## [2.0.0] - 2015-7-28
|
4
97
|
- Support for API 3.0. Usage syntax has changed. Please check out the readme.
|
5
98
|
- Update MultiJSON dependency to 1.11.0
|
@@ -21,8 +114,23 @@
|
|
21
114
|
## [1.1.4] - 2012-11-04
|
22
115
|
- Fix JSON::ParserError on export calls that return blank results
|
23
116
|
|
24
|
-
[unreleased]: https://github.com/amro/gibbon/compare/
|
117
|
+
[unreleased]: https://github.com/amro/gibbon/compare/v3.1.0...HEAD
|
118
|
+
[3.1.0]: https://github.com/amro/gibbon/compare/v3.0.2...v3.1.0
|
119
|
+
[3.0.2]: https://github.com/amro/gibbon/compare/v3.0.1...v3.0.2
|
120
|
+
[3.0.1]: https://github.com/amro/gibbon/compare/v3.0.0...v3.0.1
|
121
|
+
[3.0.0]: https://github.com/amro/gibbon/compare/v2.2.5...v3.0.0
|
122
|
+
[2.2.5]: https://github.com/amro/gibbon/compare/v2.2.4...v2.2.5
|
123
|
+
[2.2.4]: https://github.com/amro/gibbon/compare/v2.2.2...v2.2.4
|
124
|
+
[2.2.3]: https://github.com/amro/gibbon/compare/v2.2.2...v2.2.3
|
125
|
+
[2.2.2]: https://github.com/amro/gibbon/compare/v2.2.1...v2.2.2
|
126
|
+
[2.2.1]: https://github.com/amro/gibbon/compare/v2.2.0...v2.2.1
|
127
|
+
[2.2.0]: https://github.com/amro/gibbon/compare/v2.1.3...v2.2.0
|
128
|
+
[2.1.3]: https://github.com/amro/gibbon/compare/v2.1.2...v2.1.3
|
129
|
+
[2.1.2]: https://github.com/amro/gibbon/compare/v2.1.1...v2.1.2
|
130
|
+
[2.1.1]: https://github.com/amro/gibbon/compare/v2.1.0...v2.1.1
|
131
|
+
[2.1.0]: https://github.com/amro/gibbon/compare/v2.0.0...v2.1.0
|
25
132
|
[2.0.0]: https://github.com/amro/gibbon/compare/v1.2.0...v2.0.0
|
26
133
|
[1.2.0]: https://github.com/amro/gibbon/compare/v1.1.5...v1.2.0
|
27
|
-
[1.1.
|
134
|
+
[1.1.6]: https://github.com/amro/gibbon/compare/v1.1.5...v1.1.6
|
135
|
+
[1.1.5]: https://github.com/amro/gibbon/compare/v1.1.4...v1.1.5
|
28
136
|
[1.1.4]: https://github.com/amro/gibbon/compare/v1.1.3...v1.1.4
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
9
|
+
level of experience, education, socio-economic status, nationality, personal
|
10
|
+
appearance, race, religion, or sexual identity and orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at amromousa@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
72
|
+
|
73
|
+
[homepage]: https://www.contributor-covenant.org
|
74
|
+
|
75
|
+
For answers to common questions about this code of conduct, see
|
76
|
+
https://www.contributor-covenant.org/faq
|
data/Gemfile
CHANGED
data/LICENSE.txt
CHANGED