postmortem 0.2.5 → 0.2.6

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: fd3c7e0205b1225caa909fe3940cb87ab5080bc7bf1ee398cb77547f01791ed9
4
- data.tar.gz: 577921e6e73fc4fbcca72478708b4537e576f081364a502ad80c6f1327cab742
3
+ metadata.gz: c568b654939fbe3a62397c8f3339bc1b53ea179c8b978010feb91796a6981966
4
+ data.tar.gz: 98326372aac64150232ecab827c5fb150416cb56839d1c939a70cc16453cedd5
5
5
  SHA512:
6
- metadata.gz: a9356b29967072434c6e5579c9520697dd02085fd61b6b23e2ff1f0bbb7f755908075d9a172281c58e0366092cbe3129eed23b1b5793f833a1a70b4bcf4d721a
7
- data.tar.gz: a32461cce8da22998b86c30f01b5dbff8b443c5b90e1b26252b74d4818642628de570b68471f82ef082d2b0314e89c0bb011071b28354e1eb7718c141e8466dc
6
+ metadata.gz: fcd1c8195d8646052c03645b93bbf40c33279592cdaebe9d1fe37ff923e6a1e3f89a03b452342362db5fe3965d5107fdcaa927aa13afc699cc12bdb9e39a3a72
7
+ data.tar.gz: c5adb545133250df8a94f0be2ca61f19ed4cc85bb1864303c48932b404a83d6933373213f0dbab2ef19269210c944206495899bb162156897e351a550cd76d11
data/Makefile CHANGED
@@ -3,3 +3,7 @@ test:
3
3
  bundle exec rspec
4
4
  bundle exec rubocop
5
5
  bundle exec strong_versions
6
+
7
+ .PHONY: demo
8
+ demo:
9
+ bundle exec ruby doc/demo.rb
data/README.md CHANGED
@@ -26,7 +26,7 @@ Add the gem to your application's Gemfile:
26
26
 
27
27
  ```ruby
28
28
  group :development, :test do
29
- gem 'postmortem', '~> 0.2.5'
29
+ gem 'postmortem', '~> 0.2.6'
30
30
  end
31
31
  ```
32
32
 
data/layout/layout.js CHANGED
@@ -1,4 +1,6 @@
1
1
  (function () {
2
+ if (POSTMORTEM && POSTMORTEM.downloadedPreview) document.title = 'PostMortem';
3
+
2
4
  let previousInbox;
3
5
  let currentView;
4
6
  let reloadIdentityIframeTimeout;
@@ -248,7 +250,7 @@
248
250
 
249
251
  loadHeaders(mail);
250
252
  loadToolbar(mail);
251
- loadDownloadLink();
253
+ loadDownloadLink(mail);
252
254
 
253
255
  highlightMail(mail);
254
256
  markAsRead(mail);
@@ -310,7 +312,7 @@
310
312
  $target.addClass('active');
311
313
  };
312
314
 
313
- const loadDownloadLink = () => {
315
+ const loadDownloadLink = (mail) => {
314
316
  const html = document.documentElement.innerHTML;
315
317
  const start = html.indexOf('<!--INBOX-START-->');
316
318
  const end = html.indexOf('<!--INBOX-END-->') + '<!--INBOX-END-->'.length;
@@ -318,6 +320,8 @@
318
320
  const blob = new Blob([modifiedHtml], { type: 'application/octet-stream' });
319
321
  const uri = window.URL.createObjectURL(blob);
320
322
  $("#download-link").attr('href', uri);
323
+ console.log(mail.subject.replace(/[0-9a-zA-Z_ -]/gi, ''));
324
+ $("#download-link").attr('download', mail.subject.replace(/[^0-9a-zA-Z_ -]/gi, '') + '.html');
321
325
  };
322
326
 
323
327
  const compareIdentity = (uuid) => {
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Postmortem
4
- VERSION = '0.2.5'
4
+ VERSION = '0.2.6'
5
5
  end
data/postmortem.gemspec CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.metadata['changelog_uri'] = 'https://github.com/bobf/postmortem/blob/master/README.md'
20
20
 
21
21
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
22
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
22
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|doc)/}) }
23
23
  end
24
24
  spec.bindir = 'bin'
25
25
  spec.executables = []
@@ -29,6 +29,7 @@ Gem::Specification.new do |spec|
29
29
 
30
30
  spec.add_development_dependency 'actionmailer', '~> 6.0'
31
31
  spec.add_development_dependency 'devpack', '~> 0.3.2'
32
+ spec.add_development_dependency 'faker', '~> 2.17'
32
33
  spec.add_development_dependency 'pony', '~> 1.13'
33
34
  spec.add_development_dependency 'rspec', '~> 3.9'
34
35
  spec.add_development_dependency 'rspec-its', '~> 1.3'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postmortem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Farrell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-28 00:00:00.000000000 Z
11
+ date: 2021-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mail
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.3.2
55
+ - !ruby/object:Gem::Dependency
56
+ name: faker
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '2.17'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '2.17'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: pony
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -168,7 +182,6 @@ files:
168
182
  - Rakefile
169
183
  - bin/console
170
184
  - bin/setup
171
- - doc/screenshot.png
172
185
  - layout/default.html.erb
173
186
  - layout/dependencies.css
174
187
  - layout/dependencies.js
data/doc/screenshot.png DELETED
Binary file