pango 3.3.6 → 3.3.7

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: 33b4d1efd1665e7fa56ba2e4e5a0d20dbf741e958ecf7ef9d5c7c5dcb80d112f
4
- data.tar.gz: b53675c6e061c529787491eb45af187697bf5f028442670a6ab2d12903f290de
3
+ metadata.gz: 04eeba47b2dd7cbe4b2d66834bba3ba388e943929c55e6c82c050acc67e5b301
4
+ data.tar.gz: 631c3411917422b93a55e7a6a3630376b10c5ee1d4c029c62c15f23aa7d586ab
5
5
  SHA512:
6
- metadata.gz: 6bc7375f7fe84ae27052bc51ebe4293cc7e1f657510d368454caf00938d2db0d649453e1cff5f25c7afcc85322be91539fc18f175032358b7748796ce1447cf5
7
- data.tar.gz: 2c7f34fb92f21c8912c6fb8db71ce7e6a30425a6ef7b4cd3614dbd11f9c8ad827440ac71c68feb0e5b97c002f4cf5aa860791a84b898e26b066d333e9b60fae7
6
+ metadata.gz: bf8626ac1b2355bd0e790ed6f454eff077bc2790828d2feb87c0c1d1839e0a0f8d34d50a1f912c401c60d388bcea4a9ed3a824a988692e2eccb583df3708462b
7
+ data.tar.gz: 142a334e270ce44df68db9b177c4a9dfbd21701a68854c977cbb2207b27652825a8b29dd85b610a01198a3b0445290143487b861cd7249a5427dc9ac3d40e1ef
@@ -20,6 +20,15 @@
20
20
 
21
21
  #include "rb-pango-private.h"
22
22
 
23
+ #ifndef PANGO_CHECK_VERSION
24
+ # define PANGO_CHECK_VERSION(major, minor, micro) \
25
+ (PANGO_VERSION_MAJOR > (major) || \
26
+ (PANGO_VERSION_MAJOR == (major) && PANGO_VERSION_MINOR > (minor)) || \
27
+ (PANGO_VERSION_MAJOR == (major) && PANGO_VERSION_MINOR == (minor) && \
28
+ PANGO_VERSION_MICRO >= (micro)))
29
+ #endif
30
+
31
+ #if !PANGO_CHECK_VERSION(1, 44, 0)
23
32
  static GType
24
33
  pango_attribute_get_type(void)
25
34
  {
@@ -30,6 +39,7 @@ pango_attribute_get_type(void)
30
39
  (GBoxedFreeFunc)pango_attribute_destroy);
31
40
  return our_type;
32
41
  }
42
+ #endif
33
43
 
34
44
  VALUE
35
45
  rbpango_attribute_to_ruby(PangoAttribute *attribute)
@@ -0,0 +1,29 @@
1
+ # Copyright (C) 2019 Ruby-GNOME2 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 Pango
18
+ class AttrList
19
+ include Enumerable
20
+
21
+ def each(&block)
22
+ iter = iterator
23
+ yield(iter)
24
+ while iter.next
25
+ yield(iter)
26
+ end
27
+ end
28
+ end
29
+ end
@@ -18,7 +18,7 @@ module Pango
18
18
  class AttrType
19
19
  def to_class
20
20
  class_name = "Attr"
21
- nick.split(/_/).each do |component|
21
+ nick.split("-").each do |component|
22
22
  class_name << component.capitalize
23
23
  end
24
24
  Pango.const_get(class_name)
data/lib/pango/loader.rb CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2017-2018 Ruby-GNOME2 Project Team
1
+ # Copyright (C) 2017-2019 Ruby-GNOME2 Project Team
2
2
  #
3
3
  # This library is free software; you can redistribute it and/or
4
4
  # modify it under the terms of the GNU Lesser General Public
@@ -81,6 +81,7 @@ module Pango
81
81
  end
82
82
 
83
83
  def require_libraries
84
+ require "pango/attr-list"
84
85
  require "pango/attr-type"
85
86
  require "pango/color"
86
87
  require "pango/font-description"
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2017 Ruby-GNOME2 Project Team
1
+ # Copyright (C) 2017-2019 Ruby-GNOME2 Project Team
2
2
  #
3
3
  # This library is free software; you can redistribute it and/or
4
4
  # modify it under the terms of the GNU Lesser General Public
@@ -24,5 +24,10 @@ class TestAttrList < Test::Unit::TestCase
24
24
  def test_insert
25
25
  attribute = Pango::AttrLanguage.new(Pango::Language.default)
26
26
  @attrs.insert(attribute)
27
+ assert_equal([
28
+ [attribute.value.to_s],
29
+ [],
30
+ ],
31
+ @attrs.collect {|iter| iter.attrs.collect {|a| a.value.to_s}})
27
32
  end
28
33
  end
@@ -0,0 +1,24 @@
1
+ # Copyright (C) 2019 Ruby-GNOME2 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
+ class TestAttrType < Test::Unit::TestCase
18
+ sub_test_case(".to_class") do
19
+ test("AttrFontDesc") do
20
+ assert_equal(Pango::AttrFontDesc,
21
+ Pango::AttrType::FONT_DESC.to_class)
22
+ end
23
+ end
24
+ end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pango
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.6
4
+ version: 3.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Ruby-GNOME2 Project Team
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2019-03-21 00:00:00.000000000 Z
10
+ date: 2019-08-16 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: cairo-gobject
@@ -16,28 +15,28 @@ dependencies:
16
15
  requirements:
17
16
  - - '='
18
17
  - !ruby/object:Gem::Version
19
- version: 3.3.6
18
+ version: 3.3.7
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - '='
25
24
  - !ruby/object:Gem::Version
26
- version: 3.3.6
25
+ version: 3.3.7
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: gobject-introspection
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - '='
32
31
  - !ruby/object:Gem::Version
33
- version: 3.3.6
32
+ version: 3.3.7
34
33
  type: :runtime
35
34
  prerelease: false
36
35
  version_requirements: !ruby/object:Gem::Requirement
37
36
  requirements:
38
37
  - - '='
39
38
  - !ruby/object:Gem::Version
40
- version: 3.3.6
39
+ version: 3.3.7
41
40
  description: Ruby/Pango is a Ruby binding of pango-1.x.
42
41
  email: ruby-gnome2-devel-en@lists.sourceforge.net
43
42
  executables: []
@@ -61,6 +60,7 @@ files:
61
60
  - ext/pango/rb-pango.h
62
61
  - extconf.rb
63
62
  - lib/pango.rb
63
+ - lib/pango/attr-list.rb
64
64
  - lib/pango/attr-type.rb
65
65
  - lib/pango/cairo-loader.rb
66
66
  - lib/pango/color.rb
@@ -79,6 +79,7 @@ files:
79
79
  - test/test-analysis.rb
80
80
  - test/test-attr-iterator.rb
81
81
  - test/test-attr-list.rb
82
+ - test/test-attr-type.rb
82
83
  - test/test-attribute.rb
83
84
  - test/test-color.rb
84
85
  - test/test-context.rb