flowmailer_rails 0.2.0 → 0.3.0

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: 26ad29df91bf8ce2e60eea7d6bc7e35ead984aaacb88a09fce445ec98def8542
4
- data.tar.gz: 606d48b72365d4c9c36bf3b605ff29a4ed9ff159b34889209280ccf1b90872ce
3
+ metadata.gz: 7884566c5323eae88a0598cb79f9a885bd19f7e18b2c0f5e5c47996aeb3ee2f4
4
+ data.tar.gz: 86377d140e8af3ad2499c66d93f30f23e53d41ab9aa8e6dac6839329b7321c52
5
5
  SHA512:
6
- metadata.gz: 6571137fd7a30106c0fa50adc8e0631c6ae7f74efeea7f5a4dbecccad74dc94a3419ee4143d46a2e9ac681d072d6c9fc9b6ea53914f810383cee6e0cc90381dc
7
- data.tar.gz: fdf61fa3331fea173cdfaa6e36826b30f7c5e1e48286ee6c91cad28d71264aadcd9b26f040c225617db810aa4dc5c365cd4f3202266e4d9f21a47546f69fa578
6
+ metadata.gz: 8e6b9b2c12006e737cdf6b963d2a03cdf1af5d8ae2e146cfa7249cd161750a9f2213231bdbe1e8a2b22d2c8179a644130470a25b606798dbf23d8ccae6cc8594
7
+ data.tar.gz: bfc43dbe2a9798a6c99d00dc130f02dd6b3fd227adba22a81465592532d10d57b468281b1b70b7a794b576b803678c56b57dd574375e3c5818dc771d053f4801
data/Gemfile.lock CHANGED
@@ -9,40 +9,53 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actionmailer (6.1.3.2)
13
- actionpack (= 6.1.3.2)
14
- actionview (= 6.1.3.2)
15
- activejob (= 6.1.3.2)
16
- activesupport (= 6.1.3.2)
12
+ actioncable (5.2.6)
13
+ actionpack (= 5.2.6)
14
+ nio4r (~> 2.0)
15
+ websocket-driver (>= 0.6.1)
16
+ actionmailer (5.2.6)
17
+ actionpack (= 5.2.6)
18
+ actionview (= 5.2.6)
19
+ activejob (= 5.2.6)
17
20
  mail (~> 2.5, >= 2.5.4)
18
21
  rails-dom-testing (~> 2.0)
19
- actionpack (6.1.3.2)
20
- actionview (= 6.1.3.2)
21
- activesupport (= 6.1.3.2)
22
- rack (~> 2.0, >= 2.0.9)
22
+ actionpack (5.2.6)
23
+ actionview (= 5.2.6)
24
+ activesupport (= 5.2.6)
25
+ rack (~> 2.0, >= 2.0.8)
23
26
  rack-test (>= 0.6.3)
24
27
  rails-dom-testing (~> 2.0)
25
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
26
- actionview (6.1.3.2)
27
- activesupport (= 6.1.3.2)
28
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
29
+ actionview (5.2.6)
30
+ activesupport (= 5.2.6)
28
31
  builder (~> 3.1)
29
32
  erubi (~> 1.4)
30
33
  rails-dom-testing (~> 2.0)
31
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
32
- activejob (6.1.3.2)
33
- activesupport (= 6.1.3.2)
34
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
35
+ activejob (5.2.6)
36
+ activesupport (= 5.2.6)
34
37
  globalid (>= 0.3.6)
35
- activesupport (6.1.3.2)
38
+ activemodel (5.2.6)
39
+ activesupport (= 5.2.6)
40
+ activerecord (5.2.6)
41
+ activemodel (= 5.2.6)
42
+ activesupport (= 5.2.6)
43
+ arel (>= 9.0)
44
+ activestorage (5.2.6)
45
+ actionpack (= 5.2.6)
46
+ activerecord (= 5.2.6)
47
+ marcel (~> 1.0.0)
48
+ activesupport (5.2.6)
36
49
  concurrent-ruby (~> 1.0, >= 1.0.2)
37
- i18n (>= 1.6, < 2)
38
- minitest (>= 5.1)
39
- tzinfo (~> 2.0)
40
- zeitwerk (~> 2.3)
41
- addressable (2.7.0)
50
+ i18n (>= 0.7, < 2)
51
+ minitest (~> 5.1)
52
+ tzinfo (~> 1.1)
53
+ addressable (2.8.0)
42
54
  public_suffix (>= 2.0.2, < 5.0)
43
- ast (2.4.1)
55
+ arel (9.0.0)
56
+ ast (2.4.2)
44
57
  builder (3.2.4)
45
- concurrent-ruby (1.1.8)
58
+ concurrent-ruby (1.1.9)
46
59
  crack (0.4.4)
47
60
  crass (1.0.6)
48
61
  diff-lcs (1.3)
@@ -52,37 +65,61 @@ GEM
52
65
  multipart-post (>= 1.2, < 3)
53
66
  faraday_middleware (0.14.0)
54
67
  faraday (>= 0.7.4, < 1.0)
55
- globalid (0.4.2)
56
- activesupport (>= 4.2.0)
68
+ globalid (0.5.2)
69
+ activesupport (>= 5.0)
57
70
  hashdiff (1.0.1)
58
71
  i18n (1.8.10)
59
72
  concurrent-ruby (~> 1.0)
60
- loofah (2.9.1)
73
+ loofah (2.11.0)
61
74
  crass (~> 1.0.2)
62
75
  nokogiri (>= 1.5.9)
63
76
  mail (2.7.1)
64
77
  mini_mime (>= 0.1.1)
78
+ marcel (1.0.1)
79
+ method_source (1.0.0)
65
80
  mini_mime (1.1.0)
81
+ mini_portile2 (2.6.1)
66
82
  minitest (5.14.4)
67
83
  multipart-post (2.1.1)
68
- nokogiri (1.11.6-arm64-darwin)
84
+ nio4r (2.5.8)
85
+ nokogiri (1.12.2)
86
+ mini_portile2 (~> 2.6.1)
69
87
  racc (~> 1.4)
70
- parallel (1.20.0)
71
- parser (2.7.2.0)
88
+ parallel (1.20.1)
89
+ parser (3.0.2.0)
72
90
  ast (~> 2.4.1)
73
91
  public_suffix (4.0.6)
74
92
  racc (1.5.2)
75
93
  rack (2.2.3)
76
94
  rack-test (1.1.0)
77
95
  rack (>= 1.0, < 3)
96
+ rails (5.2.6)
97
+ actioncable (= 5.2.6)
98
+ actionmailer (= 5.2.6)
99
+ actionpack (= 5.2.6)
100
+ actionview (= 5.2.6)
101
+ activejob (= 5.2.6)
102
+ activemodel (= 5.2.6)
103
+ activerecord (= 5.2.6)
104
+ activestorage (= 5.2.6)
105
+ activesupport (= 5.2.6)
106
+ bundler (>= 1.3.0)
107
+ railties (= 5.2.6)
108
+ sprockets-rails (>= 2.0.0)
78
109
  rails-dom-testing (2.0.3)
79
110
  activesupport (>= 4.2.0)
80
111
  nokogiri (>= 1.6)
81
112
  rails-html-sanitizer (1.3.0)
82
113
  loofah (~> 2.3)
114
+ railties (5.2.6)
115
+ actionpack (= 5.2.6)
116
+ activesupport (= 5.2.6)
117
+ method_source
118
+ rake (>= 0.8.7)
119
+ thor (>= 0.19.0, < 2.0)
83
120
  rainbow (3.0.0)
84
121
  rake (13.0.1)
85
- regexp_parser (1.8.2)
122
+ regexp_parser (2.1.1)
86
123
  rexml (3.2.5)
87
124
  rspec (3.9.0)
88
125
  rspec-core (~> 3.9.0)
@@ -97,37 +134,56 @@ GEM
97
134
  rspec-mocks (3.9.1)
98
135
  diff-lcs (>= 1.2.0, < 2.0)
99
136
  rspec-support (~> 3.9.0)
137
+ rspec-rails (4.0.1)
138
+ actionpack (>= 4.2)
139
+ activesupport (>= 4.2)
140
+ railties (>= 4.2)
141
+ rspec-core (~> 3.9)
142
+ rspec-expectations (~> 3.9)
143
+ rspec-mocks (~> 3.9)
144
+ rspec-support (~> 3.9)
100
145
  rspec-support (3.9.2)
101
- rubocop (0.91.1)
146
+ rubocop (1.18.4)
102
147
  parallel (~> 1.10)
103
- parser (>= 2.7.1.1)
148
+ parser (>= 3.0.0.0)
104
149
  rainbow (>= 2.2.2, < 4.0)
105
- regexp_parser (>= 1.7)
150
+ regexp_parser (>= 1.8, < 3.0)
106
151
  rexml
107
- rubocop-ast (>= 0.4.0, < 1.0)
152
+ rubocop-ast (>= 1.8.0, < 2.0)
108
153
  ruby-progressbar (~> 1.7)
109
- unicode-display_width (>= 1.4.0, < 2.0)
110
- rubocop-ast (0.8.0)
111
- parser (>= 2.7.1.5)
112
- rubocop-performance (1.8.1)
113
- rubocop (>= 0.87.0)
154
+ unicode-display_width (>= 1.4.0, < 3.0)
155
+ rubocop-ast (1.9.0)
156
+ parser (>= 3.0.1.1)
157
+ rubocop-performance (1.11.4)
158
+ rubocop (>= 1.7.0, < 2.0)
114
159
  rubocop-ast (>= 0.4.0)
115
- ruby-progressbar (1.10.1)
160
+ ruby-progressbar (1.11.0)
116
161
  simplecov (0.19.1)
117
162
  docile (~> 1.1)
118
163
  simplecov-html (~> 0.11)
119
164
  simplecov-html (0.12.3)
120
- standard (0.6.2)
121
- rubocop (= 0.91.1)
122
- rubocop-performance (= 1.8.1)
123
- tzinfo (2.0.4)
165
+ sprockets (4.0.2)
124
166
  concurrent-ruby (~> 1.0)
125
- unicode-display_width (1.7.0)
167
+ rack (> 1, < 3)
168
+ sprockets-rails (3.2.2)
169
+ actionpack (>= 4.0)
170
+ activesupport (>= 4.0)
171
+ sprockets (>= 3.0.0)
172
+ standard (1.1.7)
173
+ rubocop (= 1.18.4)
174
+ rubocop-performance (= 1.11.4)
175
+ thor (1.1.0)
176
+ thread_safe (0.3.6)
177
+ tzinfo (1.2.9)
178
+ thread_safe (~> 0.1)
179
+ unicode-display_width (2.0.0)
126
180
  webmock (3.10.0)
127
181
  addressable (>= 2.3.6)
128
182
  crack (>= 0.3.2)
129
183
  hashdiff (>= 0.4.0, < 2.0.0)
130
- zeitwerk (2.4.2)
184
+ websocket-driver (0.7.5)
185
+ websocket-extensions (>= 0.1.0)
186
+ websocket-extensions (0.1.5)
131
187
 
132
188
  PLATFORMS
133
189
  ruby
@@ -135,11 +191,13 @@ PLATFORMS
135
191
  DEPENDENCIES
136
192
  bundler (~> 2.0)
137
193
  flowmailer_rails!
194
+ rails (= 5.2.6)
138
195
  rake (~> 13.0)
139
196
  rspec (~> 3.0)
140
197
  rspec-json_expectations (~> 2.2)
198
+ rspec-rails
141
199
  simplecov (~> 0.19)
142
- standard (~> 0.6.1)
200
+ standard (~> 1.1.6)
143
201
  webmock (~> 3.10.0)
144
202
 
145
203
  BUNDLED WITH
@@ -36,5 +36,7 @@ Gem::Specification.new do |spec|
36
36
  spec.add_development_dependency "rspec-json_expectations", "~> 2.2"
37
37
  spec.add_development_dependency "simplecov", "~> 0.19"
38
38
  spec.add_development_dependency "webmock", "~> 3.10.0"
39
- spec.add_development_dependency "standard", "~> 0.6.1"
39
+ spec.add_development_dependency "standard", "~> 1.1.6"
40
+ spec.add_development_dependency "rails", "5.2.6"
41
+ spec.add_development_dependency "rspec-rails"
40
42
  end
@@ -1,6 +1,7 @@
1
1
  require "action_mailer"
2
2
  require "flowmailer_rails/mailer"
3
3
  require "flowmailer_rails/mail_converter"
4
+ require "flowmailer_rails/message_extensions/mail"
4
5
 
5
6
  module FlowmailerRails
6
7
  def self.install
@@ -20,7 +20,8 @@ module FlowmailerRails
20
20
  @json ||= {
21
21
  messageType: "EMAIL",
22
22
  mimedata: mimedata,
23
- senderAddress: sender_address
23
+ senderAddress: sender_address,
24
+ tags: rails_mail.tags
24
25
  }
25
26
  end
26
27
 
@@ -4,8 +4,11 @@ require "faraday_middleware"
4
4
  module FlowmailerRails
5
5
  class Mailer
6
6
  class NoAccessTokenError < StandardError; end
7
+
7
8
  class DeliveryError < StandardError; end
9
+
8
10
  class TooBigMessageError < DeliveryError; end
11
+
9
12
  class ExpiredAccessTokenError < StandardError; end
10
13
 
11
14
  OAUTH_ENDPOINT = "https://login.flowmailer.net".freeze
@@ -0,0 +1,12 @@
1
+ module Mail
2
+ class Message
3
+ def tags(val = nil)
4
+ tags = default("TAGS", val)
5
+ tags.is_a?(String) ? tags.split(/,\W?/) : tags
6
+ end
7
+
8
+ def tags=(val)
9
+ header["TAGS"] = val
10
+ end
11
+ end
12
+ end
@@ -1,3 +1,3 @@
1
1
  module FlowmailerRails
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flowmailer_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Brusman
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-01 00:00:00.000000000 Z
11
+ date: 2021-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionmailer
@@ -148,14 +148,42 @@ dependencies:
148
148
  requirements:
149
149
  - - "~>"
150
150
  - !ruby/object:Gem::Version
151
- version: 0.6.1
151
+ version: 1.1.6
152
152
  type: :development
153
153
  prerelease: false
154
154
  version_requirements: !ruby/object:Gem::Requirement
155
155
  requirements:
156
156
  - - "~>"
157
157
  - !ruby/object:Gem::Version
158
- version: 0.6.1
158
+ version: 1.1.6
159
+ - !ruby/object:Gem::Dependency
160
+ name: rails
161
+ requirement: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - '='
164
+ - !ruby/object:Gem::Version
165
+ version: 5.2.6
166
+ type: :development
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - '='
171
+ - !ruby/object:Gem::Version
172
+ version: 5.2.6
173
+ - !ruby/object:Gem::Dependency
174
+ name: rspec-rails
175
+ requirement: !ruby/object:Gem::Requirement
176
+ requirements:
177
+ - - ">="
178
+ - !ruby/object:Gem::Version
179
+ version: '0'
180
+ type: :development
181
+ prerelease: false
182
+ version_requirements: !ruby/object:Gem::Requirement
183
+ requirements:
184
+ - - ">="
185
+ - !ruby/object:Gem::Version
186
+ version: '0'
159
187
  description: Send ActionMailer messages with the Flowmailer API
160
188
  email:
161
189
  - jonas@teamtailor.com
@@ -175,6 +203,7 @@ files:
175
203
  - lib/flowmailer_rails.rb
176
204
  - lib/flowmailer_rails/mail_converter.rb
177
205
  - lib/flowmailer_rails/mailer.rb
206
+ - lib/flowmailer_rails/message_extensions/mail.rb
178
207
  - lib/flowmailer_rails/railtie.rb
179
208
  - lib/flowmailer_rails/version.rb
180
209
  homepage: https://github.com/Teamtailor/flowmailer_rails