![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package rubygem-launchy for openSUSE:Factory checked in at 2015-02-11 16:45:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-launchy (Old) and /work/SRC/openSUSE:Factory/.rubygem-launchy.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "rubygem-launchy" Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-launchy/rubygem-launchy.changes 2013-12-02 17:04:28.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-launchy.new/rubygem-launchy.changes 2015-02-11 16:45:41.000000000 +0100 @@ -1,0 +2,9 @@ +Mon Feb 9 08:06:40 UTC 2015 - coolo@suse.com + +- updated to version 2.4.3 + * Update documentation - https://github.com/copiousfreetime/launchy/pull/81 - supremebeing7 + * Fix launching of `exo-open` for XFCE - https://github.com/copiousfreetime/launchy/issues/82 - dsandstrom + * Add iceweasel as a fallback browser - https://github.com/copiousfreetime/launchy/pull/92 - jackturnbull + * Reopen $stderr in really bad situation - https://github.com/copiousfreetime/launchy/pull/77 - infertux + +------------------------------------------------------------------- Old: ---- launchy-2.4.2.gem New: ---- gem2rpm.yml launchy-2.4.3.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-launchy.spec ++++++ --- /var/tmp/diff_new_pack.sWhD4v/_old 2015-02-11 16:45:42.000000000 +0100 +++ /var/tmp/diff_new_pack.sWhD4v/_new 2015-02-11 16:45:42.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-launchy # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,22 +16,29 @@ # +# +# This file was generated with a gem2rpm.yml and not just plain gem2rpm. +# All sections marked as MANUAL, license headers, summaries and descriptions +# can be maintained in that file. Please consult this file before editing any +# of those fields +# + Name: rubygem-launchy -Version: 2.4.2 +Version: 2.4.3 Release: 0 %define mod_name launchy %define mod_full_name %{mod_name}-%{version} -%define mod_branch -%{version} -%define mod_weight 20402 - BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: ruby-macros >= 1 +BuildRequires: %{rubygem gem2rpm} +BuildRequires: %{rubygem rdoc > 3.10} +BuildRequires: %{ruby} +BuildRequires: ruby-macros >= 5 BuildRequires: update-alternatives -BuildRequires: rubygem(rdoc) > 3.10 Url: http://github.com/copiousfreetime/launchy Source: http://rubygems.org/gems/%{mod_full_name}.gem +Source1: gem2rpm.yml Summary: Launchy is helper class for launching cross-platform applications in -License: GPL-2.0+ or Ruby +License: ISC Group: Development/Languages/Ruby PreReq: update-alternatives @@ -42,68 +49,16 @@ each platform. Launchy is here to make a common approach to launching external application from within ruby programs. -%package doc -Summary: RDoc documentation for %{mod_name} -Group: Development/Languages/Ruby -Requires: %{name} = %{version} - -%description doc -Documentation generated at gem installation time. -Usually in RDoc and RI formats. - -%package testsuite -Summary: Test suite for %{mod_name} -Group: Development/Languages/Ruby -Requires: %{name} = %{version} - -%description testsuite -Test::Unit or RSpec files, useful for developers. - %prep -#gem_unpack -#if you need patches, apply them here and replace the # with a % sign in the surrounding lines -#gem_build %build %install -%gem_install -f -mkdir -p %{buildroot}%{_sysconfdir}/alternatives -mv %{buildroot}%{_bindir}/launchy{,%{mod_branch}} -touch %{buildroot}%{_sysconfdir}/alternatives/launchy -ln -s %{_sysconfdir}/alternatives/launchy %{buildroot}%{_bindir}/launchy - -mkdir -p %{buildroot}%{_docdir}/%{name} -ln -s %{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/HISTORY.md %buildroot/%{_docdir}/%{name}/HISTORY.md -ln -s %{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/LICENSE %buildroot/%{_docdir}/%{name}/LICENSE -ln -s %{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/README.md %buildroot/%{_docdir}/%{name}/README.md - -%post -/usr/sbin/update-alternatives --install \ - %{_bindir}/launchy launchy %{_bindir}/launchy%{mod_branch} %{mod_weight} - -%preun -if [ "$1" = 0 ] ; then - /usr/sbin/update-alternatives --remove launchy %{_bindir}/launchy%{mod_branch} -fi - -%files -%defattr(-,root,root,-) -%{_docdir}/%{name} -%{_bindir}/launchy%{mod_branch} -%{_bindir}/launchy -%ghost %{_sysconfdir}/alternatives/launchy -%{_libdir}/ruby/gems/%{rb_ver}/cache/%{mod_full_name}.gem -%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/ -%exclude %{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/spec -%{_libdir}/ruby/gems/%{rb_ver}/specifications/%{mod_full_name}.gemspec - -%files doc -%defattr(-,root,root,-) -%doc %{_libdir}/ruby/gems/%{rb_ver}/doc/%{mod_full_name}/ - -%files testsuite -%defattr(-,root,root,-) -%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/spec +%gem_install \ + --symlink-binaries \ + --doc-files="HISTORY.md LICENSE README.md" \ + -f + +%gem_packages %changelog ++++++ gem2rpm.yml ++++++ # --- # ## used by gem2rpm # :summary: this is a custom summary # ## used by gem2rpm # :description: |- # this is a custom description # # it can be multiline # ## used by gem2rpm # :license: MIT or Ruby # ## used by gem2rpm and gem_packages # :version_suffix: -x_y # ## used by gem2rpm and gem_packages # :disable_docs: true # ## used by gem2rpm # :disable_automatic_rdoc_dep: true # ## used by gem2rpm # :preamble: |- # BuildRequires: foobar # Requires: foobar # ## used by gem2rpm # :patches: # foo.patch: -p1 # bar.patch: # ## used by gem2rpm :sources: # - foo.desktop # - bar.desktop # :gem_install_args: '....' # ## used by gem2rpm # :pre_install: |- # %if 0%{?use_system_libev} # export USE_VENDORED_LIBEV="no" # %endif # ## used by gem2rpm # :post_install: |- # # delete custom files here or do other fancy stuff # install -D -m 0644 %{S:1} %{buildroot}%{_bindir}/gem2rpm-opensuse # ## used by gem2rpm # :testsuite_command: |- # (pushd %{buildroot}%{gem_base}/gems/%{mod_full_name} && rake test) # ## used by gem2rpm # :filelist: |- # /usr/bin/gem2rpm-opensuse # ## used by gem2rpm # :scripts: # :post: |- # /bin/echo foo # ## used by gem_packages # :main: # :preamble: |- # Requires: util-linux # Recommends: pwgen # :filelist: |- # /usr/bin/gem2rpm-opensuse # ## used by gem_packages # :custom: # apache: # :preamble: |- # Requires: ..... # :filelist: |- # /etc/apache2/conf.d/passenger.conf # :summary: Custom summary is optional # :description: |- # Custom description is optional # # bar # :post: |- # /bin/echo foo # ++++++ launchy-2.4.2.gem -> launchy-2.4.3.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CONTRIBUTING.md new/CONTRIBUTING.md --- old/CONTRIBUTING.md 2013-11-28 15:36:13.000000000 +0100 +++ new/CONTRIBUTING.md 2014-11-03 03:44:35.000000000 +0100 @@ -46,6 +46,10 @@ * [Chris Schmich](https://github.com/schmich) * [Gioele Barabucci](https://github.com/gioele) * [Colin Noel Bell](https://github.com/colbell) +* [Mark J. Lehman](https://github.com/supremebeing7) +* [Cédric Félizard](https://github.com/infertux) +* [Daniel Farina](https://github.com/fdr) +* [Jack Turnbull](https://github.com/jackturnbull) [GitHub Account]: https://github.com/signup/free "GitHub Signup" [GitHub Issues]: https://github.com/copiousfreetime/launchy/issues "Launchy Issues" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HISTORY.md new/HISTORY.md --- old/HISTORY.md 2013-11-28 15:36:13.000000000 +0100 +++ new/HISTORY.md 2014-11-03 03:44:35.000000000 +0100 @@ -1,5 +1,11 @@ # Launchy Changelog +## Version 2.4.3 - 2014-11-03 +* Update documentation - https://github.com/copiousfreetime/launchy/pull/81 - supremebeing7 +* Fix launching of `exo-open` for XFCE - https://github.com/copiousfreetime/launchy/issues/82 - dsandstrom +* Add iceweasel as a fallback browser - https://github.com/copiousfreetime/launchy/pull/92 - jackturnbull +* Reopen $stderr in really bad situation - https://github.com/copiousfreetime/launchy/pull/77 - infertux + ## Version 2.4.2 - 2013-11-28 * Fix kde issue - https://github.com/copiousfreetime/launchy/issues/72 - colbell diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2013-11-28 15:36:13.000000000 +0100 +++ new/README.md 2014-11-03 03:44:35.000000000 +0100 @@ -20,7 +20,7 @@ ## SYNOPSIS -You can use launchy on the commandline, or via its API. +You can use launchy on the commandline, within the Capybara and Rspec-rails testing environment, or via its API. ### Commandline @@ -28,6 +28,28 @@ There are additional commandline options, use `launchy --help` to see them. +### Capybara Testing + +First, install [Capybara](https://github.com/jnicklas/capybara) and [Rspec for Rails](https://github.com/rspec/rspec-rails). Capybara provides the following method: + + save_and_open_page + +When inserted into your code at the place where you would like to open your program, and when rspec is run, Capybara displays this message: + + Page saved to /home/code/my_app_name/tmp/capybara/capybara-current-date-and-time.html with save_and_open_page. + Please install the launchy gem to open page automatically. + +With Launchy installed, when rspec is run again, it will launch an unstyled instance of the specific page. It can be especially useful when debugging errors in integration tests. For example: + + context "signin" do + it "lets a user sign in" do + visit root_path + click_link signin_path + save_and_open_page + page.should have_content "Enter your login information" + end + end + ### Public API In the vein of [Semantic Versioning](http://semver.org), this is the sole diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Rakefile new/Rakefile --- old/Rakefile 2013-11-28 15:36:13.000000000 +0100 +++ new/Rakefile 2014-11-03 03:44:35.000000000 +0100 @@ -11,11 +11,15 @@ spec.add_development_dependency( 'rake' , '~> 10.1') spec.add_development_dependency( 'minitest' , '~> 5.0' ) - spec.add_development_dependency( 'rdoc' , '~> 3.12' ) + spec.add_development_dependency( 'rdoc' , '~> 4.1' ) + + spec.licenses = ['ISC'] end This.java_gemspec( This.ruby_gemspec ) do |spec| spec.add_dependency( 'spoon', '~> 0.0.1' ) + + spec.licenses = ['ISC'] end load 'tasks/default.rake' Files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/launchy/detect/nix_desktop_environment.rb new/lib/launchy/detect/nix_desktop_environment.rb --- old/lib/launchy/detect/nix_desktop_environment.rb 2013-11-28 15:36:13.000000000 +0100 +++ new/lib/launchy/detect/nix_desktop_environment.rb 2014-11-03 03:44:35.000000000 +0100 @@ -19,7 +19,7 @@ end def self.fallback_browsers - %w[ firefox seamonkey opera mozilla netscape galeon ].map { |x| ::Launchy::Argv.new( x ) } + %w[ firefox iceweasel seamonkey opera mozilla netscape galeon ].map { |x| ::Launchy::Argv.new( x ) } end def self.browsers @@ -42,7 +42,8 @@ class Gnome < NixDesktopEnvironment def self.is_current_desktop_environment? - ENV['GNOME_DESKTOP_SESSION_ID'] + ENV['GNOME_DESKTOP_SESSION_ID'] && + Launchy::Application.find_executable( 'gnome-open' ) end def self.browser @@ -60,7 +61,7 @@ end def self.browser - ::Launchy::Argv.new( 'exo-open' ) + ::Launchy::Argv.new( %w[ exo-open --launch WebBrowser ] ) end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/launchy/detect/runner.rb new/lib/launchy/detect/runner.rb --- old/lib/launchy/detect/runner.rb 2013-11-28 15:36:13.000000000 +0100 +++ new/lib/launchy/detect/runner.rb 2014-11-03 03:44:35.000000000 +0100 @@ -1,4 +1,5 @@ require 'shellwords' +require 'stringio' module Launchy::Detect class Runner @@ -113,23 +114,39 @@ end class Forkable < Runner + attr_reader :child_pid + def wet_run( cmd, *args ) - child_pid = fork do + @child_pid = fork do close_file_descriptors unless Launchy.debug? Launchy.log("wet_run: before exec in child process") - exec( *shell_commands( cmd, *args )) + exec_or_raise( cmd, *args ) exit! end - Process.detach( child_pid ) + Process.detach( @child_pid ) end + private + + # attaching to a StringIO instead of reopening so we don't loose the + # STDERR, needed for exec_or_raise. def close_file_descriptors - [$stdin, $stdout, $stderr].each do |io| - io.reopen( "/dev/null", "r+" ) - end + $stdin.reopen( "/dev/null") + + @saved_stdout = $stdout + @saved_stderr = $stderr + + $stdout = StringIO.new + $stderr = StringIO.new end - private :close_file_descriptors + def exec_or_raise( cmd, *args ) + exec( *shell_commands( cmd, *args )) + rescue Exception => e + $stderr = @saved_stderr + $stdout = @saved_stdout + raise e + end end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/launchy/version.rb new/lib/launchy/version.rb --- old/lib/launchy/version.rb 2013-11-28 15:36:13.000000000 +0100 +++ new/lib/launchy/version.rb 2014-11-03 03:44:35.000000000 +0100 @@ -1,5 +1,5 @@ module Launchy - VERSION = "2.4.2" + VERSION = "2.4.3" module Version diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2013-11-28 15:36:13.000000000 +0100 +++ new/metadata 2014-11-03 03:44:35.000000000 +0100 @@ -1,71 +1,71 @@ --- !ruby/object:Gem::Specification name: launchy version: !ruby/object:Gem::Version - version: 2.4.2 + version: 2.4.3 platform: ruby authors: - Jeremy Hinegardner autorequire: bindir: bin cert_chain: [] -date: 2013-11-28 00:00:00.000000000 Z +date: 2014-11-03 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: addressable requirement: !ruby/object:Gem::Requirement requirements: - - - ~> + - - "~>" - !ruby/object:Gem::Version version: '2.3' type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - - ~> + - - "~>" - !ruby/object:Gem::Version version: '2.3' - !ruby/object:Gem::Dependency name: rake requirement: !ruby/object:Gem::Requirement requirements: - - - ~> + - - "~>" - !ruby/object:Gem::Version version: '10.1' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - - ~> + - - "~>" - !ruby/object:Gem::Version version: '10.1' - !ruby/object:Gem::Dependency name: minitest requirement: !ruby/object:Gem::Requirement requirements: - - - ~> + - - "~>" - !ruby/object:Gem::Version version: '5.0' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - - ~> + - - "~>" - !ruby/object:Gem::Version version: '5.0' - !ruby/object:Gem::Dependency name: rdoc requirement: !ruby/object:Gem::Requirement requirements: - - - ~> + - - "~>" - !ruby/object:Gem::Version - version: '3.12' + version: '4.1' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - - ~> + - - "~>" - !ruby/object:Gem::Version - version: '3.12' + version: '4.1' description: Launchy is helper class for launching cross-platform applications in a fire and forget manner. There are application concepts (browser, email client, etc) that are common across all platforms, and they may be launched differently @@ -120,29 +120,30 @@ - tasks/default.rake - tasks/this.rb homepage: http://github.com/copiousfreetime/launchy -licenses: [] +licenses: +- ISC metadata: {} post_install_message: rdoc_options: -- --main +- "--main" - README.md -- --markup +- "--markup" - tomdoc require_paths: - lib required_ruby_version: !ruby/object:Gem::Requirement requirements: - - - '>=' + - - ">=" - !ruby/object:Gem::Version version: '0' required_rubygems_version: !ruby/object:Gem::Requirement requirements: - - - '>=' + - - ">=" - !ruby/object:Gem::Version version: '0' requirements: [] rubyforge_project: -rubygems_version: 2.1.11 +rubygems_version: 2.2.2 signing_key: specification_version: 4 summary: Launchy is helper class for launching cross-platform applications in a fire diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/applications/browser_spec.rb new/spec/applications/browser_spec.rb --- old/spec/applications/browser_spec.rb 2013-11-28 15:36:13.000000000 +0100 +++ new/spec/applications/browser_spec.rb 2014-11-03 03:44:35.000000000 +0100 @@ -51,5 +51,18 @@ browser.browser_cmdline.must_equal "do-this-instead" end + # NOTE: Unable to figure out how capture the stderr from the child which has + # moved it at least once. This test just serves the purpose of noting why + # something happens, and the proble we are attempting to fix. + it "When BROWSER is set to something that is not executable, error still appears on stderr" do + ENV['BROWSER'] = "not-an-app" + url = "http://example.com/" + + _, err = capture_subprocess_io do + Launchy.open( url ) + end + #err.must_match( /wibble/m ) + err # something + end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/detect/nix_desktop_environment_spec.rb new/spec/detect/nix_desktop_environment_spec.rb --- old/spec/detect/nix_desktop_environment_spec.rb 2013-11-28 15:36:13.000000000 +0100 +++ new/spec/detect/nix_desktop_environment_spec.rb 2014-11-03 03:44:35.000000000 +0100 @@ -10,19 +10,15 @@ Launchy.reset_global_options end - - { "KDE_FULL_SESSION" => Launchy::Detect::NixDesktopEnvironment::Kde, - "GNOME_DESKTOP_SESSION_ID" => Launchy::Detect::NixDesktopEnvironment::Gnome }.each_pair do |k,v| - it "can detect the desktop environment of a *nix machine using ENV[#{k}]" do - ENV.delete( "KDE_FULL_SESSION" ) - ENV.delete( "GNOME_DESKTOP_SESSION_ID" ) - ENV[k] = "launchy-test" - nix_env = Launchy::Detect::NixDesktopEnvironment.detect - nix_env.must_equal( v ) - nix_env.browser.must_equal( v.browser ) - ENV.delete( k ) - end - end + it "can detect the desktop environment of a KDE machine using ENV['KDE_FULL_SESSION']" do + ENV.delete( "KDE_FULL_SESSION" ) + ENV["KDE_FULL_SESSION"] = "launchy-test" + kde = Launchy::Detect::NixDesktopEnvironment::Kde + nix_env = Launchy::Detect::NixDesktopEnvironment.detect + nix_env.must_equal( kde ) + nix_env.browser.must_equal( kde.browser ) + ENV.delete( 'KDE_FULL_SESSION' ) + end it "returns false for XFCE if xprop is not found" do Launchy.host_os = "linux" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/detect/runner_spec.rb new/spec/detect/runner_spec.rb --- old/spec/detect/runner_spec.rb 2013-11-28 15:36:13.000000000 +0100 +++ new/spec/detect/runner_spec.rb 2014-11-03 03:44:35.000000000 +0100 @@ -100,5 +100,4 @@ cmd = l.dry_run( "not-really", [ url ] ) cmd.must_equal( "not-really #{url}" ) end - end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tasks/this.rb new/tasks/this.rb --- old/tasks/this.rb 2013-11-28 15:36:13.000000000 +0100 +++ new/tasks/this.rb 2014-11-03 03:44:35.000000000 +0100 @@ -176,7 +176,7 @@ if RUBY_VERSION < "1.9.0" platform_gemspec.add_development_dependency( 'rcov', '~> 1.0.0' ) else - platform_gemspec.add_development_dependency( 'simplecov', '~> 0.7.1' ) + platform_gemspec.add_development_dependency( 'simplecov', '~> 0.8' ) end end -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de