tilia-vobject 4.0.0.pre.alpha4 → 4.0.0.pre.alpha5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bb045bffc5a4f09ec5b42bf531c93af195bb13c
|
4
|
+
data.tar.gz: aee0bcf064936a2edf655b1233b07d6e17ee9363
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fde2b577247818ebaa90fa4432b12ce6186af67f3b37c29322857ad416e0a770d870001aab010b3b9b223b8aa386fa36ffcf46956f3d34d93a241e559e967a97
|
7
|
+
data.tar.gz: b09d50a778617b84cbc219f95b9d9a993cbcff17deedba818b15c15653336723494a1cd08f5565be4134c0bfd27e330834c9ac5a93743a2d608ec92c6574db31
|
@@ -138,8 +138,8 @@ module Tilia
|
|
138
138
|
#
|
139
139
|
# @return void
|
140
140
|
def input=(input)
|
141
|
-
input = input.
|
142
|
-
input = JSON.parse(input)
|
141
|
+
input = input.read unless input.is_a?(String)
|
142
|
+
input = JSON.parse(input)
|
143
143
|
|
144
144
|
@input = input
|
145
145
|
end
|
data/test/v_object/cli_test.rb
CHANGED
@@ -91,7 +91,7 @@ ICS
|
|
91
91
|
version = Tilia::VObject::Version::VERSION
|
92
92
|
assert_equal(
|
93
93
|
'["vcard",[["version",{},"text","4.0"],["prodid",{},"text","-//Tilia//Tilia VObject ' + version + '//EN"],["fn",{},"text","Cowboy Henk"]]]',
|
94
|
-
@cli.stdout.
|
94
|
+
@cli.stdout.read
|
95
95
|
)
|
96
96
|
end
|
97
97
|
|
@@ -121,7 +121,7 @@ ICS
|
|
121
121
|
"version",
|
122
122
|
JCARD
|
123
123
|
|
124
|
-
assert_equal(expected, @cli.stdout.
|
124
|
+
assert_equal(expected, @cli.stdout.read[0..39])
|
125
125
|
end
|
126
126
|
|
127
127
|
def test_convert_j_cal_fail
|
@@ -191,7 +191,7 @@ FN:Cowboy Henk
|
|
191
191
|
END:VCARD
|
192
192
|
VCF
|
193
193
|
|
194
|
-
assert_equal(expected, @cli.stdout.
|
194
|
+
assert_equal(expected, @cli.stdout.read.gsub("\r\n", "\n"))
|
195
195
|
end
|
196
196
|
|
197
197
|
def test_convert_default_formats
|
@@ -239,7 +239,7 @@ FN:Cowboy Henk
|
|
239
239
|
END:VCARD
|
240
240
|
VCF
|
241
241
|
|
242
|
-
assert_equal(expected, @cli.stdout.
|
242
|
+
assert_equal(expected, @cli.stdout.read.gsub("\r\n", "\n"))
|
243
243
|
end
|
244
244
|
|
245
245
|
def test_v_card4030
|
@@ -270,7 +270,7 @@ FN:Cowboy Henk
|
|
270
270
|
END:VCARD
|
271
271
|
VCF
|
272
272
|
|
273
|
-
assert_equal(expected, @cli.stdout.
|
273
|
+
assert_equal(expected, @cli.stdout.read.gsub("\r\n", "\n"))
|
274
274
|
end
|
275
275
|
|
276
276
|
def test_v_card4021
|
@@ -357,7 +357,7 @@ VCF
|
|
357
357
|
assert_equal(2, @cli.main(['repair', '-']))
|
358
358
|
|
359
359
|
@cli.stdout.rewind
|
360
|
-
assert(@cli.stdout.
|
360
|
+
assert(@cli.stdout.read =~ /BEGIN:VCARD\r\nVERSION:2.1\r\nUID:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\r\nEND:VCARD\r\n$/)
|
361
361
|
end
|
362
362
|
|
363
363
|
def test_repair_nothing
|
@@ -382,7 +382,7 @@ VCF
|
|
382
382
|
result = @cli.main(['repair', '-'])
|
383
383
|
|
384
384
|
@cli.stderr.rewind
|
385
|
-
error = @cli.stderr.
|
385
|
+
error = @cli.stderr.read
|
386
386
|
|
387
387
|
assert_equal(0, result, "This should have been error free. stderr output:\n#{error}")
|
388
388
|
end
|
@@ -419,7 +419,7 @@ VCF
|
|
419
419
|
result = @cli.main(['color', '-'])
|
420
420
|
|
421
421
|
@cli.stderr.rewind
|
422
|
-
error = @cli.stderr.
|
422
|
+
error = @cli.stderr.read
|
423
423
|
|
424
424
|
assert_equal(0, result, "This should have been error free. stderr output:\n#{error}")
|
425
425
|
end
|
@@ -451,7 +451,7 @@ VCF
|
|
451
451
|
result = @cli.main(['color', '-'])
|
452
452
|
|
453
453
|
@cli.stderr.rewind
|
454
|
-
error = @cli.stderr.
|
454
|
+
error = @cli.stderr.read
|
455
455
|
|
456
456
|
assert_equal(0, result, "This should have been error free. stderr output:\n#{error}")
|
457
457
|
end
|
data/test/v_object/test_case.rb
CHANGED
@@ -13,7 +13,7 @@ module Tilia
|
|
13
13
|
# CALSCALE will automatically get removed if it's set to GREGORIAN.
|
14
14
|
def assert_v_obj_equals(expected, actual, message = '')
|
15
15
|
get_obj = lambda do |input|
|
16
|
-
input = input.
|
16
|
+
input = input.read if input.respond_to?(:read)
|
17
17
|
|
18
18
|
input = Tilia::VObject::Reader.read(input) if input.is_a?(String)
|
19
19
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tilia-vobject
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0.pre.
|
4
|
+
version: 4.0.0.pre.alpha5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jakob Sack
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tilia-xml
|