You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(20) |
Jun
(46) |
Jul
(58) |
Aug
(103) |
Sep
(153) |
Oct
(192) |
Nov
(228) |
Dec
(213) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(61) |
Feb
(114) |
Mar
(103) |
Apr
(51) |
May
(84) |
Jun
(38) |
Jul
(125) |
Aug
(324) |
Sep
(120) |
Oct
(98) |
Nov
(145) |
Dec
(108) |
2004 |
Jan
(75) |
Feb
(72) |
Mar
(203) |
Apr
(33) |
May
(59) |
Jun
(39) |
Jul
(41) |
Aug
(108) |
Sep
(39) |
Oct
(74) |
Nov
(98) |
Dec
(21) |
2005 |
Jan
(113) |
Feb
(93) |
Mar
(113) |
Apr
(8) |
May
(11) |
Jun
(98) |
Jul
(91) |
Aug
(39) |
Sep
(149) |
Oct
(199) |
Nov
(29) |
Dec
(4) |
2006 |
Jan
(20) |
Feb
(6) |
Mar
(19) |
Apr
(21) |
May
(119) |
Jun
(105) |
Jul
(63) |
Aug
(10) |
Sep
(18) |
Oct
(26) |
Nov
(44) |
Dec
(113) |
2007 |
Jan
(14) |
Feb
(14) |
Mar
(11) |
Apr
(8) |
May
(7) |
Jun
(49) |
Jul
(188) |
Aug
(32) |
Sep
(12) |
Oct
(32) |
Nov
(79) |
Dec
(27) |
2008 |
Jan
(54) |
Feb
(32) |
Mar
(104) |
Apr
(247) |
May
(51) |
Jun
(25) |
Jul
(6) |
Aug
(13) |
Sep
(60) |
Oct
(63) |
Nov
(49) |
Dec
(10) |
2009 |
Jan
(132) |
Feb
(14) |
Mar
(16) |
Apr
(3) |
May
(23) |
Jun
(10) |
Jul
(14) |
Aug
(12) |
Sep
(24) |
Oct
(6) |
Nov
|
Dec
(6) |
2010 |
Jan
(12) |
Feb
(13) |
Mar
(2) |
Apr
(13) |
May
(7) |
Jun
(3) |
Jul
(6) |
Aug
|
Sep
(156) |
Oct
(57) |
Nov
(9) |
Dec
(2) |
2011 |
Jan
(109) |
Feb
(431) |
Mar
(17) |
Apr
|
May
(8) |
Jun
(25) |
Jul
(12) |
Aug
(9) |
Sep
(80) |
Oct
(244) |
Nov
(341) |
Dec
(559) |
2012 |
Jan
(137) |
Feb
(185) |
Mar
(6) |
Apr
(30) |
May
(26) |
Jun
(3) |
Jul
(25) |
Aug
(5) |
Sep
(4) |
Oct
(2) |
Nov
(16) |
Dec
(190) |
2013 |
Jan
(204) |
Feb
(70) |
Mar
(137) |
Apr
(180) |
May
(149) |
Jun
(39) |
Jul
(22) |
Aug
(8) |
Sep
(78) |
Oct
(488) |
Nov
(134) |
Dec
(138) |
2014 |
Jan
(18) |
Feb
(148) |
Mar
(238) |
Apr
(177) |
May
(45) |
Jun
(36) |
Jul
(176) |
Aug
(33) |
Sep
(114) |
Oct
(265) |
Nov
(263) |
Dec
(184) |
2015 |
Jan
(163) |
Feb
(44) |
Mar
(196) |
Apr
(184) |
May
(308) |
Jun
(132) |
Jul
(81) |
Aug
(76) |
Sep
(440) |
Oct
(125) |
Nov
(75) |
Dec
(111) |
2016 |
Jan
(210) |
Feb
(88) |
Mar
(86) |
Apr
(137) |
May
(145) |
Jun
(257) |
Jul
(35) |
Aug
(312) |
Sep
(69) |
Oct
(43) |
Nov
(91) |
Dec
(103) |
2017 |
Jan
(72) |
Feb
(50) |
Mar
(80) |
Apr
(238) |
May
(122) |
Jun
(47) |
Jul
(197) |
Aug
(92) |
Sep
(21) |
Oct
(45) |
Nov
(52) |
Dec
(26) |
2018 |
Jan
(3) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: Kouhei S. <nu...@co...> - 2017-07-31 01:24:09
|
Kouhei Sutou 2017-07-31 10:23:40 +0900 (Mon, 31 Jul 2017) New Revision: cd2f4662d173648735ad0265829debd6f0fe338a https://github.com/ruby-gnome2/ruby-gnome2/commit/cd2f4662d173648735ad0265829debd6f0fe338a Message: poppler: define class for each field type Removed files: poppler/lib/poppler/form-field.rb Modified files: poppler/lib/poppler/loader.rb poppler/test/test-document.rb Deleted: poppler/lib/poppler/form-field.rb (+0 -23) 100644 =================================================================== --- poppler/lib/poppler/form-field.rb 2017-07-31 10:15:15 +0900 (b000013) +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (C) 2017 Ruby-GNOME2 Project Team -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -module Poppler - class FormField - - alias_method :text, :text_get_text - alias_method :text=, :text_set_text - end -end Modified: poppler/lib/poppler/loader.rb (+41 -1) =================================================================== --- poppler/lib/poppler/loader.rb 2017-07-31 10:15:15 +0900 (d1bbfc6) +++ poppler/lib/poppler/loader.rb 2017-07-31 10:23:40 +0900 (31ae237) @@ -18,10 +18,12 @@ module Poppler class Loader < GObjectIntrospection::Loader private def pre_load(repository, namespace) + @form_field_classes = {} end def post_load(repository, namespace) require_libraries + convert_field_classes end def require_libraries @@ -31,7 +33,6 @@ module Poppler require "poppler/cairo" require "poppler/color" require "poppler/document" - require "poppler/form-field" require "poppler/deprecated" end @@ -43,8 +44,47 @@ module Poppler when "annot_type" method_name = "type" end + when "Poppler::FormField" + case method_name + when /\Abutton_/ + klass = define_field_class("ButtonField") + method_name = rubyish_method_name(info, prefix: "button_") + method_name = "type" if method_name == "button_type" + when /\Atext_/ + klass = define_field_class("TextField") + method_name = rubyish_method_name(info, prefix: "text_") + method_name = "type" if method_name == "text_type" + when /\Achoice_/ + klass = define_field_class("ChoiceField") + method_name = rubyish_method_name(info, prefix: "choice_") + method_name = "type" if method_name == "choice_type" + end end super(info, klass, method_name) end + + def define_field_class(name) + klass = @form_field_classes[name] + return klass if klass + + field_class = @base_module.const_get("FormField") + klass = @form_field_classes[name] = Class.new(field_class) + @base_module.const_set(name, klass) + klass + end + + def convert_field_classes + define_field_class("SignatureField") + + field_map = { + FormFieldType::BUTTON => ButtonField, + FormFieldType::TEXT => TextField, + FormFieldType::CHOICE => ChoiceField, + FormFieldType::SIGNATURE => SignatureField, + } + self.class.register_object_class_converter(FormField.gtype) do |field| + field_map[field.field_type] || FormField + end + end end end Modified: poppler/test/test-document.rb (+1 -2) =================================================================== --- poppler/test/test-document.rb 2017-07-31 10:15:15 +0900 (1ca9f36) +++ poppler/test/test-document.rb 2017-07-31 10:23:40 +0900 (e57b199) @@ -50,8 +50,7 @@ class TestDocument < Test::Unit::TestCase document.each do |page| page.form_field_mapping.each do |mapping| field = mapping.field - p field.class - return field if field.field_type == Poppler::FormFieldType::TEXT + return field if field.is_a?(Poppler::TextField) end end end |
From: Kouhei S. <nu...@co...> - 2017-07-31 01:15:50
|
Kouhei Sutou 2017-07-31 10:15:15 +0900 (Mon, 31 Jul 2017) New Revision: 6cae2a93540652f5b8269ce768e9f5e31a1e1249 https://github.com/ruby-gnome2/ruby-gnome2/commit/6cae2a93540652f5b8269ce768e9f5e31a1e1249 Message: gi: support class conversion for GObject Modified files: gobject-introspection/ext/gobject-introspection/rb-gi-loader.c Modified: gobject-introspection/ext/gobject-introspection/rb-gi-loader.c (+74 -1) =================================================================== --- gobject-introspection/ext/gobject-introspection/rb-gi-loader.c 2017-07-31 09:35:51 +0900 (728275e) +++ gobject-introspection/ext/gobject-introspection/rb-gi-loader.c 2017-07-31 10:15:15 +0900 (2fe21bd) @@ -1,6 +1,6 @@ /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */ /* - * Copyright (C) 2012-2015 Ruby-GNOME2 Project Team + * Copyright (C) 2012-2017 Ruby-GNOME2 Project Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -23,6 +23,7 @@ #define RG_TARGET_NAMESPACE rb_cGILoader static const gchar *boxed_class_converters_name = "@@boxed_class_converters"; +static const gchar *object_class_converters_name = "@@object_class_converters"; static VALUE rg_s_define_class(int argc, VALUE *argv, G_GNUC_UNUSED VALUE klass) @@ -194,6 +195,76 @@ rg_s_register_boxed_class_converter(VALUE klass, VALUE rb_gtype) return Qnil; } +typedef struct { + GType type; + VALUE rb_converters; + VALUE rb_converter; +} ObjectInstance2RObjData; + +static void +object_class_converter_free(gpointer user_data) +{ + ObjectInstance2RObjData *data = user_data; + rb_ary_delete(data->rb_converters, data->rb_converter); + g_free(data); +} + +static VALUE +object_instance2robj(gpointer instance, gpointer user_data) +{ + ObjectInstance2RObjData *data = user_data; + VALUE existing_rb_instance; + VALUE default_rb_instance; + VALUE klass; + ID id_call; + VALUE converted_rb_instance; + ID id_unref; + + existing_rb_instance = rbgobj_get_ruby_object_from_gobject(instance, FALSE); + if (!NIL_P(existing_rb_instance)) + return existing_rb_instance; + + default_rb_instance = rbgobj_get_ruby_object_from_gobject(instance, TRUE); + CONST_ID(id_call, "call"); + klass = rb_funcall(data->rb_converter, id_call, 1, default_rb_instance); + if (klass == rb_class_of(default_rb_instance)) + return default_rb_instance; + + converted_rb_instance = rbgobj_object_alloc_func(klass); + g_object_ref(instance); + CONST_ID(id_unref, "unref"); + rb_funcall(default_rb_instance, id_unref, 0); + rbgobj_gobject_initialize(converted_rb_instance, instance); + return converted_rb_instance; +} + +static VALUE +rg_s_register_object_class_converter(VALUE klass, VALUE rb_gtype) +{ + RGConvertTable table; + ObjectInstance2RObjData *data; + ID id_to_i; + VALUE object_class_converters; + + memset(&table, 0, sizeof(RGConvertTable)); + CONST_ID(id_to_i, "to_i"); + table.type = NUM2ULONG(rb_funcall(rb_gtype, id_to_i, 0)); + table.klass = Qnil; + table.instance2robj = object_instance2robj; + + data = g_new(ObjectInstance2RObjData, 1); + data->type = table.type; + data->rb_converter = rb_block_proc(); + object_class_converters = rb_cv_get(klass, object_class_converters_name); + rb_ary_push(object_class_converters, data->rb_converter); + table.user_data = data; + table.notify = object_class_converter_free; + + rbgobj_convert_define(&table); + + return Qnil; +} + static VALUE rg_s_register_constant_rename_map(G_GNUC_UNUSED VALUE klass, VALUE rb_original, @@ -260,12 +331,14 @@ rb_gi_loader_init(VALUE rb_mGI) RG_TARGET_NAMESPACE = rb_define_class_under(rb_mGI, "Loader", rb_cObject); rb_cv_set(RG_TARGET_NAMESPACE, boxed_class_converters_name, rb_ary_new()); + rb_cv_set(RG_TARGET_NAMESPACE, object_class_converters_name, rb_ary_new()); RG_DEF_SMETHOD(define_class, -1); RG_DEF_SMETHOD(define_interface, 3); RG_DEF_SMETHOD(define_struct, -1); RG_DEF_SMETHOD(define_error, -1); RG_DEF_SMETHOD(register_boxed_class_converter, 1); + RG_DEF_SMETHOD(register_object_class_converter, 1); RG_DEF_SMETHOD(register_constant_rename_map, 2); RG_DEF_SMETHOD(start_callback_dispatch_thread, 0); RG_DEF_SMETHOD(reference_gobject, -1); |
From: Travis CI <bu...@tr...> - 2017-07-31 00:59:34
|
Build Update for ruby-gnome2/ruby-gnome2 ------------------------------------- Build: #4542 Status: Still Failing Duration: 22 minutes and 18 seconds Commit: 6f7bb0e (master) Author: Kouhei Sutou Message: poppler: make Document enumerable View the changeset: https://github.com/ruby-gnome2/ruby-gnome2/compare/9d72a8c5579e...6f7bb0eb4906 View the full build log and details: https://travis-ci.org/ruby-gnome2/ruby-gnome2/builds/259209125?utm_source=email&utm_medium=notification -- You can configure recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications |
From: Kouhei S. <nu...@co...> - 2017-07-31 00:36:37
|
Kouhei Sutou 2017-07-31 09:35:51 +0900 (Mon, 31 Jul 2017) New Revision: 6f7bb0eb49068865bd7fd773a0f042b45eeaa14d https://github.com/ruby-gnome2/ruby-gnome2/commit/6f7bb0eb49068865bd7fd773a0f042b45eeaa14d Message: poppler: make Document enumerable Added files: poppler/test/fixtures/multiple-pages.odt poppler/test/fixtures/multiple-pages.pdf Modified files: poppler/lib/poppler/document.rb poppler/test/poppler-test-utils.rb poppler/test/test-document.rb Modified: poppler/lib/poppler/document.rb (+3 -1) =================================================================== --- poppler/lib/poppler/document.rb 2017-07-31 01:03:47 +0900 (5ce8f69) +++ poppler/lib/poppler/document.rb 2017-07-31 09:35:51 +0900 (6418483) @@ -16,6 +16,8 @@ module Poppler class Document + include Enumerable + alias_method :initialize_raw, :initialize def initialize(*args) if args.size == 1 and args[0].is_a?(Hash) @@ -67,7 +69,7 @@ module Poppler alias_method :[], :get_page def each - return enum_for(__method__) unless block_given? + return to_enum(__method__) unless block_given? n_pages.times do |i| yield get_page(i) Added: poppler/test/fixtures/multiple-pages.odt (+0 -0) 100644 =================================================================== (Binary files differ) Added: poppler/test/fixtures/multiple-pages.pdf (+0 -0) 100644 =================================================================== (Binary files differ) Modified: poppler/test/poppler-test-utils.rb (+12 -4) =================================================================== --- poppler/test/poppler-test-utils.rb 2017-07-31 01:03:47 +0900 (9f557d7) +++ poppler/test/poppler-test-utils.rb 2017-07-31 09:35:51 +0900 (e404ae7) @@ -15,12 +15,16 @@ module PopplerTestUtils ensure_dir(File.join(test_dir, "fixtures")) end + def fixture_path(*components) + File.join(fixtures_dir, *components) + end + def tmp_dir ensure_dir(File.join(test_dir, "tmp")) end def form_pdf - path = File.join(fixtures_dir, "form.pdf") + path = fixture_path("form.pdf") unless File.exist?(path) pdf = open("https://www.irs.gov/pub/irs-pdf/fw9.pdf").read File.open(path, "wb") do |output| @@ -31,15 +35,19 @@ module PopplerTestUtils end def image_pdf - File.join(fixtures_dir, "image.pdf") + fixture_path("image.pdf") end def image_png - File.join(fixtures_dir, "image.png") + fixture_path("image.png") end def outline_pdf - File.join(fixtures_dir, "outline.pdf") + fixture_path("outline.pdf") + end + + def multiple_pages_pdf + fixture_path("multiple-pages.pdf") end def only_poppler_version(major, minor, micro=nil) Modified: poppler/test/test-document.rb (+23 -0) =================================================================== --- poppler/test/test-document.rb 2017-07-31 01:03:47 +0900 (a083074) +++ poppler/test/test-document.rb 2017-07-31 09:35:51 +0900 (1ca9f36) @@ -23,11 +23,34 @@ class TestDocument < Test::Unit::TestCase assert_equal(default_text, find_first_text_field(reread_document).text) end + def test_each + document = Poppler::Document.new(multiple_pages_pdf) + texts = [] + document.each do |page| + texts << page.text + end + assert_equal(["The first page", "The second page"], + texts) + end + + def test_each_enumerator + document = Poppler::Document.new(multiple_pages_pdf) + assert_equal(["The first page", "The second page"], + document.each.collect(&:text)) + end + + def test_enumerable + document = Poppler::Document.new(multiple_pages_pdf) + assert_equal(["The first page", "The second page"], + document.collect(&:text)) + end + private def find_first_text_field(document) document.each do |page| page.form_field_mapping.each do |mapping| field = mapping.field + p field.class return field if field.field_type == Poppler::FormFieldType::TEXT end end |
From: Travis CI <bu...@tr...> - 2017-07-30 17:22:16
|
Build Update for ruby-gnome2/ruby-gnome2 ------------------------------------- Build: #4541 Status: Still Failing Duration: 26 minutes and 37 seconds Commit: 9d72a8c (master) Author: Kouhei Sutou Message: poppler test: add missing GI dependency View the changeset: https://github.com/ruby-gnome2/ruby-gnome2/compare/7c7ea1ee17b3...9d72a8c5579e View the full build log and details: https://travis-ci.org/ruby-gnome2/ruby-gnome2/builds/259115635?utm_source=email&utm_medium=notification -- You can configure recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications |
From: Travis CI <bu...@tr...> - 2017-07-30 17:02:57
|
Build Update for ruby-gnome2/ruby-gnome2 ------------------------------------- Build: #4540 Status: Still Failing Duration: 26 minutes and 18 seconds Commit: 7c7ea1e (master) Author: Kouhei Sutou Message: poppler: simplify View the changeset: https://github.com/ruby-gnome2/ruby-gnome2/compare/9c5e13ee5f06...7c7ea1ee17b3 View the full build log and details: https://travis-ci.org/ruby-gnome2/ruby-gnome2/builds/259109776?utm_source=email&utm_medium=notification -- You can configure recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications |
From: Travis CI <bu...@tr...> - 2017-07-30 16:45:13
|
Build Update for ruby-gnome2/ruby-gnome2 ------------------------------------- Build: #4539 Status: Still Failing Duration: 26 minutes and 55 seconds Commit: 9c5e13e (master) Author: Kouhei Sutou Message: poppler: Document#each supports enumerator View the changeset: https://github.com/ruby-gnome2/ruby-gnome2/compare/e0559a3337c1...9c5e13ee5f06 View the full build log and details: https://travis-ci.org/ruby-gnome2/ruby-gnome2/builds/259109752?utm_source=email&utm_medium=notification -- You can configure recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications |
From: Travis CI <bu...@tr...> - 2017-07-30 16:25:32
|
Build Update for ruby-gnome2/ruby-gnome2 ------------------------------------- Build: #4538 Status: Still Failing Duration: 25 minutes and 57 seconds Commit: e0559a3 (master) Author: Kouhei Sutou Message: poppler: save methods accept local file path View the changeset: https://github.com/ruby-gnome2/ruby-gnome2/compare/0aaef5bc2c51...e0559a3337c1 View the full build log and details: https://travis-ci.org/ruby-gnome2/ruby-gnome2/builds/259109306?utm_source=email&utm_medium=notification -- You can configure recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications |
From: Travis CI <bu...@tr...> - 2017-07-30 16:09:48
|
Build Update for ruby-gnome2/ruby-gnome2 ------------------------------------- Build: #4537 Status: Still Failing Duration: 28 minutes and 31 seconds Commit: 0aaef5b (master) Author: Kouhei Sutou Message: poppler test: need open-uri to download test PDF View the changeset: https://github.com/ruby-gnome2/ruby-gnome2/compare/666334f638f9...0aaef5bc2c51 View the full build log and details: https://travis-ci.org/ruby-gnome2/ruby-gnome2/builds/259108678?utm_source=email&utm_medium=notification -- You can configure recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications |
From: Kouhei S. <nu...@co...> - 2017-07-30 16:04:19
|
Kouhei Sutou 2017-07-31 01:03:47 +0900 (Mon, 31 Jul 2017) New Revision: 9d72a8c5579e0bdec9c2fd53dc31d0e3bc77b148 https://github.com/ruby-gnome2/ruby-gnome2/commit/9d72a8c5579e0bdec9c2fd53dc31d0e3bc77b148 Message: poppler test: add missing GI dependency Modified files: poppler/test/run-test.rb Modified: poppler/test/run-test.rb (+9 -4) =================================================================== --- poppler/test/run-test.rb 2017-07-31 00:34:29 +0900 (f44965c) +++ poppler/test/run-test.rb 2017-07-31 01:03:47 +0900 (2ee3cc6) @@ -24,14 +24,19 @@ have_make = system("which make > /dev/null") glib_dir = File.expand_path(File.join(base_dir, "..", "glib2")) gdk_pixbuf_dir = File.expand_path(File.join(base_dir, "..", "gdk_pixbuf2")) pango_dir = File.join(File.join(base_dir, ".." , "pango")) +gobject_introspection_dir = + File.join(File.join(base_dir, ".." , "gobject-introspection")) $LOAD_PATH.unshift(File.join(glib_dir, "test")) require 'glib-test-init' -[[gdk_pixbuf_dir, "gdk_pixbuf2"], - [pango_dir, "pango"], - [glib_dir, "glib2"], - [base_dir, "poppler"]].each do |dir, module_name| +[ + [glib_dir, "glib2"], + [gdk_pixbuf_dir, "gdk_pixbuf2"], + [pango_dir, "pango"], + [gobject_introspection_dir, "gobject-introspection"], + [base_dir, "poppler"], +].each do |dir, module_name| if File.exist?(File.join(dir, "Makefile")) if have_make system("cd #{dir.dump} && make > /dev/null") or exit(false) |
From: Travis CI <bu...@tr...> - 2017-07-30 15:48:52
|
Build Update for ruby-gnome2/ruby-gnome2 ------------------------------------- Build: #4536 Status: Still Failing Duration: 22 minutes and 51 seconds Commit: 666334f (master) Author: Kouhei Sutou Message: Merge pull request #1083 from cedlemo/poppler_test_document Poppler test document Patch by cedlemo. Thanks!!! View the changeset: https://github.com/ruby-gnome2/ruby-gnome2/compare/34c32c926483...666334f638f9 View the full build log and details: https://travis-ci.org/ruby-gnome2/ruby-gnome2/builds/259107773?utm_source=email&utm_medium=notification -- You can configure recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications |
From: Kouhei S. <nu...@co...> - 2017-07-30 15:34:56
|
Kouhei Sutou 2017-07-31 00:34:29 +0900 (Mon, 31 Jul 2017) New Revision: 7c7ea1ee17b3f85ae2a4258a964eba064f005809 https://github.com/ruby-gnome2/ruby-gnome2/commit/7c7ea1ee17b3f85ae2a4258a964eba064f005809 Message: poppler: simplify Modified files: poppler/lib/poppler/document.rb Modified: poppler/lib/poppler/document.rb (+2 -2) =================================================================== --- poppler/lib/poppler/document.rb 2017-07-31 00:34:09 +0900 (3766007) +++ poppler/lib/poppler/document.rb 2017-07-31 00:34:29 +0900 (5ce8f69) @@ -68,8 +68,8 @@ module Poppler def each return enum_for(__method__) unless block_given? - n = n_pages - 1 - (0..n).each do |i| + + n_pages.times do |i| yield get_page(i) end end |
From: Kouhei S. <nu...@co...> - 2017-07-30 15:34:50
|
Kouhei Sutou 2017-07-31 00:34:09 +0900 (Mon, 31 Jul 2017) New Revision: 9c5e13ee5f06dd9f45dd480531db21148c895de2 https://github.com/ruby-gnome2/ruby-gnome2/commit/9c5e13ee5f06dd9f45dd480531db21148c895de2 Message: poppler: Document#each supports enumerator Modified files: poppler/lib/poppler/document.rb Modified: poppler/lib/poppler/document.rb (+2 -1) =================================================================== --- poppler/lib/poppler/document.rb 2017-07-31 00:32:10 +0900 (0eec790) +++ poppler/lib/poppler/document.rb 2017-07-31 00:34:09 +0900 (3766007) @@ -67,10 +67,11 @@ module Poppler alias_method :[], :get_page def each + return enum_for(__method__) unless block_given? n = n_pages - 1 (0..n).each do |i| yield get_page(i) - end if block_given? + end end alias_method :save_raw, :save |
From: Kouhei S. <nu...@co...> - 2017-07-30 15:32:49
|
Kouhei Sutou 2017-07-31 00:32:10 +0900 (Mon, 31 Jul 2017) New Revision: e0559a3337c1bed09210e2cc93369f9d81ed4ce3 https://github.com/ruby-gnome2/ruby-gnome2/commit/e0559a3337c1bed09210e2cc93369f9d81ed4ce3 Message: poppler: save methods accept local file path Modified files: poppler/lib/poppler/document.rb poppler/test/test-document.rb Modified: poppler/lib/poppler/document.rb (+11 -0) =================================================================== --- poppler/lib/poppler/document.rb 2017-07-31 00:29:33 +0900 (6d1df20) +++ poppler/lib/poppler/document.rb 2017-07-31 00:32:10 +0900 (0eec790) @@ -72,6 +72,17 @@ module Poppler yield get_page(i) end if block_given? end + + alias_method :save_raw, :save + def save(uri) + save_raw(ensure_uri(uri)) + end + + alias_method :save_a_copy_raw, :save_a_copy + def save_a_copy(uri) + save_a_copy_raw(ensure_uri(uri)) + end + private def pdf_data?(data) data.start_with?("%PDF-1.") Modified: poppler/test/test-document.rb (+2 -6) =================================================================== --- poppler/test/test-document.rb 2017-07-31 00:29:33 +0900 (93c36e8) +++ poppler/test/test-document.rb 2017-07-31 00:32:10 +0900 (a083074) @@ -5,9 +5,7 @@ class TestDocument < Test::Unit::TestCase document = Poppler::Document.new(form_pdf) find_first_text_field(document).text = "XXX" - assert(document.save("file:///" + saved_pdf)) - assert(File.exist?(saved_pdf)) - + document.save(saved_pdf) reread_document = Poppler::Document.new(saved_pdf) assert_equal("XXX", find_first_text_field(reread_document).text) end @@ -20,9 +18,7 @@ class TestDocument < Test::Unit::TestCase first_text_field = find_first_text_field(document) default_text = first_text_field.text first_text_field.text = "XXX" - assert(document.save_a_copy("file:///" + copied_pdf)) - assert(File.exist?(copied_pdf)) - + document.save_a_copy(copied_pdf) reread_document = Poppler::Document.new(copied_pdf) assert_equal(default_text, find_first_text_field(reread_document).text) end |
From: Kouhei S. <nu...@co...> - 2017-07-30 15:30:12
|
Kouhei Sutou 2017-07-31 00:29:33 +0900 (Mon, 31 Jul 2017) New Revision: 0aaef5bc2c5100b6430093cabe87ac078808a334 https://github.com/ruby-gnome2/ruby-gnome2/commit/0aaef5bc2c5100b6430093cabe87ac078808a334 Message: poppler test: need open-uri to download test PDF Modified files: poppler/test/poppler-test-utils.rb Modified: poppler/test/poppler-test-utils.rb (+9 -8) =================================================================== --- poppler/test/poppler-test-utils.rb 2017-07-31 00:24:45 +0900 (c593f97) +++ poppler/test/poppler-test-utils.rb 2017-07-31 00:29:33 +0900 (9f557d7) @@ -1,5 +1,5 @@ -require 'uri' -require 'fileutils' +require "open-uri" +require "fileutils" module PopplerTestUtils def ensure_dir(dir) @@ -20,13 +20,14 @@ module PopplerTestUtils end def form_pdf - file = File.join(fixtures_dir, "form.pdf") - return file if File.exist?(file) - pdf = open("https://www.irs.gov/pub/irs-pdf/fw9.pdf").read - File.open(file, "wb") do |output| - output.print(pdf) + path = File.join(fixtures_dir, "form.pdf") + unless File.exist?(path) + pdf = open("https://www.irs.gov/pub/irs-pdf/fw9.pdf").read + File.open(path, "wb") do |output| + output.print(pdf) + end end - URI.join('file:///', file.path) + path end def image_pdf |
From: cedlemo <nu...@co...> - 2017-07-30 15:25:15
|
cedlemo 2017-07-29 18:23:13 +0900 (Sat, 29 Jul 2017) New Revision: 15ff142ac721dccf7c3df031f86aa3ca7f38be73 https://github.com/ruby-gnome2/ruby-gnome2/commit/15ff142ac721dccf7c3df031f86aa3ca7f38be73 Merged 666334f: Merge pull request #1083 from cedlemo/poppler_test_document Message: double quote for strings Modified files: poppler/test/test-document.rb Modified: poppler/test/test-document.rb (+2 -2) =================================================================== --- poppler/test/test-document.rb 2017-07-29 18:21:50 +0900 (2cab6fb) +++ poppler/test/test-document.rb 2017-07-29 18:23:13 +0900 (93c36e8) @@ -5,7 +5,7 @@ class TestDocument < Test::Unit::TestCase document = Poppler::Document.new(form_pdf) find_first_text_field(document).text = "XXX" - assert(document.save('file:///' + saved_pdf)) + assert(document.save("file:///" + saved_pdf)) assert(File.exist?(saved_pdf)) reread_document = Poppler::Document.new(saved_pdf) @@ -20,7 +20,7 @@ class TestDocument < Test::Unit::TestCase first_text_field = find_first_text_field(document) default_text = first_text_field.text first_text_field.text = "XXX" - assert(document.save_a_copy('file:///' + copied_pdf)) + assert(document.save_a_copy("file:///" + copied_pdf)) assert(File.exist?(copied_pdf)) reread_document = Poppler::Document.new(copied_pdf) |
From: cedlemo <nu...@co...> - 2017-07-30 15:25:07
|
cedlemo 2017-07-29 17:45:37 +0900 (Sat, 29 Jul 2017) New Revision: 05337beec5d80fe45ffa0d81a7cff3322bd416e3 https://github.com/ruby-gnome2/ruby-gnome2/commit/05337beec5d80fe45ffa0d81a7cff3322bd416e3 Merged 666334f: Merge pull request #1083 from cedlemo/poppler_test_document Message: Add Poppler::Document#each Modified files: poppler/lib/poppler/document.rb Modified: poppler/lib/poppler/document.rb (+6 -0) =================================================================== --- poppler/lib/poppler/document.rb 2017-07-26 14:17:11 +0900 (0b635b2) +++ poppler/lib/poppler/document.rb 2017-07-29 17:45:37 +0900 (6d1df20) @@ -66,6 +66,12 @@ module Poppler alias_method :[], :get_page + def each + n = n_pages - 1 + (0..n).each do |i| + yield get_page(i) + end if block_given? + end private def pdf_data?(data) data.start_with?("%PDF-1.") |
From: cedlemo <nu...@co...> - 2017-07-30 15:25:07
|
cedlemo 2017-07-29 18:21:50 +0900 (Sat, 29 Jul 2017) New Revision: 7782799aa8f7085efd14766747340d43e6eba4c2 https://github.com/ruby-gnome2/ruby-gnome2/commit/7782799aa8f7085efd14766747340d43e6eba4c2 Merged 666334f: Merge pull request #1083 from cedlemo/poppler_test_document Message: Add Poppler::FormField#text, #text= methods Copied files: poppler/lib/poppler/form-field.rb (from poppler/lib/poppler/loader.rb) Modified files: poppler/lib/poppler/loader.rb poppler/test/test-document.rb Copied: poppler/lib/poppler/form-field.rb (+3 -29) 54% =================================================================== --- poppler/lib/poppler/loader.rb 2017-07-29 18:13:06 +0900 (b0f7284) +++ poppler/lib/poppler/form-field.rb 2017-07-29 18:21:50 +0900 (b000013) @@ -15,35 +15,9 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA module Poppler - class Loader < GObjectIntrospection::Loader - private - def pre_load(repository, namespace) - end + class FormField - def post_load(repository, namespace) - require_libraries - end - - def require_libraries - require "poppler/version" - - require "poppler/annot-callout-line" - require "poppler/cairo" - require "poppler/color" - require "poppler/document" - - require "poppler/deprecated" - end - - def load_method_info(info, klass, method_name) - case klass.name - when "Poppler::Annot" - case method_name - when "annot_type" - method_name = "type" - end - end - super(info, klass, method_name) - end + alias_method :text, :text_get_text + alias_method :text=, :text_set_text end end Modified: poppler/lib/poppler/loader.rb (+1 -0) =================================================================== --- poppler/lib/poppler/loader.rb 2017-07-29 18:13:06 +0900 (b0f7284) +++ poppler/lib/poppler/loader.rb 2017-07-29 18:21:50 +0900 (d1bbfc6) @@ -31,6 +31,7 @@ module Poppler require "poppler/cairo" require "poppler/color" require "poppler/document" + require "poppler/form-field" require "poppler/deprecated" end Modified: poppler/test/test-document.rb (+5 -5) =================================================================== --- poppler/test/test-document.rb 2017-07-29 18:13:06 +0900 (0304acd) +++ poppler/test/test-document.rb 2017-07-29 18:21:50 +0900 (2cab6fb) @@ -4,12 +4,12 @@ class TestDocument < Test::Unit::TestCase FileUtils.rm_f(saved_pdf) document = Poppler::Document.new(form_pdf) - find_first_text_field(document).text_set_text("XXX") + find_first_text_field(document).text = "XXX" assert(document.save('file:///' + saved_pdf)) assert(File.exist?(saved_pdf)) reread_document = Poppler::Document.new(saved_pdf) - assert_equal("XXX", find_first_text_field(reread_document).text_get_text) + assert_equal("XXX", find_first_text_field(reread_document).text) end def test_save_a_copy @@ -18,13 +18,13 @@ class TestDocument < Test::Unit::TestCase document = Poppler::Document.new(form_pdf) first_text_field = find_first_text_field(document) - default_text = first_text_field.text_get_text - first_text_field.text_set_text("XXX") + default_text = first_text_field.text + first_text_field.text = "XXX" assert(document.save_a_copy('file:///' + copied_pdf)) assert(File.exist?(copied_pdf)) reread_document = Poppler::Document.new(copied_pdf) - assert_equal(default_text, find_first_text_field(reread_document).text_get_text) + assert_equal(default_text, find_first_text_field(reread_document).text) end private |
From: Kouhei S. <nu...@co...> - 2017-07-30 15:25:07
|
Kouhei Sutou 2017-07-31 00:24:45 +0900 (Mon, 31 Jul 2017) New Revision: 666334f638f91377f94e40ab3b8320d27521d720 https://github.com/ruby-gnome2/ruby-gnome2/commit/666334f638f91377f94e40ab3b8320d27521d720 Message: Merge pull request #1083 from cedlemo/poppler_test_document Poppler test document Patch by cedlemo. Thanks!!! |
From: cedlemo <nu...@co...> - 2017-07-30 15:25:07
|
cedlemo 2017-07-29 18:05:18 +0900 (Sat, 29 Jul 2017) New Revision: e97970291ed06ae0b87d1f11e59dfb9d0f1f82bb https://github.com/ruby-gnome2/ruby-gnome2/commit/e97970291ed06ae0b87d1f11e59dfb9d0f1f82bb Merged 666334f: Merge pull request #1083 from cedlemo/poppler_test_document Message: Use the raw api in order to make it work (to be improved) Modified files: poppler/test/test-document.rb Modified: poppler/test/test-document.rb (+6 -6) =================================================================== --- poppler/test/test-document.rb 2017-07-29 17:45:37 +0900 (05e5fd7) +++ poppler/test/test-document.rb 2017-07-29 18:05:18 +0900 (e9643fd) @@ -4,12 +4,12 @@ class TestDocument < Test::Unit::TestCase FileUtils.rm_f(saved_pdf) document = Poppler::Document.new(form_pdf) - find_first_text_field(document).text = "XXX" + find_first_text_field(document).text_set_text("XXX") assert(document.save(saved_pdf)) assert(File.exist?(saved_pdf)) reread_document = Poppler::Document.new(saved_pdf) - assert_equal("XXX", find_first_text_field(reread_document).text) + assert_equal("XXX", find_first_text_field(reread_document).text_get_text) end def test_save_a_copy @@ -18,13 +18,13 @@ class TestDocument < Test::Unit::TestCase document = Poppler::Document.new(form_pdf) first_text_field = find_first_text_field(document) - default_text = first_text_field.text - first_text_field.text = "XXX" + default_text = first_text_field.text_get_text + first_text_field.text_set_text("XXX") assert(document.save_a_copy(copied_pdf)) assert(File.exist?(copied_pdf)) reread_document = Poppler::Document.new(copied_pdf) - assert_equal(default_text, find_first_text_field(reread_document).text) + assert_equal(default_text, find_first_text_field(reread_document).text_get_text) end private @@ -32,7 +32,7 @@ class TestDocument < Test::Unit::TestCase document.each do |page| page.form_field_mapping.each do |mapping| field = mapping.field - return field if field.is_a?(Poppler::TextField) + return field if field.field_type == Poppler::FormFieldType::TEXT end end end |
From: cedlemo <nu...@co...> - 2017-07-30 15:25:07
|
cedlemo 2017-07-29 18:13:06 +0900 (Sat, 29 Jul 2017) New Revision: 8b945dc88511199c297a3a72ea82f923cb3116fe https://github.com/ruby-gnome2/ruby-gnome2/commit/8b945dc88511199c297a3a72ea82f923cb3116fe Merged 666334f: Merge pull request #1083 from cedlemo/poppler_test_document Message: Use URI form with Poppler::Document#save, #save_a_copy Modified files: poppler/test/test-document.rb Modified: poppler/test/test-document.rb (+2 -2) =================================================================== --- poppler/test/test-document.rb 2017-07-29 18:05:18 +0900 (e9643fd) +++ poppler/test/test-document.rb 2017-07-29 18:13:06 +0900 (0304acd) @@ -5,7 +5,7 @@ class TestDocument < Test::Unit::TestCase document = Poppler::Document.new(form_pdf) find_first_text_field(document).text_set_text("XXX") - assert(document.save(saved_pdf)) + assert(document.save('file:///' + saved_pdf)) assert(File.exist?(saved_pdf)) reread_document = Poppler::Document.new(saved_pdf) @@ -20,7 +20,7 @@ class TestDocument < Test::Unit::TestCase first_text_field = find_first_text_field(document) default_text = first_text_field.text_get_text first_text_field.text_set_text("XXX") - assert(document.save_a_copy(copied_pdf)) + assert(document.save_a_copy('file:///' + copied_pdf)) assert(File.exist?(copied_pdf)) reread_document = Poppler::Document.new(copied_pdf) |
From: Travis CI <bu...@tr...> - 2017-07-26 05:40:42
|
Build Update for ruby-gnome2/ruby-gnome2 ------------------------------------- Build: #4533 Status: Still Failing Duration: 22 minutes and 8 seconds Commit: 34c32c9 (master) Author: Kouhei Sutou Message: poppler: support cairo integration again View the changeset: https://github.com/ruby-gnome2/ruby-gnome2/compare/a3f5612711eb...34c32c926483 View the full build log and details: https://travis-ci.org/ruby-gnome2/ruby-gnome2/builds/257588052?utm_source=email&utm_medium=notification -- You can configure recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications |
From: Kouhei S. <nu...@co...> - 2017-07-26 05:17:51
|
Kouhei Sutou 2017-07-26 14:17:11 +0900 (Wed, 26 Jul 2017) New Revision: 34c32c9264835b5122219f799ce2b02176058b41 https://github.com/ruby-gnome2/ruby-gnome2/commit/34c32c9264835b5122219f799ce2b02176058b41 Message: poppler: support cairo integration again Copied files: poppler/lib/poppler/cairo.rb (from poppler/lib/poppler.rb) Modified files: poppler/lib/poppler.rb poppler/lib/poppler/loader.rb Modified: poppler/lib/poppler.rb (+1 -0) =================================================================== --- poppler/lib/poppler.rb 2017-07-24 11:26:39 +0900 (2837e57) +++ poppler/lib/poppler.rb 2017-07-26 14:17:11 +0900 (d5c7a94) @@ -16,6 +16,7 @@ require "gobject-introspection" require "gio2" +require "cairo-gobject" base_dir = Pathname.new(__FILE__).dirname.dirname.expand_path vendor_dir = base_dir + "vendor" + "local" Copied: poppler/lib/poppler/cairo.rb (+6 -19) 60% =================================================================== --- poppler/lib/poppler.rb 2017-07-24 11:26:39 +0900 (2837e57) +++ poppler/lib/poppler/cairo.rb 2017-07-26 14:17:11 +0900 (5e3dfb3) @@ -14,23 +14,10 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -require "gobject-introspection" -require "gio2" - -base_dir = Pathname.new(__FILE__).dirname.dirname.expand_path -vendor_dir = base_dir + "vendor" + "local" -vendor_bin_dir = vendor_dir + "bin" -GLib.prepend_dll_path(vendor_bin_dir) -vendor_girepository_dir = vendor_dir + "lib" + "girepository-1.0" -GObjectIntrospection.prepend_typelib_path(vendor_girepository_dir) - -require "poppler/loader" - -module Poppler - LOG_DOMAIN = "Poppler" - GLib::Log.set_log_domain(LOG_DOMAIN) - - loader = Loader.new(self) - loader.load("Poppler") - +module Cairo + class Context + def render_poppler_page(page, options={}) + page.render(self) + end + end end Modified: poppler/lib/poppler/loader.rb (+1 -0) =================================================================== --- poppler/lib/poppler/loader.rb 2017-07-24 11:26:39 +0900 (4e4e05a) +++ poppler/lib/poppler/loader.rb 2017-07-26 14:17:11 +0900 (b0f7284) @@ -28,6 +28,7 @@ module Poppler require "poppler/version" require "poppler/annot-callout-line" + require "poppler/cairo" require "poppler/color" require "poppler/document" |
From: Travis CI <bu...@tr...> - 2017-07-24 02:51:20
|
Build Update for ruby-gnome2/ruby-gnome2 ------------------------------------- Build: #4532 Status: Still Failing Duration: 23 minutes and 7 seconds Commit: a3f5612 (master) Author: Kouhei Sutou Message: webkit2-gtk: use main loop View the changeset: https://github.com/ruby-gnome2/ruby-gnome2/compare/3baded1565ce...a3f5612711eb View the full build log and details: https://travis-ci.org/ruby-gnome2/ruby-gnome2/builds/256732087?utm_source=email&utm_medium=notification -- You can configure recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications |
From: Kouhei S. <nu...@co...> - 2017-07-24 02:27:25
|
Kouhei Sutou 2017-07-24 11:26:39 +0900 (Mon, 24 Jul 2017) New Revision: a3f5612711eb38aaf03ae4d5324cb3656f5e1b1d https://github.com/ruby-gnome2/ruby-gnome2/commit/a3f5612711eb38aaf03ae4d5324cb3656f5e1b1d Message: webkit2-gtk: use main loop Modified files: webkit2-gtk/sample/screenshot.rb Modified: webkit2-gtk/sample/screenshot.rb (+4 -7) =================================================================== --- webkit2-gtk/sample/screenshot.rb 2017-07-24 09:22:08 +0900 (391a228) +++ webkit2-gtk/sample/screenshot.rb 2017-07-24 11:26:39 +0900 (ca31bd9) @@ -23,7 +23,7 @@ if ARGV.empty? exit(false) end -main_context = GLib::MainContext.default +main_loop = GLib::MainLoop.new view_context = WebKit2Gtk::WebContext.new(ephemeral: true) view = WebKit2Gtk::WebView.new(context: view_context) @@ -33,12 +33,11 @@ window.set_default_size(800, 600) window.show_all ARGV.each do |uri| view.load_uri(uri) - finished = false view.signal_connect("load-changed") do |_, load_event| case load_event when WebKit2Gtk::LoadEvent::FINISHED view.get_snapshot(:full_document, :none) do |_, result| - finished = true + main_loop.quit snapshot_surface = view.get_snapshot_finish(result) base_path = CGI.escape(uri) snapshot_surface.write_to_png("#{base_path}.png") @@ -58,13 +57,11 @@ ARGV.each do |uri| end end view.signal_connect("load-failed") do |_, _, failed_uri, error| - finished = true + main_loop.quit message = "failed to load URI: #{failed_uri}: " message << "#{error.class}(#{error.code}): #{error.message}" puts(message) true end - until finished - main_context.iteration(true) - end + main_loop.run end |