backupper 0.4.0 → 0.4.1

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: e342e000d1463ab2e5acda75380d51b4234e15c10bc9926de642657ffadbbe02
4
- data.tar.gz: c5b08c11facbf564daaf375ccff26e0e8ba4aa59b5d03a0981dc8f69ea5d5463
3
+ metadata.gz: 573331f34a1bce133cd5b9d021e888fec59d07d2aedbc206a2ed3966effb030e
4
+ data.tar.gz: bdce765523c2b93efeb1b95cf3c5f9ef39a0e4adc634ac720fb765c0d416d1ad
5
5
  SHA512:
6
- metadata.gz: c2c543a27f6f781700acded008b3629a19507da9b10b3851cf513edceac10bcaf8e8efdb771dfee04ae2ee208ba966c5134b03e71002df6d65d3851cbc658a26
7
- data.tar.gz: caccc5dd3ec837854f29efa9e94f11a02543d67c4f6e659f9a5d037760ffe3e5eed577d39eed86151d9e9fb69e5d7ca93d5aaf416adc58386b82dcc49e280269
6
+ metadata.gz: 9b662880a0de3b61521ebec6bf58323ca392a0561679b9ff57cabbf2bb7475670cc64975844fa6abd3b4c76d1cc62bacf88dfe828ff9062e723e257daf23c62f
7
+ data.tar.gz: 253addc17de4fb4381a3d1c1912a922efd721b9c3409374aaa7a0c3630736e7ccf67e49be7f77a986c65d71796a068d8815107f581906b65f0beb67f73f38867
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- backupper (0.4.0)
4
+ backupper (0.4.1)
5
5
  mail (~> 2.7)
6
6
  sshkit (~> 1.15)
7
7
 
@@ -13,18 +13,13 @@ class Mailer
13
13
  Mail.defaults do
14
14
  delivery_method :smtp, options
15
15
  end
16
- Mail.deliver do
17
- to to
18
- from from
19
- subject self.subject(report)
20
- body self.body(report)
21
- end
16
+ Mail.deliver(to: to, from: from, subject: generate_subject(report), body: generate_body(report))
22
17
  end
23
18
 
24
19
  class << self
25
20
  private
26
21
 
27
- def body(report)
22
+ def generate_body(report)
28
23
  b = []
29
24
  report.each do |k, data|
30
25
  s = ''
@@ -51,7 +46,7 @@ class Mailer
51
46
  return "Report for backups (#{Time.now})\n\n#{b.join("\n\n")}"
52
47
  end
53
48
 
54
- def subject(report)
49
+ def generate_subject(report)
55
50
  errors = report.select { |_k, v| v[:error] }.size
56
51
  icon = '✅'
57
52
  icon = '⚠️' if errors > 0
@@ -1,3 +1,3 @@
1
1
  class Backupper
2
- VERSION = '0.4.0'.freeze
2
+ VERSION = '0.4.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backupper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - pioz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-10 00:00:00.000000000 Z
11
+ date: 2019-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mail