actionkit_connector 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/actionkit_connector.rb +8 -6
- data/lib/actionkit_connector/version.rb +1 -1
- data/spec/connector_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b25d549d3ea61e0a351d0816761597228991f8fa
|
4
|
+
data.tar.gz: b612b116a374417c53b4bce966da9fe9875b5523
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 808a3bd13d3b379b3adee3cdbf384cc9041864d2a9d2bd9dea3862777a98772fb518eb9d0eb8237e812fedb2d124fb36dc7718c4ec3ac5277f558b8d9f6f7812
|
7
|
+
data.tar.gz: 0b58e244b6be5da2a097f6b697c75aade04c87b59789049a4ffb5c93986cb7005bcd570ddee23c4d18a45bdcca163b8373a4d88ee4070459c231edec6abcc03f
|
data/lib/actionkit_connector.rb
CHANGED
@@ -81,7 +81,7 @@ module ActionKitConnector
|
|
81
81
|
options = {
|
82
82
|
basic_auth: self.auth,
|
83
83
|
headers: {
|
84
|
-
'Content-type' => 'application/json'
|
84
|
+
'Content-type' => 'application/json; charset=UTF-8'
|
85
85
|
},
|
86
86
|
:body => {
|
87
87
|
:type => 'petitionpage',
|
@@ -107,7 +107,7 @@ module ActionKitConnector
|
|
107
107
|
options = {
|
108
108
|
basic_auth: self.auth,
|
109
109
|
headers: {
|
110
|
-
'Content-type' => 'application/json'
|
110
|
+
'Content-type' => 'application/json; charset=UTF-8'
|
111
111
|
},
|
112
112
|
:body => {
|
113
113
|
:type => 'donationpage',
|
@@ -131,8 +131,9 @@ module ActionKitConnector
|
|
131
131
|
body = { page: page_name, email: email }.merge self.parse_action_options(options)
|
132
132
|
options = {
|
133
133
|
basic_auth: self.auth,
|
134
|
-
body: body,
|
135
|
-
format: :json
|
134
|
+
body: body.to_json,
|
135
|
+
format: :json,
|
136
|
+
headers: {'Content-Type' => 'application/json; charset=UTF-8'}
|
136
137
|
}
|
137
138
|
self.class.post(target, options)
|
138
139
|
end
|
@@ -147,7 +148,7 @@ module ActionKitConnector
|
|
147
148
|
basic_auth: self.auth,
|
148
149
|
body: options.to_json,
|
149
150
|
headers: {
|
150
|
-
'Content-Type' => 'application/json'
|
151
|
+
'Content-Type' => 'application/json; charset=UTF-8'
|
151
152
|
}
|
152
153
|
}
|
153
154
|
self.class.post(target, page_opts)
|
@@ -157,7 +158,8 @@ module ActionKitConnector
|
|
157
158
|
included_options = {}
|
158
159
|
acceptable_options = [
|
159
160
|
:ip_address, :is_forwarded, :link,
|
160
|
-
:mailing, :referring_mailing, :referring_user
|
161
|
+
:mailing, :referring_mailing, :referring_user,
|
162
|
+
:name
|
161
163
|
]
|
162
164
|
options.each_key do |key|
|
163
165
|
if acceptable_options.include? key.to_sym
|
data/spec/connector_spec.rb
CHANGED
@@ -98,7 +98,7 @@ describe 'Connector' do
|
|
98
98
|
it 'creates a donationpush action' do
|
99
99
|
client.create_donation_action(full_donation_options)
|
100
100
|
expect(WebMock).to have_requested(:post, 'http://username:password@api.example.com/donationpush/').
|
101
|
-
with(body: request_body, headers: {'Content-Type' => 'application/json'})
|
101
|
+
with(body: request_body, headers: {'Content-Type' => 'application/json; charset=UTF-8'})
|
102
102
|
end
|
103
103
|
end
|
104
104
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionkit_connector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Boersma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|