markdown_gmail_sender 0.1.7 → 0.1.8

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
  SHA1:
3
- metadata.gz: 3ce5697a8b4396ebdf9502c8e4989a1a21aeb1e5
4
- data.tar.gz: dc6467b2fe8f27b6274f471b65bace82d6ed0d9e
3
+ metadata.gz: 9197b5225d325a5c446d264bdd2cba2752d9351d
4
+ data.tar.gz: c56baff7864e72a6e7529cb5e360db4cf16b966b
5
5
  SHA512:
6
- metadata.gz: 15a0d8f953afbe2524d1907af21efed743e741a2406855db593a340a736497c80f9ce72a8b08b05bd1852b55959169b4a1a4428f3e4a082158822479f9e0237c
7
- data.tar.gz: 849d3593926b1450f491ab3aa2e09a211a9edefdb316be0e6117ea56320e4ce85f36f65639ae00a340c0b1bb91176be3779ed8556e033ed4ee370cb6b6bbd007
6
+ metadata.gz: 7083ff382ebaf3e1441ac93b59cde3fff3e5b966fc23ec3bfec9fc606a4627115f184a1ed5a4d8a98cc13ea660a9c3d6d8d8252f2affd21f359608103c9bb1e6
7
+ data.tar.gz: ce8deb3e7408756c648350ca17b783ce2a9776fc7987429b310bd65855711ea2845e4b0e5ee7435f48c6ccae9dba38a49f1b98a0aaff27bec622f43f2dd28573
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
@@ -1 +1,2 @@
1
- Jk\��OvJ�\��gׄJSE��1����p�&!\2r��E�#u����u)a� d��5� jT2I��IjԐh��YC��=�݇��?��­m �ݧG����zkF��w�}�?�*,Qr��:����y��u���)c�n�-S�5x�>��'Yt��SW7^p�!����!_�i5���0�>�nE;�U���0C�?�r<��S]���<��La.'FTi� �;0�Q��:�<���V�S��2�w
1
+ s�SQ��Ջڗg�ߘ񷲥�baX������B7ǁ��$MvpbzBY�����o�Y�(�
2
+ ����,�W)��
@@ -23,6 +23,7 @@ class MarkdownGmailSender
23
23
  @messages = Dir.glob(File.join(compose_dirpath, '*.md')).map do |mdfile|
24
24
 
25
25
  s = File.read mdfile
26
+
26
27
 
27
28
  regex = %r{
28
29
 
@@ -35,15 +36,16 @@ class MarkdownGmailSender
35
36
  subject:\s+(?<subject> [^\n]+)\n
36
37
  (?<body> .*)
37
38
 
38
- }xm =~ s
39
+ }xm
39
40
 
40
- files = attachments.nil? ? [] : attachments.split.map(&:strip)
41
-
41
+ r = regex.match(s)
42
+
43
+ files = r[:attachments].nil? ? [] : r[:attachments].split.map(&:strip)
42
44
 
43
45
  {
44
- filepath: mdfile, from: from, to: to, attachments: files,
45
- subject: subject, body_txt: body,
46
- body_html: RDiscount.new(body).to_html
46
+ filepath: mdfile, from: r[:from], to: r[:to],
47
+ attachments: files, subject: r[:subject], body_txt: r[:body],
48
+ body_html: RDiscount.new(r[:body]).to_html
47
49
  }
48
50
 
49
51
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markdown_gmail_sender
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  OLGmpGkaE9Sobz20K+IVp5+s3z06CrVYK7TN2gXYiGZRGAxmnd3sd0F8Aewu4uWI
32
32
  HiWyElQDGz9Bjw==
33
33
  -----END CERTIFICATE-----
34
- date: 2016-08-01 00:00:00.000000000 Z
34
+ date: 2017-03-01 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: gmail
@@ -74,7 +74,7 @@ dependencies:
74
74
  - !ruby/object:Gem::Version
75
75
  version: 2.2.0.1
76
76
  description:
77
- email: james@r0bertson.co.uk
77
+ email: james@jamesrobertson.eu
78
78
  executables: []
79
79
  extensions: []
80
80
  extra_rdoc_files: []
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  version: '0'
101
101
  requirements: []
102
102
  rubyforge_project:
103
- rubygems_version: 2.5.1
103
+ rubygems_version: 2.6.8
104
104
  signing_key:
105
105
  specification_version: 4
106
106
  summary: Scans a *compose* folder (file directory) for messages (files in markdown
metadata.gz.sig CHANGED
@@ -1,4 +1,3 @@
1
- .��p̣��~1r� �H,��0�*�f�J��L��S\w�?�o�3<d��J�
2
- ?�+%z��Yt��x��r�lk��e����f�`��Ads�['��*L��uC����l���IJ�,}q$=ꢣ&�Ezֹ����
3
- x@G��;
4
- �m��$8����nگ�(~��5�I�Ǐw�U��x>��pn[U
1
+ �@7q���6]3b'Pn�+շ��-����O j][*���YO,L
2
+ a0�iřcVR]D
3
+ ���W�h��nx^N�=�7nD�