gnu: ruby-atoulme-saikuro: Enable tests.
* gnu/packages/ruby.scm (ruby-atoulme-saikuro) [propagated-inputs]: Add ruby-irb-1.1.1 and ruby-e2mmap. [arguments]: Enable tests. Signed-off-by: Christopher Baines <mail@cbaines.net>
This commit is contained in:
		
							parent
							
								
									54e083cef1
								
							
						
					
					
						commit
						93a5378b00
					
				
					 1 changed files with 21 additions and 3 deletions
				
			
		| 
						 | 
					@ -1306,9 +1306,27 @@ script.")
 | 
				
			||||||
               (base32
 | 
					               (base32
 | 
				
			||||||
                "0kvd2nsxffbza61d3q4j94wrbnbv50r1zy3a7q26f6k706fw1f19"))))
 | 
					                "0kvd2nsxffbza61d3q4j94wrbnbv50r1zy3a7q26f6k706fw1f19"))))
 | 
				
			||||||
    (build-system ruby-build-system)
 | 
					    (build-system ruby-build-system)
 | 
				
			||||||
    ;; FIXME: There are no unit tests.  The tests are demonstrations of the
 | 
					    (arguments
 | 
				
			||||||
    ;; "saikuro" tool.
 | 
					     (list
 | 
				
			||||||
    (arguments `(#:tests? #f))
 | 
					      #:phases
 | 
				
			||||||
 | 
					      #~(modify-phases %standard-phases
 | 
				
			||||||
 | 
					          (add-after 'unpack 'fix-module-resolution
 | 
				
			||||||
 | 
					            (lambda _
 | 
				
			||||||
 | 
					              (substitute* "lib/saikuro.rb"
 | 
				
			||||||
 | 
					                ;; irb 1.2.0 or later doesn't have RubyToken
 | 
				
			||||||
 | 
					                (("require 'irb/ruby-lex'")
 | 
				
			||||||
 | 
					                 "require 'rubygems'\ngem 'irb', '=1.1.1'\nrequire 'irb/ruby-lex'"))))
 | 
				
			||||||
 | 
					          (delete 'check)
 | 
				
			||||||
 | 
					          (add-after 'install 'check
 | 
				
			||||||
 | 
					            (lambda* (#:key outputs #:allow-other-keys)
 | 
				
			||||||
 | 
					              (let* ((out (assoc-ref outputs "out"))
 | 
				
			||||||
 | 
					                     (saikuro (string-append out "/bin/saikuro")))
 | 
				
			||||||
 | 
					                (setenv "GEM_PATH" (string-append
 | 
				
			||||||
 | 
					                                    (getenv "GEM_PATH") ":"
 | 
				
			||||||
 | 
					                                    #$output "/lib/ruby/vendor_ruby"))
 | 
				
			||||||
 | 
					                (invoke saikuro "--cyclo" "--token" "--input_directory" "tests")))))))
 | 
				
			||||||
 | 
					    (propagated-inputs (list ruby-irb-1.1.1
 | 
				
			||||||
 | 
					                             ruby-e2mmap)) ;required by rubygems
 | 
				
			||||||
    (synopsis "Cyclomatic complexity analyzer")
 | 
					    (synopsis "Cyclomatic complexity analyzer")
 | 
				
			||||||
    (description "Saikuro is a Ruby cyclomatic complexity analyzer.  When
 | 
					    (description "Saikuro is a Ruby cyclomatic complexity analyzer.  When
 | 
				
			||||||
given Ruby source code Saikuro will generate a report listing the cyclomatic
 | 
					given Ruby source code Saikuro will generate a report listing the cyclomatic
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue