postman_mta 0.2.0 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6505bfbf9fe78bbb7726d321c38e8206e81c9a21da85fd27d438b7c755fe8b40
4
- data.tar.gz: 891a13937aa6592cd04df517a3dd04ac0069d625c3f663b96447cd81c5538fd2
3
+ metadata.gz: 2d9293f93f017dfa88b6077c19fd05b3969669891e2649bf1dced1d4e5429869
4
+ data.tar.gz: 3822ea0ec147420749580b24d00d41e8a12ac38359c1ab6fa8fb39958cd8a7df
5
5
  SHA512:
6
- metadata.gz: fcdb6f1967352b1130fd5b0287c475fe79d144ef2dc8739122b7116e5fb811e19fa26714f793dba573a532843eb947fefc2ddc433806edc490569f8a50cad1cc
7
- data.tar.gz: 037b20cf0e0ec0216e1fa81b7b6f4844c8b570f3999146b90da8401e755a8a648ed4b6f7f97b41deeb7c7612445103bb0b6f32067b40b0fc673b864401a5ccbc
6
+ metadata.gz: 6e2d0a4827f7f147cf1e1f1063ae96e68cab8f87befaf8b1df8518e38a62da210c65c490dc42d2d21870f229109b70c9206148805d34aac532ed6062ee613246
7
+ data.tar.gz: 4e10279361370373e0ac372833d05328ab8b0b1060aa3d51ea94d23f21c9835e4761c4ba9603a1f862a4b87fb859cbb05ed8fbf99c8561e5666d6e737ec44aba
@@ -1,9 +1,17 @@
1
1
  module PostmanMta
2
2
  class LabelsController < ApplicationController
3
+ def index
4
+ render label.index(label_params)
5
+ end
6
+
3
7
  def create
4
8
  render label.create(label_params)
5
9
  end
6
10
 
11
+ def update
12
+ render label.update(params[:id], label_params)
13
+ end
14
+
7
15
  def destroy
8
16
  render label.destroy(params[:id])
9
17
  end
@@ -6,10 +6,18 @@ module PostmanMta
6
6
  @conversation_id = conversation_id
7
7
  end
8
8
 
9
+ def index(params = {})
10
+ get('/labels', body: params)
11
+ end
12
+
9
13
  def create(params)
10
14
  post("/conversations/#{conversation_id}/labels", body: params)
11
15
  end
12
16
 
17
+ def update(label_id, params)
18
+ patch("/conversations/#{conversation_id}/labels/#{label_id}", body: params)
19
+ end
20
+
13
21
  def destroy(label_id)
14
22
  delete("/conversations/#{conversation_id}/labels/#{label_id}")
15
23
  end
@@ -14,7 +14,7 @@ PostmanMta::Engine.routes.draw do
14
14
  match :unread, on: :collection, via: [:put, :patch]
15
15
  match :move, on: :collection, via: [:put, :patch]
16
16
 
17
- resources :labels, only: [:create, :destroy]
17
+ resources :labels, only: [:create, :update, :destroy]
18
18
  resources :tags, only: [:create, :destroy]
19
19
  end
20
20
 
@@ -26,4 +26,5 @@ PostmanMta::Engine.routes.draw do
26
26
 
27
27
  resources :routes, only: :index
28
28
  resources :domains, only: :index
29
+ resources :labels, only: :index
29
30
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PostmanMta
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postman_mta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Malinovskiy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-25 00:00:00.000000000 Z
11
+ date: 2019-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler