tessera 1.0.0 → 1.0.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
  SHA1:
3
- metadata.gz: c0f3879b8f5f8538b9aa77e1ea3c13429155e33a
4
- data.tar.gz: dfc52c94f1d2c390f2292d3c695414d8db1640b7
3
+ metadata.gz: 3b0e0460f97b49328187e5a75600d245a6ee666c
4
+ data.tar.gz: 47f1e3df8258e26093d5fc237cae8082c8840ead
5
5
  SHA512:
6
- metadata.gz: cdfeedc4502f4323df7980ad0ab2871e5c71a87234998ba2f5c66167edfe67c13072867f98a9a658ec6d8b02159ba8d14efa5fdd5e65bc5fff70c742617ca6ce
7
- data.tar.gz: 7b884d2c4a52ae50422041ac8083917f95c31b94ac4ead6b845736b3e17b16592d417d82866be7b17fab14e3b2661c01bdf464975365610edda34c41a62f7b67
6
+ metadata.gz: 5daae428ec527b3c529b9b664264c1ae6535917d7ffb9441554b647f83ab4117d31cf61ba10d1889c1a19596de1e85d19e0a7c34d9058ec3679b94c787121a39
7
+ data.tar.gz: e1c427c69346a494f64a02b7199a814e6b930be4b10b0e0d91e271a9cd77ab2bf93a46c6523ec75be4d8aa6e570eda0f1e00c8e0b2d9c9862fdcbc67ca6f8d25
data/README.md CHANGED
@@ -153,6 +153,12 @@ params = {
153
153
  result = Tessera::Ticket.create(params)
154
154
  ```
155
155
 
156
+ NOTE: this sending of article `To` email is not done purely by OTRS, you will
157
+ have to user this plugin:
158
+ https://github.com/znuny/Znuny4OTRS-GIArticleSend
159
+
160
+ Please see instalation notes provided by
161
+ https://github.com/znuny/Znuny4OTRS-Rep
156
162
 
157
163
  ## Development
158
164
 
@@ -4,6 +4,7 @@ module Tessera
4
4
  attr_accessor :Content, :ContentType, :Filename
5
5
 
6
6
  def initialize(tempfile:)
7
+ tempfile.rewind
7
8
  @Content = Base64.encode64(tempfile.read)
8
9
  @ContentType = tempfile.content_type
9
10
  @Filename = tempfile.original_filename
@@ -34,14 +34,11 @@ module Tessera
34
34
  def create(params)
35
35
  ticket = Tessera::Otrs::Ticket.new(params[:ticket]).to_hash
36
36
  article = Tessera::Otrs::Article.new(params[:article]).to_hash
37
- attachment = if params[:attachment]
38
- case params[:attachment].class
39
- when Hash
40
- Tessera::Otrs::Attachment.new(params[:attachment]).to_hash
41
- when Array
42
- params[:attachment].map do |a|
43
- Tessera::Otrs::Attachment.new(a).to_hash
44
- end
37
+ attachment = if params[:attachment] && params[:attachment].is_a?(Hash)
38
+ Tessera::Otrs::Attachment.new(params[:attachment]).to_hash
39
+ elsif params[:attachment] && params[:attachment].is_a?(Array)
40
+ params[:attachment].map do |a|
41
+ Tessera::Otrs::Attachment.new(a).to_hash
45
42
  end
46
43
  end
47
44
  body = { Ticket: ticket }
@@ -1,3 +1,3 @@
1
1
  module Tessera
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.0.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tessera
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrej Antas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-06 00:00:00.000000000 Z
11
+ date: 2018-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler