omah 0.6.6 → 0.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 059b2d003ffef43680d5c402e45ec1a88179b464
4
- data.tar.gz: 5e9054f96fd11aff64306defce3c5947aff811b2
3
+ metadata.gz: c0a9ad1e87310d011c8016f819a8420441db5df3
4
+ data.tar.gz: 7745d711ddb0ad0cf1d438bfd6b53e403950d89c
5
5
  SHA512:
6
- metadata.gz: d26d992707577f1514e9c6f428c607567f2efb41c29f402f11e7e4f10ea2bc68edef408678a4689315d99810a4733aaa5e8eaaa92f1feb8f92f93c237a7f2706
7
- data.tar.gz: 8cec7e8633429cb3ff253ab3ec57c1c44f7de9d6398fd6ca677ab81a3f9265bf17f296c504e785a2f16446baafba027de2d3d30db664b89d67e226b505d2ea6c
6
+ metadata.gz: c7bd6a70c3c09424389ad99334460cb26d098c7928169f33a981c102e731629e2063412606f1fba5dd567289ca0515ae537d67571387e3242379b7a5d2341cab
7
+ data.tar.gz: 42a30bf8609877f109854c62724c6c8b039ad53cbf48e2089c25a1c818717983ac29ccb7d5d3b832b6ea60adbf0963077e35c0a08559b34719d707fee40175e5
checksums.yaml.gz.sig CHANGED
@@ -1,2 +1,4 @@
1
- ~/&H$d7���ܥ��Px�CkR:���M�TԲT�Ձ�k���f� Y�Y-�k�������X��U��A����L��[��X5�W�f��f(}��B(%���9Q���s@��u{���ª "�KL��{)��K`��X�!3���(�q�!\4��`�ӣ.'<0���rD��
2
- 9 ����({{Q?sLL挻�J�ѣV=�dW���T��M��oG@���.�p�NV��C�۞4\��+ ܊��R�
1
+ H�44
2
+ sB�a�}ݑ��YX t�ȐҴ�>#؉��[�@���-=Fכm}�̃�$� ���7�
3
+ �0�����\����ɦ��<�V$���Ȯ�Š�^[����(;J� ��{�JmZ����!�d
4
+ �HՏo�)��"n��� ��xJV*�������2
data.tar.gz.sig CHANGED
@@ -1 +1 @@
1
- F�'�����=e5���N��,��4$Ha2GWF$�ʜh�����p���D����=�Bo���9��qR�Պ���Q�C��~*��Nv5񉣸iR\�� R�?��HHM.�<��3��Ȳ|�:2�ꢲe���/�B\ԕ�Q,��%��_i5�l/��]�ap=�r�dn���L���OW��*h��5�a�!��K�@�ڦ�xXv4U���S})�48J�B��ɋ<�Jr'�LA{�2�� �q�
1
+ K�*��s.�XCW)"^2�Vlҟ������'�P�:�@����R�:�hU���n�Q���%���\�X ��I���Ϟ��j�����:W���J�s�+�H*<�����V讱#���35/kDn�� �;N<��1.ޘ,}a�����?V�<� s~���P���CMYu�� �K�ȂBɨ-Kr����E��?�,��������"��A����Y�+'���AWTrhjhVI���v�~�(|g
data/lib/omah.rb CHANGED
@@ -41,7 +41,7 @@ class Omah
41
41
 
42
42
  x = if File.exists? dailyfile then dailyfile
43
43
  else
44
- 'messages[date]/message(id, tags, from, to, subject, date, ' \
44
+ 'messages[date]/message(msg_id, tags, from, to, subject, date, ' \
45
45
  + 'txt_filepath, html_filepath, attachment1, attachment2, attachment3)'
46
46
  end
47
47
 
@@ -65,19 +65,21 @@ class Omah
65
65
 
66
66
  def store messages
67
67
 
68
- messages.each do |msg|
68
+ messages.each.with_index do |msg,i|
69
+
69
70
 
70
71
  subject = msg[:subject]
72
+
71
73
  title = subject.gsub(/\W+/,'-')[0,30].sub(/-$/,'')
72
74
 
73
75
  a = @dd.all.select {|x| x.subject == subject}
74
-
76
+
75
77
  ordinal = a.any? ? '.' + a.length.to_s : ''
76
78
  txt_file = title + ordinal + '.txt'
77
79
  html_file = title + ordinal + '.html'
78
80
 
79
- id = msg[:id]
80
- next if @dd.find_by_id id
81
+ id = msg[:msg_id]
82
+ next if @dd.find_by_msg_id id
81
83
 
82
84
  path = archive()
83
85
  txt_filepath = File.join(path, txt_file)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omah
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.6
4
+ version: 0.6.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  3LosTxP//qasvjSWNDjmKeTI4/c/fvSDtS5mLXCsxnJ/1Jp4zlO0rZWz0/BgcPFj
32
32
  GUN8SqUlRq5unw==
33
33
  -----END CERTIFICATE-----
34
- date: 2015-06-08 00:00:00.000000000 Z
34
+ date: 2015-06-23 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: dynarex-daily
metadata.gz.sig CHANGED
Binary file