goffice 3.1.1 → 3.1.2

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: d5a70695ed84471c40dd91f81234f4e2321399e4
4
- data.tar.gz: 8a3c46633007e58ec7060d6fa46ec9bdfaa7ad8c
3
+ metadata.gz: cdf5849b4f57e71d04d8a5dde7ca97318322f856
4
+ data.tar.gz: e1664fb871f68e75d600a3ec66e1e6b2b20752c1
5
5
  SHA512:
6
- metadata.gz: ad2662eff88fc6ac589c2fd00e2f34b2665f2ea1b835823f8deec9c36c2848c8bf9594ed022deb6aecfc0fc68f34899f7d7b4f8e1a3924728b82b7b2745e3012
7
- data.tar.gz: 490e43de24fe8d1d0be6ba857c2deb5dbe16785124725ae1bda217708c3efb8de2184b59a3565591486306e989421ff4820e5edd1362ae7a8ec2ddbc638b534b
6
+ metadata.gz: d677c3a59f7147b3ee83541dd995c54b7bfbdb2be491341a07402aca624537ab6c72770180808406cb1e061905a9b744db29208dfaedc128da16c3a9518574ea
7
+ data.tar.gz: ea2d01a9210fbade1c4793a99318cdf3d7809cd33a4c5e389e357247442247b52f08eab9eef835196ca94cacd42359f51d262ac95a4665ceb8180025f4523617
@@ -0,0 +1,68 @@
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
+ # Copyright (C) 2017 Ruby-GNOME2 Project Team
18
+ #
19
+ # This library is free software; you can redistribute it and/or
20
+ # modify it under the terms of the GNU Lesser General Public
21
+ # License as published by the Free Software Foundation; either
22
+ # version 2.1 of the License, or (at your option) any later version.
23
+ #
24
+ # This library is distributed in the hope that it will be useful,
25
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
26
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27
+ # Lesser General Public License for more details.
28
+ #
29
+ # You should have received a copy of the GNU Lesser General Public
30
+ # License along with this library; if not, write to the Free Software
31
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
32
+
33
+ require "pkg-config"
34
+ require "native-package-installer"
35
+
36
+ case RUBY_PLATFORM
37
+ when /mingw|mswin/
38
+ task :default => "nothing"
39
+ else
40
+ task :default => "dependency:check"
41
+ end
42
+
43
+ task :nothing do
44
+ end
45
+
46
+ namespace :dependency do
47
+ desc "Check dependency"
48
+ task :check do
49
+ unless PKGConfig.check_version?("libgoffice-0.10")
50
+ goffice010_spec = {
51
+ :debian => "libgoffice-0.10-dev",
52
+ :homebrew => "goffice",
53
+ }
54
+ unless NativePackageInstaller.install(goffice08_spec)
55
+ unless PKGConfig.check_version?("libgoffice-0.8")
56
+ goffice08_spec = {
57
+ :debian => "libgoffice-0.8-dev",
58
+ :redhat => "goffice08-devel",
59
+ :homebrew => "goffice",
60
+ }
61
+ unless NativePackageInstaller.install(goffice08_spec)
62
+ exit(false)
63
+ end
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
@@ -27,7 +27,7 @@ GObjectIntrospection.prepend_typelib_path(vendor_girepository_dir)
27
27
 
28
28
  require "goffice/loader"
29
29
 
30
- module GOffice
30
+ module GOffice
31
31
  LOG_DOMAIN = "GOffice"
32
32
  GLib::Log.set_log_domain(LOG_DOMAIN)
33
33
 
@@ -27,10 +27,13 @@ module GOffice
27
27
 
28
28
  def define_version(repository, namespace)
29
29
  major, minor, micro = repository.get_version(namespace).split(".")
30
- @base_module.const_set("MAJOR", Integer(major))
31
- @base_module.const_set("MINOR", Integer(minor))
32
- micro = Integer(micro) unless micro.nil?
33
- @base_module.const_set("MICRO", micro)
30
+ version_module = Module.new do
31
+ const_set("MAJOR", Integer(major))
32
+ const_set("MINOR", Integer(minor))
33
+ micro = Integer(micro) unless micro.nil?
34
+ const_set("MICRO", micro)
35
+ end
36
+ @base_module.const_set("Version", version_module)
34
37
  end
35
38
 
36
39
  def require_libraries
@@ -24,7 +24,7 @@ module GOffice
24
24
  version = [
25
25
  MAJOR,
26
26
  MINOR,
27
- MICRO,
27
+ MICRO || 0,
28
28
  ].compact
29
29
  (version <=> [major, minor, micro]) >= 0
30
30
  end
@@ -17,7 +17,10 @@
17
17
  require "test-unit"
18
18
 
19
19
  module GOfficeTestUtils
20
- def omit_on_travis_ci
21
- omit("This test can't be run on Travis CI") if ENV["CI"]
20
+ private
21
+ def only_goffice_version(major, minor, micro=nil)
22
+ unless GOffice::Version.or_later?(major, minor, micro)
23
+ omit("Require GOffice >= #{major}.#{minor}.#{micro}")
24
+ end
22
25
  end
23
26
  end
@@ -58,5 +58,11 @@ $LOAD_PATH.unshift(File.join(goffice_base, "test"))
58
58
  require "goffice-test-utils"
59
59
 
60
60
  require "goffice"
61
+ begin
62
+ GOffice.init
63
+ rescue GObjectIntrospection::RepositoryError
64
+ puts("Omit because typelib file doesn't exist: #{$!.message}")
65
+ exit(true)
66
+ end
61
67
 
62
68
  exit Test::Unit::AutoRunner.run(true, File.join(goffice_base, "test"))
@@ -18,7 +18,7 @@ class DataScalarStrTest < Test::Unit::TestCase
18
18
  include GOfficeTestUtils
19
19
 
20
20
  test ".new" do
21
- omit_on_travis_ci
21
+ only_goffice_version(0, 10, 27)
22
22
  data = GOffice::DataScalarStr.new("XXX")
23
23
  assert_equal("XXX", data.str)
24
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: goffice
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.1.2
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-01-26 00:00:00.000000000 Z
11
+ date: 2017-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gsf
@@ -16,49 +16,51 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.1.1
19
+ version: 3.1.2
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.1
26
+ version: 3.1.2
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.1
33
+ version: 3.1.2
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.1
40
+ version: 3.1.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: gtk3
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 3.1.1
47
+ version: 3.1.2
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 3.1.1
54
+ version: 3.1.2
55
55
  description: Ruby/GOFFICE is a Ruby binding of GOFFICE.
56
56
  email: ruby-gnome2-devel-en@lists.sourceforge.net
57
57
  executables: []
58
- extensions: []
58
+ extensions:
59
+ - dependency-check/Rakefile
59
60
  extra_rdoc_files: []
60
61
  files:
61
62
  - Rakefile
63
+ - dependency-check/Rakefile
62
64
  - lib/goffice.rb
63
65
  - lib/goffice/loader.rb
64
66
  - lib/goffice/version.rb
@@ -67,7 +69,7 @@ files:
67
69
  - test/test-data-scalar-str.rb
68
70
  homepage: http://ruby-gnome2.sourceforge.jp/
69
71
  licenses:
70
- - LGPLv2.1+
72
+ - LGPL-2.1+
71
73
  metadata: {}
72
74
  post_install_message:
73
75
  rdoc_options: []