gir_ffi 0.11.0 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/Changelog.md +6 -0
  3. data/Gemfile +2 -9
  4. data/README.md +4 -6
  5. data/lib/ffi-glib/main_loop.rb +1 -4
  6. data/lib/ffi-gobject/value.rb +2 -4
  7. data/lib/gir_ffi/builders/argument_builder.rb +1 -1
  8. data/lib/gir_ffi/builders/null_argument_builder.rb +1 -2
  9. data/lib/gir_ffi/builders/null_return_value_builder.rb +1 -2
  10. data/lib/gir_ffi/builders/user_defined_builder.rb +1 -1
  11. data/lib/gir_ffi/in_pointer.rb +3 -3
  12. data/lib/gir_ffi/version.rb +1 -1
  13. data/tasks/test.rake +0 -16
  14. data/test/base_test_helper.rb +0 -38
  15. data/test/ffi-gobject/gobject_test.rb +26 -26
  16. data/test/ffi-gobject/value_test.rb +10 -8
  17. data/test/gir_ffi/boxed_base_test.rb +6 -4
  18. data/test/gir_ffi/builders/function_builder_test.rb +1 -1
  19. data/test/gir_ffi/builders/user_defined_builder_test.rb +39 -18
  20. data/test/gir_ffi/class_base_test.rb +6 -12
  21. data/test/gir_ffi/in_pointer_test.rb +3 -5
  22. data/test/gir_ffi/sized_array_test.rb +5 -4
  23. data/test/gir_ffi/struct_like_base_test.rb +9 -7
  24. data/test/gir_ffi/user_defined_object_info_test.rb +2 -2
  25. data/test/integration/callback_exceptions_test.rb +0 -2
  26. data/test/integration/derived_classes_test.rb +0 -2
  27. data/test/integration/generated_everything_test.rb +1 -1
  28. data/test/integration/generated_gimarshallingtests_test.rb +26 -26
  29. data/test/integration/generated_gio_test.rb +0 -2
  30. data/test/integration/generated_glib_test.rb +0 -2
  31. data/test/integration/generated_gst_test.rb +0 -2
  32. data/test/integration/generated_gtk_source_test.rb +26 -0
  33. data/test/integration/generated_gtop_test.rb +0 -2
  34. data/test/integration/generated_secret_test.rb +0 -2
  35. data/test/integration/generated_warnlib_test.rb +0 -2
  36. data/test/integration/method_lookup_test.rb +0 -2
  37. metadata +20 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 40ea5b819bf924354aa3422d6d50f16b273c2da6
4
- data.tar.gz: 6da1f53d118bca0abccf87a2e4540bc6dc0f879f
3
+ metadata.gz: 4383f1ecbc304b28e9b0b85b0bc54f85444e744d
4
+ data.tar.gz: aa02867a66c86cf5dd47535d7743e7259361d3c3
5
5
  SHA512:
6
- metadata.gz: c2bc2ce1e2c881277554af8fe4e4b937518761f218b920442f56c0974caf67721751b2aee983acb02737e029fde356c5bbe71106bab0c73bf42311bd10021987
7
- data.tar.gz: 0fe6972ea1da4b0dddd910efb36aeae78940bd4a3de5812b4e1dbe64fde8bd74795739e639f7bc17620121f37fe63a1e10a04559bf0d567d4c7aa13a1c440525
6
+ metadata.gz: 0e26daaa79d44f2485a9c0d58a3699e30c33dd5ec8615833aeceeaad06f8d1f112a7a4b18e2bd64469becc50be0574df533c219d4745d8a2cd8f23fef7fa49db
7
+ data.tar.gz: 6639c70f15f213e08e0e366f3c852b5c85d63ca80c78763a099fa68e60cd8ba87114b63f2c3a8c8419d07961b548d73b14b896e15416c3af96e2b831411a5671
data/Changelog.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.11.1 / 2017-01-07
4
+
5
+ * Fix build on JRuby
6
+ * Allow clearing properties that take a GObject value
7
+ * Handle GLists requiring an Interface type
8
+
3
9
  ## 0.11.0 / 2016-10-16
4
10
 
5
11
  * Internal test and code improvements. Some internal APIs have been removed or
data/Gemfile CHANGED
@@ -4,18 +4,11 @@ source 'https://rubygems.org'
4
4
  # The gem's dependencies are specified in gir_ffi.gemspec
5
5
  gemspec
6
6
 
7
- gem 'rubocop', '~> 0.43.0', group: :development
8
-
9
- gem 'mutant', git: 'https://github.com/mbj/mutant.git',
10
- branch: 'feature/minitest-integration',
11
- platform: :mri_23,
12
- group: :development
13
-
14
7
  if ENV['CI']
15
8
  if ENV['TRAVIS_RUBY_VERSION'] == '2.2'
16
9
  gem 'coveralls', group: :development
17
10
  end
18
11
  else
19
- gem 'simplecov', '~> 0.12.0', group: :development, platform: :mri
20
- gem 'pry', '~> 0.10.0', group: :development
12
+ gem 'pry', '~> 0.10.4', group: :local_development
13
+ gem 'simplecov', '~> 0.12.0', group: :local_development, platform: :mri
21
14
  end
data/README.md CHANGED
@@ -53,8 +53,7 @@ examples can be found in `gir_ffi-gtk` and `gir_ffi-gst`.
53
53
 
54
54
  ## Requirements
55
55
 
56
- GirFFI is tested on CRuby 2.1, 2.2 and 2.3, JRuby 9.0 and 9.1, and on
57
- Rubinius 3.
56
+ GirFFI is tested on CRuby 2.1, 2.2 and 2.3, JRuby 9.1, and on Rubinius 3.
58
57
 
59
58
  You will also need gobject-introspection installed with some
60
59
  introspection data.
@@ -70,10 +69,9 @@ On Debian and Ubuntu, installing `libgirepository1.0-1` and `gir1.2-glib-2.0`
70
69
  should be enough to use GirFFI in your application.
71
70
 
72
71
  To run the tests, you should additionally install `libgirepository1.0-dev`,
73
- `libcairo2-dev`, `gobject-introspection`, `gir1.2-gtop-2.0`, `gir1.2-pango-1.0`,
74
- `gir1.2-secret-1` and `gir1.2-gstreamer-1.0`. This should be enough to get
75
- `rake test` working.
76
-
72
+ `libcairo2-dev`, `gobject-introspection`, `gir1.2-gtop-2.0`, `gir1.2-gtk-3.0`,
73
+ `gir1.2-pango-1.0`, `gir1.2-secret-1` and `gir1.2-gstreamer-1.0`. This should
74
+ be enough to get `rake test` working.
77
75
 
78
76
  GirFFI has not been tested on Mac OS X or Microsoft Windows. YMMV.
79
77
 
@@ -39,10 +39,7 @@ module GLib
39
39
  setup_instance_method :run
40
40
 
41
41
  def run_with_thread_enabler
42
- case RUBY_ENGINE
43
- when 'jruby'
44
- when 'rbx'
45
- else # 'ruby' most likely
42
+ if RUBY_ENGINE == 'ruby'
46
43
  ThreadEnabler.instance.setup_idle_handler
47
44
  end
48
45
  RUNNING_LOOPS << self
@@ -149,11 +149,9 @@ module GObject
149
149
  raise "Can't handle #{val.class}"
150
150
  end
151
151
 
152
- def set_none(_)
153
- end
152
+ def set_none(_); end
154
153
 
155
- def get_none
156
- end
154
+ def get_none; end
157
155
 
158
156
  def set_instance_enhanced(val)
159
157
  check_type_compatibility val if val
@@ -206,7 +206,7 @@ module GirFFI
206
206
 
207
207
  def pre_convertor_argument
208
208
  if ownership_transfer == :everything && specialized_type_tag == :object
209
- "#{name}.ref"
209
+ "#{name} && #{name}.ref"
210
210
  else
211
211
  name
212
212
  end
@@ -2,8 +2,7 @@
2
2
  module GirFFI
3
3
  # Argument builder that does nothing. Implements the Null Object pattern.
4
4
  class NullArgumentBuilder
5
- def initialize(*)
6
- end
5
+ def initialize(*); end
7
6
 
8
7
  def pre_conversion
9
8
  []
@@ -3,8 +3,7 @@ module GirFFI
3
3
  module Builders
4
4
  # Implements a blank return value matching ReturnValueBuilder's interface.
5
5
  class NullReturnValueBuilder
6
- def initialize
7
- end
6
+ def initialize; end
8
7
 
9
8
  def array_length_idx
10
9
  -1
@@ -174,7 +174,7 @@ module GirFFI
174
174
 
175
175
  alignment = superclass::Struct.alignment
176
176
  fields_spec = properties.flat_map do |param_info|
177
- field_name = param_info.accessor_name
177
+ field_name = param_info.accessor_name.to_sym
178
178
  ffi_type = param_info.ffi_type
179
179
  type_size = FFI.type_size(ffi_type)
180
180
  spec = [field_name, ffi_type, offset]
@@ -37,10 +37,10 @@ module GirFFI
37
37
  from_utf8 val
38
38
  when :gint32, :guint32, :gint8, :GType
39
39
  FFI::Pointer.new val
40
- when Class, :void
41
- val.to_ptr
42
- when Module
40
+ when GirFFI::EnumLikeBase
43
41
  FFI::Pointer.new type[val]
42
+ when Module, :void
43
+ val.to_ptr
44
44
  else
45
45
  raise NotImplementedError, type
46
46
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  # Current GirFFI version
3
3
  module GirFFI
4
- VERSION = '0.11.0'.freeze
4
+ VERSION = '0.11.1'.freeze
5
5
  end
data/tasks/test.rake CHANGED
@@ -189,22 +189,6 @@ namespace :test do
189
189
  Cucumber::Rake::Task.new(:features) do |t|
190
190
  t.cucumber_opts = 'features --format pretty'
191
191
  end
192
-
193
- desc 'Run mutant'
194
-
195
- task mutant: :lib do
196
- command = <<-EOS
197
- RUBY_THREAD_VM_STACK_SIZE=64000 \
198
- bundle exec mutant \
199
- --include lib \
200
- --include test \
201
- --use minitest \
202
- --since master \
203
- --jobs 4 \
204
- "GirFFI*" "GObject*" "GObjectIntrospection*" "GLib*"
205
- EOS
206
- system command
207
- end
208
192
  end
209
193
 
210
194
  file "test/lib/Makefile" => "test/lib/configure" do
@@ -61,41 +61,3 @@ module BaseTestExtensions
61
61
  end
62
62
 
63
63
  Minitest::Test.send :include, BaseTestExtensions
64
-
65
- # Provide methods needed for integration with mutant
66
- module ForMutant
67
- # Mark the current test class as covering the given expression.
68
- def cover(expression)
69
- @expression = expression
70
- end
71
-
72
- # Return the currently set covering expression.
73
- def covering
74
- defined?(@expression) && @expression
75
- end
76
-
77
- # Return the cover expression, but raise an exception if it is not defined.
78
- # This is the method used by mutant to fetch the coverage information.
79
- def cover_expression
80
- raise "Cover expression for #{self} is not specified" unless @expression
81
- @expression
82
- end
83
- end
84
-
85
- Minitest::Test.send :extend, ForMutant
86
-
87
- def cover_expression_for(cls)
88
- full_stack = cls.describe_stack.dup << cls
89
- full_stack.reverse_each do |level|
90
- return level.covering if level.covering
91
- return level.desc.to_s if level.desc.is_a? Module
92
- end
93
- full_stack.first.desc.to_s
94
- end
95
-
96
- # Override describe to automatically set cover information
97
- def describe(desc, *additional_desc, &block)
98
- super.tap do |cls|
99
- cls.cover cover_expression_for(cls) unless cls.covering
100
- end
101
- end
@@ -14,33 +14,33 @@ describe GObject do
14
14
  end
15
15
 
16
16
  it 'has constants for the fundamental GTypes' do
17
- assert_equal GObject.type_from_name('invalid'), GObject::TYPE_INVALID
18
- assert_equal nil, GObject.type_name(GObject::TYPE_INVALID)
17
+ GObject::TYPE_INVALID.must_equal GObject.type_from_name('invalid')
18
+ GObject.type_name(GObject::TYPE_INVALID).must_be_nil
19
19
 
20
- assert_equal 'void', GObject.type_name(GObject::TYPE_NONE)
21
- assert_equal 'GInterface', GObject.type_name(GObject::TYPE_INTERFACE)
22
- assert_equal 'gchar', GObject.type_name(GObject::TYPE_CHAR)
23
- assert_equal 'guchar', GObject.type_name(GObject::TYPE_UCHAR)
24
- assert_equal 'gboolean', GObject.type_name(GObject::TYPE_BOOLEAN)
25
- assert_equal 'gint', GObject.type_name(GObject::TYPE_INT)
26
- assert_equal 'guint', GObject.type_name(GObject::TYPE_UINT)
27
- assert_equal 'glong', GObject.type_name(GObject::TYPE_LONG)
28
- assert_equal 'gulong', GObject.type_name(GObject::TYPE_ULONG)
29
- assert_equal 'gint64', GObject.type_name(GObject::TYPE_INT64)
30
- assert_equal 'guint64', GObject.type_name(GObject::TYPE_UINT64)
31
- assert_equal 'GEnum', GObject.type_name(GObject::TYPE_ENUM)
32
- assert_equal 'GFlags', GObject.type_name(GObject::TYPE_FLAGS)
33
- assert_equal 'gfloat', GObject.type_name(GObject::TYPE_FLOAT)
34
- assert_equal 'gdouble', GObject.type_name(GObject::TYPE_DOUBLE)
35
- assert_equal 'gchararray', GObject.type_name(GObject::TYPE_STRING)
36
- assert_equal 'gpointer', GObject.type_name(GObject::TYPE_POINTER)
37
- assert_equal 'GBoxed', GObject.type_name(GObject::TYPE_BOXED)
38
- assert_equal 'GParam', GObject.type_name(GObject::TYPE_PARAM)
39
- assert_equal 'GObject', GObject.type_name(GObject::TYPE_OBJECT)
40
- assert_equal 'GType', GObject.type_name(GObject::TYPE_GTYPE)
41
- assert_equal 'GVariant', GObject.type_name(GObject::TYPE_VARIANT)
42
- assert_equal 'GStrv', GObject.type_name(GObject::TYPE_STRV)
43
- assert_equal 'GHashTable', GObject.type_name(GObject::TYPE_HASH_TABLE)
20
+ GObject.type_name(GObject::TYPE_NONE).must_equal 'void'
21
+ GObject.type_name(GObject::TYPE_INTERFACE).must_equal 'GInterface'
22
+ GObject.type_name(GObject::TYPE_CHAR).must_equal 'gchar'
23
+ GObject.type_name(GObject::TYPE_UCHAR).must_equal 'guchar'
24
+ GObject.type_name(GObject::TYPE_BOOLEAN).must_equal 'gboolean'
25
+ GObject.type_name(GObject::TYPE_INT).must_equal 'gint'
26
+ GObject.type_name(GObject::TYPE_UINT).must_equal 'guint'
27
+ GObject.type_name(GObject::TYPE_LONG).must_equal 'glong'
28
+ GObject.type_name(GObject::TYPE_ULONG).must_equal 'gulong'
29
+ GObject.type_name(GObject::TYPE_INT64).must_equal 'gint64'
30
+ GObject.type_name(GObject::TYPE_UINT64).must_equal 'guint64'
31
+ GObject.type_name(GObject::TYPE_ENUM).must_equal 'GEnum'
32
+ GObject.type_name(GObject::TYPE_FLAGS).must_equal 'GFlags'
33
+ GObject.type_name(GObject::TYPE_FLOAT).must_equal 'gfloat'
34
+ GObject.type_name(GObject::TYPE_DOUBLE).must_equal 'gdouble'
35
+ GObject.type_name(GObject::TYPE_STRING).must_equal 'gchararray'
36
+ GObject.type_name(GObject::TYPE_POINTER).must_equal 'gpointer'
37
+ GObject.type_name(GObject::TYPE_BOXED).must_equal 'GBoxed'
38
+ GObject.type_name(GObject::TYPE_PARAM).must_equal 'GParam'
39
+ GObject.type_name(GObject::TYPE_OBJECT).must_equal 'GObject'
40
+ GObject.type_name(GObject::TYPE_GTYPE).must_equal 'GType'
41
+ GObject.type_name(GObject::TYPE_VARIANT).must_equal 'GVariant'
42
+ GObject.type_name(GObject::TYPE_STRV).must_equal 'GStrv'
43
+ GObject.type_name(GObject::TYPE_HASH_TABLE).must_equal 'GHashTable'
44
44
  end
45
45
 
46
46
  describe '::object_class_from_instance' do
@@ -41,35 +41,37 @@ describe GObject::Value do
41
41
  it 'wraps a boolean false' do
42
42
  gv = GObject::Value.wrap_ruby_value false
43
43
  assert_instance_of GObject::Value, gv
44
- assert_equal false, gv.get_boolean
44
+ gv.get_boolean.must_equal false
45
45
  end
46
46
 
47
47
  it 'wraps a boolean true' do
48
48
  gv = GObject::Value.wrap_ruby_value true
49
49
  assert_instance_of GObject::Value, gv
50
- assert_equal true, gv.get_boolean
50
+ gv.get_boolean.must_equal true
51
51
  end
52
52
 
53
53
  it 'wraps an Integer' do
54
54
  gv = GObject::Value.wrap_ruby_value 42
55
- assert_equal 42, gv.get_int
55
+ gv.get_int.must_equal 42
56
56
  end
57
57
 
58
58
  it 'wraps a String' do
59
59
  gv = GObject::Value.wrap_ruby_value 'Some Random String'
60
- assert_equal 'Some Random String', gv.get_string
60
+ gv.get_string.must_equal 'Some Random String'
61
61
  end
62
62
 
63
63
  it 'wraps nil' do
64
64
  gv = GObject::Value.wrap_ruby_value nil
65
65
  assert_instance_of GObject::Value, gv
66
- assert_equal nil, gv.get_value
66
+ gv.get_value.must_be_nil
67
67
  end
68
68
 
69
69
  it 'wraps object values' do
70
70
  value = GObject::Object.new({})
71
71
  gv = GObject::Value.wrap_ruby_value value
72
+ value.ref_count.must_equal 2
72
73
  gv.get_value.must_equal value
74
+ value.ref_count.must_equal 3
73
75
  end
74
76
  end
75
77
 
@@ -177,13 +179,13 @@ describe GObject::Value do
177
179
  it 'unwraps a boolean false' do
178
180
  gv = GObject::Value.wrap_ruby_value false
179
181
  result = gv.get_value
180
- assert_equal false, result
182
+ result.must_equal false
181
183
  end
182
184
 
183
185
  it 'unwraps a boolean true' do
184
186
  gv = GObject::Value.wrap_ruby_value true
185
187
  result = gv.get_value
186
- assert_equal true, result
188
+ result.must_equal true
187
189
  end
188
190
 
189
191
  it 'unwraps a signed char' do
@@ -321,7 +323,7 @@ describe GObject::Value do
321
323
  it 'creates a null GValue from a Ruby nil' do
322
324
  gv = GObject::Value.from nil
323
325
  gv.current_gtype.must_equal GObject::TYPE_INVALID
324
- gv.get_value.must_equal nil
326
+ gv.get_value.must_be_nil
325
327
  end
326
328
  end
327
329
 
@@ -17,8 +17,9 @@ describe GirFFI::BoxedBase do
17
17
  it 'returns a copy with owned false' do
18
18
  original = GIMarshallingTests::BoxedStruct.new
19
19
  copy = GIMarshallingTests::BoxedStruct.copy_from(original)
20
- copy.to_ptr.wont_equal original.to_ptr
21
- copy.to_ptr.wont_be :autorelease?
20
+ ptr = copy.to_ptr
21
+ ptr.wont_be :==, original.to_ptr
22
+ ptr.wont_be :autorelease? if ptr.respond_to? :autorelease?
22
23
  copy.struct.wont_be :owned?
23
24
  end
24
25
  end
@@ -27,8 +28,9 @@ describe GirFFI::BoxedBase do
27
28
  it 'wraps and owns the supplied pointer' do
28
29
  original = GIMarshallingTests::BoxedStruct.new
29
30
  copy = GIMarshallingTests::BoxedStruct.wrap_own(original.to_ptr)
30
- copy.to_ptr.must_equal original.to_ptr
31
- copy.to_ptr.wont_be :autorelease?
31
+ ptr = copy.to_ptr
32
+ ptr.must_equal original.to_ptr
33
+ ptr.wont_be :autorelease? if ptr.respond_to? :autorelease?
32
34
  copy.struct.must_be :owned?
33
35
  end
34
36
  end
@@ -275,7 +275,7 @@ describe GirFFI::Builders::FunctionBuilder do
275
275
  code.must_equal <<-CODE.reset_indentation
276
276
  def self.full_inout(object)
277
277
  _v1 = FFI::MemoryPointer.new :pointer
278
- _v1.put_pointer 0, GIMarshallingTests::Object.from(object.ref)
278
+ _v1.put_pointer 0, GIMarshallingTests::Object.from(object && object.ref)
279
279
  GIMarshallingTests::Lib.gi_marshalling_tests_object_full_inout _v1
280
280
  _v2 = GIMarshallingTests::Object.wrap(_v1.get_pointer(0))
281
281
  return _v2
@@ -23,7 +23,7 @@ describe GirFFI::Builders::UserDefinedBuilder do
23
23
  it.install_property GObject.param_spec_int('foo-bar', 'foo bar',
24
24
  'The Foo Bar Property',
25
25
  10, 20, 15,
26
- readwrite: true)
26
+ readable: true, writable: true)
27
27
  end
28
28
  end
29
29
 
@@ -74,15 +74,15 @@ describe GirFFI::Builders::UserDefinedBuilder do
74
74
  it.install_property GObject.param_spec_string('string-prop', 'string property',
75
75
  'The String Property',
76
76
  'this is the default value',
77
- readwrite: true)
77
+ readable: true, writable: true)
78
78
  it.install_property GObject.param_spec_int('int-prop', 'integer property',
79
79
  'The Integer Property',
80
80
  10, 20, 15,
81
- readwrite: true)
81
+ readable: true, writable: true)
82
82
  it.install_property GObject.param_spec_long('long-prop', 'long property',
83
83
  'The Long Property',
84
84
  10.0, 50.0, 42.0,
85
- readwrite: true)
85
+ readable: true, writable: true)
86
86
  end
87
87
  end
88
88
 
@@ -120,7 +120,7 @@ describe GirFFI::Builders::UserDefinedBuilder do
120
120
  it.install_property GObject.param_spec_boxed('boxed-prop', 'boxed property',
121
121
  'The Boxed Property',
122
122
  boxed_gtype,
123
- readwrite: true)
123
+ readable: true, writable: true)
124
124
  end
125
125
  end
126
126
 
@@ -151,7 +151,7 @@ describe GirFFI::Builders::UserDefinedBuilder do
151
151
  it.install_property GObject.param_spec_object('object-prop', 'object property',
152
152
  'The Object Property',
153
153
  object_gtype,
154
- readwrite: true)
154
+ readable: true, writable: true)
155
155
  end
156
156
  end
157
157
 
@@ -173,6 +173,27 @@ describe GirFFI::Builders::UserDefinedBuilder do
173
173
  obj.object_prop = object
174
174
  obj.object_prop.int.must_equal 423
175
175
  end
176
+
177
+ it 'allows clearing the property throught the setter method' do
178
+ obj = klass.new
179
+ obj.object_prop = nil
180
+ obj.object_prop.must_be_nil
181
+ end
182
+
183
+ it 'handles reference counting correctly when using the accessor' do
184
+ obj = klass.new
185
+ object = GIMarshallingTests::Object.new 42
186
+ obj.object_prop = object
187
+ object.ref_count.must_equal 2
188
+ end
189
+
190
+ it 'handles reference counting correctly when using the set_property method' do
191
+ obj = klass.new
192
+ object = GIMarshallingTests::Object.new 42
193
+ object.ref_count.must_equal 1
194
+ obj.set_property('object_prop', object)
195
+ object.ref_count.must_equal 4 # Due to extra Value#set_value + Value#get_value
196
+ end
176
197
  end
177
198
 
178
199
  describe 'with a boolean property' do
@@ -182,7 +203,7 @@ describe GirFFI::Builders::UserDefinedBuilder do
182
203
  it.install_property GObject.param_spec_boolean('the-prop', 'the property',
183
204
  'The Property',
184
205
  true,
185
- readwrite: true)
206
+ readable: true, writable: true)
186
207
  end
187
208
  end
188
209
 
@@ -200,7 +221,7 @@ describe GirFFI::Builders::UserDefinedBuilder do
200
221
  it.install_property GObject.param_spec_char('the-prop', 'the property',
201
222
  'The Property',
202
223
  -20, 100, 15,
203
- readwrite: true)
224
+ readable: true, writable: true)
204
225
  end
205
226
  end
206
227
 
@@ -218,7 +239,7 @@ describe GirFFI::Builders::UserDefinedBuilder do
218
239
  it.install_property GObject.param_spec_uchar('the-prop', 'the property',
219
240
  'The Property',
220
241
  10, 100, 15,
221
- readwrite: true)
242
+ readable: true, writable: true)
222
243
  end
223
244
  end
224
245
 
@@ -236,7 +257,7 @@ describe GirFFI::Builders::UserDefinedBuilder do
236
257
  it.install_property GObject.param_spec_uint('the-prop', 'the property',
237
258
  'The Property',
238
259
  10, 100, 15,
239
- readwrite: true)
260
+ readable: true, writable: true)
240
261
  end
241
262
  end
242
263
 
@@ -254,7 +275,7 @@ describe GirFFI::Builders::UserDefinedBuilder do
254
275
  it.install_property GObject.param_spec_ulong('the-prop', 'the property',
255
276
  'The Property',
256
277
  10, 100, 15,
257
- readwrite: true)
278
+ readable: true, writable: true)
258
279
  end
259
280
  end
260
281
 
@@ -272,7 +293,7 @@ describe GirFFI::Builders::UserDefinedBuilder do
272
293
  it.install_property GObject.param_spec_int64('the-prop', 'the property',
273
294
  'The Property',
274
295
  10, 100, 15,
275
- readwrite: true)
296
+ readable: true, writable: true)
276
297
  end
277
298
  end
278
299
 
@@ -290,7 +311,7 @@ describe GirFFI::Builders::UserDefinedBuilder do
290
311
  it.install_property GObject.param_spec_uint64('the-prop', 'the property',
291
312
  'The Property',
292
313
  10, 100, 15,
293
- readwrite: true)
314
+ readable: true, writable: true)
294
315
  end
295
316
  end
296
317
 
@@ -308,7 +329,7 @@ describe GirFFI::Builders::UserDefinedBuilder do
308
329
  it.install_property GObject.param_spec_float('the-prop', 'the property',
309
330
  'The Property',
310
331
  10.0, 100.0, 15.0,
311
- readwrite: true)
332
+ readable: true, writable: true)
312
333
  end
313
334
  end
314
335
 
@@ -326,7 +347,7 @@ describe GirFFI::Builders::UserDefinedBuilder do
326
347
  it.install_property GObject.param_spec_double('the-prop', 'the property',
327
348
  'The Property',
328
349
  10.0, 100.0, 15.0,
329
- readwrite: true)
350
+ readable: true, writable: true)
330
351
  end
331
352
  end
332
353
 
@@ -344,7 +365,7 @@ describe GirFFI::Builders::UserDefinedBuilder do
344
365
  prop = GObject.param_spec_enum('the-prop', 'the property',
345
366
  'The Property',
346
367
  GIMarshallingTests::GEnum.gtype, 0,
347
- readwrite: true)
368
+ readable: true, writable: true)
348
369
  it.install_property prop
349
370
  end
350
371
  end
@@ -363,7 +384,7 @@ describe GirFFI::Builders::UserDefinedBuilder do
363
384
  prop = GObject.param_spec_flags('the-prop', 'the property',
364
385
  'The Property',
365
386
  GIMarshallingTests::Flags.gtype, 0,
366
- readwrite: true)
387
+ readable: true, writable: true)
367
388
  it.install_property prop
368
389
  end
369
390
  end
@@ -388,7 +409,7 @@ describe GirFFI::Builders::UserDefinedBuilder do
388
409
  it.install_property GObject.param_spec_int('int-prop', 'integer property',
389
410
  'Integer Property',
390
411
  10, 20, 15,
391
- readwrite: true)
412
+ readable: true, writable: true)
392
413
  end
393
414
  end
394
415
 
@@ -93,8 +93,7 @@ describe GirFFI::ClassBase do
93
93
  'correct-result'
94
94
  end
95
95
 
96
- def initialize
97
- end
96
+ def initialize; end
98
97
  end
99
98
  klass.const_set :GIR_FFI_BUILDER, builder
100
99
 
@@ -105,8 +104,7 @@ describe GirFFI::ClassBase do
105
104
  it 'raises a sensible error if the method is not found' do
106
105
  expect(builder = Object.new).to receive(:setup_method).with('foo').and_return nil
107
106
  klass = Class.new GirFFI::ClassBase do
108
- def initialize
109
- end
107
+ def initialize; end
110
108
  end
111
109
  klass.const_set :GIR_FFI_BUILDER, builder
112
110
 
@@ -124,11 +122,9 @@ describe GirFFI::ClassBase do
124
122
 
125
123
  expect(sub_builder = Object.new).to receive(:setup_instance_method).with('foo').and_return nil
126
124
  sub_klass = Class.new klass do
127
- def foo
128
- end
125
+ def foo; end
129
126
 
130
- def initialize
131
- end
127
+ def initialize; end
132
128
  end
133
129
  sub_klass.const_set :GIR_FFI_BUILDER, sub_builder
134
130
 
@@ -144,8 +140,7 @@ describe GirFFI::ClassBase do
144
140
  'correct-result'
145
141
  end
146
142
 
147
- def initialize
148
- end
143
+ def initialize; end
149
144
  end
150
145
  klass.const_set :GIR_FFI_BUILDER, builder
151
146
 
@@ -158,8 +153,7 @@ describe GirFFI::ClassBase do
158
153
  it 'raises a sensible error if the method is not found' do
159
154
  expect(builder = Object.new).to receive(:setup_instance_method).with('foo').and_return nil
160
155
  klass = Class.new GirFFI::ClassBase do
161
- def initialize
162
- end
156
+ def initialize; end
163
157
  end
164
158
  klass.const_set :GIR_FFI_BUILDER, builder
165
159
 
@@ -33,7 +33,7 @@ describe GirFFI::InPointer do
33
33
  struct[:foo] = 42
34
34
  struct[:bar] = 24
35
35
  ptr = GirFFI::InPointer.from_array e, [struct]
36
- ptr.wont_equal struct.to_ptr
36
+ ptr.wont_be :==, struct.to_ptr
37
37
  new_struct = e::Struct.new ptr
38
38
  new_struct[:foo].must_equal 42
39
39
  new_struct[:bar].must_equal 24
@@ -147,10 +147,8 @@ describe GirFFI::InPointer do
147
147
 
148
148
  it 'handles enum types' do
149
149
  e = Module.new do
150
+ extend GirFFI::EnumBase
150
151
  self::Enum = FFI::Enum.new [:foo, :bar, :baz], :qux
151
- def self.[](val)
152
- self::Enum[val]
153
- end
154
152
  end
155
153
  ptr = GirFFI::InPointer.from e, :bar
156
154
  ptr.address.must_equal 1
@@ -166,7 +164,7 @@ describe GirFFI::InPointer do
166
164
  end
167
165
 
168
166
  it 'returns nil when passed nil' do
169
- GirFFI::InPointer.from(:void, nil).must_equal nil
167
+ GirFFI::InPointer.from(:void, nil).must_be_nil
170
168
  end
171
169
  end
172
170
 
@@ -103,7 +103,7 @@ describe GirFFI::SizedArray do
103
103
 
104
104
  struct_copy = arr.first
105
105
  struct_copy.long_.must_equal struct.long_
106
- struct_copy.to_ptr.wont_equal struct.to_ptr
106
+ struct_copy.to_ptr.wont_be :==, struct.to_ptr
107
107
  struct_copy.struct.wont_be :owned?
108
108
  end
109
109
 
@@ -124,7 +124,7 @@ describe GirFFI::SizedArray do
124
124
  it 'return an unowned copy of its argument' do
125
125
  arr = GirFFI::SizedArray.from :gint32, 3, [3, 2, 1]
126
126
  arr2 = GirFFI::SizedArray.copy_from :gint32, 3, arr
127
- arr.to_ptr.wont_equal arr2.to_ptr
127
+ arr.to_ptr.wont_be :==, arr2.to_ptr
128
128
  arr2.to_a.must_equal [3, 2, 1]
129
129
  arr2.to_ptr.wont_be :autorelease?
130
130
  end
@@ -139,7 +139,7 @@ describe GirFFI::SizedArray do
139
139
  arr = GirFFI::SizedArray.from :gint32, 3, [3, 2, 1]
140
140
  arr2 = GirFFI::SizedArray.copy_from :gint32, 3, arr.to_ptr
141
141
  assert_instance_of GirFFI::SizedArray, arr2
142
- arr2.to_ptr.wont_equal arr.to_ptr
142
+ arr2.to_ptr.wont_be :==, arr.to_ptr
143
143
  arr2.to_ptr.wont_be :autorelease?
144
144
  arr2.to_a.must_equal [3, 2, 1]
145
145
  end
@@ -185,7 +185,8 @@ describe GirFFI::SizedArray do
185
185
  it 'returns just a pointer' do
186
186
  sized = GirFFI::SizedArray.from :int32, 3, [1, 2, 3]
187
187
  ptr = sized.to_ptr
188
- GirFFI::SizedArray.get_value_from_pointer(ptr, 0).must_equal ptr
188
+ result = GirFFI::SizedArray.get_value_from_pointer(ptr, 0)
189
+ result.must_be :==, ptr
189
190
  end
190
191
 
191
192
  it 'offsets correctly' do
@@ -8,7 +8,7 @@ describe GirFFI::StructLikeBase do
8
8
  it 'returns a wrapped owned copy of structs' do
9
9
  original = GIMarshallingTests::SimpleStruct.new
10
10
  copy = GIMarshallingTests::SimpleStruct.wrap_copy(original.to_ptr)
11
- copy.to_ptr.wont_equal original.to_ptr
11
+ copy.to_ptr.wont_be :==, original.to_ptr
12
12
  copy.to_ptr.wont_be :autorelease?
13
13
  copy.struct.must_be :owned?
14
14
  end
@@ -16,7 +16,7 @@ describe GirFFI::StructLikeBase do
16
16
  it 'returns a wrapped owned copy of unions' do
17
17
  original = GIMarshallingTests::Union.new
18
18
  copy = GIMarshallingTests::Union.wrap_copy(original.to_ptr)
19
- copy.to_ptr.wont_equal original.to_ptr
19
+ copy.to_ptr.wont_be :==, original.to_ptr
20
20
  copy.to_ptr.wont_be :autorelease?
21
21
  copy.struct.must_be :owned?
22
22
  end
@@ -24,8 +24,9 @@ describe GirFFI::StructLikeBase do
24
24
  it 'returns a wrapped owned copy of boxed types' do
25
25
  original = GIMarshallingTests::BoxedStruct.new
26
26
  copy = GIMarshallingTests::BoxedStruct.wrap_copy(original.to_ptr)
27
- copy.to_ptr.wont_equal original.to_ptr
28
- copy.to_ptr.wont_be :autorelease?
27
+ ptr = copy.to_ptr
28
+ ptr.wont_be :==, original.to_ptr
29
+ ptr.wont_be :autorelease? if ptr.respond_to? :autorelease
29
30
  copy.struct.must_be :owned?
30
31
  end
31
32
 
@@ -40,7 +41,7 @@ describe GirFFI::StructLikeBase do
40
41
  original.long_ = 42
41
42
  copy = GIMarshallingTests::Union.copy_from(original)
42
43
  copy.long_.must_equal 42
43
- copy.to_ptr.wont_equal original.to_ptr
44
+ copy.to_ptr.wont_be :==, original.to_ptr
44
45
  copy.to_ptr.wont_be :autorelease?
45
46
  copy.struct.wont_be :owned?
46
47
  end
@@ -48,7 +49,7 @@ describe GirFFI::StructLikeBase do
48
49
  it 'returns an unowned copy of structs' do
49
50
  original = GIMarshallingTests::SimpleStruct.new
50
51
  copy = GIMarshallingTests::SimpleStruct.copy_from(original)
51
- copy.to_ptr.wont_equal original.to_ptr
52
+ copy.to_ptr.wont_be :==, original.to_ptr
52
53
  copy.to_ptr.wont_be :autorelease?
53
54
  copy.struct.wont_be :owned?
54
55
  end
@@ -122,7 +123,8 @@ describe GirFFI::StructLikeBase do
122
123
  it 'returns just a pointer' do
123
124
  object = klass.new
124
125
  ptr = object.to_ptr
125
- klass.get_value_from_pointer(ptr, 0).must_equal ptr
126
+ result = klass.get_value_from_pointer(ptr, 0)
127
+ result.must_be :==, ptr
126
128
  end
127
129
 
128
130
  it 'uses offset correctly' do
@@ -85,7 +85,7 @@ describe GirFFI::UserDefinedObjectInfo do
85
85
  let(:info) { GirFFI::UserDefinedObjectInfo.new klass }
86
86
 
87
87
  it 'finds no methods' do
88
- info.find_method('foo').must_equal nil
88
+ info.find_method('foo').must_be_nil
89
89
  end
90
90
  end
91
91
 
@@ -94,7 +94,7 @@ describe GirFFI::UserDefinedObjectInfo do
94
94
  let(:info) { GirFFI::UserDefinedObjectInfo.new klass }
95
95
 
96
96
  it 'finds no signals' do
97
- info.find_signal('foo').must_equal nil
97
+ info.find_signal('foo').must_be_nil
98
98
  end
99
99
  end
100
100
 
@@ -6,8 +6,6 @@ GirFFI.setup :Regress
6
6
  class CallbackTestException < RuntimeError; end
7
7
 
8
8
  describe 'An exception in a callback' do
9
- cover 'GLib::MainLoop'
10
-
11
9
  describe 'for signals' do
12
10
  let(:object) { Regress::TestSubObj.new }
13
11
 
@@ -5,8 +5,6 @@ GirFFI.setup :Regress
5
5
 
6
6
  # Tests deriving Ruby classes from GObject classes.
7
7
  describe 'For derived classes' do
8
- cover 'GirFFI'
9
-
10
8
  describe 'setting up methods when first called' do
11
9
  before do
12
10
  save_module :GIMarshallingTests
@@ -394,7 +394,7 @@ describe Everything do
394
394
  skip unless get_introspection_data 'Everything', 'passthrough_one_gpointer'
395
395
  ptr = FFI::MemoryPointer.new(:int)
396
396
  result = Everything.passthrough_one_gpointer(ptr)
397
- result.must_equal ptr
397
+ result.must_be :==, ptr
398
398
  end
399
399
 
400
400
  it 'has a working function #passthrough_one_gshort' do
@@ -843,11 +843,11 @@ describe GIMarshallingTests do
843
843
  end
844
844
 
845
845
  it 'can be retrieved with #get_property' do
846
- instance.get_property('some-boxed-glist').must_equal nil
846
+ instance.get_property('some-boxed-glist').must_be_nil
847
847
  end
848
848
 
849
849
  it 'can be retrieved with #some_boxed_glist' do
850
- instance.some_boxed_glist.must_equal nil
850
+ instance.some_boxed_glist.must_be_nil
851
851
  end
852
852
 
853
853
  it 'can be set with #set_property_extended' do
@@ -870,11 +870,11 @@ describe GIMarshallingTests do
870
870
  end
871
871
 
872
872
  it 'can be retrieved with #get_property' do
873
- instance.get_property('some-boxed-struct').must_equal nil
873
+ instance.get_property('some-boxed-struct').must_be_nil
874
874
  end
875
875
 
876
876
  it 'can be retrieved with #some_boxed_struct' do
877
- instance.some_boxed_struct.must_equal nil
877
+ instance.some_boxed_struct.must_be_nil
878
878
  end
879
879
 
880
880
  it 'can be set with #set_property' do
@@ -1536,49 +1536,49 @@ describe GIMarshallingTests do
1536
1536
 
1537
1537
  it 'has a working function #boolean_inout_false_true' do
1538
1538
  res = GIMarshallingTests.boolean_inout_false_true false
1539
- assert_equal true, res
1539
+ res.must_equal true
1540
1540
  end
1541
1541
 
1542
1542
  it 'has a working function #boolean_inout_true_false' do
1543
1543
  res = GIMarshallingTests.boolean_inout_true_false true
1544
- assert_equal false, res
1544
+ res.must_equal false
1545
1545
  end
1546
1546
 
1547
1547
  it 'has a working function #boolean_out_false' do
1548
1548
  res = GIMarshallingTests.boolean_out_false
1549
- assert_equal false, res
1549
+ res.must_equal false
1550
1550
  end
1551
1551
 
1552
1552
  it 'has a working function #boolean_out_true' do
1553
1553
  res = GIMarshallingTests.boolean_out_true
1554
- assert_equal true, res
1554
+ res.must_equal true
1555
1555
  end
1556
1556
 
1557
1557
  it 'has a working function #boolean_return_false' do
1558
1558
  res = GIMarshallingTests.boolean_return_false
1559
- assert_equal false, res
1559
+ res.must_equal false
1560
1560
  end
1561
1561
 
1562
1562
  it 'has a working function #boolean_return_true' do
1563
1563
  res = GIMarshallingTests.boolean_return_true
1564
- assert_equal true, res
1564
+ res.must_equal true
1565
1565
  end
1566
1566
 
1567
1567
  it 'has a working function #boxed_struct_inout' do
1568
1568
  bx = GIMarshallingTests::BoxedStruct.new
1569
1569
  bx.long_ = 42
1570
1570
  res = GIMarshallingTests.boxed_struct_inout bx
1571
- assert_equal 0, res.long_
1571
+ res.long_.must_equal 0
1572
1572
  end
1573
1573
 
1574
1574
  it 'has a working function #boxed_struct_out' do
1575
1575
  res = GIMarshallingTests.boxed_struct_out
1576
- assert_equal 42, res.long_
1576
+ res.long_.must_equal 42
1577
1577
  end
1578
1578
 
1579
1579
  it 'has a working function #boxed_struct_returnv' do
1580
1580
  res = GIMarshallingTests.boxed_struct_returnv
1581
- assert_equal 42, res.long_
1581
+ res.long_.must_equal 42
1582
1582
  res.g_strv.must_be :==, %w(0 1 2)
1583
1583
  end
1584
1584
 
@@ -1656,12 +1656,12 @@ describe GIMarshallingTests do
1656
1656
 
1657
1657
  it 'has a working function #double_out' do
1658
1658
  ret = GIMarshallingTests.double_out
1659
- assert_equal Float::MAX, ret
1659
+ ret.must_equal Float::MAX
1660
1660
  end
1661
1661
 
1662
1662
  it 'has a working function #double_return' do
1663
1663
  ret = GIMarshallingTests.double_return
1664
- assert_equal Float::MAX, ret
1664
+ ret.must_equal Float::MAX
1665
1665
  end
1666
1666
 
1667
1667
  it 'has a working function #enum_in' do
@@ -1671,22 +1671,22 @@ describe GIMarshallingTests do
1671
1671
 
1672
1672
  it 'has a working function #enum_inout' do
1673
1673
  e = GIMarshallingTests.enum_inout :value3
1674
- assert_equal :value1, e
1674
+ e.must_equal :value1
1675
1675
  end
1676
1676
 
1677
1677
  it 'has a working function #enum_out' do
1678
1678
  e = GIMarshallingTests.enum_out
1679
- assert_equal :value3, e
1679
+ e.must_equal :value3
1680
1680
  end
1681
1681
 
1682
1682
  it 'has a working function #enum_returnv' do
1683
1683
  e = GIMarshallingTests.enum_returnv
1684
- assert_equal :value3, e
1684
+ e.must_equal :value3
1685
1685
  end
1686
1686
 
1687
1687
  it 'has a working function #filename_list_return' do
1688
1688
  fl = GIMarshallingTests.filename_list_return
1689
- assert_equal nil, fl
1689
+ fl.must_be_nil
1690
1690
  end
1691
1691
 
1692
1692
  it 'has a working function #flags_in' do
@@ -1843,7 +1843,7 @@ describe GIMarshallingTests do
1843
1843
  cl = GIMarshallingTests.gclosure_return
1844
1844
  gv = GObject::Value.wrap_ruby_value 0
1845
1845
  result = cl.invoke gv, []
1846
- assert_equal 42, gv.get_value
1846
+ gv.get_value.must_equal 42
1847
1847
  result.must_equal 42
1848
1848
  end
1849
1849
 
@@ -1854,17 +1854,17 @@ describe GIMarshallingTests do
1854
1854
 
1855
1855
  it 'has a working function #genum_inout' do
1856
1856
  res = GIMarshallingTests.genum_inout :value3
1857
- assert_equal :value1, res
1857
+ res.must_equal :value1
1858
1858
  end
1859
1859
 
1860
1860
  it 'has a working function #genum_out' do
1861
1861
  res = GIMarshallingTests.genum_out
1862
- assert_equal :value3, res
1862
+ res.must_equal :value3
1863
1863
  end
1864
1864
 
1865
1865
  it 'has a working function #genum_returnv' do
1866
1866
  res = GIMarshallingTests.genum_returnv
1867
- assert_equal :value3, res
1867
+ res.must_equal :value3
1868
1868
  end
1869
1869
 
1870
1870
  it 'has a working function #gerror' do
@@ -2261,10 +2261,10 @@ describe GIMarshallingTests do
2261
2261
 
2262
2262
  it 'has a working function #gvalue_inout' do
2263
2263
  res = GIMarshallingTests.gvalue_inout GObject::Value.wrap_ruby_value(42)
2264
- assert_equal '42', res
2264
+ res.must_equal '42'
2265
2265
 
2266
2266
  res = GIMarshallingTests.gvalue_inout 42
2267
- assert_equal '42', res
2267
+ res.must_equal '42'
2268
2268
  end
2269
2269
 
2270
2270
  it 'has a working function #gvalue_int64_in' do
@@ -2284,7 +2284,7 @@ describe GIMarshallingTests do
2284
2284
 
2285
2285
  it 'has a working function #gvalue_out' do
2286
2286
  res = GIMarshallingTests.gvalue_out
2287
- assert_equal 42, res
2287
+ res.must_equal 42
2288
2288
  end
2289
2289
 
2290
2290
  it 'has a working function #gvalue_out_caller_allocates' do
@@ -5,8 +5,6 @@ GirFFI.setup :Gio
5
5
 
6
6
  # Tests generated methods and functions in the Gio namespace.
7
7
  describe 'The generated Gio module' do
8
- cover 'Gio'
9
-
10
8
  describe 'File#new_for_path, a method returning an interface,' do
11
9
  it 'returns an object of a more specific class' do
12
10
  file = Gio::File.new_for_path('/')
@@ -3,8 +3,6 @@ require 'gir_ffi_test_helper'
3
3
 
4
4
  # Tests generated classes, methods and functions in the GLib namespace.
5
5
  describe 'The generated GLib module' do
6
- cover 'GLib'
7
-
8
6
  it 'can auto-generate the GLib::IConv class' do
9
7
  klass = GLib::IConv
10
8
 
@@ -6,8 +6,6 @@ Gst.init []
6
6
 
7
7
  # Tests behavior of objects in the generated Gio namespace.
8
8
  describe 'the generated Gst module' do
9
- cover 'Gst'
10
-
11
9
  describe 'Gst::FakeSink' do
12
10
  let(:instance) { Gst::ElementFactory.make('fakesink', 'sink') }
13
11
 
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+ require 'gir_ffi_test_helper'
3
+
4
+ # Tests behavior of objects in the generated GtkSource namespace.
5
+ describe 'The generated GtkSource module' do
6
+ before do
7
+ begin
8
+ GirFFI.setup :GtkSource
9
+ rescue
10
+ skip 'GtkSource GIR not available'
11
+ end
12
+ end
13
+
14
+ describe 'GtkSource::CompletionContext' do
15
+ let(:instance) { GtkSource::CompletionContext.new }
16
+
17
+ it 'allows adding proposals' do
18
+ proposals = [
19
+ GtkSource::CompletionItem.new('Proposal 1', 'Proposal 1', nil, 'blah 1'),
20
+ GtkSource::CompletionItem.new('Proposal 2', 'Proposal 2', nil, 'blah 2'),
21
+ GtkSource::CompletionItem.new('Proposal 3', 'Proposal 3', nil, 'blah 3')
22
+ ]
23
+ instance.add_proposals nil, proposals, true
24
+ end
25
+ end
26
+ end
@@ -4,8 +4,6 @@ require 'gir_ffi_test_helper'
4
4
  # Tests generated methods and functions in the GTop namespace. This namespace
5
5
  # contains types with bad names, like 'glibtop_cpu'.
6
6
  describe 'The generated GTop module' do
7
- cover 'GTop'
8
-
9
7
  before do
10
8
  begin
11
9
  GirFFI.setup :GTop
@@ -2,8 +2,6 @@
2
2
  require 'gir_ffi_test_helper'
3
3
 
4
4
  describe 'The generated Secret module' do
5
- cover 'Secret'
6
-
7
5
  describe 'Secret::Schema' do
8
6
  it 'has a working constructor' do
9
7
  begin
@@ -2,8 +2,6 @@
2
2
  require 'gir_ffi_test_helper'
3
3
 
4
4
  describe 'The generated WarnLib module' do
5
- cover 'WarnLib'
6
-
7
5
  before do
8
6
  begin
9
7
  GirFFI.setup :WarnLib
@@ -3,8 +3,6 @@ require 'gir_ffi_test_helper'
3
3
 
4
4
  # Tests how methods are looked up and generated on first use.
5
5
  describe 'Looking up methods' do
6
- cover 'GirFFI'
7
-
8
6
  before do
9
7
  save_module :Regress
10
8
  GirFFI.setup :Regress
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.11.0
4
+ version: 0.11.1
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-10-16 00:00:00.000000000 Z
11
+ date: 2017-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '11.1'
89
+ version: '12.0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '11.1'
96
+ version: '12.0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: aruba
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -108,6 +108,20 @@ dependencies:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: 0.14.1
111
+ - !ruby/object:Gem::Dependency
112
+ name: rubocop
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 0.46.0
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 0.46.0
111
125
  description: |2
112
126
  GirFFI creates bindings for GObject-based libraries at runtime based on introspection
113
127
  data provided by the GObject Introspection Repository (GIR) system. Bindings are created
@@ -415,6 +429,7 @@ files:
415
429
  - test/integration/generated_glib_test.rb
416
430
  - test/integration/generated_gobject_test.rb
417
431
  - test/integration/generated_gst_test.rb
432
+ - test/integration/generated_gtk_source_test.rb
418
433
  - test/integration/generated_gtop_test.rb
419
434
  - test/integration/generated_pango_ft2_test.rb
420
435
  - test/integration/generated_pango_test.rb
@@ -451,7 +466,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
451
466
  version: '0'
452
467
  requirements: []
453
468
  rubyforge_project:
454
- rubygems_version: 2.5.1
469
+ rubygems_version: 2.6.8
455
470
  signing_key:
456
471
  specification_version: 4
457
472
  summary: FFI-based GObject binding using the GObject Introspection Repository