mingle_events 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: db8c244cc6b0a5038dcc12a40e478906098cfb7d
4
- data.tar.gz: 0cebb359a4b5bd057fe2e6ea794ebe4645c3e756
3
+ metadata.gz: 4781909d8e51e73f1b77efcbafb9b94e5c0bf241
4
+ data.tar.gz: 7db2de0be1b4383a6b9e90035d549d4d19f52e08
5
5
  SHA512:
6
- metadata.gz: b8e7269e1250643f31c4310f5f1dc37c82945ee0d0b47929a18422c0b4f5a1459cc2a4d7b51020962f4bc994a722d1d1548c79164a6a8ee21ba4f84b1a6a0967
7
- data.tar.gz: 7b37839e548eefbdbd0b599a5e78ea1e3ab3485bcf84dfe6f9db3769ed2c05cdadbfb4883038862e519a3b688e7997ded85463bf7e94104efbe3c44b8d32a647
6
+ metadata.gz: 604f1d166e69cc11fbe15e4f7959321ee707829a3541d566fb38967d90b79021acf5e2bfcf830fb314a785b29b3e585b50d30211c3fa303a2d056924d5343c93
7
+ data.tar.gz: ea73fa6942fbdcfd8845cd8c24ae347bb17a6e03c5525224f90ed6c6afe9114c903f91e5965f4f1ff1a4835d965cab708eb516e74ba93c87348a544d8a6028f2
@@ -90,7 +90,7 @@ module MingleEvents
90
90
  end
91
91
  end
92
92
  inner_text = inner_text(element)
93
- inner_text && inner_text != "" ? inner_text : attrs
93
+ inner_text && inner_text.strip != "" ? inner_text : attrs
94
94
  end
95
95
 
96
96
  def patching_namespaces(node)
@@ -319,6 +319,37 @@ module MingleEvents
319
319
  assert_equal(nil, change[:old_value])
320
320
  end
321
321
 
322
+
323
+ def test_parse_card_creation_changes
324
+ element_xml_text = %{
325
+ <entry xmlns="http://www.w3.org/2005/Atom">
326
+ <content type="application/vnd.mingle+xml">
327
+ <changes xmlns="http://www.thoughtworks-studios.com/ns/mingle">
328
+ <change type="card-creation"/>
329
+ </changes>
330
+ </content>
331
+ </entry>}
332
+ entry = Entry.from_snippet(element_xml_text)
333
+
334
+ change = entry.changes.first
335
+ assert_equal(Category::CARD_CREATION, change[:type])
336
+ end
337
+
338
+ def test_parse_card_description_changes
339
+ element_xml_text = %{
340
+ <entry xmlns="http://www.w3.org/2005/Atom">
341
+ <content type="application/vnd.mingle+xml">
342
+ <changes xmlns="http://www.thoughtworks-studios.com/ns/mingle">
343
+ <change type="description-change">
344
+ </change>
345
+ </changes>
346
+ </content>
347
+ </entry>}
348
+ entry = Entry.from_snippet(element_xml_text)
349
+
350
+ change = entry.changes.first
351
+ assert_equal(Category::DESCRIPTION_CHANGE, change[:type])
352
+ end
322
353
  end
323
354
 
324
355
  end
@@ -42,6 +42,7 @@ module MingleEvents
42
42
  assert_equal({:a => 's'}, Xml.parse('<a x="y">s</a>').select('a').to_hash)
43
43
  assert_equal({:a => "\u00A0"}, Xml.parse('<a>&#160;</a>').select('a').to_hash)
44
44
  assert_equal({:a => { :x => 'y'}}, Xml.parse('<a x="y"></a>').select('a').to_hash)
45
+ assert_equal({:a => { :x => 'y'}}, Xml.parse("<a x=\"y\">\n </a>").select('a').to_hash)
45
46
 
46
47
  end
47
48
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mingle_events
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Rice
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-23 00:00:00.000000000 Z
11
+ date: 2015-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri