vte3 3.1.8 → 3.1.9

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
  SHA1:
3
- metadata.gz: b7020a5ff568b93613ad324597fdf1f8a288f954
4
- data.tar.gz: 1409119a2e89c439f86dea1eb6e56c2c4fbef183
3
+ metadata.gz: dc688db62f705441230e4e67df0b858bbebb2d4e
4
+ data.tar.gz: f919b923931e9d84e7264b355995097c6ab19546
5
5
  SHA512:
6
- metadata.gz: 7d593a7daf668d09f9958ba3566c424f6828a2a0a867fc4f8b935c54ccd6df15a559e68270343daf573bad5b66fe73021ffd59029e67382254f192792c0eb72a
7
- data.tar.gz: 102b0abbb2704c09c3c28bdc1f9e6fe3057ee529593ecaba48d9e038e49981d222e9f29b5f9dc8e89baa6f17fbc5bf7ac2f18e9f61a0f8722eb5ccc6e02ddb0c
6
+ metadata.gz: 2b4563df8b857a9fe7f5a1234a10cb97379db9e7a0a6836161605f48680a63ad219e4478c2cb771c05b48e67d929f6854b5d674536d40ea75303a614e9b28f8c
7
+ data.tar.gz: 3cf2fadf2dfc5bbd0dae14f4346eb13768c9c87bdd7e8989f716b5b8e48a0095a4c335e691e7d6a8cd13584b16d2464f0427ff23bae33818532040c31a5ab431
data/Rakefile CHANGED
@@ -46,7 +46,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
46
46
  :name => "vte",
47
47
  :download_site => :gnome,
48
48
  :label => "vte",
49
- :version => "0.48.3",
49
+ :version => "0.50.1",
50
50
  :compression_method => "xz",
51
51
  :windows => {
52
52
  :configure_args => [
data/lib/vte3/loader.rb CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2014-2015 Ruby-GNOME2 Project Team
1
+ # Copyright (C) 2014-2017 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
@@ -17,16 +17,6 @@
17
17
  module Vte
18
18
  class Loader < GObjectIntrospection::Loader
19
19
  private
20
- def load_function_info(info)
21
- name = info.name
22
- case name
23
- when "init"
24
- # ignore
25
- else
26
- super
27
- end
28
- end
29
-
30
20
  def pre_load(repository, namespace)
31
21
  define_version_module
32
22
  end
@@ -42,6 +32,7 @@ module Vte
42
32
 
43
33
  def require_libraries
44
34
  require "vte3/pty"
35
+ require "vte3/regex"
45
36
  require "vte3/terminal"
46
37
  require "vte3/version"
47
38
 
data/lib/vte3/regex.rb ADDED
@@ -0,0 +1,46 @@
1
+ # Copyright (C) 2017 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 Vte
18
+ if const_defined?(:Regex)
19
+ class Regex
20
+ alias_method :initialize_raw, :initialize
21
+ def initialize(pattern, compile_flags, options)
22
+ flags = parse_compile_flags(compile_flags)
23
+ if options[:for_match]
24
+ initialize_new_for_match(pattern, pattern.bytesize, flags)
25
+ elsif options[:for_search]
26
+ initialize_new_for_search(pattern, pattern.bytesize, flags)
27
+ else
28
+ raise(ArgumentError,
29
+ "must specify usage :for_match or :for_search: #{options.inspect}")
30
+ end
31
+ end
32
+
33
+ private
34
+ def parse_compile_flags(compile_flags)
35
+ return compile_flags if compile_flags.is_a?(Integer)
36
+ return compile_flags unless compile_flags.is_a?(Array)
37
+
38
+ flags = 0
39
+ compile_flags.each do |flag|
40
+ flags |= GLib::RegexCompileFlags.new(flag).to_i
41
+ end
42
+ flags
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,55 @@
1
+ # Copyright (C) 2017 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 TestRegex < Test::Unit::TestCase
18
+ include VteTestUtils
19
+
20
+ def setup
21
+ omit_if_not_const_defined("Vte::Regex")
22
+ end
23
+
24
+ def test_for_match
25
+ Vte::Regex.new("test", 0, :for_match => true)
26
+ # TODO: Add assertion
27
+ end
28
+
29
+ def test_for_search
30
+ Vte::Regex.new("test", 0, :for_search => true)
31
+ # TODO: Add assertion
32
+ end
33
+
34
+ sub_test_case("flags") do
35
+ def test_integer
36
+ Vte::Regex.new("test",
37
+ GLib::RegexCompileFlags::OPTIMIZE.to_i,
38
+ :for_match => true)
39
+ # TODO: Add assertion
40
+ end
41
+
42
+ def test_object
43
+ Vte::Regex.new("test",
44
+ GLib::RegexCompileFlags::OPTIMIZE,
45
+ :for_match => true)
46
+ # TODO: Add assertion
47
+ end
48
+
49
+ def test_array
50
+ flags = [:optimize, :multiline]
51
+ Vte::Regex.new("test", flags, :for_match => true)
52
+ # TODO: Add assertion
53
+ end
54
+ end
55
+ end
@@ -28,17 +28,28 @@ class TestTerminal < Test::Unit::TestCase
28
28
  end
29
29
 
30
30
  sub_test_case "#spawn" do
31
+ setup do
32
+ @loop = GLib::MainLoop.new
33
+ @wait_child_exited = false
34
+ @child_exit_callback_id = @terminal.signal_connect("child-exited") do
35
+ @loop.quit
36
+ end
37
+ end
38
+
31
39
  teardown do
32
- loop = GLib::MainLoop.new
33
- GLib::Idle.add do
34
- loop.quit
35
- GLib::Source::REMOVE
40
+ unless @wait_child_exited
41
+ GLib::Idle.add do
42
+ @loop.quit
43
+ GLib::Source::REMOVE
44
+ end
36
45
  end
37
- loop.run
46
+ @loop.run
47
+ @terminal.signal_handler_disconnect(@child_exit_callback_id)
38
48
  end
39
49
 
40
50
  test "success" do
41
51
  pid = @terminal.spawn(:argv => ["echo"])
52
+ @wait_child_exited = true
42
53
  assert do
43
54
  pid > 0
44
55
  end
@@ -47,6 +58,7 @@ class TestTerminal < Test::Unit::TestCase
47
58
  test "failure" do
48
59
  assert_raise(GLib::SpawnError) do
49
60
  @terminal.spawn(:argv => ["nonexistent"])
61
+ @wait_child_exited = true
50
62
  end
51
63
  end
52
64
  end
@@ -23,4 +23,17 @@ module VteTestUtils
23
23
  omit("#{instance.class}##{method_name} is not respond.")
24
24
  end
25
25
  end
26
+
27
+ def omit_if_not_const_defined(constant_name)
28
+ unless Object.const_defined?(constant_name)
29
+ omit("#{constant_name} is not defined.")
30
+ end
31
+ end
32
+
33
+ def only_vte_version(major, minor, micro=nil)
34
+ micro ||= 0
35
+ unless Vte::Version.or_later?(major, minor, micro)
36
+ omit("Require VTE >= #{major}.#{minor}.#{micro}")
37
+ end
38
+ end
26
39
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vte3
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.8
4
+ version: 3.1.9
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: 2017-07-15 00:00:00.000000000 Z
11
+ date: 2017-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gtk3
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.1.8
19
+ version: 3.1.9
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.1.8
26
+ version: 3.1.9
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: gobject-introspection
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.1.8
33
+ version: 3.1.9
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.1.8
40
+ version: 3.1.9
41
41
  description: Ruby/VTE is a Ruby binding of VTE.
42
42
  email: ruby-gnome2-devel-en@lists.sourceforge.net
43
43
  executables: []
@@ -51,10 +51,12 @@ files:
51
51
  - lib/vte3/deprecated.rb
52
52
  - lib/vte3/loader.rb
53
53
  - lib/vte3/pty.rb
54
+ - lib/vte3/regex.rb
54
55
  - lib/vte3/terminal.rb
55
56
  - lib/vte3/version.rb
56
57
  - test/run-test.rb
57
58
  - test/test-pty.rb
59
+ - test/test-regex.rb
58
60
  - test/test-terminal-properties.rb
59
61
  - test/test-terminal-signals.rb
60
62
  - test/test-terminal.rb
@@ -80,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
82
  version: '0'
81
83
  requirements: []
82
84
  rubyforge_project:
83
- rubygems_version: 2.5.2
85
+ rubygems_version: 2.5.2.1
84
86
  signing_key:
85
87
  specification_version: 4
86
88
  summary: Ruby/VTE is a Ruby binding of VTE.