vcard 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vcard/vcard.rb +0 -1
- data/lib/vcard/version.rb +1 -1
- data/test/vcard_test.rb +2 -25
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f08f4f7aa3e79dda330a56b2cddb0629388f033
|
4
|
+
data.tar.gz: 4e73e399c414fef9a96b58625cf8e5763e0c5ddb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d6577970761ac7b49bd44c380907f0c9f6a82c29a66f2a195315d705b2a99de3645449b5b216b5b0621ea57c9260556e579c7377506b0c33d0b8bfc53259774
|
7
|
+
data.tar.gz: 24330d86736986c9add123743bcdaf76a09cca7cfe8975e5746eea4d95bc97fe4b3f256c34a62c66603a9c8718a59a1ded63eb537428b1808f660193e927260f
|
data/lib/vcard/vcard.rb
CHANGED
@@ -649,7 +649,6 @@ module Vcard
|
|
649
649
|
raise ArgumentError, "Vcard.decode cannot be called with a #{card.type}"
|
650
650
|
end
|
651
651
|
|
652
|
-
string.force_encoding(Encoding::UTF_8)
|
653
652
|
entities = ::Vcard.expand(::Vcard.decode(string))
|
654
653
|
|
655
654
|
# Since all vCards must have a begin/end, the top-level should consist
|
data/lib/vcard/version.rb
CHANGED
data/test/vcard_test.rb
CHANGED
@@ -305,14 +305,10 @@ EOF
|
|
305
305
|
end
|
306
306
|
|
307
307
|
def test_modify_name
|
308
|
-
card = Vcard.decode("begin:vcard\nend:vcard\n").first
|
309
|
-
|
310
|
-
assert_raises(::Vcard::InvalidEncodingError) do
|
311
|
-
card.name
|
312
|
-
end
|
308
|
+
card = Vcard::Vcard.decode("begin:vcard\nend:vcard\n").first
|
313
309
|
|
314
310
|
assert_raises(::Vcard::Unencodeable) do
|
315
|
-
Vcard::Maker.make2(card) {}
|
311
|
+
Vcard::Vcard::Maker.make2(card) {}
|
316
312
|
end
|
317
313
|
|
318
314
|
card.make do |m|
|
@@ -408,25 +404,6 @@ EOF
|
|
408
404
|
assert_equal(Date.new(1980, 10, 25), card.birthday)
|
409
405
|
end
|
410
406
|
|
411
|
-
def test_utf_heuristics
|
412
|
-
bom = "\xEF\xBB\xBF"
|
413
|
-
dat = "BEGIN:VCARD\nN:name\nEND:VCARD\n"
|
414
|
-
utf_name_test(bom+dat)
|
415
|
-
utf_name_test(bom+dat.downcase)
|
416
|
-
utf_name_test(dat)
|
417
|
-
utf_name_test(dat.downcase)
|
418
|
-
|
419
|
-
utf_name_test(be(bom+dat))
|
420
|
-
utf_name_test(be(bom+dat.downcase))
|
421
|
-
utf_name_test(be(dat))
|
422
|
-
utf_name_test(be(dat.downcase))
|
423
|
-
|
424
|
-
utf_name_test(le(bom+dat))
|
425
|
-
utf_name_test(le(bom+dat.downcase))
|
426
|
-
utf_name_test(le(dat))
|
427
|
-
utf_name_test(le(dat.downcase))
|
428
|
-
end
|
429
|
-
|
430
407
|
# Broken output from Highrise. Report to support@highrisehq.com
|
431
408
|
def test_highrises_invalid_google_talk_field
|
432
409
|
c = vcard(:highrise)
|