postman_mta 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/postman_mta/labels_controller.rb +8 -0
- data/app/models/postman_mta/label.rb +8 -0
- data/config/routes.rb +2 -1
- data/lib/postman_mta/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d9293f93f017dfa88b6077c19fd05b3969669891e2649bf1dced1d4e5429869
|
4
|
+
data.tar.gz: 3822ea0ec147420749580b24d00d41e8a12ac38359c1ab6fa8fb39958cd8a7df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/config/routes.rb
CHANGED
@@ -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
|
data/lib/postman_mta/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2019-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|