litmus-instant 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/ci.yml +29 -0
  3. data/.gitignore +0 -2
  4. data/.ruby-version +1 -1
  5. data/Gemfile.lock +94 -0
  6. data/LICENSE.txt +1 -1
  7. data/README.md +0 -2
  8. data/fixtures/vcr_cassettes/Litmus_Instant/Litmus_Instant_Client_provides_Litmus_Instant_class_methods_as_instance_methods.yml +165 -49
  9. data/fixtures/vcr_cassettes/Litmus_Instant/Litmus_Instant_Client_uses_its_own_config.yml +18 -94
  10. data/fixtures/vcr_cassettes/Litmus_Instant/client_configurations/returns_a_Hash_of_clients_and_their_available_options.yml +1032 -141
  11. data/fixtures/vcr_cassettes/Litmus_Instant/clients/returns_an_array_of_client_names.yml +83 -25
  12. data/fixtures/vcr_cassettes/Litmus_Instant/create_email/authenticated_with_invalid_email_Hash_raise_a_request_error.yml +8 -43
  13. data/fixtures/vcr_cassettes/Litmus_Instant/create_email/authenticated_with_valid_email_Hash_optional_end_user_id_is_relayed.yml +9 -49
  14. data/fixtures/vcr_cassettes/Litmus_Instant/create_email/authenticated_with_valid_email_Hash_prerequest_configurations_is_relayed.yml +9 -60
  15. data/fixtures/vcr_cassettes/Litmus_Instant/create_email/authenticated_with_valid_email_Hash_response_.yml +9 -48
  16. data/fixtures/vcr_cassettes/Litmus_Instant/create_email/unauthenticated_raises_an_authentication_error.yml +9 -6
  17. data/fixtures/vcr_cassettes/Litmus_Instant/get_preview/raises_NotFound_for_an_expired_email_guid.yml +9 -6
  18. data/fixtures/vcr_cassettes/Litmus_Instant/get_preview/raises_RequestError_for_an_invalid_client.yml +16 -90
  19. data/fixtures/vcr_cassettes/Litmus_Instant/get_preview/raises_RequestError_for_an_invalid_email_guid.yml +9 -6
  20. data/fixtures/vcr_cassettes/Litmus_Instant/get_preview/returns_a_Hash_of_the_image_types.yml +19 -99
  21. data/fixtures/vcr_cassettes/Litmus_Instant/get_preview/supports_optional_capture_configuration.yml +19 -99
  22. data/fixtures/vcr_cassettes/Litmus_Instant/prefetch_previews/raises_RequestError_for_an_invalid_email_guid.yml +9 -6
  23. data/fixtures/vcr_cassettes/Litmus_Instant/prefetch_previews/raises_RequestError_if_any_invalid_configurations_are_present.yml +16 -90
  24. data/fixtures/vcr_cassettes/Litmus_Instant/prefetch_previews/responds_with_an_array_of_the_requested_configurations.yml +16 -99
  25. data/lib/litmus/instant/version.rb +1 -1
  26. data/litmus-instant.gemspec +3 -3
  27. metadata +15 -14
@@ -11,8 +11,12 @@ http_interactions:
11
11
  - application/json
12
12
  Accept:
13
13
  - application/json
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ User-Agent:
17
+ - Ruby
14
18
  Authorization:
15
- - Basic Y3hkNHR1c3F3b2tnZ2dseGl6ZDl2cDd6bXV4dmo2eG95a2UxOg==
19
+ - Basic <ENCODED_API_KEY>
16
20
  response:
17
21
  status:
18
22
  code: 200
@@ -21,89 +25,11 @@ http_interactions:
21
25
  Server:
22
26
  - nginx
23
27
  Date:
24
- - Mon, 20 Jun 2016 11:44:03 GMT
28
+ - Wed, 10 Nov 2021 14:36:58 GMT
25
29
  Content-Type:
26
30
  - application/json;charset=utf-8
27
31
  Content-Length:
28
32
  - '58'
29
- Connection:
30
- - keep-alive
31
- Strict-Transport-Security:
32
- - max-age=3600; includeSubdomains; preload
33
- X-Frame-Options:
34
- - DENY
35
- X-Content-Type-Options:
36
- - nosniff
37
- body:
38
- encoding: UTF-8
39
- string: |-
40
- {
41
- "email_guid": "92d9cb6d-6ea0-4b46-813c-3025214f80fd"
42
- }
43
- http_version:
44
- recorded_at: Mon, 20 Jun 2016 11:44:06 GMT
45
- - request:
46
- method: post
47
- uri: https://instant-api.litmus.com/v1/emails/92d9cb6d-6ea0-4b46-813c-3025214f80fd/previews/prefetch
48
- body:
49
- encoding: UTF-8
50
- string: '{"configurations":[{"client":"OL2010"},{"client":"OL2001MYSPACEODYSSEY"}]}'
51
- headers:
52
- Content-Type:
53
- - application/json
54
- Accept:
55
- - application/json
56
- response:
57
- status:
58
- code: 400
59
- message: Bad Request
60
- headers:
61
- Server:
62
- - nginx
63
- Date:
64
- - Mon, 20 Jun 2016 11:44:04 GMT
65
- Content-Type:
66
- - application/json;charset=utf-8
67
- Content-Length:
68
- - '126'
69
- Connection:
70
- - keep-alive
71
- body:
72
- encoding: UTF-8
73
- string: |-
74
- {
75
- "status": 400,
76
- "title": "Bad Request",
77
- "description": "Each client must be valid, 'OL2001MYSPACEODYSSEY' is unknown"
78
- }
79
- http_version:
80
- recorded_at: Mon, 20 Jun 2016 11:44:06 GMT
81
- - request:
82
- method: post
83
- uri: https://<API_KEY>:@instant-api.litmus.com/v1/emails
84
- body:
85
- encoding: UTF-8
86
- string: '{"plain_text":"Hej världen! Kärlek, den svenska kocken."}'
87
- headers:
88
- Content-Type:
89
- - application/json
90
- Accept:
91
- - application/json
92
- response:
93
- status:
94
- code: 200
95
- message: OK
96
- headers:
97
- Server:
98
- - nginx
99
- Date:
100
- - Fri, 21 Jul 2017 12:59:33 GMT
101
- Content-Type:
102
- - application/json;charset=utf-8
103
- Content-Length:
104
- - '58'
105
- Connection:
106
- - keep-alive
107
33
  Vary:
108
34
  - Origin
109
35
  Strict-Transport-Security:
@@ -116,13 +42,12 @@ http_interactions:
116
42
  encoding: UTF-8
117
43
  string: |-
118
44
  {
119
- "email_guid": "63c98daa-7572-48ea-b97d-9a817be8dfac"
45
+ "email_guid": "cd96ae61-a466-4016-ba70-b60e2965b045"
120
46
  }
121
- http_version:
122
- recorded_at: Fri, 21 Jul 2017 13:02:06 GMT
47
+ recorded_at: Wed, 10 Nov 2021 14:36:58 GMT
123
48
  - request:
124
49
  method: post
125
- uri: https://instant-api.litmus.com/v1/emails/63c98daa-7572-48ea-b97d-9a817be8dfac/previews/prefetch
50
+ uri: https://instant-api.litmus.com/v1/emails/cd96ae61-a466-4016-ba70-b60e2965b045/previews/prefetch
126
51
  body:
127
52
  encoding: UTF-8
128
53
  string: '{"configurations":[{"client":"OL2010"},{"client":"OL2001MYSPACEODYSSEY"}]}'
@@ -131,6 +56,10 @@ http_interactions:
131
56
  - application/json
132
57
  Accept:
133
58
  - application/json
59
+ Accept-Encoding:
60
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
61
+ User-Agent:
62
+ - Ruby
134
63
  response:
135
64
  status:
136
65
  code: 400
@@ -139,13 +68,11 @@ http_interactions:
139
68
  Server:
140
69
  - nginx
141
70
  Date:
142
- - Fri, 21 Jul 2017 12:59:34 GMT
71
+ - Wed, 10 Nov 2021 14:36:59 GMT
143
72
  Content-Type:
144
73
  - application/json;charset=utf-8
145
74
  Content-Length:
146
75
  - '126'
147
- Connection:
148
- - keep-alive
149
76
  Vary:
150
77
  - Origin
151
78
  body:
@@ -156,6 +83,5 @@ http_interactions:
156
83
  "title": "Bad Request",
157
84
  "description": "Each client must be valid, 'OL2001MYSPACEODYSSEY' is unknown"
158
85
  }
159
- http_version:
160
- recorded_at: Fri, 21 Jul 2017 13:02:06 GMT
161
- recorded_with: VCR 2.9.3
86
+ recorded_at: Wed, 10 Nov 2021 14:36:59 GMT
87
+ recorded_with: VCR 6.0.0
@@ -11,8 +11,12 @@ http_interactions:
11
11
  - application/json
12
12
  Accept:
13
13
  - application/json
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ User-Agent:
17
+ - Ruby
14
18
  Authorization:
15
- - Basic Y3hkNHR1c3F3b2tnZ2dseGl6ZDl2cDd6bXV4dmo2eG95a2UxOg==
19
+ - Basic <ENCODED_API_KEY>
16
20
  response:
17
21
  status:
18
22
  code: 200
@@ -21,98 +25,11 @@ http_interactions:
21
25
  Server:
22
26
  - nginx
23
27
  Date:
24
- - Mon, 20 Jun 2016 11:44:05 GMT
28
+ - Wed, 10 Nov 2021 14:37:01 GMT
25
29
  Content-Type:
26
30
  - application/json;charset=utf-8
27
31
  Content-Length:
28
32
  - '58'
29
- Connection:
30
- - keep-alive
31
- Strict-Transport-Security:
32
- - max-age=3600; includeSubdomains; preload
33
- X-Frame-Options:
34
- - DENY
35
- X-Content-Type-Options:
36
- - nosniff
37
- body:
38
- encoding: UTF-8
39
- string: |-
40
- {
41
- "email_guid": "92d9cb6d-6ea0-4b46-813c-3025214f80fd"
42
- }
43
- http_version:
44
- recorded_at: Mon, 20 Jun 2016 11:44:08 GMT
45
- - request:
46
- method: post
47
- uri: https://instant-api.litmus.com/v1/emails/92d9cb6d-6ea0-4b46-813c-3025214f80fd/previews/prefetch
48
- body:
49
- encoding: UTF-8
50
- string: '{"configurations":[{"client":"OL2010","images":"allowed"},{"client":"IPAD","orientation":"vertical"}]}'
51
- headers:
52
- Content-Type:
53
- - application/json
54
- Accept:
55
- - application/json
56
- response:
57
- status:
58
- code: 202
59
- message: Accepted
60
- headers:
61
- Server:
62
- - nginx
63
- Date:
64
- - Mon, 20 Jun 2016 11:44:06 GMT
65
- Content-Type:
66
- - application/json;charset=utf-8
67
- Content-Length:
68
- - '222'
69
- Connection:
70
- - keep-alive
71
- body:
72
- encoding: UTF-8
73
- string: |-
74
- {
75
- "configurations": [
76
- {
77
- "orientation": "vertical",
78
- "images": "allowed",
79
- "client": "OL2010"
80
- },
81
- {
82
- "orientation": "vertical",
83
- "images": "allowed",
84
- "client": "IPAD"
85
- }
86
- ]
87
- }
88
- http_version:
89
- recorded_at: Mon, 20 Jun 2016 11:44:08 GMT
90
- - request:
91
- method: post
92
- uri: https://<API_KEY>:@instant-api.litmus.com/v1/emails
93
- body:
94
- encoding: UTF-8
95
- string: '{"plain_text":"Hej världen! Kärlek, den svenska kocken."}'
96
- headers:
97
- Content-Type:
98
- - application/json
99
- Accept:
100
- - application/json
101
- response:
102
- status:
103
- code: 200
104
- message: OK
105
- headers:
106
- Server:
107
- - nginx
108
- Date:
109
- - Fri, 21 Jul 2017 12:59:34 GMT
110
- Content-Type:
111
- - application/json;charset=utf-8
112
- Content-Length:
113
- - '58'
114
- Connection:
115
- - keep-alive
116
33
  Vary:
117
34
  - Origin
118
35
  Strict-Transport-Security:
@@ -125,13 +42,12 @@ http_interactions:
125
42
  encoding: UTF-8
126
43
  string: |-
127
44
  {
128
- "email_guid": "63c98daa-7572-48ea-b97d-9a817be8dfac"
45
+ "email_guid": "5b893fa9-a8d3-41be-842c-cfd1967d3e40"
129
46
  }
130
- http_version:
131
- recorded_at: Fri, 21 Jul 2017 13:02:07 GMT
47
+ recorded_at: Wed, 10 Nov 2021 14:37:01 GMT
132
48
  - request:
133
49
  method: post
134
- uri: https://instant-api.litmus.com/v1/emails/63c98daa-7572-48ea-b97d-9a817be8dfac/previews/prefetch
50
+ uri: https://instant-api.litmus.com/v1/emails/5b893fa9-a8d3-41be-842c-cfd1967d3e40/previews/prefetch
135
51
  body:
136
52
  encoding: UTF-8
137
53
  string: '{"configurations":[{"client":"OL2010","images":"allowed"},{"client":"IPAD","orientation":"vertical"}]}'
@@ -140,6 +56,10 @@ http_interactions:
140
56
  - application/json
141
57
  Accept:
142
58
  - application/json
59
+ Accept-Encoding:
60
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
61
+ User-Agent:
62
+ - Ruby
143
63
  response:
144
64
  status:
145
65
  code: 202
@@ -148,13 +68,11 @@ http_interactions:
148
68
  Server:
149
69
  - nginx
150
70
  Date:
151
- - Fri, 21 Jul 2017 12:59:35 GMT
71
+ - Wed, 10 Nov 2021 14:37:02 GMT
152
72
  Content-Type:
153
73
  - application/json;charset=utf-8
154
74
  Content-Length:
155
75
  - '222'
156
- Connection:
157
- - keep-alive
158
76
  Vary:
159
77
  - Origin
160
78
  body:
@@ -174,6 +92,5 @@ http_interactions:
174
92
  }
175
93
  ]
176
94
  }
177
- http_version:
178
- recorded_at: Fri, 21 Jul 2017 13:02:08 GMT
179
- recorded_with: VCR 2.9.3
95
+ recorded_at: Wed, 10 Nov 2021 14:37:02 GMT
96
+ recorded_with: VCR 6.0.0
@@ -1,5 +1,5 @@
1
1
  module Litmus
2
2
  class Instant
3
- VERSION = "0.3.0"
3
+ VERSION = "0.3.1"
4
4
  end
5
5
  end
@@ -27,10 +27,10 @@ Gem::Specification.new do |spec|
27
27
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
28
  spec.require_paths = ["lib"]
29
29
 
30
- spec.add_dependency "httparty", ">= 0.13.5", "< 0.16"
30
+ spec.add_dependency "httparty", ">= 0.13.5", "< 1.0.0"
31
31
 
32
- spec.add_development_dependency "bundler", "~> 1.10"
33
- spec.add_development_dependency "rake", "~> 12.0"
32
+ spec.add_development_dependency "bundler"
33
+ spec.add_development_dependency "rake"
34
34
  spec.add_development_dependency "rspec"
35
35
  spec.add_development_dependency "guard-rspec"
36
36
  spec.add_development_dependency "webmock"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: litmus-instant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rahim Packir Saibo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-07-21 00:00:00.000000000 Z
11
+ date: 2021-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: 0.13.5
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '0.16'
22
+ version: 1.0.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,35 +29,35 @@ dependencies:
29
29
  version: 0.13.5
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '0.16'
32
+ version: 1.0.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: bundler
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - "~>"
37
+ - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: '1.10'
39
+ version: '0'
40
40
  type: :development
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - "~>"
44
+ - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: '1.10'
46
+ version: '0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - "~>"
51
+ - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: '12.0'
53
+ version: '0'
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - "~>"
58
+ - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: '12.0'
60
+ version: '0'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: rspec
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -136,11 +136,13 @@ executables: []
136
136
  extensions: []
137
137
  extra_rdoc_files: []
138
138
  files:
139
+ - ".github/workflows/ci.yml"
139
140
  - ".gitignore"
140
141
  - ".rspec"
141
142
  - ".ruby-version"
142
143
  - ".travis.yml"
143
144
  - Gemfile
145
+ - Gemfile.lock
144
146
  - Guardfile
145
147
  - LICENSE.txt
146
148
  - Procfile
@@ -195,8 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
195
197
  - !ruby/object:Gem::Version
196
198
  version: '0'
197
199
  requirements: []
198
- rubyforge_project:
199
- rubygems_version: 2.6.8
200
+ rubygems_version: 3.1.6
200
201
  signing_key:
201
202
  specification_version: 4
202
203
  summary: Ruby client library for Litmus Instant API