texd 0.4.2 → 0.5.0

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: f6bbbe0b3497e37a0c6aad0d14c4869642b3f515082a3527ce176f7a043b868d
4
- data.tar.gz: 36dc2ada8433384db1e2e39534a9a43d54290e7189398942e92911e7b4801da3
3
+ metadata.gz: 7b96f50cf6e5741a667f9f0bdb41d6e781c50a6d1a67b4637f1c4e1e12a45176
4
+ data.tar.gz: 15028be97e8a7e86025998dc54cb8e502976dd3752bc88f68b55dac32309e4ed
5
5
  SHA512:
6
- metadata.gz: 1aadeb5f3c91bb5894d9c207a8f42e34ae359463f22921fc83299157c01b63bbcb7fe3f4ac466f982ae7571aa4081542ba33e6b631811aa48ca03db527af993a
7
- data.tar.gz: b904d72f6f4630665f263a3d4a57ef1fe53e38f3ed46c162bb546bad33d7e555d3d6734e65148e97111e1077279fcb9150998142d371c19cad969b5bfe5c3e64
6
+ metadata.gz: d5a1f0f363874f090a28ced8d90a13ebcab331b3410833304ea0f5273143668b8e89e227a94045547badf0fcdf6dd7690f565272501e72b0b13764c8e673c530
7
+ data.tar.gz: 513fc1c93cbcab5941eda498453f23914149314709b8d67738470a43f6c4fbc65cf0c636ab2148f8872155b2562e6df4f79f9c29a09b7052e92ca61f1fb3c0b9
data/CHANGELOG.md CHANGED
@@ -1,6 +1,14 @@
1
1
  ## Unreleased
2
2
 
3
- [Compare changes](https://github.com/digineo/texd-ruby/compare/v0.4.2...master)
3
+ [Compare changes](https://github.com/digineo/texd-ruby/compare/v0.5.0...master)
4
+
5
+ ## v0.5.0 - 2022-07-22
6
+
7
+ [Compare changes](https://github.com/digineo/texd-ruby/compare/v0.4.2...v0.5.0)
8
+
9
+ **Changes**
10
+
11
+ - add support for inline files: `<%= texd_inline "contents\n", "filename.txt" %>`
4
12
 
5
13
  ## v0.4.2 - 2022-06-16
6
14
 
data/Gemfile.lock CHANGED
@@ -1,74 +1,74 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- texd (0.4.2)
4
+ texd (0.5.0)
5
5
  multipart-post (~> 2.0)
6
6
  rails (>= 6.0, < 8)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actioncable (7.0.3)
12
- actionpack (= 7.0.3)
13
- activesupport (= 7.0.3)
11
+ actioncable (7.0.3.1)
12
+ actionpack (= 7.0.3.1)
13
+ activesupport (= 7.0.3.1)
14
14
  nio4r (~> 2.0)
15
15
  websocket-driver (>= 0.6.1)
16
- actionmailbox (7.0.3)
17
- actionpack (= 7.0.3)
18
- activejob (= 7.0.3)
19
- activerecord (= 7.0.3)
20
- activestorage (= 7.0.3)
21
- activesupport (= 7.0.3)
16
+ actionmailbox (7.0.3.1)
17
+ actionpack (= 7.0.3.1)
18
+ activejob (= 7.0.3.1)
19
+ activerecord (= 7.0.3.1)
20
+ activestorage (= 7.0.3.1)
21
+ activesupport (= 7.0.3.1)
22
22
  mail (>= 2.7.1)
23
23
  net-imap
24
24
  net-pop
25
25
  net-smtp
26
- actionmailer (7.0.3)
27
- actionpack (= 7.0.3)
28
- actionview (= 7.0.3)
29
- activejob (= 7.0.3)
30
- activesupport (= 7.0.3)
26
+ actionmailer (7.0.3.1)
27
+ actionpack (= 7.0.3.1)
28
+ actionview (= 7.0.3.1)
29
+ activejob (= 7.0.3.1)
30
+ activesupport (= 7.0.3.1)
31
31
  mail (~> 2.5, >= 2.5.4)
32
32
  net-imap
33
33
  net-pop
34
34
  net-smtp
35
35
  rails-dom-testing (~> 2.0)
36
- actionpack (7.0.3)
37
- actionview (= 7.0.3)
38
- activesupport (= 7.0.3)
36
+ actionpack (7.0.3.1)
37
+ actionview (= 7.0.3.1)
38
+ activesupport (= 7.0.3.1)
39
39
  rack (~> 2.0, >= 2.2.0)
40
40
  rack-test (>= 0.6.3)
41
41
  rails-dom-testing (~> 2.0)
42
42
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
43
- actiontext (7.0.3)
44
- actionpack (= 7.0.3)
45
- activerecord (= 7.0.3)
46
- activestorage (= 7.0.3)
47
- activesupport (= 7.0.3)
43
+ actiontext (7.0.3.1)
44
+ actionpack (= 7.0.3.1)
45
+ activerecord (= 7.0.3.1)
46
+ activestorage (= 7.0.3.1)
47
+ activesupport (= 7.0.3.1)
48
48
  globalid (>= 0.6.0)
49
49
  nokogiri (>= 1.8.5)
50
- actionview (7.0.3)
51
- activesupport (= 7.0.3)
50
+ actionview (7.0.3.1)
51
+ activesupport (= 7.0.3.1)
52
52
  builder (~> 3.1)
53
53
  erubi (~> 1.4)
54
54
  rails-dom-testing (~> 2.0)
55
55
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
56
- activejob (7.0.3)
57
- activesupport (= 7.0.3)
56
+ activejob (7.0.3.1)
57
+ activesupport (= 7.0.3.1)
58
58
  globalid (>= 0.3.6)
59
- activemodel (7.0.3)
60
- activesupport (= 7.0.3)
61
- activerecord (7.0.3)
62
- activemodel (= 7.0.3)
63
- activesupport (= 7.0.3)
64
- activestorage (7.0.3)
65
- actionpack (= 7.0.3)
66
- activejob (= 7.0.3)
67
- activerecord (= 7.0.3)
68
- activesupport (= 7.0.3)
59
+ activemodel (7.0.3.1)
60
+ activesupport (= 7.0.3.1)
61
+ activerecord (7.0.3.1)
62
+ activemodel (= 7.0.3.1)
63
+ activesupport (= 7.0.3.1)
64
+ activestorage (7.0.3.1)
65
+ actionpack (= 7.0.3.1)
66
+ activejob (= 7.0.3.1)
67
+ activerecord (= 7.0.3.1)
68
+ activesupport (= 7.0.3.1)
69
69
  marcel (~> 1.0)
70
70
  mini_mime (>= 1.1.0)
71
- activesupport (7.0.3)
71
+ activesupport (7.0.3.1)
72
72
  concurrent-ruby (~> 1.0, >= 1.0.2)
73
73
  i18n (>= 1.6, < 2)
74
74
  minitest (>= 5.1)
@@ -88,8 +88,9 @@ GEM
88
88
  erubi (1.10.0)
89
89
  globalid (1.0.0)
90
90
  activesupport (>= 5.0)
91
- i18n (1.10.0)
91
+ i18n (1.12.0)
92
92
  concurrent-ruby (~> 1.0)
93
+ json (2.6.2)
93
94
  loofah (2.18.0)
94
95
  crass (~> 1.0.2)
95
96
  nokogiri (>= 1.5.9)
@@ -99,7 +100,7 @@ GEM
99
100
  method_source (1.0.0)
100
101
  mini_mime (1.1.2)
101
102
  mini_portile2 (2.8.0)
102
- minitest (5.16.1)
103
+ minitest (5.16.2)
103
104
  multipart-post (2.2.3)
104
105
  net-imap (0.2.3)
105
106
  digest
@@ -116,10 +117,10 @@ GEM
116
117
  net-protocol
117
118
  timeout
118
119
  nio4r (2.5.8)
119
- nokogiri (1.13.6)
120
+ nokogiri (1.13.7)
120
121
  mini_portile2 (~> 2.8.0)
121
122
  racc (~> 1.4)
122
- nokogiri (1.13.6-x86_64-linux)
123
+ nokogiri (1.13.7-x86_64-linux)
123
124
  racc (~> 1.4)
124
125
  parallel (1.22.1)
125
126
  parser (3.1.2.0)
@@ -131,31 +132,31 @@ GEM
131
132
  byebug (~> 11.0)
132
133
  pry (~> 0.13.0)
133
134
  racc (1.6.0)
134
- rack (2.2.3.1)
135
- rack-test (2.0.1)
135
+ rack (2.2.4)
136
+ rack-test (2.0.2)
136
137
  rack (>= 1.3)
137
- rails (7.0.3)
138
- actioncable (= 7.0.3)
139
- actionmailbox (= 7.0.3)
140
- actionmailer (= 7.0.3)
141
- actionpack (= 7.0.3)
142
- actiontext (= 7.0.3)
143
- actionview (= 7.0.3)
144
- activejob (= 7.0.3)
145
- activemodel (= 7.0.3)
146
- activerecord (= 7.0.3)
147
- activestorage (= 7.0.3)
148
- activesupport (= 7.0.3)
138
+ rails (7.0.3.1)
139
+ actioncable (= 7.0.3.1)
140
+ actionmailbox (= 7.0.3.1)
141
+ actionmailer (= 7.0.3.1)
142
+ actionpack (= 7.0.3.1)
143
+ actiontext (= 7.0.3.1)
144
+ actionview (= 7.0.3.1)
145
+ activejob (= 7.0.3.1)
146
+ activemodel (= 7.0.3.1)
147
+ activerecord (= 7.0.3.1)
148
+ activestorage (= 7.0.3.1)
149
+ activesupport (= 7.0.3.1)
149
150
  bundler (>= 1.15.0)
150
- railties (= 7.0.3)
151
+ railties (= 7.0.3.1)
151
152
  rails-dom-testing (2.0.3)
152
153
  activesupport (>= 4.2.0)
153
154
  nokogiri (>= 1.6)
154
155
  rails-html-sanitizer (1.4.3)
155
156
  loofah (~> 2.3)
156
- railties (7.0.3)
157
- actionpack (= 7.0.3)
158
- activesupport (= 7.0.3)
157
+ railties (7.0.3.1)
158
+ actionpack (= 7.0.3.1)
159
+ activesupport (= 7.0.3.1)
159
160
  method_source
160
161
  rake (>= 12.2)
161
162
  thor (~> 1.0)
@@ -185,30 +186,31 @@ GEM
185
186
  rspec-mocks (~> 3.10)
186
187
  rspec-support (~> 3.10)
187
188
  rspec-support (3.11.0)
188
- rubocop (1.31.0)
189
+ rubocop (1.32.0)
190
+ json (~> 2.3)
189
191
  parallel (~> 1.10)
190
192
  parser (>= 3.1.0.0)
191
193
  rainbow (>= 2.2.2, < 4.0)
192
194
  regexp_parser (>= 1.8, < 3.0)
193
195
  rexml (>= 3.2.5, < 4.0)
194
- rubocop-ast (>= 1.18.0, < 2.0)
196
+ rubocop-ast (>= 1.19.1, < 2.0)
195
197
  ruby-progressbar (~> 1.7)
196
198
  unicode-display_width (>= 1.4.0, < 3.0)
197
- rubocop-ast (1.18.0)
199
+ rubocop-ast (1.19.1)
198
200
  parser (>= 3.1.1.0)
199
- rubocop-rails (2.15.1)
201
+ rubocop-rails (2.15.2)
200
202
  activesupport (>= 4.2.0)
201
203
  rack (>= 1.1)
202
204
  rubocop (>= 1.7.0, < 2.0)
203
205
  rubocop-rake (0.6.0)
204
206
  rubocop (~> 1.0)
205
- rubocop-rspec (2.11.1)
206
- rubocop (~> 1.19)
207
+ rubocop-rspec (2.12.1)
208
+ rubocop (~> 1.31)
207
209
  ruby-progressbar (1.11.0)
208
210
  strscan (3.0.3)
209
211
  thor (1.2.1)
210
212
  timeout (0.3.0)
211
- tzinfo (2.0.4)
213
+ tzinfo (2.0.5)
212
214
  concurrent-ruby (~> 1.0)
213
215
  unicode-display_width (2.2.0)
214
216
  webrick (1.7.0)
@@ -1,63 +1,63 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- texd (0.4.2)
4
+ texd (0.5.0)
5
5
  multipart-post (~> 2.0)
6
6
  rails (>= 6.0, < 8)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actioncable (6.0.5)
12
- actionpack (= 6.0.5)
11
+ actioncable (6.0.5.1)
12
+ actionpack (= 6.0.5.1)
13
13
  nio4r (~> 2.0)
14
14
  websocket-driver (>= 0.6.1)
15
- actionmailbox (6.0.5)
16
- actionpack (= 6.0.5)
17
- activejob (= 6.0.5)
18
- activerecord (= 6.0.5)
19
- activestorage (= 6.0.5)
20
- activesupport (= 6.0.5)
15
+ actionmailbox (6.0.5.1)
16
+ actionpack (= 6.0.5.1)
17
+ activejob (= 6.0.5.1)
18
+ activerecord (= 6.0.5.1)
19
+ activestorage (= 6.0.5.1)
20
+ activesupport (= 6.0.5.1)
21
21
  mail (>= 2.7.1)
22
- actionmailer (6.0.5)
23
- actionpack (= 6.0.5)
24
- actionview (= 6.0.5)
25
- activejob (= 6.0.5)
22
+ actionmailer (6.0.5.1)
23
+ actionpack (= 6.0.5.1)
24
+ actionview (= 6.0.5.1)
25
+ activejob (= 6.0.5.1)
26
26
  mail (~> 2.5, >= 2.5.4)
27
27
  rails-dom-testing (~> 2.0)
28
- actionpack (6.0.5)
29
- actionview (= 6.0.5)
30
- activesupport (= 6.0.5)
28
+ actionpack (6.0.5.1)
29
+ actionview (= 6.0.5.1)
30
+ activesupport (= 6.0.5.1)
31
31
  rack (~> 2.0, >= 2.0.8)
32
32
  rack-test (>= 0.6.3)
33
33
  rails-dom-testing (~> 2.0)
34
34
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
35
- actiontext (6.0.5)
36
- actionpack (= 6.0.5)
37
- activerecord (= 6.0.5)
38
- activestorage (= 6.0.5)
39
- activesupport (= 6.0.5)
35
+ actiontext (6.0.5.1)
36
+ actionpack (= 6.0.5.1)
37
+ activerecord (= 6.0.5.1)
38
+ activestorage (= 6.0.5.1)
39
+ activesupport (= 6.0.5.1)
40
40
  nokogiri (>= 1.8.5)
41
- actionview (6.0.5)
42
- activesupport (= 6.0.5)
41
+ actionview (6.0.5.1)
42
+ activesupport (= 6.0.5.1)
43
43
  builder (~> 3.1)
44
44
  erubi (~> 1.4)
45
45
  rails-dom-testing (~> 2.0)
46
46
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
47
- activejob (6.0.5)
48
- activesupport (= 6.0.5)
47
+ activejob (6.0.5.1)
48
+ activesupport (= 6.0.5.1)
49
49
  globalid (>= 0.3.6)
50
- activemodel (6.0.5)
51
- activesupport (= 6.0.5)
52
- activerecord (6.0.5)
53
- activemodel (= 6.0.5)
54
- activesupport (= 6.0.5)
55
- activestorage (6.0.5)
56
- actionpack (= 6.0.5)
57
- activejob (= 6.0.5)
58
- activerecord (= 6.0.5)
50
+ activemodel (6.0.5.1)
51
+ activesupport (= 6.0.5.1)
52
+ activerecord (6.0.5.1)
53
+ activemodel (= 6.0.5.1)
54
+ activesupport (= 6.0.5.1)
55
+ activestorage (6.0.5.1)
56
+ actionpack (= 6.0.5.1)
57
+ activejob (= 6.0.5.1)
58
+ activerecord (= 6.0.5.1)
59
59
  marcel (~> 1.0)
60
- activesupport (6.0.5)
60
+ activesupport (6.0.5.1)
61
61
  concurrent-ruby (~> 1.0, >= 1.0.2)
62
62
  i18n (>= 0.7, < 2)
63
63
  minitest (~> 5.1)
@@ -76,7 +76,7 @@ GEM
76
76
  erubi (1.10.0)
77
77
  globalid (1.0.0)
78
78
  activesupport (>= 5.0)
79
- i18n (1.10.0)
79
+ i18n (1.12.0)
80
80
  concurrent-ruby (~> 1.0)
81
81
  loofah (2.18.0)
82
82
  crass (~> 1.0.2)
@@ -87,13 +87,13 @@ GEM
87
87
  method_source (1.0.0)
88
88
  mini_mime (1.1.2)
89
89
  mini_portile2 (2.8.0)
90
- minitest (5.16.1)
90
+ minitest (5.16.2)
91
91
  multipart-post (2.2.3)
92
92
  nio4r (2.5.8)
93
- nokogiri (1.13.6)
93
+ nokogiri (1.13.7)
94
94
  mini_portile2 (~> 2.8.0)
95
95
  racc (~> 1.4)
96
- nokogiri (1.13.6-x86_64-linux)
96
+ nokogiri (1.13.7-x86_64-linux)
97
97
  racc (~> 1.4)
98
98
  pry (0.13.1)
99
99
  coderay (~> 1.1)
@@ -102,32 +102,32 @@ GEM
102
102
  byebug (~> 11.0)
103
103
  pry (~> 0.13.0)
104
104
  racc (1.6.0)
105
- rack (2.2.3.1)
106
- rack-test (2.0.1)
105
+ rack (2.2.4)
106
+ rack-test (2.0.2)
107
107
  rack (>= 1.3)
108
- rails (6.0.5)
109
- actioncable (= 6.0.5)
110
- actionmailbox (= 6.0.5)
111
- actionmailer (= 6.0.5)
112
- actionpack (= 6.0.5)
113
- actiontext (= 6.0.5)
114
- actionview (= 6.0.5)
115
- activejob (= 6.0.5)
116
- activemodel (= 6.0.5)
117
- activerecord (= 6.0.5)
118
- activestorage (= 6.0.5)
119
- activesupport (= 6.0.5)
108
+ rails (6.0.5.1)
109
+ actioncable (= 6.0.5.1)
110
+ actionmailbox (= 6.0.5.1)
111
+ actionmailer (= 6.0.5.1)
112
+ actionpack (= 6.0.5.1)
113
+ actiontext (= 6.0.5.1)
114
+ actionview (= 6.0.5.1)
115
+ activejob (= 6.0.5.1)
116
+ activemodel (= 6.0.5.1)
117
+ activerecord (= 6.0.5.1)
118
+ activestorage (= 6.0.5.1)
119
+ activesupport (= 6.0.5.1)
120
120
  bundler (>= 1.3.0)
121
- railties (= 6.0.5)
121
+ railties (= 6.0.5.1)
122
122
  sprockets-rails (>= 2.0.0)
123
123
  rails-dom-testing (2.0.3)
124
124
  activesupport (>= 4.2.0)
125
125
  nokogiri (>= 1.6)
126
126
  rails-html-sanitizer (1.4.3)
127
127
  loofah (~> 2.3)
128
- railties (6.0.5)
129
- actionpack (= 6.0.5)
130
- activesupport (= 6.0.5)
128
+ railties (6.0.5.1)
129
+ actionpack (= 6.0.5.1)
130
+ activesupport (= 6.0.5.1)
131
131
  method_source
132
132
  rake (>= 0.8.7)
133
133
  thor (>= 0.20.3, < 2.0)
@@ -162,7 +162,7 @@ GEM
162
162
  sprockets (>= 3.0.0)
163
163
  thor (1.2.1)
164
164
  thread_safe (0.3.6)
165
- tzinfo (1.2.9)
165
+ tzinfo (1.2.10)
166
166
  thread_safe (~> 0.1)
167
167
  websocket-driver (0.7.5)
168
168
  websocket-extensions (>= 0.1.0)
@@ -1,67 +1,67 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- texd (0.4.2)
4
+ texd (0.5.0)
5
5
  multipart-post (~> 2.0)
6
6
  rails (>= 6.0, < 8)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actioncable (6.1.6)
12
- actionpack (= 6.1.6)
13
- activesupport (= 6.1.6)
11
+ actioncable (6.1.6.1)
12
+ actionpack (= 6.1.6.1)
13
+ activesupport (= 6.1.6.1)
14
14
  nio4r (~> 2.0)
15
15
  websocket-driver (>= 0.6.1)
16
- actionmailbox (6.1.6)
17
- actionpack (= 6.1.6)
18
- activejob (= 6.1.6)
19
- activerecord (= 6.1.6)
20
- activestorage (= 6.1.6)
21
- activesupport (= 6.1.6)
16
+ actionmailbox (6.1.6.1)
17
+ actionpack (= 6.1.6.1)
18
+ activejob (= 6.1.6.1)
19
+ activerecord (= 6.1.6.1)
20
+ activestorage (= 6.1.6.1)
21
+ activesupport (= 6.1.6.1)
22
22
  mail (>= 2.7.1)
23
- actionmailer (6.1.6)
24
- actionpack (= 6.1.6)
25
- actionview (= 6.1.6)
26
- activejob (= 6.1.6)
27
- activesupport (= 6.1.6)
23
+ actionmailer (6.1.6.1)
24
+ actionpack (= 6.1.6.1)
25
+ actionview (= 6.1.6.1)
26
+ activejob (= 6.1.6.1)
27
+ activesupport (= 6.1.6.1)
28
28
  mail (~> 2.5, >= 2.5.4)
29
29
  rails-dom-testing (~> 2.0)
30
- actionpack (6.1.6)
31
- actionview (= 6.1.6)
32
- activesupport (= 6.1.6)
30
+ actionpack (6.1.6.1)
31
+ actionview (= 6.1.6.1)
32
+ activesupport (= 6.1.6.1)
33
33
  rack (~> 2.0, >= 2.0.9)
34
34
  rack-test (>= 0.6.3)
35
35
  rails-dom-testing (~> 2.0)
36
36
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
37
- actiontext (6.1.6)
38
- actionpack (= 6.1.6)
39
- activerecord (= 6.1.6)
40
- activestorage (= 6.1.6)
41
- activesupport (= 6.1.6)
37
+ actiontext (6.1.6.1)
38
+ actionpack (= 6.1.6.1)
39
+ activerecord (= 6.1.6.1)
40
+ activestorage (= 6.1.6.1)
41
+ activesupport (= 6.1.6.1)
42
42
  nokogiri (>= 1.8.5)
43
- actionview (6.1.6)
44
- activesupport (= 6.1.6)
43
+ actionview (6.1.6.1)
44
+ activesupport (= 6.1.6.1)
45
45
  builder (~> 3.1)
46
46
  erubi (~> 1.4)
47
47
  rails-dom-testing (~> 2.0)
48
48
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
49
- activejob (6.1.6)
50
- activesupport (= 6.1.6)
49
+ activejob (6.1.6.1)
50
+ activesupport (= 6.1.6.1)
51
51
  globalid (>= 0.3.6)
52
- activemodel (6.1.6)
53
- activesupport (= 6.1.6)
54
- activerecord (6.1.6)
55
- activemodel (= 6.1.6)
56
- activesupport (= 6.1.6)
57
- activestorage (6.1.6)
58
- actionpack (= 6.1.6)
59
- activejob (= 6.1.6)
60
- activerecord (= 6.1.6)
61
- activesupport (= 6.1.6)
52
+ activemodel (6.1.6.1)
53
+ activesupport (= 6.1.6.1)
54
+ activerecord (6.1.6.1)
55
+ activemodel (= 6.1.6.1)
56
+ activesupport (= 6.1.6.1)
57
+ activestorage (6.1.6.1)
58
+ actionpack (= 6.1.6.1)
59
+ activejob (= 6.1.6.1)
60
+ activerecord (= 6.1.6.1)
61
+ activesupport (= 6.1.6.1)
62
62
  marcel (~> 1.0)
63
63
  mini_mime (>= 1.1.0)
64
- activesupport (6.1.6)
64
+ activesupport (6.1.6.1)
65
65
  concurrent-ruby (~> 1.0, >= 1.0.2)
66
66
  i18n (>= 1.6, < 2)
67
67
  minitest (>= 5.1)
@@ -80,7 +80,7 @@ GEM
80
80
  erubi (1.10.0)
81
81
  globalid (1.0.0)
82
82
  activesupport (>= 5.0)
83
- i18n (1.10.0)
83
+ i18n (1.12.0)
84
84
  concurrent-ruby (~> 1.0)
85
85
  loofah (2.18.0)
86
86
  crass (~> 1.0.2)
@@ -91,13 +91,13 @@ GEM
91
91
  method_source (1.0.0)
92
92
  mini_mime (1.1.2)
93
93
  mini_portile2 (2.8.0)
94
- minitest (5.16.1)
94
+ minitest (5.16.2)
95
95
  multipart-post (2.2.3)
96
96
  nio4r (2.5.8)
97
- nokogiri (1.13.6)
97
+ nokogiri (1.13.7)
98
98
  mini_portile2 (~> 2.8.0)
99
99
  racc (~> 1.4)
100
- nokogiri (1.13.6-x86_64-linux)
100
+ nokogiri (1.13.7-x86_64-linux)
101
101
  racc (~> 1.4)
102
102
  pry (0.13.1)
103
103
  coderay (~> 1.1)
@@ -106,32 +106,32 @@ GEM
106
106
  byebug (~> 11.0)
107
107
  pry (~> 0.13.0)
108
108
  racc (1.6.0)
109
- rack (2.2.3.1)
110
- rack-test (2.0.1)
109
+ rack (2.2.4)
110
+ rack-test (2.0.2)
111
111
  rack (>= 1.3)
112
- rails (6.1.6)
113
- actioncable (= 6.1.6)
114
- actionmailbox (= 6.1.6)
115
- actionmailer (= 6.1.6)
116
- actionpack (= 6.1.6)
117
- actiontext (= 6.1.6)
118
- actionview (= 6.1.6)
119
- activejob (= 6.1.6)
120
- activemodel (= 6.1.6)
121
- activerecord (= 6.1.6)
122
- activestorage (= 6.1.6)
123
- activesupport (= 6.1.6)
112
+ rails (6.1.6.1)
113
+ actioncable (= 6.1.6.1)
114
+ actionmailbox (= 6.1.6.1)
115
+ actionmailer (= 6.1.6.1)
116
+ actionpack (= 6.1.6.1)
117
+ actiontext (= 6.1.6.1)
118
+ actionview (= 6.1.6.1)
119
+ activejob (= 6.1.6.1)
120
+ activemodel (= 6.1.6.1)
121
+ activerecord (= 6.1.6.1)
122
+ activestorage (= 6.1.6.1)
123
+ activesupport (= 6.1.6.1)
124
124
  bundler (>= 1.15.0)
125
- railties (= 6.1.6)
125
+ railties (= 6.1.6.1)
126
126
  sprockets-rails (>= 2.0.0)
127
127
  rails-dom-testing (2.0.3)
128
128
  activesupport (>= 4.2.0)
129
129
  nokogiri (>= 1.6)
130
130
  rails-html-sanitizer (1.4.3)
131
131
  loofah (~> 2.3)
132
- railties (6.1.6)
133
- actionpack (= 6.1.6)
134
- activesupport (= 6.1.6)
132
+ railties (6.1.6.1)
133
+ actionpack (= 6.1.6.1)
134
+ activesupport (= 6.1.6.1)
135
135
  method_source
136
136
  rake (>= 12.2)
137
137
  thor (~> 1.0)
@@ -165,7 +165,7 @@ GEM
165
165
  activesupport (>= 5.2)
166
166
  sprockets (>= 3.0.0)
167
167
  thor (1.2.1)
168
- tzinfo (2.0.4)
168
+ tzinfo (2.0.5)
169
169
  concurrent-ruby (~> 1.0)
170
170
  websocket-driver (0.7.5)
171
171
  websocket-extensions (>= 0.1.0)
@@ -1,74 +1,74 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- texd (0.4.2)
4
+ texd (0.5.0)
5
5
  multipart-post (~> 2.0)
6
6
  rails (>= 6.0, < 8)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actioncable (7.0.3)
12
- actionpack (= 7.0.3)
13
- activesupport (= 7.0.3)
11
+ actioncable (7.0.3.1)
12
+ actionpack (= 7.0.3.1)
13
+ activesupport (= 7.0.3.1)
14
14
  nio4r (~> 2.0)
15
15
  websocket-driver (>= 0.6.1)
16
- actionmailbox (7.0.3)
17
- actionpack (= 7.0.3)
18
- activejob (= 7.0.3)
19
- activerecord (= 7.0.3)
20
- activestorage (= 7.0.3)
21
- activesupport (= 7.0.3)
16
+ actionmailbox (7.0.3.1)
17
+ actionpack (= 7.0.3.1)
18
+ activejob (= 7.0.3.1)
19
+ activerecord (= 7.0.3.1)
20
+ activestorage (= 7.0.3.1)
21
+ activesupport (= 7.0.3.1)
22
22
  mail (>= 2.7.1)
23
23
  net-imap
24
24
  net-pop
25
25
  net-smtp
26
- actionmailer (7.0.3)
27
- actionpack (= 7.0.3)
28
- actionview (= 7.0.3)
29
- activejob (= 7.0.3)
30
- activesupport (= 7.0.3)
26
+ actionmailer (7.0.3.1)
27
+ actionpack (= 7.0.3.1)
28
+ actionview (= 7.0.3.1)
29
+ activejob (= 7.0.3.1)
30
+ activesupport (= 7.0.3.1)
31
31
  mail (~> 2.5, >= 2.5.4)
32
32
  net-imap
33
33
  net-pop
34
34
  net-smtp
35
35
  rails-dom-testing (~> 2.0)
36
- actionpack (7.0.3)
37
- actionview (= 7.0.3)
38
- activesupport (= 7.0.3)
36
+ actionpack (7.0.3.1)
37
+ actionview (= 7.0.3.1)
38
+ activesupport (= 7.0.3.1)
39
39
  rack (~> 2.0, >= 2.2.0)
40
40
  rack-test (>= 0.6.3)
41
41
  rails-dom-testing (~> 2.0)
42
42
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
43
- actiontext (7.0.3)
44
- actionpack (= 7.0.3)
45
- activerecord (= 7.0.3)
46
- activestorage (= 7.0.3)
47
- activesupport (= 7.0.3)
43
+ actiontext (7.0.3.1)
44
+ actionpack (= 7.0.3.1)
45
+ activerecord (= 7.0.3.1)
46
+ activestorage (= 7.0.3.1)
47
+ activesupport (= 7.0.3.1)
48
48
  globalid (>= 0.6.0)
49
49
  nokogiri (>= 1.8.5)
50
- actionview (7.0.3)
51
- activesupport (= 7.0.3)
50
+ actionview (7.0.3.1)
51
+ activesupport (= 7.0.3.1)
52
52
  builder (~> 3.1)
53
53
  erubi (~> 1.4)
54
54
  rails-dom-testing (~> 2.0)
55
55
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
56
- activejob (7.0.3)
57
- activesupport (= 7.0.3)
56
+ activejob (7.0.3.1)
57
+ activesupport (= 7.0.3.1)
58
58
  globalid (>= 0.3.6)
59
- activemodel (7.0.3)
60
- activesupport (= 7.0.3)
61
- activerecord (7.0.3)
62
- activemodel (= 7.0.3)
63
- activesupport (= 7.0.3)
64
- activestorage (7.0.3)
65
- actionpack (= 7.0.3)
66
- activejob (= 7.0.3)
67
- activerecord (= 7.0.3)
68
- activesupport (= 7.0.3)
59
+ activemodel (7.0.3.1)
60
+ activesupport (= 7.0.3.1)
61
+ activerecord (7.0.3.1)
62
+ activemodel (= 7.0.3.1)
63
+ activesupport (= 7.0.3.1)
64
+ activestorage (7.0.3.1)
65
+ actionpack (= 7.0.3.1)
66
+ activejob (= 7.0.3.1)
67
+ activerecord (= 7.0.3.1)
68
+ activesupport (= 7.0.3.1)
69
69
  marcel (~> 1.0)
70
70
  mini_mime (>= 1.1.0)
71
- activesupport (7.0.3)
71
+ activesupport (7.0.3.1)
72
72
  concurrent-ruby (~> 1.0, >= 1.0.2)
73
73
  i18n (>= 1.6, < 2)
74
74
  minitest (>= 5.1)
@@ -87,7 +87,7 @@ GEM
87
87
  erubi (1.10.0)
88
88
  globalid (1.0.0)
89
89
  activesupport (>= 5.0)
90
- i18n (1.10.0)
90
+ i18n (1.12.0)
91
91
  concurrent-ruby (~> 1.0)
92
92
  loofah (2.18.0)
93
93
  crass (~> 1.0.2)
@@ -98,7 +98,7 @@ GEM
98
98
  method_source (1.0.0)
99
99
  mini_mime (1.1.2)
100
100
  mini_portile2 (2.8.0)
101
- minitest (5.16.1)
101
+ minitest (5.16.2)
102
102
  multipart-post (2.2.3)
103
103
  net-imap (0.2.3)
104
104
  digest
@@ -115,10 +115,10 @@ GEM
115
115
  net-protocol
116
116
  timeout
117
117
  nio4r (2.5.8)
118
- nokogiri (1.13.6)
118
+ nokogiri (1.13.7)
119
119
  mini_portile2 (~> 2.8.0)
120
120
  racc (~> 1.4)
121
- nokogiri (1.13.6-x86_64-linux)
121
+ nokogiri (1.13.7-x86_64-linux)
122
122
  racc (~> 1.4)
123
123
  pry (0.13.1)
124
124
  coderay (~> 1.1)
@@ -127,31 +127,31 @@ GEM
127
127
  byebug (~> 11.0)
128
128
  pry (~> 0.13.0)
129
129
  racc (1.6.0)
130
- rack (2.2.3.1)
131
- rack-test (2.0.1)
130
+ rack (2.2.4)
131
+ rack-test (2.0.2)
132
132
  rack (>= 1.3)
133
- rails (7.0.3)
134
- actioncable (= 7.0.3)
135
- actionmailbox (= 7.0.3)
136
- actionmailer (= 7.0.3)
137
- actionpack (= 7.0.3)
138
- actiontext (= 7.0.3)
139
- actionview (= 7.0.3)
140
- activejob (= 7.0.3)
141
- activemodel (= 7.0.3)
142
- activerecord (= 7.0.3)
143
- activestorage (= 7.0.3)
144
- activesupport (= 7.0.3)
133
+ rails (7.0.3.1)
134
+ actioncable (= 7.0.3.1)
135
+ actionmailbox (= 7.0.3.1)
136
+ actionmailer (= 7.0.3.1)
137
+ actionpack (= 7.0.3.1)
138
+ actiontext (= 7.0.3.1)
139
+ actionview (= 7.0.3.1)
140
+ activejob (= 7.0.3.1)
141
+ activemodel (= 7.0.3.1)
142
+ activerecord (= 7.0.3.1)
143
+ activestorage (= 7.0.3.1)
144
+ activesupport (= 7.0.3.1)
145
145
  bundler (>= 1.15.0)
146
- railties (= 7.0.3)
146
+ railties (= 7.0.3.1)
147
147
  rails-dom-testing (2.0.3)
148
148
  activesupport (>= 4.2.0)
149
149
  nokogiri (>= 1.6)
150
150
  rails-html-sanitizer (1.4.3)
151
151
  loofah (~> 2.3)
152
- railties (7.0.3)
153
- actionpack (= 7.0.3)
154
- activesupport (= 7.0.3)
152
+ railties (7.0.3.1)
153
+ actionpack (= 7.0.3.1)
154
+ activesupport (= 7.0.3.1)
155
155
  method_source
156
156
  rake (>= 12.2)
157
157
  thor (~> 1.0)
@@ -181,7 +181,7 @@ GEM
181
181
  strscan (3.0.3)
182
182
  thor (1.2.1)
183
183
  timeout (0.3.0)
184
- tzinfo (2.0.4)
184
+ tzinfo (2.0.5)
185
185
  concurrent-ruby (~> 1.0)
186
186
  websocket-driver (0.7.5)
187
187
  websocket-extensions (>= 0.1.0)
@@ -53,6 +53,33 @@ module Texd
53
53
  add(Attachment::File, path, rename)
54
54
  end
55
55
 
56
+ # Includes a file with the given `content` to the list. This is useful
57
+ # if you generate the content on-the-fly (like creating CSV data from
58
+ # database records), and don't want to save that content to disk first.
59
+ #
60
+ # In short, these examples should be mostly equivalent:
61
+ #
62
+ # # use a temporary file to write contents to, and attach that file:
63
+ # tmp = Tempfile.new ["foo", ".csv"]
64
+ # tmp.write @record.to_csv
65
+ # tmp.flush
66
+ # tmp.close
67
+ # text_attach tmp.name
68
+ #
69
+ # # skip writing to disk and inline the file:
70
+ # texd_inline @record.to_csv, "foo.csv"
71
+ #
72
+ # @param [<Type>] contents <description>
73
+ # @param [<Type>] path <description>
74
+ #
75
+ # @return [<Type>] <description>
76
+ def inline(contents, path)
77
+ att = Attachment::Dynamic.new(path, contents)
78
+
79
+ items[att.name] ||= att
80
+ items[att.name]
81
+ end
82
+
56
83
  # Adds a file reference with the given path to the list. Similar to #attach,
57
84
  # the file path must either be an absolute filename or be relative to
58
85
  # app/tex/ of the host application.
@@ -130,12 +157,33 @@ module Texd
130
157
  end
131
158
  end
132
159
 
160
+ # Computes the file name of a given path, and returns it with or without
161
+ # file extension.
162
+ #
163
+ # @param [String, Pathname] path A Pathname instance or just a plain file name.
164
+ # @param [Boolean] with_extension If true, returns the file path's basename
165
+ # unmodified, otherwise the file extension, including its ".", is removed.
166
+ # @return [String] File path with or without extension.
167
+ def self.name(path, with_extension = true) # rubocop:disable Style/OptionalBooleanParameter
168
+ basename = ::File.basename(path)
169
+ return basename if with_extension
170
+
171
+ dot = basename.rindex(".")
172
+ return basename if dot == 0 # file starts with "."
173
+
174
+ basename.slice(0, dot)
175
+ end
176
+
133
177
  Dynamic = Struct.new(:name, :contents) do
134
178
  def to_upload_io(**)
135
179
  Multipart::Post::UploadIO.new(StringIO.new(contents), nil, name).tap { |io|
136
180
  io.instance_variable_set :@original_filename, name
137
181
  }
138
182
  end
183
+
184
+ def name(with_extension = true) # rubocop:disable Style/OptionalBooleanParameter
185
+ Attachment.name(self[:name], with_extension)
186
+ end
139
187
  end
140
188
 
141
189
  class Base
@@ -164,13 +212,7 @@ module Texd
164
212
  # @param [Boolean] with_extension
165
213
  # @return [String] output file name
166
214
  def name(with_extension = true) # rubocop:disable Style/OptionalBooleanParameter
167
- basename = ::File.basename(@name)
168
- return basename if with_extension
169
-
170
- dot = basename.rindex(".")
171
- return basename if dot == 0 # file starts with "."
172
-
173
- basename.slice(0, dot)
215
+ Attachment.name(@name, with_extension)
174
216
  end
175
217
  end
176
218
 
data/lib/texd/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Texd
4
- VERSION = "0.4.2"
4
+ VERSION = "0.5.0"
5
5
  end
data/lib/texd.rb CHANGED
@@ -80,6 +80,10 @@ module Texd
80
80
  attachments.attach(path, rename).name(with_extension)
81
81
  end
82
82
 
83
+ define_method :texd_inline do |data, name, with_extension: true|
84
+ attachments.inline(data, name).name(with_extension)
85
+ end
86
+
83
87
  define_method :texd_reference do |path, rename: true, with_extension: true|
84
88
  attachments.reference(path, rename).name(with_extension)
85
89
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: texd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominik Menke
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-28 00:00:00.000000000 Z
11
+ date: 2022-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multipart-post
@@ -141,7 +141,7 @@ metadata:
141
141
  rubygems_mfa_required: 'true'
142
142
  homepage_uri: https://github.com/digineo/texd-ruby
143
143
  source_code_uri: https://github.com/digineo/texd-ruby
144
- changelog_uri: https://github.com/digineo/texd-ruby/blob/v0.4.2/CHANGELOG.md
144
+ changelog_uri: https://github.com/digineo/texd-ruby/blob/v0.5.0/CHANGELOG.md
145
145
  post_install_message:
146
146
  rdoc_options: []
147
147
  require_paths: