axtro-roart 0.1.9.1 → 0.1.9.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,12 @@
1
+ module Roart
2
+ class ContentFormatter
3
+ # The following is only based on quick trial&error on my part. The RT Api (at least in 3.6) does not have good documentation.
4
+ # Strings in a RT request:
5
+ # - are not allowed to contain '\r'
6
+ # - must use equally padded new-lines to distinguish them from the beginning of a new field (we use 2-space padding)
7
+ def self.format_string(string)
8
+ string.gsub("\r", '').gsub("\n", "\n ")
9
+ end
10
+
11
+ end
12
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: axtro-roart
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9.1
4
+ version: 0.1.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - PJ Davis
@@ -55,6 +55,7 @@ files:
55
55
  - lib/roart/connection_adapter.rb
56
56
  - lib/roart/connection_adapters/mechanize_adapter.rb
57
57
  - lib/roart/core/hash.rb
58
+ - lib/roart/core/content_formatter.rb
58
59
  - lib/roart/errors.rb
59
60
  - lib/roart/history.rb
60
61
  - lib/roart/roart.rb