graphene1 4.3.2 → 4.3.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bf5b8a837937eb4f8c34e74553e01d8cedaf8ebfea9fdd1f248abadd988237b7
4
- data.tar.gz: 37bc677471d08b6eeb52a20545673ae5f151c8d5316e06ad6b46af87767b274d
3
+ metadata.gz: 677c84f28b137d3e42e351dd7fb9c52c9b04f4cf769b746de146890565eaefa7
4
+ data.tar.gz: 4413f1c73c140ff9a2bf10d4ea0321423d3192608da63223d7bf064c74ac1b47
5
5
  SHA512:
6
- metadata.gz: 6e6db53cabcf39cb2e2aeab2abf80e572bde710c769a6e18337abd6ddb005cded9e8b09efa0a0b492425b32a8301d4d5444f0accdbdfa8899791a3e84ce8508c
7
- data.tar.gz: 99dad58ede7c0f8f29db1ad5b4e6629ac6639ac3abc77ae0c7d904b792c1fc5b8555b2e8c3c8a61eb355b44db959a3b4d968ce6cfce728c5df5db12fb55d00c3
6
+ metadata.gz: 129e2893e7835d8c7568c34f695f3e05db2495f74ee506595016b127f8bb32d594c8ab723f54fddf33dcfc53148440cfa03eb8d57d2ce05fec01e478706c824c
7
+ data.tar.gz: 31902a6bebe39076bff0d4fe2fb6ef99c0e61bfc6feb8e389771d848f57f351c3be9d9ec0aba6802129bac232f4afcd264ce322943c00b360e85cd6b9fd02d37
@@ -25,6 +25,7 @@ module Graphene
25
25
  def post_load(repository, namespace)
26
26
  require_relative "point"
27
27
  require_relative "rect"
28
+ require_relative "size"
28
29
  require_relative "vec2"
29
30
  end
30
31
 
@@ -0,0 +1,57 @@
1
+ # Copyright (C) 2025 Ruby-GNOME Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ module Graphene
18
+ class Size
19
+ class << self
20
+ def try_convert(value)
21
+ case value
22
+ when Array
23
+ return nil unless value.size == 2
24
+ new(*value)
25
+ else
26
+ nil
27
+ end
28
+ end
29
+ end
30
+
31
+ alias_method :initialize_raw, :initialize
32
+ def initialize(*args)
33
+ super()
34
+ case args.size
35
+ when 0
36
+ when 1
37
+ arg = args[0]
38
+ case arg
39
+ when Size
40
+ init_from_size(arg)
41
+ else
42
+ raise ArgumentError, "source must be Graphene::Size: #{arg.inspect}"
43
+ end
44
+ when 2
45
+ init(*args)
46
+ else
47
+ message = +"wrong number of arguments "
48
+ message << "(given #{args.size}, expected 0..2)"
49
+ raise ArgumentError, message
50
+ end
51
+ end
52
+
53
+ def to_a
54
+ [width, height]
55
+ end
56
+ end
57
+ end
@@ -16,7 +16,7 @@
16
16
 
17
17
  require "gobject-introspection"
18
18
 
19
- require "graphene/loader"
19
+ require_relative "graphene1/loader"
20
20
 
21
21
  module Graphene
22
22
  LOG_DOMAIN = "Graphene"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphene1
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.2
4
+ version: 4.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Ruby-GNOME Project Team
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - '='
17
17
  - !ruby/object:Gem::Version
18
- version: 4.3.2
18
+ version: 4.3.3
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - '='
24
24
  - !ruby/object:Gem::Version
25
- version: 4.3.2
25
+ version: 4.3.3
26
26
  description: Ruby/Graphene1 is a Ruby binding of Graphene.
27
27
  email: ruby-gnome2-devel-en@lists.sourceforge.net
28
28
  executables: []
@@ -33,12 +33,13 @@ files:
33
33
  - README.md
34
34
  - Rakefile
35
35
  - graphene1.gemspec
36
- - lib/graphene.rb
37
- - lib/graphene/loader.rb
38
- - lib/graphene/point.rb
39
- - lib/graphene/rect.rb
40
- - lib/graphene/vec2.rb
41
- - lib/graphene/version.rb
36
+ - lib/graphene1.rb
37
+ - lib/graphene1/loader.rb
38
+ - lib/graphene1/point.rb
39
+ - lib/graphene1/rect.rb
40
+ - lib/graphene1/size.rb
41
+ - lib/graphene1/vec2.rb
42
+ - lib/graphene1/version.rb
42
43
  homepage: https://ruby-gnome.github.io/
43
44
  licenses:
44
45
  - LGPL-2.1-or-later
File without changes
File without changes
File without changes
File without changes