gir_ffi 0.9.1 → 0.9.2
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: ca3636ea5b78e4f09c583690ad160c4a2e739cb1
|
4
|
+
data.tar.gz: 8a4d243567cc87cc00d18783931c97a35635c6c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6994483aa5dd9df51ef778c97de12698abf57fa436527370c404e7e53e711f5febbe56bd34d1765e2efed09622d81ffbb3da8bb45d3b68048956a61d45562d68
|
7
|
+
data.tar.gz: 0092e6fb91d2cfa3e1f6f70e4d601b8a1ac617d817675f3c1ad5930c0b3e0989c5b93a3b56601b2e6f1939c15cb1016485baff82635781af01e5099936232df8
|
data/Changelog.md
CHANGED
@@ -45,6 +45,12 @@ module GirFFI
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
+
def eligible_properties
|
49
|
+
info.properties.reject do |pinfo|
|
50
|
+
info.find_instance_method("get_#{pinfo.name}")
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
48
54
|
protected
|
49
55
|
|
50
56
|
def object_class_struct_info
|
@@ -102,7 +108,7 @@ module GirFFI
|
|
102
108
|
end
|
103
109
|
|
104
110
|
def setup_property_accessors
|
105
|
-
|
111
|
+
eligible_properties.each do |prop|
|
106
112
|
PropertyBuilder.new(prop).build
|
107
113
|
end
|
108
114
|
end
|
data/lib/gir_ffi/version.rb
CHANGED
@@ -99,4 +99,21 @@ describe GirFFI::Builders::ObjectBuilder do
|
|
99
99
|
result.map(&:name).wont_include 'parent_instance'
|
100
100
|
end
|
101
101
|
end
|
102
|
+
|
103
|
+
describe '#eligible_properties' do
|
104
|
+
let(:wi_builder) do
|
105
|
+
GirFFI::Builders::ObjectBuilder.new(
|
106
|
+
get_introspection_data('Regress', 'TestWi8021x'))
|
107
|
+
end
|
108
|
+
|
109
|
+
it 'includes properties that do not have a matching getter method' do
|
110
|
+
result = obj_builder.eligible_properties
|
111
|
+
result.map(&:name).must_include 'double'
|
112
|
+
end
|
113
|
+
|
114
|
+
it 'skips properties that have a matching getter method' do
|
115
|
+
result = wi_builder.eligible_properties
|
116
|
+
result.map(&:name).wont_include 'testbool'
|
117
|
+
end
|
118
|
+
end
|
102
119
|
end
|
@@ -14,5 +14,18 @@ describe 'the generated Gst module' do
|
|
14
14
|
GObject.signal_emit(instance, 'handoff')
|
15
15
|
a.must_equal 10
|
16
16
|
end
|
17
|
+
|
18
|
+
it 'correctly fetches the name' do
|
19
|
+
instance.name.must_equal 'sink'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe 'Gst::AutoAudioSink' do
|
24
|
+
let(:instance) { Gst::ElementFactory.make('autoaudiosink', 'audiosink') }
|
25
|
+
|
26
|
+
it 'correctly fetches the name' do
|
27
|
+
instance.get_name.must_equal 'audiosink'
|
28
|
+
instance.name.must_equal 'audiosink'
|
29
|
+
end
|
17
30
|
end
|
18
31
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gir_ffi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matijs van Zuijlen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|