gnumeric 3.0.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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 773bf530cb95ba20da33e59f64875d8c1ad15c22
4
+ data.tar.gz: 9af68133d9cd08af9b409ada9bd01ba97ed5a07c
5
+ SHA512:
6
+ metadata.gz: 4cf9ce1a7077e77684ffc0a1b31ed21fb21e15d2c13c5708cf3701df54a6291e34ef175ffe96da0228f6fb145b3a8b8bb605a6444f839e469bfe1ba9bcd8f79f
7
+ data.tar.gz: 4677c2c85e602620056d296c53974e5bbebfd915f54284348df36827a79124cb4045cf9af1b9f12715511786aa7676e1099ab12b3a196419e509b1cb5615c277
@@ -0,0 +1,51 @@
1
+ # -*- ruby -*-
2
+ #
3
+ # Copyright (C) 2016 Ruby-GNOME2 Project Team
4
+ #
5
+ # This library is free software; you can redistribute it and/or
6
+ # modify it under the terms of the GNU Lesser General Public
7
+ # License as published by the Free Software Foundation; either
8
+ # version 2.1 of the License, or (at your option) any later version.
9
+ #
10
+ # This library is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ # Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public
16
+ # License along with this library; if not, write to the Free Software
17
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+
19
+ $LOAD_PATH.unshift("./../glib2/lib")
20
+ require 'gnome2/rake/package-task'
21
+
22
+ package_task = GNOME2::Rake::PackageTask.new do |package|
23
+ package.summary = "Ruby/Gnumeric is a Ruby binding of Gnumeric."
24
+ package.description = "Ruby/Gnumeric is a Ruby binding of Gnumeric."
25
+ package.dependency.gem.runtime = ["goffice", "gobject-introspection"]
26
+ package.windows.packages = []
27
+ package.windows.dependencies = ["libxml2"]
28
+ package.windows.build_dependencies = [
29
+ "goffice",
30
+ "gobject-introspection",
31
+ ]
32
+ package.windows.gobject_introspection_dependencies = [
33
+ "gio2"
34
+ ]
35
+ package.external_packages = [
36
+ {
37
+ :name => "gnumeric",
38
+ :download_site => :gnome,
39
+ :label => "gnumeric",
40
+ :version => "1.12.31",
41
+ :compression_method => "xz",
42
+ :windows => {
43
+ :configure_args => [
44
+ ],
45
+ :patches => [
46
+ ]
47
+ },
48
+ },
49
+ ]
50
+ end
51
+ package_task.define
@@ -0,0 +1,60 @@
1
+ # Copyright (C) 2016 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
+ require "gobject-introspection"
18
+ require "goffice"
19
+
20
+ base_dir = Pathname.new(__FILE__).dirname.dirname.expand_path
21
+ vendor_dir = base_dir + "vendor" + "local"
22
+ vendor_bin_dir = vendor_dir + "bin"
23
+ GLib.prepend_dll_path(vendor_bin_dir)
24
+ vendor_girepository_dir = vendor_dir + "lib" + "girepository-1.0"
25
+ GObjectIntrospection.prepend_typelib_path(vendor_girepository_dir)
26
+
27
+ require "gnm/loader"
28
+
29
+ module Gnm
30
+ LOG_DOMAIN = "Gnumeric"
31
+ GLib::Log.set_log_domain(LOG_DOMAIN)
32
+
33
+ class Error < StandardError
34
+ end
35
+
36
+ class << self
37
+ def const_missing(name)
38
+ init
39
+ if const_defined?(name)
40
+ const_get(name)
41
+ else
42
+ super
43
+ end
44
+ end
45
+
46
+ def init
47
+ class << self
48
+ remove_method(:init)
49
+ remove_method(:const_missing)
50
+ end
51
+ GOffice.init if GOffice.respond_to?(:init)
52
+ loader = Loader.new(self)
53
+ loader.load("Gnm")
54
+ init
55
+ class << self
56
+ remove_method(:init)
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,59 @@
1
+ # Copyright (C) 2016 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 Gnm
18
+ class Loader < GObjectIntrospection::Loader
19
+ private
20
+ def pre_load(repository, namespace)
21
+ end
22
+
23
+ def post_load(repository, namespace)
24
+ require_libraries
25
+ end
26
+
27
+ def require_libraries
28
+ end
29
+
30
+ def load_enum_value(value_info, enum_module)
31
+ name = case value_info.name.upcase
32
+ when /\A3D_NAME\z/
33
+ "NAME_3D"
34
+ else
35
+ value_info.name.upcase
36
+ end
37
+ enum_module.const_set(name, value_info.value)
38
+ end
39
+
40
+ def initialize_post(object)
41
+ super
42
+ return unless object.is_a?(GLib::Object)
43
+ self.class.reference_gobject(object, :sink => true)
44
+ end
45
+
46
+ def rubyish_class_name(info)
47
+ name = info.name.gsub(/Class\z/, "")
48
+ case name
49
+ when /\A.*_t\z/
50
+ name.gsub(/_t\z/, "").split("_").map do |component|
51
+ component[0] = component[0].upcase
52
+ component
53
+ end.join
54
+ else
55
+ name
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,17 @@
1
+ # Copyright (C) 2016 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
+ require "gnm"
@@ -0,0 +1,25 @@
1
+ # Copyright (C) 2016 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
+ require "tempfile"
18
+
19
+ require "test-unit"
20
+
21
+ module GnumericTestUtils
22
+ def fixture_file(*components)
23
+ File.join(__dir__, "fixtures", *components)
24
+ end
25
+ end
@@ -0,0 +1,64 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # Copyright (C) 2016 Ruby-GNOME2 Project Team
4
+ #
5
+ # This library is free software; you can redistribute it and/or
6
+ # modify it under the terms of the GNU Lesser General Public
7
+ # License as published by the Free Software Foundation; either
8
+ # version 2.1 of the License, or (at your option) any later version.
9
+ #
10
+ # This library is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ # Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public
16
+ # License along with this library; if not, write to the Free Software
17
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+
19
+ ruby_gnome2_base = File.join(File.dirname(__FILE__), "..", "..")
20
+ ruby_gnome2_base = File.expand_path(ruby_gnome2_base)
21
+
22
+ glib_base = File.join(ruby_gnome2_base, "glib2")
23
+ atk_base = File.join(ruby_gnome2_base, "atk")
24
+ pango_base = File.join(ruby_gnome2_base, "pango")
25
+ gdk_pixbuf_base = File.join(ruby_gnome2_base, "gdk_pixbuf2")
26
+ cairo_gobject_base = File.join(ruby_gnome2_base, "cairo-gobject")
27
+ gobject_introspection_base = File.join(ruby_gnome2_base, "gobject-introspection")
28
+ gio2_base = File.join(ruby_gnome2_base, "gio2")
29
+ gdk3_base = File.join(ruby_gnome2_base, "gdk3")
30
+ gtk3_base = File.join(ruby_gnome2_base, "gtk3")
31
+ gsf_base = File.join(ruby_gnome2_base, "gsf")
32
+ goffice_base = File.join(ruby_gnome2_base, "goffice")
33
+ gnumeric_base = File.join(ruby_gnome2_base, "gnumeric")
34
+
35
+ modules = [
36
+ [glib_base, "glib2"],
37
+ [atk_base, "atk"],
38
+ [pango_base, "pango"],
39
+ [cairo_gobject_base, "cairo-gobject"],
40
+ [gdk_pixbuf_base, "gdk_pixbuf2"],
41
+ [gobject_introspection_base, "gobject-introspection"],
42
+ [gio2_base, "gio2"],
43
+ [gdk3_base, "gdk3"],
44
+ [gtk3_base, "gtk3"],
45
+ [gsf_base, "gsf"],
46
+ [goffice_base, "goffice"],
47
+ [gnumeric_base, "gnumeric"]
48
+ ]
49
+
50
+ modules.each do |target, module_name|
51
+ makefile = File.join(target, "Makefile")
52
+ if File.exist?(makefile) and system("which make > /dev/null")
53
+ `make -C #{target.dump} > /dev/null` or exit(false)
54
+ end
55
+ $LOAD_PATH.unshift(File.join(target, "ext", module_name))
56
+ $LOAD_PATH.unshift(File.join(target, "lib"))
57
+ end
58
+
59
+ $LOAD_PATH.unshift(File.join(gnumeric_base, "test"))
60
+ require "gnumeric-test-utils"
61
+
62
+ require "gnumeric"
63
+
64
+ exit Test::Unit::AutoRunner.run(true, File.join(gnumeric_base, "test"))
@@ -0,0 +1,35 @@
1
+ # Copyright (C) 2016 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 ConvertTest < Test::Unit::TestCase
18
+ include GnumericTestUtils
19
+
20
+ test ".gnumeric -> .csv" do
21
+ # TODO: Improve API
22
+ input_path = fixture_file("hello.gnumeric")
23
+ output = Tempfile.new(["test-gnumeric", ".csv"])
24
+ command_context = Gnm::CmdContextStderr.new
25
+ Gnm.plugins_init(command_context)
26
+ io_context = GOffice::IOContext.new(command_context)
27
+ view = Gnm::WorkbookView.new("file://#{input_path}",
28
+ nil,
29
+ io_context,
30
+ "utf-8")
31
+ saver = GOffice::FileSaver.for_file_name(output.path)
32
+ Gnm.wb_view_save_as(view, saver, "file://#{output.path}", command_context)
33
+ assert_equal("hello\n", File.read(output.path))
34
+ end
35
+ end
metadata ADDED
@@ -0,0 +1,79 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gnumeric
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.0.9
5
+ platform: ruby
6
+ authors:
7
+ - The Ruby-GNOME2 Project Team
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-08-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: goffice
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '='
18
+ - !ruby/object:Gem::Version
19
+ version: 3.0.9
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: 3.0.9
27
+ - !ruby/object:Gem::Dependency
28
+ name: gobject-introspection
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: 3.0.9
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 3.0.9
41
+ description: Ruby/Gnumeric is a Ruby binding of Gnumeric.
42
+ email: ruby-gnome2-devel-en@lists.sourceforge.net
43
+ executables: []
44
+ extensions: []
45
+ extra_rdoc_files: []
46
+ files:
47
+ - Rakefile
48
+ - lib/gnm.rb
49
+ - lib/gnm/loader.rb
50
+ - lib/gnumeric.rb
51
+ - test/fixtures/hello.gnumeric
52
+ - test/gnumeric-test-utils.rb
53
+ - test/run-test.rb
54
+ - test/test-convert.rb
55
+ homepage: http://ruby-gnome2.sourceforge.jp/
56
+ licenses:
57
+ - LGPLv2.1+
58
+ metadata: {}
59
+ post_install_message:
60
+ rdoc_options: []
61
+ require_paths:
62
+ - lib
63
+ required_ruby_version: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: 2.1.0
68
+ required_rubygems_version: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: '0'
73
+ requirements: []
74
+ rubyforge_project:
75
+ rubygems_version: 2.5.1
76
+ signing_key:
77
+ specification_version: 4
78
+ summary: Ruby/Gnumeric is a Ruby binding of Gnumeric.
79
+ test_files: []