xrb 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/ext/xrb/tag.c +6 -1
- data/lib/xrb/tag.rb +5 -1
- data/lib/xrb/version.rb +1 -1
- data/license.md +1 -0
- data.tar.gz.sig +3 -2
- metadata +3 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd37ae9601f70b0cfcbabe16d8fcb75979e9f1f3c31b09c09dc09e0778ecee62
|
4
|
+
data.tar.gz: 24fec49db14fee7d33279c8a1ebd886be3c260c094a40315525ca53c86e82421
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95f9e7530e0d5419c5a55a0a33d242f54fc15ac1f1e48d046c27b2b46d627e19b4fc7a90c111e428e502f58afe2a93818610758ecb757c31cc7990f2756f8220
|
7
|
+
data.tar.gz: 0fc975c1d6b59077b326efd428bb2f0039ead7198145c4b66aaab098fe0c58caaf0018c2568ea8fc0cab81b0f5346bd35df102eaac0ebe02e28ee7713ca020bd
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/ext/xrb/tag.c
CHANGED
@@ -97,13 +97,18 @@ VALUE XRB_Tag_append_attributes(VALUE self, VALUE buffer, VALUE attributes, VALU
|
|
97
97
|
|
98
98
|
for (i = 0; i < RARRAY_LEN(attributes); i++) {
|
99
99
|
VALUE attribute = RARRAY_AREF(attributes, i);
|
100
|
+
|
101
|
+
if (rb_type(attribute) != T_ARRAY || RARRAY_LEN(attribute) != 2) {
|
102
|
+
rb_raise(rb_eTypeError, "expected array for attribute key/value pair");
|
103
|
+
}
|
104
|
+
|
100
105
|
VALUE key = RARRAY_AREF(attribute, 0);
|
101
106
|
VALUE value = RARRAY_AREF(attribute, 1);
|
102
107
|
|
103
108
|
XRB_Tag_append_tag_attribute(buffer, key, value, prefix);
|
104
109
|
}
|
105
110
|
} else {
|
106
|
-
rb_raise(
|
111
|
+
rb_raise(rb_eTypeError, "expected hash or array for attributes");
|
107
112
|
}
|
108
113
|
|
109
114
|
return Qnil;
|
data/lib/xrb/tag.rb
CHANGED
@@ -99,7 +99,11 @@ module XRB
|
|
99
99
|
when Hash
|
100
100
|
self.append_attributes(buffer, value, attribute_key)
|
101
101
|
when Array
|
102
|
-
|
102
|
+
value.each do |attribute|
|
103
|
+
raise TypeError, "expected array of key-value pairs" unless attribute.is_a?(Array) and attribute.size == 2
|
104
|
+
|
105
|
+
self.append_attributes(buffer, [attribute], attribute_key)
|
106
|
+
end
|
103
107
|
when TrueClass
|
104
108
|
buffer << ' ' << attribute_key.to_s
|
105
109
|
else
|
data/lib/xrb/version.rb
CHANGED
data/license.md
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
Copyright, 2012-2024, by Samuel Williams.
|
4
4
|
Copyright, 2020, by Cyril Roelandt.
|
5
5
|
Copyright, 2022, by Adam Daniels.
|
6
|
+
Copyright, 2024, by Jean Boussier.
|
6
7
|
|
7
8
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
9
|
of this software and associated documentation files (the "Software"), to deal
|
data.tar.gz.sig
CHANGED
@@ -1,2 +1,3 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
=hZ��^u\ ��*�P�99�gА�*锵�(�8�'u�n�ߖC���z���z��SX�4�5�5]w��G3L(��3��#������!�R"Ba�7`=!�m���K�XqʙQf�]V�e_�����$O۱����_���S�{�k���4b����
|
2
|
+
P���t/����w�Z�*�+ܙ}���90Qv�&�a��cơ�d�N��J�E�b�m�fE�D��I���}-q�s7
|
3
|
+
����B^(��|}}�q�IT%N}����N�Ǚ�/ה%
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xrb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
- Adam Daniels
|
9
9
|
- Cyril Roelandt
|
10
|
+
- Jean Boussier
|
10
11
|
autorequire:
|
11
12
|
bindir: bin
|
12
13
|
cert_chain:
|
@@ -39,7 +40,7 @@ cert_chain:
|
|
39
40
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
40
41
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
41
42
|
-----END CERTIFICATE-----
|
42
|
-
date: 2024-05-
|
43
|
+
date: 2024-05-06 00:00:00.000000000 Z
|
43
44
|
dependencies: []
|
44
45
|
description:
|
45
46
|
email:
|
metadata.gz.sig
CHANGED
Binary file
|