gir_ffi 0.16.1 → 0.17.0

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
  SHA256:
3
- metadata.gz: f895f96ce883cc8698a2b95c39e241313762a9235a5d6bb38f0ca6ce0cb72249
4
- data.tar.gz: 31f7c7558d25116276e3857d7aca50272232753b49da125b208124d93f33c519
3
+ metadata.gz: 5d9166ab1e26f13ddc3aa9c5695fb67d4530491f56c01d1e78ad7648f5ea8583
4
+ data.tar.gz: 5a2e96556fcd892f0cd143c51a21df6c18475950a166c90a994b38a33777281e
5
5
  SHA512:
6
- metadata.gz: 72e1eddb0fb987e2c2ad6805e6c2b3c1c6588997d30f3efaaac3de408585fda9fa50aca66b74ec9aa76ee253a2701bf747187556086f772f9d20c67f985a6ae9
7
- data.tar.gz: 264a6574d5cde0c8d981553433b895ccd11e3ae61c1aeb315ca75c74ee563efe2d4944f1b344fee50844b1caef5e8a547da0d50c4571461d67bdabd016cda323
6
+ metadata.gz: f9252568631fc6355af2ee913e73fd363ccf04714c9702d93c6fc26119180046f4345232c66d47a93dcc872024f6a855a1d268b3eff23b49f18fd136d9ef5ef4
7
+ data.tar.gz: e289ed1d545a09f5bb2d67a91101fd6cd7510a1a69e721f07f85fd82a352f4922316a3cf92b67a57216e8e203ec5f3232d60e7634e4c9509e6a65819f42a0dcb
data/Changelog.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.17.0 / 2023-12-31
4
+
5
+ * Support Ruby 3.0 and up, dropping support for Ruby 2.7 ([#356] by [mvz])
6
+
7
+ [#356]: https://github.com/mvz/gir_ffi/pull/356
8
+
3
9
  ## 0.16.1 / 2023-10-07
4
10
 
5
11
  * Support Ruby 3.2 ([#331] by [mvz])
@@ -11,9 +11,9 @@ module GObject
11
11
  [:size_t, :uint32, :pointer, :pointer],
12
12
  :pointer)
13
13
 
14
- def self.new_with_properties(*args, &block)
14
+ def self.new_with_properties(...)
15
15
  obj = allocate
16
- obj.__send__ :initialize_with_properties, *args, &block
16
+ obj.__send__(:initialize_with_properties, ...)
17
17
  obj
18
18
  end
19
19
 
@@ -37,9 +37,9 @@ module GObject
37
37
  alias_method :initialize, :initialize_with_properties
38
38
  remove_method :old_initialze
39
39
 
40
- def self.new(*args, &block)
40
+ def self.new(...)
41
41
  obj = allocate
42
- obj.__send__ :initialize, *args, &block
42
+ obj.__send__(:initialize, ...)
43
43
  obj
44
44
  end
45
45
 
@@ -258,7 +258,7 @@ module GObjectIntrospection
258
258
 
259
259
  # Union type representing an argument value
260
260
  class GIArgument < FFI::Union
261
- signed_size_t = "int#{FFI.type_size(:size_t) * 8}".to_sym
261
+ signed_size_t = :"int#{FFI.type_size(:size_t) * 8}"
262
262
 
263
263
  layout :v_boolean, :int,
264
264
  :v_int8, :int8,
@@ -32,7 +32,7 @@ module GirFFI
32
32
  when Module
33
33
  value_ffi_type.get_value_from_pointer(pointer, 0)
34
34
  when Symbol
35
- pointer.send("get_#{value_ffi_type}", 0)
35
+ pointer.send(:"get_#{value_ffi_type}", 0)
36
36
  else
37
37
  raise NotImplementedError
38
38
  end
@@ -172,7 +172,7 @@ module GirFFI
172
172
  end
173
173
 
174
174
  def has_ingoing_component?
175
- (direction == :inout || direction == :in)
175
+ direction == :inout || direction == :in
176
176
  end
177
177
 
178
178
  def array_length_assignment
@@ -128,7 +128,7 @@ module GirFFI
128
128
 
129
129
  def property_setter_func
130
130
  setter = proc do |object, _property_id, value, pspec|
131
- object.send("#{pspec.accessor_name}=", value.get_value)
131
+ object.send(:"#{pspec.accessor_name}=", value.get_value)
132
132
  end
133
133
  GObject::ObjectSetPropertyFunc.from setter
134
134
  end
@@ -57,7 +57,7 @@ module GirFFI
57
57
  ffi_type = TypeMap.type_specification_to_ffi_type type
58
58
  FFI::MemoryPointer.new(ffi_type).tap do |block|
59
59
  block.autorelease = false
60
- block.send "put_#{ffi_type}", 0, value
60
+ block.send :"put_#{ffi_type}", 0, value
61
61
  end
62
62
  end
63
63
 
@@ -137,7 +137,7 @@ module GirFFI
137
137
  type_size = FFI.type_size(ffi_type)
138
138
  FFI::MemoryPointer.new(type_size * (ary.length + 1)).tap do |block|
139
139
  block.autorelease = false
140
- block.send "put_array_of_#{ffi_type}", 0, ary
140
+ block.send :"put_array_of_#{ffi_type}", 0, ary
141
141
  end
142
142
  end
143
143
  end
@@ -7,11 +7,11 @@ module GirFFI
7
7
  module ModuleBase
8
8
  include MethodSetup
9
9
 
10
- def method_missing(method, *arguments, &block)
10
+ def method_missing(method, ...)
11
11
  result = setup_method method.to_s
12
12
  return super unless result
13
13
 
14
- send method, *arguments, &block
14
+ send(method, ...)
15
15
  end
16
16
 
17
17
  def respond_to_missing?(method, *)
@@ -7,7 +7,7 @@ module GirFFI
7
7
  # Maps GObject type tags and type specification to types FFI can handle.
8
8
  module TypeMap
9
9
  sz = FFI.type_size(:size_t) * 8
10
- gsize_type = "uint#{sz}".to_sym
10
+ gsize_type = :"uint#{sz}"
11
11
 
12
12
  TAG_TYPE_MAP = {
13
13
  enum: :int32,
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Current GirFFI version
4
4
  module GirFFI
5
- VERSION = "0.16.1"
5
+ VERSION = "0.17.0"
6
6
  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.16.1
4
+ version: 0.17.0
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: 2023-10-07 00:00:00.000000000 Z
11
+ date: 2023-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -154,28 +154,28 @@ dependencies:
154
154
  requirements:
155
155
  - - "~>"
156
156
  - !ruby/object:Gem::Version
157
- version: '1.56'
157
+ version: '1.59'
158
158
  type: :development
159
159
  prerelease: false
160
160
  version_requirements: !ruby/object:Gem::Requirement
161
161
  requirements:
162
162
  - - "~>"
163
163
  - !ruby/object:Gem::Version
164
- version: '1.56'
164
+ version: '1.59'
165
165
  - !ruby/object:Gem::Dependency
166
166
  name: rubocop-minitest
167
167
  requirement: !ruby/object:Gem::Requirement
168
168
  requirements:
169
169
  - - "~>"
170
170
  - !ruby/object:Gem::Version
171
- version: 0.32.2
171
+ version: 0.34.1
172
172
  type: :development
173
173
  prerelease: false
174
174
  version_requirements: !ruby/object:Gem::Requirement
175
175
  requirements:
176
176
  - - "~>"
177
177
  - !ruby/object:Gem::Version
178
- version: 0.32.2
178
+ version: 0.34.1
179
179
  - !ruby/object:Gem::Dependency
180
180
  name: rubocop-packaging
181
181
  requirement: !ruby/object:Gem::Requirement
@@ -196,14 +196,14 @@ dependencies:
196
196
  requirements:
197
197
  - - "~>"
198
198
  - !ruby/object:Gem::Version
199
- version: '1.19'
199
+ version: '1.20'
200
200
  type: :development
201
201
  prerelease: false
202
202
  version_requirements: !ruby/object:Gem::Requirement
203
203
  requirements:
204
204
  - - "~>"
205
205
  - !ruby/object:Gem::Version
206
- version: '1.19'
206
+ version: '1.20'
207
207
  - !ruby/object:Gem::Dependency
208
208
  name: simplecov
209
209
  requirement: !ruby/object:Gem::Requirement
@@ -433,14 +433,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
433
433
  requirements:
434
434
  - - ">="
435
435
  - !ruby/object:Gem::Version
436
- version: 2.7.0
436
+ version: 3.0.0
437
437
  required_rubygems_version: !ruby/object:Gem::Requirement
438
438
  requirements:
439
439
  - - ">="
440
440
  - !ruby/object:Gem::Version
441
441
  version: '0'
442
442
  requirements: []
443
- rubygems_version: 3.4.20
443
+ rubygems_version: 3.5.3
444
444
  signing_key:
445
445
  specification_version: 4
446
446
  summary: FFI-based GObject binding using the GObject Introspection Repository