ludo-roart 0.1.11 → 0.1.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,6 +5,8 @@ class Hash
5
5
  value = Roart::ContentFormatter.format_string(value.to_s)
6
6
  if key.to_s.match(/^cf_.+/)
7
7
  "CF-#{key.to_s[3..key.to_s.length].gsub(/_/, " ").camelize.humanize}: #{value}"
8
+ elsif key.to_s.match(/^CF-.+/)
9
+ "#{key.to_s}: #{value}"
8
10
  else
9
11
  "#{key.to_s.camelize}: #{value}"
10
12
  end
@@ -19,4 +21,4 @@ class Hash
19
21
  hash
20
22
  end
21
23
 
22
- end
24
+ end
data/roart.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{ludo-roart}
5
- s.version = "0.1.11"
5
+ s.version = "0.1.12"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["PJ Davis"]
@@ -13,10 +13,15 @@ describe 'hash extentions' do
13
13
  payload.to_content_format.should == "CF-Stuff: field"
14
14
  end
15
15
 
16
+ it 'should NOT change custom key when it starts with CF-' do
17
+ payload = { 'CF-My CustomField wiTout magic' => 'hello' }
18
+ payload.to_content_format.should == "CF-My CustomField wiTout magic: hello"
19
+ end
20
+
16
21
  it 'should use our content formatter for strings' do
17
22
  payload = {:subject => 'A new ticket', :queue => 'My queue', :text => "A text"}
18
23
  Roart::ContentFormatter.should_receive(:format_string).at_least(:once)
19
24
  payload.to_content_format
20
25
  end
21
26
 
22
- end
27
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ludo-roart
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 11
10
- version: 0.1.11
9
+ - 12
10
+ version: 0.1.12
11
11
  platform: ruby
12
12
  authors:
13
13
  - PJ Davis