From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:58904) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goAqH-0008QY-EQ for guix-patches@gnu.org; Mon, 28 Jan 2019 12:37:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1goAqF-0001Nl-FS for guix-patches@gnu.org; Mon, 28 Jan 2019 12:37:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:50148) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1goAqF-0001NY-BH for guix-patches@gnu.org; Mon, 28 Jan 2019 12:37:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1goAqF-0001S4-8H for guix-patches@gnu.org; Mon, 28 Jan 2019 12:37:03 -0500 Subject: [bug#30689] [PATCH 15/39] gnu: ruby-parallel: Begin to enable tests and update version. Resent-Message-ID: From: Christopher Baines Date: Mon, 28 Jan 2019 17:35:56 +0000 Message-Id: <20190128173620.27999-15-mail@cbaines.net> In-Reply-To: <20190128173620.27999-1-mail@cbaines.net> References: <87h8dshesk.fsf@cbaines.net> <20190128173620.27999-1-mail@cbaines.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 30689@debbugs.gnu.org * gnu/packages/ruby.scm (ruby-parallel): Update to 1.13.0. [source]: Switch to the Git repository. [arguments]: Change the #:test-target, and modify some phases. [native-inputs]: Add packages required for running the tests. --- gnu/packages/ruby.scm | 62 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 54 insertions(+), 8 deletions(-) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 4c21c8c04a..8e2c18933e 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -36,11 +36,14 @@ #:use-module (gnu packages compression) #:use-module (gnu packages databases) #:use-module (gnu packages dbm) + #:use-module (gnu packages rails) #:use-module (gnu packages readline) #:use-module (gnu packages autotools) #:use-module (gnu packages java) #:use-module (gnu packages libffi) #:use-module (gnu packages libidn) + #:use-module (gnu packages linux) + #:use-module (gnu packages lsof) #:use-module (gnu packages maths) #:use-module (gnu packages ncurses) #:use-module (gnu packages networking) @@ -6638,15 +6641,58 @@ interface. It allows Jekyll to rebuild your site when a file changes.") (define-public ruby-parallel (package (name "ruby-parallel") - (version "1.12.1") - (source (origin - (method url-fetch) - (uri (rubygems-uri "parallel" version)) - (sha256 - (base32 - "01hj8v1qnyl5ndrs33g8ld8ibk0rbcqdpkpznr04gkbxd11pqn67")))) + (version "1.13.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/grosser/parallel.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1isqzbqxz2ndad4i5z3lb9ldrhaijfncj8bmffv04sq44sv87ikv")))) (build-system ruby-build-system) - (arguments `(#:tests? #f)); No rakefile + (arguments + `(;; TODO 3 test failures + ;; rspec ./spec/parallel_spec.rb:190 # Parallel.in_processes does not + ;; open unnecessary pipes + ;; rspec './spec/parallel_spec.rb[1:9:7]' # Parallel.each works with + ;; SQLite in processes + ;; rspec './spec/parallel_spec.rb[1:9:16]' # Parallel.each works with + ;; SQLite in threads + #:tests? #f + #:test-target "rspec-rerun:spec" + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-Gemfile + (lambda _ + (substitute* "Gemfile" + (("gem 'rspec-legacy_formatters'") "") + (("gem 'activerecord.*$") "gem 'activerecord'\n")))) + (add-before 'check 'delete-Gemfile.lock + (lambda _ + ;; Bundler isn't being used for fetching dependendencies, so + ;; delete the Gemfile.lock + (delete-file "Gemfile.lock") + #t)) + (add-before 'build 'patch-gemspec + (lambda _ + (substitute* "parallel.gemspec" + (("git ls-files") "find")) + #t))))) + (native-inputs + `(("ruby-rspec" ,ruby-rspec) + ("ruby-rspec-rerun" ,ruby-rspec-rerun) + ("bundler" ,bundler) + ("ruby-activerecord" ,ruby-activerecord) + ("ruby-ruby-progressbar" ,ruby-ruby-progressbar) + ("ruby-bump" ,ruby-bump) + ("procps" ,procps) + ("lsof" ,lsof) + ("ruby-mysql2" ,ruby-mysql2) + ("ruby-sqlite3" ,ruby-sqlite3) + ("ruby-i18n" ,ruby-i18n))) (home-page "https://github.com/grosser/parallel") (synopsis "Parallel processing in Ruby") (description "Parallel allows you to run any code in parallel Processes -- 2.20.1