pocus 1.0.0 → 1.1.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 +4 -4
- data/README.md +5 -3
- data/lib/pocus/identity.rb +1 -1
- data/lib/pocus/resource.rb +4 -3
- metadata +4 -35
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 50a4404a6f892888678d3d4fdd038133696beaece4d7cbb6e7e92dffd8b00b8e
|
|
4
|
+
data.tar.gz: 2418eef7353f39b5b7ff913993277ba1369707c7e64ae03b5baef40a2c8551c7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c993ee6385f43f1fc06d7253bfc4c790c713c9fabba38199ee225ec25db188141cd7ccc61fff4b6ab090a6d17f7d753be154cc65e95ba5505e9cc5dbcc6e34ab
|
|
7
|
+
data.tar.gz: ec1ebf2100cf5390c412eac26ea5586068e24b4cc2c80a968a86b7700e7610ab49cf2531c9f10ba28370552a04735dc93e81d4c2276b56465d82d11f76f2e24e
|
data/README.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
# Pocus
|
|
2
2
|
|
|
3
3
|
[](http://badge.fury.io/rb/pocus)
|
|
4
|
-
[](https://travis-ci.org/varyonic/pocus)
|
|
4
|
+
[![Github Actions ][actions_badge]][actions]
|
|
6
5
|
|
|
7
6
|
Unofficial Ruby API client for [iContact API](https://www.icontact.com/developerportal) (f.k.a. Vocus), inspired by Active Resource.
|
|
8
7
|
|
|
@@ -71,4 +70,7 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
|
71
70
|
|
|
72
71
|
Read the [LICENSE](LICENSE.md) for details.
|
|
73
72
|
|
|
74
|
-
Copyright (c) 2016-
|
|
73
|
+
Copyright (c) 2016-2025 [Varyonic](https://www.varyonic.com).
|
|
74
|
+
|
|
75
|
+
[actions_badge]: https://github.com/varyonic/pocus/workflows/ci/badge.svg
|
|
76
|
+
[actions]: https://github.com/varyonic/pocus/actions
|
data/lib/pocus/identity.rb
CHANGED
data/lib/pocus/resource.rb
CHANGED
|
@@ -5,7 +5,7 @@ module Pocus
|
|
|
5
5
|
|
|
6
6
|
def initialize(resources, errors, warnings)
|
|
7
7
|
@errors = (errors || [])
|
|
8
|
-
@warnings = (warnings || [])
|
|
8
|
+
@warnings = (warnings || []).reject { |w| w =~ /Your account is past due/ }
|
|
9
9
|
super resources
|
|
10
10
|
end
|
|
11
11
|
end
|
|
@@ -106,7 +106,8 @@ module Pocus
|
|
|
106
106
|
def post_multiple(request_path, klass, fields_multiple)
|
|
107
107
|
data = fields_multiple.map { |fields| camelize_fields(fields) }
|
|
108
108
|
response = session.send_request('POST', path + request_path, data)
|
|
109
|
-
|
|
109
|
+
data = response.fetch(klass.tag_multiple) || []
|
|
110
|
+
resources = data.map { |fields| klass.new(fields.merge(parent: self)) }
|
|
110
111
|
ResponseArray.new(resources, response['errors'], response['warnings'])
|
|
111
112
|
end
|
|
112
113
|
|
|
@@ -165,7 +166,7 @@ module Pocus
|
|
|
165
166
|
end
|
|
166
167
|
|
|
167
168
|
def assign_errors(response)
|
|
168
|
-
assign_attributes(errors: response['errors'] || [], warnings: response['warnings'] || [])
|
|
169
|
+
assign_attributes(errors: response['errors'] || [], warnings: (response['warnings'] || []).reject { |w| w =~ /Your account is past due/ })
|
|
169
170
|
end
|
|
170
171
|
|
|
171
172
|
def underscore(camel_cased_word)
|
metadata
CHANGED
|
@@ -1,45 +1,16 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pocus
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Piers Chambers
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: rake
|
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
|
16
|
-
requirements:
|
|
17
|
-
- - "~>"
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: '11.0'
|
|
20
|
-
type: :development
|
|
21
|
-
prerelease: false
|
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
-
requirements:
|
|
24
|
-
- - "~>"
|
|
25
|
-
- !ruby/object:Gem::Version
|
|
26
|
-
version: '11.0'
|
|
27
|
-
- !ruby/object:Gem::Dependency
|
|
28
|
-
name: pry
|
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
|
30
|
-
requirements:
|
|
31
|
-
- - ">="
|
|
32
|
-
- !ruby/object:Gem::Version
|
|
33
|
-
version: '0'
|
|
34
|
-
type: :development
|
|
35
|
-
prerelease: false
|
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
-
requirements:
|
|
38
|
-
- - ">="
|
|
39
|
-
- !ruby/object:Gem::Version
|
|
40
|
-
version: '0'
|
|
41
|
-
- !ruby/object:Gem::Dependency
|
|
42
|
-
name: pry-state
|
|
43
14
|
requirement: !ruby/object:Gem::Requirement
|
|
44
15
|
requirements:
|
|
45
16
|
- - ">="
|
|
@@ -72,8 +43,8 @@ email:
|
|
|
72
43
|
executables: []
|
|
73
44
|
extensions: []
|
|
74
45
|
extra_rdoc_files:
|
|
75
|
-
- README.md
|
|
76
46
|
- LICENSE.md
|
|
47
|
+
- README.md
|
|
77
48
|
files:
|
|
78
49
|
- LICENSE.md
|
|
79
50
|
- README.md
|
|
@@ -98,7 +69,6 @@ homepage: https://github.com/varyonic/pocus
|
|
|
98
69
|
licenses:
|
|
99
70
|
- MIT
|
|
100
71
|
metadata: {}
|
|
101
|
-
post_install_message:
|
|
102
72
|
rdoc_options: []
|
|
103
73
|
require_paths:
|
|
104
74
|
- lib
|
|
@@ -113,8 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
113
83
|
- !ruby/object:Gem::Version
|
|
114
84
|
version: '0'
|
|
115
85
|
requirements: []
|
|
116
|
-
rubygems_version: 3.
|
|
117
|
-
signing_key:
|
|
86
|
+
rubygems_version: 3.6.7
|
|
118
87
|
specification_version: 4
|
|
119
88
|
summary: Unofficial Ruby client for iContact API
|
|
120
89
|
test_files: []
|