expresspigeon-ruby 0.0.7 → 0.0.8
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 +1 -0
- data/lib/expresspigeon-ruby/messages.rb +1 -1
- data/lib/expresspigeon-ruby/version.rb +1 -1
- data/spec/messages_spec.rb +6 -2
- data/test/README +22 -2
- 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: 1091b71d05e2b52d8834c3e156b4a7abb1a7d581
|
4
|
+
data.tar.gz: 0c6c20dfb96132e211cc05090d51f83170da212c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63fbab303fa8bed86310e7c50208090e3466546d7f4fe782ac8dd66ac9acb89fad1d4b82dbad2e42846387316b66d6a59226752ce968d09166d5bb2c9e066d9f
|
7
|
+
data.tar.gz: b3da497b86385ec668d652dc543b48ddbc7937ddf8e93866f83ec1b02ee24cd34b1cf239487ac5f170641f47597c7fd27c2a5e5b844a760cf10cb29578587855
|
data/README.md
CHANGED
@@ -115,7 +115,7 @@ module ExpressPigeon
|
|
115
115
|
payload[:reply_to] = reply_to
|
116
116
|
payload[:subject] = subject
|
117
117
|
payload[:from] = from
|
118
|
-
payload[:merge_fields] = merge_fields
|
118
|
+
payload[:merge_fields] = merge_fields.to_json
|
119
119
|
payload[:view_online] = view_online
|
120
120
|
payload[:click_tracking] = click_tracking
|
121
121
|
payload[:suppress_address] = suppress_address
|
data/spec/messages_spec.rb
CHANGED
@@ -142,12 +142,16 @@ describe 'transactional messages integration test' do
|
|
142
142
|
payload[:from].should eq 'Jane Doe'
|
143
143
|
payload[:subject].should eq 'Hello, Dolly!'
|
144
144
|
payload[:template_id].should eq 123
|
145
|
-
payload[:merge_fields][:eye_color].should eq 'blue'
|
146
|
-
payload[:merge_fields][:body_shape].should eq 'pear'
|
147
145
|
payload[:view_online].should eq false
|
148
146
|
payload[:click_tracking].should eq true
|
149
147
|
payload[:suppress_address].should eq false
|
150
148
|
payload['attachment1.txt'].class.should eq File
|
149
|
+
|
150
|
+
payload[:merge_fields].class.should eq String
|
151
|
+
merge_fields = JSON.parse payload[:merge_fields]
|
152
|
+
merge_fields['eye_color'].should eq "blue"
|
153
|
+
merge_fields['body_shape'].should eq "pear"
|
154
|
+
|
151
155
|
File.basename(payload['attachment1.txt']).should eq 'attachment1.txt'
|
152
156
|
File.basename(payload['attachment2.txt']).should eq 'attachment2.txt'
|
153
157
|
end
|
data/test/README
CHANGED
@@ -1,5 +1,25 @@
|
|
1
|
+
h2. Intro
|
2
|
+
|
1
3
|
This directory contains Ruby scripts for manual testing some features.
|
2
4
|
|
3
|
-
In order to point to test
|
5
|
+
In order to point to test env and set the auth_key, you need need to source the file called set_env (ignored)
|
6
|
+
|
7
|
+
h2. Curl example
|
8
|
+
|
4
9
|
|
5
|
-
|
10
|
+
```
|
11
|
+
curl -X POST https://api.expresspigeon.com/messages \
|
12
|
+
-H "Content-type: multipart/form-data" \
|
13
|
+
-H "X-auth-key: XXX"\
|
14
|
+
-F template_id=123\
|
15
|
+
-F reply_to='john@doe.com'\
|
16
|
+
-F from='John Doe'\
|
17
|
+
-F to='jane@doe.com'\
|
18
|
+
-F subject='Lets go out tonight?'\
|
19
|
+
-F view_online=true\
|
20
|
+
-F suppress_address=true\
|
21
|
+
-F click_tracking=true\
|
22
|
+
-F merge_fields='{"first_name": "Jane"}'\
|
23
|
+
-F attachment=@attachments/attachment1.txt\
|
24
|
+
-F attachment=@attachments/attachment2.txt
|
25
|
+
```
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: expresspigeon-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ipolevoy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|