evertils 2.3.0 → 2.3.1

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
  SHA256:
3
- metadata.gz: 62ca579ad54707c549144be390ed3dcfa4879477f1728fb83a93f954375967d7
4
- data.tar.gz: ecc129eb13feff7c60fb36c2f6d85a569a742102a56a5614bf8e381bb341b8ad
3
+ metadata.gz: bc07e653bf9a91249f6aab1f8c4a4def003a698db1f38170c055c0b891dc376a
4
+ data.tar.gz: 10a6f9beaf17ae3fa6b90f05b5552e200d7baeec8be0a6e48b2137eeb6075795
5
5
  SHA512:
6
- metadata.gz: cb35a2cc7157eac38b55373b1b6e178781e6072dab44b29233659977b609a63694c5d36470f7195a407b35fdc1ec8d661ebde4272682b3bf1f214de730d55f28
7
- data.tar.gz: 2ac70310c34c6d7b47b1b8c03cc249b75b4940dabb6f2fda74f946a052c70ee17a62d45acf78233d24ead2a0e26161b5353a9acf99886390f674cddc40cb79c2
6
+ metadata.gz: 9fe3737bc7de38424e8797b1011d077c2c1a0443cd94f0fb1f88da188abb5f4c705f346c0ca64ac06c1b5ba1a767a798925c058f8816072058356cad384e0261
7
+ data.tar.gz: f8ac9c971f22a68cd307304d4b3f2ed35434502a2931f5e2eab8a5e22708c33f07fff4266499cc262dcd03dd8fa8d0af3efb8373ff1f9a314f61ca7ac90bf3af
@@ -81,9 +81,16 @@ module Evertils
81
81
  def update_note_content_with(text)
82
82
  xml = @api_helper.from_str(@note.entity.content)
83
83
  target = xml.search('en-note').first
84
+ job_id = 0
85
+ job_id = text.first.split(' -').first.to_i unless text.first.scan('-').empty?
86
+
87
+ text.map! { |l| l.gsub("#{job_id} - ", '')}
84
88
 
85
89
  text.each do |line|
86
- target.add_child("<div>* #{Formatting.current_time} - #{Formatting.clean(line)}</div>")
90
+ child = "<div>* #{Formatting.current_time} -".dup
91
+ child.concat " #{job_id} -" unless job_id.zero?
92
+ child.concat " #{Formatting.clean(line)}</div>"
93
+ target.add_child(child)
87
94
  end
88
95
 
89
96
  xml
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Evertils
4
- VERSION = '2.3.0'
4
+ VERSION = '2.3.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evertils
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Priebe