postman_mta 0.2.4 → 0.2.8

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: 63d6c39090e609521da139680163a8ea087177b08058fa9c891200ed74b2db24
4
- data.tar.gz: aad564e61a4c45ff2bbcfae4f1415acee51a0c5e064431974977a10fd2af4741
3
+ metadata.gz: 00b5790f98eed5f3700b7e690569a7c45a414e589ce93875f7f8f835b6030e50
4
+ data.tar.gz: 867869d0186f7fa4355145756974cf6e5068943e917c613daa55cbaac222fd05
5
5
  SHA512:
6
- metadata.gz: f4c30c98c0a6baa305f4676965941e404b60421decf6ea2c71f5f934bf0c4bc597296955da11aa05caf67abc2315bdd4c95b8f9e7c2308be443d470ee3e7c6ec
7
- data.tar.gz: c03703cc5f1d59d2b0bde4aa848fdb7ea95366a9cdb9bc3049ff00c704bd2115d9893ae15641ea2e4d29178dfece718dcce1045ba6050b6820941470dce02caf
6
+ metadata.gz: 3daaac4f0134fa96ab5b035fb3d95fc9a0d4cd42ffeba3469428a69996e7ba61d99a52f8333c12b13c709740b7440c71531058f87e51932673309f691c582a5d
7
+ data.tar.gz: 8f9ae88792ef70ed0bb44b2b00c20b72907c107cafc6b7414e8cd60e5ad86a46457b64fdefe96162784999a245f1c6a3ab5aaa5fe9e330c8bc6bd997eca9a76b
data/.gitignore CHANGED
@@ -1,6 +1,5 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
- /Gemfile.lock
4
3
  /_yardoc/
5
4
  /coverage/
6
5
  /doc/
data/.rubocop.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  AllCops:
2
2
  NewCops: disable
3
- TargetRubyVersion: 2.4
3
+ TargetRubyVersion: 2.7
4
4
  Exclude:
5
5
  - "Guardfile"
6
6
  - "Rakefile"
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.5.1
1
+ 2.7.4
data/Gemfile.lock ADDED
@@ -0,0 +1,242 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ postman_mta (0.2.8)
5
+ httparty (~> 0.15)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ actioncable (5.2.8.1)
11
+ actionpack (= 5.2.8.1)
12
+ nio4r (~> 2.0)
13
+ websocket-driver (>= 0.6.1)
14
+ actionmailer (5.2.8.1)
15
+ actionpack (= 5.2.8.1)
16
+ actionview (= 5.2.8.1)
17
+ activejob (= 5.2.8.1)
18
+ mail (~> 2.5, >= 2.5.4)
19
+ rails-dom-testing (~> 2.0)
20
+ actionpack (5.2.8.1)
21
+ actionview (= 5.2.8.1)
22
+ activesupport (= 5.2.8.1)
23
+ rack (~> 2.0, >= 2.0.8)
24
+ rack-test (>= 0.6.3)
25
+ rails-dom-testing (~> 2.0)
26
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
27
+ actionview (5.2.8.1)
28
+ activesupport (= 5.2.8.1)
29
+ builder (~> 3.1)
30
+ erubi (~> 1.4)
31
+ rails-dom-testing (~> 2.0)
32
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
33
+ activejob (5.2.8.1)
34
+ activesupport (= 5.2.8.1)
35
+ globalid (>= 0.3.6)
36
+ activemodel (5.2.8.1)
37
+ activesupport (= 5.2.8.1)
38
+ activerecord (5.2.8.1)
39
+ activemodel (= 5.2.8.1)
40
+ activesupport (= 5.2.8.1)
41
+ arel (>= 9.0)
42
+ activestorage (5.2.8.1)
43
+ actionpack (= 5.2.8.1)
44
+ activerecord (= 5.2.8.1)
45
+ marcel (~> 1.0.0)
46
+ activesupport (5.2.8.1)
47
+ concurrent-ruby (~> 1.0, >= 1.0.2)
48
+ i18n (>= 0.7, < 2)
49
+ minitest (~> 5.1)
50
+ tzinfo (~> 1.1)
51
+ addressable (2.8.1)
52
+ public_suffix (>= 2.0.2, < 6.0)
53
+ api_matchers (0.6.2)
54
+ activesupport (>= 3.2.5)
55
+ nokogiri (>= 1.5.2)
56
+ rspec (>= 3.1)
57
+ arel (9.0.0)
58
+ ast (2.4.2)
59
+ builder (3.2.4)
60
+ childprocess (4.1.0)
61
+ coderay (1.1.3)
62
+ concurrent-ruby (1.1.10)
63
+ crack (0.4.5)
64
+ rexml
65
+ crass (1.0.6)
66
+ diff-lcs (1.5.0)
67
+ erubi (1.11.0)
68
+ ffi (1.15.5)
69
+ formatador (1.1.0)
70
+ globalid (1.0.0)
71
+ activesupport (>= 5.0)
72
+ guard (2.18.0)
73
+ formatador (>= 0.2.4)
74
+ listen (>= 2.7, < 4.0)
75
+ lumberjack (>= 1.0.12, < 2.0)
76
+ nenv (~> 0.1)
77
+ notiffany (~> 0.0)
78
+ pry (>= 0.13.0)
79
+ shellany (~> 0.0)
80
+ thor (>= 0.18.1)
81
+ guard-compat (1.2.1)
82
+ guard-rspec (4.7.3)
83
+ guard (~> 2.1)
84
+ guard-compat (~> 1.1)
85
+ rspec (>= 2.99.0, < 4.0)
86
+ hashdiff (1.0.1)
87
+ httparty (0.20.0)
88
+ mime-types (~> 3.0)
89
+ multi_xml (>= 0.5.2)
90
+ i18n (1.12.0)
91
+ concurrent-ruby (~> 1.0)
92
+ iniparse (1.5.0)
93
+ json (2.6.2)
94
+ kwalify (0.7.2)
95
+ listen (3.7.1)
96
+ rb-fsevent (~> 0.10, >= 0.10.3)
97
+ rb-inotify (~> 0.9, >= 0.9.10)
98
+ loofah (2.18.0)
99
+ crass (~> 1.0.2)
100
+ nokogiri (>= 1.5.9)
101
+ lumberjack (1.2.8)
102
+ mail (2.7.1)
103
+ mini_mime (>= 0.1.1)
104
+ marcel (1.0.2)
105
+ method_source (1.0.0)
106
+ mime-types (3.4.1)
107
+ mime-types-data (~> 3.2015)
108
+ mime-types-data (3.2022.0105)
109
+ mini_mime (1.1.2)
110
+ minitest (5.16.3)
111
+ multi_xml (0.6.0)
112
+ nenv (0.3.0)
113
+ nio4r (2.5.8)
114
+ nokogiri (1.13.8-x86_64-linux)
115
+ racc (~> 1.4)
116
+ notiffany (0.1.3)
117
+ nenv (~> 0.1)
118
+ shellany (~> 0.0)
119
+ overcommit (0.59.1)
120
+ childprocess (>= 0.6.3, < 5)
121
+ iniparse (~> 1.4)
122
+ rexml (~> 3.2)
123
+ parallel (1.22.1)
124
+ parser (3.1.2.1)
125
+ ast (~> 2.4.1)
126
+ pry (0.14.1)
127
+ coderay (~> 1.1)
128
+ method_source (~> 1.0)
129
+ public_suffix (5.0.0)
130
+ racc (1.6.0)
131
+ rack (2.2.4)
132
+ rack-test (2.0.2)
133
+ rack (>= 1.3)
134
+ rails (5.2.8.1)
135
+ actioncable (= 5.2.8.1)
136
+ actionmailer (= 5.2.8.1)
137
+ actionpack (= 5.2.8.1)
138
+ actionview (= 5.2.8.1)
139
+ activejob (= 5.2.8.1)
140
+ activemodel (= 5.2.8.1)
141
+ activerecord (= 5.2.8.1)
142
+ activestorage (= 5.2.8.1)
143
+ activesupport (= 5.2.8.1)
144
+ bundler (>= 1.3.0)
145
+ railties (= 5.2.8.1)
146
+ sprockets-rails (>= 2.0.0)
147
+ rails-dom-testing (2.0.3)
148
+ activesupport (>= 4.2.0)
149
+ nokogiri (>= 1.6)
150
+ rails-html-sanitizer (1.4.3)
151
+ loofah (~> 2.3)
152
+ railties (5.2.8.1)
153
+ actionpack (= 5.2.8.1)
154
+ activesupport (= 5.2.8.1)
155
+ method_source
156
+ rake (>= 0.8.7)
157
+ thor (>= 0.19.0, < 2.0)
158
+ rainbow (3.1.1)
159
+ rake (10.5.0)
160
+ rb-fsevent (0.11.2)
161
+ rb-inotify (0.10.1)
162
+ ffi (~> 1.0)
163
+ reek (6.1.1)
164
+ kwalify (~> 0.7.0)
165
+ parser (~> 3.1.0)
166
+ rainbow (>= 2.0, < 4.0)
167
+ regexp_parser (2.5.0)
168
+ rexml (3.2.5)
169
+ rspec (3.9.0)
170
+ rspec-core (~> 3.9.0)
171
+ rspec-expectations (~> 3.9.0)
172
+ rspec-mocks (~> 3.9.0)
173
+ rspec-core (3.9.3)
174
+ rspec-support (~> 3.9.3)
175
+ rspec-expectations (3.9.4)
176
+ diff-lcs (>= 1.2.0, < 2.0)
177
+ rspec-support (~> 3.9.0)
178
+ rspec-mocks (3.9.1)
179
+ diff-lcs (>= 1.2.0, < 2.0)
180
+ rspec-support (~> 3.9.0)
181
+ rspec-rails (3.9.1)
182
+ actionpack (>= 3.0)
183
+ activesupport (>= 3.0)
184
+ railties (>= 3.0)
185
+ rspec-core (~> 3.9.0)
186
+ rspec-expectations (~> 3.9.0)
187
+ rspec-mocks (~> 3.9.0)
188
+ rspec-support (~> 3.9.0)
189
+ rspec-support (3.9.4)
190
+ rubocop (1.35.1)
191
+ json (~> 2.3)
192
+ parallel (~> 1.10)
193
+ parser (>= 3.1.2.1)
194
+ rainbow (>= 2.2.2, < 4.0)
195
+ regexp_parser (>= 1.8, < 3.0)
196
+ rexml (>= 3.2.5, < 4.0)
197
+ rubocop-ast (>= 1.20.1, < 2.0)
198
+ ruby-progressbar (~> 1.7)
199
+ unicode-display_width (>= 1.4.0, < 3.0)
200
+ rubocop-ast (1.21.0)
201
+ parser (>= 3.1.1.0)
202
+ ruby-progressbar (1.11.0)
203
+ shellany (0.0.1)
204
+ sprockets (4.1.1)
205
+ concurrent-ruby (~> 1.0)
206
+ rack (> 1, < 3)
207
+ sprockets-rails (3.4.2)
208
+ actionpack (>= 5.2)
209
+ activesupport (>= 5.2)
210
+ sprockets (>= 3.0.0)
211
+ sqlite3 (1.3.13)
212
+ thor (1.2.1)
213
+ thread_safe (0.3.6)
214
+ tzinfo (1.2.10)
215
+ thread_safe (~> 0.1)
216
+ unicode-display_width (2.2.0)
217
+ webmock (3.18.1)
218
+ addressable (>= 2.8.0)
219
+ crack (>= 0.3.2)
220
+ hashdiff (>= 0.4.0, < 2.0.0)
221
+ websocket-driver (0.7.5)
222
+ websocket-extensions (>= 0.1.0)
223
+ websocket-extensions (0.1.5)
224
+
225
+ PLATFORMS
226
+ x86_64-linux
227
+
228
+ DEPENDENCIES
229
+ api_matchers (~> 0.6.2)
230
+ guard-rspec (~> 4.7, >= 4.7.3)
231
+ overcommit
232
+ postman_mta!
233
+ rails (~> 5.0)
234
+ rake (~> 10.0)
235
+ reek
236
+ rspec-rails (~> 3.5, >= 3.5.2)
237
+ rubocop
238
+ sqlite3 (~> 1.3, < 1.4)
239
+ webmock (~> 3.0, >= 3.0.1)
240
+
241
+ BUNDLED WITH
242
+ 2.2.26
@@ -10,8 +10,6 @@ module PostmanMta
10
10
  ActionController::Renderers::All,
11
11
  ActionController::ConditionalGet,
12
12
 
13
- ActionController::ForceSSL,
14
-
15
13
  AbstractController::Callbacks,
16
14
  ActionController::StrongParameters,
17
15
 
@@ -0,0 +1,21 @@
1
+ module PostmanMta
2
+ class NotesController < ApplicationController
3
+ def create
4
+ render note.create(notes_params)
5
+ end
6
+
7
+ def update
8
+ render note.update(notes_params[:id], notes_params)
9
+ end
10
+
11
+ private
12
+
13
+ def note
14
+ @note ||= PostmanMta::Note.new
15
+ end
16
+
17
+ def notes_params
18
+ params.permit!
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,11 @@
1
+ module PostmanMta
2
+ class Note < ApplicationModel
3
+ def create(params)
4
+ post('/notes', body: params)
5
+ end
6
+
7
+ def update(note_id, params)
8
+ patch("/notes/#{note_id}", body: params)
9
+ end
10
+ end
11
+ end
@@ -11,5 +11,9 @@ module PostmanMta
11
11
  def create(params = {})
12
12
  post('/routes', body: params)
13
13
  end
14
+
15
+ def destroy(uuid, params = {})
16
+ delete("/routes/#{uuid}", body: params)
17
+ end
14
18
  end
15
19
  end
data/config/routes.rb CHANGED
@@ -33,4 +33,5 @@ PostmanMta::Engine.routes.draw do
33
33
  resources :routes, only: :index
34
34
  resources :domains, only: :index
35
35
  resources :labels, only: :index
36
+ resources :notes, only: [:create, :update]
36
37
  end
@@ -17,7 +17,7 @@ module PostmanMta
17
17
  @response_body = response.parsed_response
18
18
  @response_status = response.code
19
19
 
20
- { json: response_body, status: response_status }
20
+ { json: response_body, status: @response_status }
21
21
  end
22
22
  end
23
23
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PostmanMta
4
- VERSION = '0.2.4'
4
+ VERSION = '0.2.8'
5
5
  end
data/postman_mta.gemspec CHANGED
@@ -23,7 +23,6 @@ Gem::Specification.new do |spec|
23
23
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
24
  spec.require_paths = ['lib']
25
25
 
26
- spec.add_development_dependency 'bundler', '~> 1.14'
27
26
  spec.add_development_dependency 'guard-rspec', '~> 4.7', '>= 4.7.3'
28
27
  spec.add_development_dependency 'overcommit'
29
28
  spec.add_development_dependency 'rake', '~> 10.0'
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postman_mta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Malinovskiy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-15 00:00:00.000000000 Z
11
+ date: 2022-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.14'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.14'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: guard-rspec
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -143,6 +129,7 @@ files:
143
129
  - ".ruby-version"
144
130
  - ".travis.yml"
145
131
  - Gemfile
132
+ - Gemfile.lock
146
133
  - Guardfile
147
134
  - LICENSE.txt
148
135
  - README.md
@@ -154,6 +141,7 @@ files:
154
141
  - app/controllers/postman_mta/domains_controller.rb
155
142
  - app/controllers/postman_mta/labels_controller.rb
156
143
  - app/controllers/postman_mta/messages_controller.rb
144
+ - app/controllers/postman_mta/notes_controller.rb
157
145
  - app/controllers/postman_mta/routes_controller.rb
158
146
  - app/controllers/postman_mta/stats/messages_controller.rb
159
147
  - app/controllers/postman_mta/tags_controller.rb
@@ -166,6 +154,7 @@ files:
166
154
  - app/models/postman_mta/domain.rb
167
155
  - app/models/postman_mta/label.rb
168
156
  - app/models/postman_mta/message.rb
157
+ - app/models/postman_mta/note.rb
169
158
  - app/models/postman_mta/route.rb
170
159
  - app/models/postman_mta/tag.rb
171
160
  - bin/console
@@ -201,8 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
201
190
  - !ruby/object:Gem::Version
202
191
  version: '0'
203
192
  requirements: []
204
- rubyforge_project:
205
- rubygems_version: 2.7.6
193
+ rubygems_version: 3.2.26
206
194
  signing_key:
207
195
  specification_version: 4
208
196
  summary: Rails gem to easy integrate postman to your application