eml_to_pdf 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -1
- data/README.md +3 -1
- data/lib/eml_to_pdf/configuration.rb +9 -6
- data/lib/eml_to_pdf/metadata_context.rb +1 -1
- data/lib/eml_to_pdf/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8066ee85637834e40eabff881ca5dc0c507dfeec
|
4
|
+
data.tar.gz: 482c532373eebd9c8ac1dd53c8855d05c0f03e4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a966380147ebf6245004730e86b042738346d5b426ba839fe96613bb575a090887e108b6fee5149a7991a1edd167a798f88e8d050678096e85c14646d3ad2776
|
7
|
+
data.tar.gz: 4955d0bc20a0ad90c44fa2b00a70814cb66dd316f7e765fef4e2d4efd57337c83d72a8a92ea6420cced9a6e90a2e972a46d987004f3871f01566cf87b877a139
|
data/.travis.yml
CHANGED
@@ -1,4 +1,8 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
3
|
- 2.2.2
|
4
|
-
before_install:
|
4
|
+
before_install:
|
5
|
+
- gem install bundler -v 1.10.6
|
6
|
+
- wget http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
|
7
|
+
- tar -xvf wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
|
8
|
+
- export PATH=$PATH:$PWD/wkhtmltox/bin/
|
data/README.md
CHANGED
@@ -1,22 +1,25 @@
|
|
1
1
|
module EmlToPdf
|
2
2
|
class Configuration
|
3
3
|
attr_accessor :from_label, :to_label, :cc_label, :date_label
|
4
|
-
attr_reader :date_format
|
5
4
|
|
6
5
|
def initialize
|
7
6
|
@from_label = "From"
|
8
7
|
@to_label = "To"
|
9
8
|
@cc_label = "Cc"
|
10
9
|
@date_label = "Date"
|
11
|
-
@date_format = "%Y-%m-%d %H:%M:%S %z"
|
10
|
+
@date_format = lambda { |date| date.strftime("%Y-%m-%d %H:%M:%S %z") }
|
12
11
|
end
|
13
12
|
|
14
|
-
def date_format
|
15
|
-
if
|
16
|
-
@date_format =
|
13
|
+
def date_format(&block)
|
14
|
+
if block_given?
|
15
|
+
@date_format = block
|
17
16
|
else
|
18
|
-
|
17
|
+
@date_format
|
19
18
|
end
|
20
19
|
end
|
20
|
+
|
21
|
+
def format_date(date)
|
22
|
+
@date_format.call(date)
|
23
|
+
end
|
21
24
|
end
|
22
25
|
end
|
data/lib/eml_to_pdf/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eml_to_pdf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yves Siegrist
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|