postman_mta 0.2.1 → 0.2.2

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: 2d9293f93f017dfa88b6077c19fd05b3969669891e2649bf1dced1d4e5429869
4
- data.tar.gz: 3822ea0ec147420749580b24d00d41e8a12ac38359c1ab6fa8fb39958cd8a7df
3
+ metadata.gz: 7d6d5fffa4743f5f68aca42d85ce8504cd3b1438e87b08b9aab67f8c86dcd1a8
4
+ data.tar.gz: 9e533b9344643973321ed86143708bd19db68424f995499478a24c0e5b5c05e6
5
5
  SHA512:
6
- metadata.gz: 6e2d0a4827f7f147cf1e1f1063ae96e68cab8f87befaf8b1df8518e38a62da210c65c490dc42d2d21870f229109b70c9206148805d34aac532ed6062ee613246
7
- data.tar.gz: 4e10279361370373e0ac372833d05328ab8b0b1060aa3d51ea94d23f21c9835e4761c4ba9603a1f862a4b87fb859cbb05ed8fbf99c8561e5666d6e737ec44aba
6
+ metadata.gz: f1eec23222904c934a81f5e1a867f9a0bb0a670403e984274ae4a941a6acd6d702c630fd623c05bb6c155b2fe3a32280699be1e8aa58d2c750de866aa5f100f1
7
+ data.tar.gz: ca7da62ced3248c0735e49f7fa4f4f323fab93cd72e59cd32f2a7d65d5ba836ba9c70fcc544d038eab9b231d8989f37292ecb2dbba66317b4df205080130014a
@@ -1,6 +1,6 @@
1
1
  AllCops:
2
+ NewCops: disable
2
3
  TargetRubyVersion: 2.4
3
-
4
4
  Exclude:
5
5
  - "Guardfile"
6
6
  - "Rakefile"
@@ -30,7 +30,7 @@ Lint/AmbiguousBlockAssociation:
30
30
 
31
31
  ##################### Metrics ##################################
32
32
 
33
- Metrics/LineLength:
33
+ Layout/LineLength:
34
34
  Max: 110
35
35
 
36
36
  Metrics/ClassLength:
@@ -45,11 +45,3 @@ Metrics/BlockLength:
45
45
  Max: 50
46
46
  Exclude:
47
47
  - "**/*_spec.rb"
48
-
49
- ##################### Rails ##################################
50
-
51
- Rails:
52
- Enabled: true
53
-
54
- Rails/SkipsModelValidations:
55
- Enabled: false
@@ -0,0 +1,23 @@
1
+ module PostmanMta
2
+ module Archive
3
+ class ConversationsController < ApplicationController
4
+ def index
5
+ render conversation.index(permitted_params)
6
+ end
7
+
8
+ def show
9
+ render conversation.find(params[:id])
10
+ end
11
+
12
+ private
13
+
14
+ def conversation
15
+ @conversation ||= PostmanMta::Archive::Conversation.new
16
+ end
17
+
18
+ def permitted_params
19
+ params.permit!
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,13 @@
1
+ module PostmanMta
2
+ module Archive
3
+ class Conversation < PostmanMta::Conversation
4
+ def index(params = {})
5
+ get('/archive/conversations', body: params)
6
+ end
7
+
8
+ def find(conversation_id)
9
+ get("/archive/conversations/#{conversation_id}")
10
+ end
11
+ end
12
+ end
13
+ end
@@ -4,10 +4,14 @@ module PostmanMta
4
4
  get('/conversations', body: params)
5
5
  end
6
6
 
7
+ def archive(params = {})
8
+ get('/archive/conversations', body: params)
9
+ end
10
+
7
11
  def folder(folder, params = {})
8
12
  params = {
9
13
  folder: folder
10
- }.merge(params)
14
+ }.merge!(params)
11
15
 
12
16
  get('/conversations', body: params)
13
17
  end
@@ -24,6 +24,10 @@ PostmanMta::Engine.routes.draw do
24
24
  end
25
25
  end
26
26
 
27
+ namespace :archive do
28
+ resources :conversations, only: [:index, :show]
29
+ end
30
+
27
31
  resources :routes, only: :index
28
32
  resources :domains, only: :index
29
33
  resources :labels, only: :index
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PostmanMta
4
- VERSION = '0.2.1'
4
+ VERSION = '0.2.2'
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.1
4
+ version: 0.2.2
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-03-14 00:00:00.000000000 Z
11
+ date: 2020-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -148,6 +148,7 @@ files:
148
148
  - README.md
149
149
  - Rakefile
150
150
  - app/controllers/postman_mta/application_controller.rb
151
+ - app/controllers/postman_mta/archive/conversations_controller.rb
151
152
  - app/controllers/postman_mta/attachments_controller.rb
152
153
  - app/controllers/postman_mta/conversations_controller.rb
153
154
  - app/controllers/postman_mta/domains_controller.rb
@@ -157,6 +158,7 @@ files:
157
158
  - app/controllers/postman_mta/stats/messages_controller.rb
158
159
  - app/controllers/postman_mta/tags_controller.rb
159
160
  - app/models/postman_mta/application_model.rb
161
+ - app/models/postman_mta/archive/conversation.rb
160
162
  - app/models/postman_mta/attachment.rb
161
163
  - app/models/postman_mta/bookmark.rb
162
164
  - app/models/postman_mta/conversation.rb