webkit-gtk 3.0.5 → 3.0.6

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: 6b47e9de2213ad37fec51545bbd316fa1d148216
4
- data.tar.gz: 4f2598d873cf48d9517acbaf145dd6185e41d150
3
+ metadata.gz: 5cf855b4170224b1a44c86416ea4531e623355ac
4
+ data.tar.gz: f302583ad300f217d65c53ed933928b4a0df92a8
5
5
  SHA512:
6
- metadata.gz: aa69059df419ba16e72c2e7c1bd496f5eafe64d80512c1c7de43fb59cfb73340488551fe112bfd5a8e4e6f04007c56126acb574035ab2a635cad7d5a7bafa5c1
7
- data.tar.gz: 5e92b0d1421ea645081664033951974c591b5909de96c273e7eb1ca912aa460042592c21dae2d34d2568f6944c9b1a7a55b9cfdd2764b3cb37ae902754b7a3b9
6
+ metadata.gz: 613c85573bf5fb81fa945febfcd94107311cf2dc062a2f4e3a412d021955d001efd3069a5f936977b953b6496bae9ba08b2c8dcd12a664df4c5a70af13e3ebec
7
+ data.tar.gz: 8942fb2abcce59872f26e7d185410932fcdcc41d2c11d39c61abcf2da9103284f0c4c8ae7e6568c00508f0e77aa064dbfaebd68a758924bb1c26d72c849e2011
data/lib/webkit-gtk.rb CHANGED
@@ -46,10 +46,36 @@ module WebKitGtk
46
46
 
47
47
  class Loader < GObjectIntrospection::Loader
48
48
  private
49
+ def pre_load(repository, namespace)
50
+ define_version_module
51
+ end
52
+
53
+ def post_load(repository, namespace)
54
+ require_libraries
55
+ end
56
+
57
+ def define_version_module
58
+ @version_module = Module.new
59
+ @base_module.const_set("Version", @version_module)
60
+ end
61
+
62
+ def require_libraries
63
+ require "webkit-gtk/version"
64
+ end
65
+
49
66
  def initialize_post(object)
50
67
  super
51
68
  return unless object.is_a?(GLib::Object)
52
69
  self.class.reference_gobject(object, :sink => true)
53
70
  end
71
+
72
+ def load_constant_info(info)
73
+ case info.name
74
+ when /_VERSION\z/
75
+ @version_module.const_set($PREMATCH, info.value)
76
+ else
77
+ super
78
+ end
79
+ end
54
80
  end
55
81
  end
@@ -0,0 +1,33 @@
1
+ # Copyright (C) 2015 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 WebKitGtk
18
+ module Version
19
+ STRING = [MAJOR, MINOR, MICRO].join(".")
20
+
21
+ class << self
22
+ def or_later?(major, minor, micro=nil)
23
+ micro ||= 0
24
+ version = [
25
+ MAJOR,
26
+ MINOR,
27
+ MICRO,
28
+ ]
29
+ (version <=> [major, minor, micro]) >= 0
30
+ end
31
+ end
32
+ end
33
+ end
data/test/run-test.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  #
3
- # Copyright (C) 2013 Ruby-GNOME2 Project Team
3
+ # Copyright (C) 2013-2015 Ruby-GNOME2 Project Team
4
4
  #
5
5
  # This library is free software; you can redistribute it and/or
6
6
  # modify it under the terms of the GNU Lesser General Public
@@ -61,4 +61,4 @@ require "webkit-gtk-test-utils"
61
61
 
62
62
  require "webkit-gtk"
63
63
 
64
- exit Test::Unit::AutoRunner.run(true)
64
+ exit Test::Unit::AutoRunner.run(true, File.join(webkit_gtk_base, "test"))
@@ -0,0 +1,47 @@
1
+ # Copyright (C) 2015 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 TestWebKitGtkVersion < Test::Unit::TestCase
18
+ include WebKitGtkTestUtils
19
+
20
+ test "STRING" do
21
+ major = WebKitGtk::Version::MAJOR
22
+ minor = WebKitGtk::Version::MINOR
23
+ micro = WebKitGtk::Version::MICRO
24
+ assert_equal([major, minor, micro].join("."),
25
+ WebKitGtk::Version::STRING)
26
+ end
27
+
28
+ sub_test_case("#or_later?") do
29
+ test "same" do
30
+ assert_true(WebKitGtk::Version.or_later?(WebKitGtk::Version::MAJOR,
31
+ WebKitGtk::Version::MINOR,
32
+ WebKitGtk::Version::MICRO))
33
+ end
34
+
35
+ test "later" do
36
+ assert_true(WebKitGtk::Version.or_later?(WebKitGtk::Version::MAJOR,
37
+ WebKitGtk::Version::MINOR - 1,
38
+ WebKitGtk::Version::MICRO))
39
+ end
40
+
41
+ test "earlier" do
42
+ assert_false(WebKitGtk::Version.or_later?(WebKitGtk::Version::MAJOR,
43
+ WebKitGtk::Version::MINOR + 1,
44
+ WebKitGtk::Version::MICRO))
45
+ end
46
+ end
47
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webkit-gtk
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.5
4
+ version: 3.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Ruby-GNOME2 Project Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-22 00:00:00.000000000 Z
11
+ date: 2015-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gobject-introspection
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.0.5
19
+ version: 3.0.6
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 3.0.5
26
+ version: 3.0.6
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: gtk3
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.0.5
33
+ version: 3.0.6
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 3.0.5
40
+ version: 3.0.6
41
41
  description: Ruby/WebKitGTK is a Ruby binding of WebKitGTK+.
42
42
  email: ruby-gnome2-devel-en@lists.sourceforge.net
43
43
  executables: []
@@ -46,8 +46,10 @@ extra_rdoc_files: []
46
46
  files:
47
47
  - Rakefile
48
48
  - lib/webkit-gtk.rb
49
+ - lib/webkit-gtk/version.rb
49
50
  - sample/brower.rb
50
51
  - test/run-test.rb
52
+ - test/test-version.rb
51
53
  - test/test_webkit_gtk_webview.rb
52
54
  - test/webkit-gtk-test-utils.rb
53
55
  - test/webkit-gtk-test-utils/omissions.rb