postmark 1.19.2 → 1.20.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 45d3044b475c26b380a5af538b2041b23e5051d317fca3da4d06dbbd777a9b26
4
- data.tar.gz: ad943ebef5f02830354c1351c820c1b89bf65d67a7a70f633976f5559b5f6667
3
+ metadata.gz: 587a749e850a9a9fc2e70087fd13fa79d926844246f8030942d116ac6fbbcaec
4
+ data.tar.gz: 20fc00b9b8b59d45afe4722abd859cc4248f63ce487d190167aec0b957bd3c76
5
5
  SHA512:
6
- metadata.gz: 59ad96a4dc0292b451a2a31b1cf412a2bdd18e4bebcc477f8e52e7d6c8a429dc0caa99213294ec9a24b0aa17c4ce2a5e15e65c2ea4f158863b7a7769c4272df4
7
- data.tar.gz: 788444b0afba94c35473b3db60f71febebae947753b658374933471ed9afc47dc0cacce2d4692225a27fcce88fbdf824b7a3dbe76551648cdc3519be75fac2cd
6
+ metadata.gz: d4049417165d062f7d923a0b84e1c4b31791930e24c6c58d1171bbc0cb189cdbbe53736ee720b994c2a467d94afba7225512c39975f6fcd7d56d63b7c7cc567e
7
+ data.tar.gz: 7fce7304875e3a7877a73e697450fb82bfbdb2404a44337dfe6591e099476e7d57ead59ce9e30182f01825b4cfc7ca61ff49a1871cf9368b13bf74fe39753e05
@@ -14,6 +14,9 @@ rvm:
14
14
  - 2.1.9
15
15
  - 2.2.5
16
16
  - 2.3.1
17
+ - 2.5.7
18
+ - 2.6.5
19
+ - 2.7.0
17
20
  matrix:
18
21
  include:
19
22
  - rvm: 1.8.7
@@ -1,5 +1,9 @@
1
1
  = Changelog
2
2
 
3
+ == 1.20.0
4
+
5
+ * Removed deprecated trigger endpoints
6
+
3
7
  == 1.19.2
4
8
 
5
9
  Allow possibility to change TLS version for HTTP client.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.17.0
1
+ 1.20.0
@@ -197,11 +197,6 @@ module Postmark
197
197
  format_response http_client.get("triggers/#{type}/#{id}")
198
198
  end
199
199
 
200
- def update_trigger(type, id, options)
201
- data = serialize(HashHelper.to_postmark(options))
202
- format_response http_client.put("triggers/#{type}/#{id}", data)
203
- end
204
-
205
200
  def delete_trigger(type, id)
206
201
  type = Postmark::Inflector.to_postmark(type).downcase
207
202
  format_response http_client.delete("triggers/#{type}/#{id}")
@@ -1,3 +1,3 @@
1
1
  module Postmark
2
- VERSION = '1.19.2'
2
+ VERSION = '1.20.0'
3
3
  end
@@ -14,23 +14,6 @@ describe 'Accessing server resources using the API' do
14
14
  }
15
15
  }
16
16
 
17
- context 'Triggers API' do
18
- let(:unique_token) {rand(36 ** 32).to_s(36)}
19
-
20
- it 'can be used to manage tag triggers via the API' do
21
- skip("Endpoint removed")
22
- trigger = api_client.create_trigger(:tags, :match_name => "gemtest_#{unique_token}", :track_opens => true)
23
- api_client.update_trigger(:tags, trigger[:id], :match_name => "pre_#{trigger[:match_name]}")
24
- updated = api_client.get_trigger(:tags, trigger[:id])
25
-
26
- expect(updated[:id]).to eq(trigger[:id])
27
- expect(updated[:match_name]).not_to eq(trigger[:id])
28
- expect(api_client.triggers(:tags).map {|t| t[:id]}).to include(trigger[:id])
29
-
30
- api_client.delete_trigger(:tags, trigger[:id])
31
- end
32
- end
33
-
34
17
  context 'Messages API' do
35
18
  def with_retries(max_retries = 20, wait_seconds = 3)
36
19
  yield
@@ -70,4 +53,4 @@ describe 'Accessing server resources using the API' do
70
53
  }.not_to raise_error
71
54
  end
72
55
  end
73
- end
56
+ end
@@ -538,22 +538,6 @@ describe Postmark::ApiClient do
538
538
  describe '#create_trigger' do
539
539
  let(:http_client) {subject.http_client}
540
540
 
541
- context 'tags' do
542
- let(:options) {{:foo => 'bar'}}
543
- let(:response) {{'Foo' => 'Bar'}}
544
-
545
- it 'performs a POST request to /triggers/tags with given options' do
546
- allow(http_client).to receive(:post).with('triggers/tags',
547
- {'Foo' => 'bar'}.to_json)
548
- subject.create_trigger(:tags, options)
549
- end
550
-
551
- it 'symbolizes response keys' do
552
- allow(http_client).to receive(:post).and_return(response)
553
- expect(subject.create_trigger(:tags, options)).to eq(:foo => 'Bar')
554
- end
555
- end
556
-
557
541
  context 'inbound rules' do
558
542
  let(:options) {{:rule => 'example.com'}}
559
543
  let(:response) {{'Rule' => 'example.com'}}
@@ -586,23 +570,6 @@ describe Postmark::ApiClient do
586
570
  end
587
571
  end
588
572
 
589
- describe '#update_trigger' do
590
- let(:http_client) {subject.http_client}
591
- let(:options) {{:foo => 'bar'}}
592
- let(:id) {42}
593
-
594
- it 'performs a PUT request to /triggers/tags/:id' do
595
- allow(http_client).to receive(:put).with("triggers/tags/#{id}",
596
- {'Foo' => 'bar'}.to_json)
597
- subject.update_trigger(:tags, id, options)
598
- end
599
-
600
- it 'symbolizes response keys' do
601
- allow(http_client).to receive(:put).and_return('Foo' => 'Bar')
602
- expect(subject.update_trigger(:tags, id, options)).to eq(:foo => 'Bar')
603
- end
604
- end
605
-
606
573
  describe '#delete_trigger' do
607
574
  let(:http_client) {subject.http_client}
608
575
 
@@ -619,7 +586,7 @@ describe Postmark::ApiClient do
619
586
  expect(subject.delete_trigger(:tags, id)).to eq(:foo => 'Bar')
620
587
  end
621
588
  end
622
-
589
+
623
590
  context 'inbound rules' do
624
591
  let(:id) {42}
625
592
 
@@ -639,16 +606,6 @@ describe Postmark::ApiClient do
639
606
  let(:http_client) {subject.http_client}
640
607
  let(:options) {{:offset => 5}}
641
608
 
642
- context 'tags' do
643
- let(:response) {{'Tags' => [], 'TotalCount' => 0}}
644
-
645
- it 'performs a GET request to /triggers/tags' do
646
- allow(http_client).to receive(:get).with('triggers/tags', options) {response}
647
- expect(subject.get_triggers(:tags, options)).to be_an(Array)
648
- expect(subject.get_triggers(:tags, options).count).to be_zero
649
- end
650
- end
651
-
652
609
  context 'inbound rules' do
653
610
  let(:response) {{'InboundRules' => [], 'TotalCount' => 0}}
654
611
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postmark
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.19.2
4
+ version: 1.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Petyo Ivanov
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
146
  - !ruby/object:Gem::Version
147
147
  version: 1.3.7
148
148
  requirements: []
149
- rubygems_version: 3.1.2
149
+ rubygems_version: 3.0.6
150
150
  signing_key:
151
151
  specification_version: 4
152
152
  summary: Official Postmark API wrapper.