gnu: ruby-hamster: Fix build.
* gnu/packages/ruby.scm (ruby-hamster)[arguments]: Run tests with ruby-2.7 and update style.
This commit is contained in:
		
							parent
							
								
									fd2a01d564
								
							
						
					
					
						commit
						81a2a0f8d1
					
				
					 1 changed files with 22 additions and 21 deletions
				
			
		| 
						 | 
					@ -3698,27 +3698,28 @@ engine.")
 | 
				
			||||||
          "1n1lsh96vnyc1pnzyd30f9prcsclmvmkdb3nm5aahnyizyiy6lar"))))
 | 
					          "1n1lsh96vnyc1pnzyd30f9prcsclmvmkdb3nm5aahnyizyiy6lar"))))
 | 
				
			||||||
  (build-system ruby-build-system)
 | 
					  (build-system ruby-build-system)
 | 
				
			||||||
  (arguments
 | 
					  (arguments
 | 
				
			||||||
   '(#:phases
 | 
					   (list
 | 
				
			||||||
     (modify-phases %standard-phases
 | 
					    ;; Only supports Ruby 2 currently
 | 
				
			||||||
       (add-after 'unpack 'remove-unnecessary-dependencies
 | 
					    #:ruby ruby-2.7
 | 
				
			||||||
         (lambda _
 | 
					    #:phases
 | 
				
			||||||
           ;; pry is a debugging tool, and is unnecessary when running the
 | 
					    #~(modify-phases %standard-phases
 | 
				
			||||||
           ;; tests
 | 
					        (add-after 'unpack 'remove-unnecessary-dependencies
 | 
				
			||||||
           (substitute* "spec/lib/hamster/vector/insert_spec.rb"
 | 
					          (lambda _
 | 
				
			||||||
             (("require 'pry'") ""))
 | 
					            ;; pry is a debugging tool, and is unnecessary when running the
 | 
				
			||||||
           (substitute* "spec/spec_helper.rb"
 | 
					            ;; tests
 | 
				
			||||||
             (("require \"pry\"") "")
 | 
					            (substitute* "spec/lib/hamster/vector/insert_spec.rb"
 | 
				
			||||||
             ;; CodeClimate is an online service, and is unnecessary for
 | 
					              (("require 'pry'") ""))
 | 
				
			||||||
             ;; running the tests
 | 
					            (substitute* "spec/spec_helper.rb"
 | 
				
			||||||
             (("require \"codeclimate-test-reporter\"") "")
 | 
					              (("require \"pry\"") "")
 | 
				
			||||||
             (("CodeClimate.*\n") ""))
 | 
					              ;; CodeClimate is an online service, and is unnecessary for
 | 
				
			||||||
           #t))
 | 
					              ;; running the tests
 | 
				
			||||||
       ;; No Rakefile is included, so run rspec directly.
 | 
					              (("require \"codeclimate-test-reporter\"") "")
 | 
				
			||||||
       (replace 'check
 | 
					              (("CodeClimate.*\n") ""))))
 | 
				
			||||||
         (lambda* (#:key tests? #:allow-other-keys)
 | 
					        ;; No Rakefile is included, so run rspec directly.
 | 
				
			||||||
           (when tests?
 | 
					        (replace 'check
 | 
				
			||||||
             (invoke "rspec"))
 | 
					          (lambda* (#:key tests? #:allow-other-keys)
 | 
				
			||||||
           #t)))))
 | 
					            (when tests?
 | 
				
			||||||
 | 
					              (invoke "ruby" (which "rspec"))))))))
 | 
				
			||||||
  (propagated-inputs
 | 
					  (propagated-inputs
 | 
				
			||||||
   (list ruby-concurrent))
 | 
					   (list ruby-concurrent))
 | 
				
			||||||
  (native-inputs
 | 
					  (native-inputs
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue