aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/ruby.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/ruby.scm')
-rw-r--r--gnu/packages/ruby.scm41
1 files changed, 41 insertions, 0 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index a307a7c796..55cd78bc66 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -5890,3 +5890,44 @@ will probably be an issue and hence this gem.")
(home-page
"https://github.com/pboling/rspec-pending_for")
(license #f)))
+
+(define-public ruby_version ; There is another gem called 'ruby-version' so we
+ ; use an underscore in this name
+ (package
+ (name "ruby_version")
+ (version "1.0.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (rubygems-uri "ruby_version" version))
+ (sha256
+ (base32
+ "0854i1bjy56176anr05l5m0vc81nl53c7fyfg7sljj62m1d64dgj"))))
+ (build-system ruby-build-system)
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'fix-dependencies
+ (lambda _
+ (delete-file "Gemfile.lock")
+ (delete-file "pkg/ruby_version-1.0.0.gem")
+ (substitute* "ruby_version.gemspec"
+ ((".*rdoc.*") "\n")
+ (("rake.*") "rake>)\n")
+ ((".*rubygems-tasks.*") "\n"))
+ (substitute* "Rakefile"
+ (("^require 'rubygems/tasks'") "")
+ (("Gem::Tasks.new") ""))
+ #t)))))
+ (native-inputs
+ `(("bundler" ,bundler)
+ ("ruby-rspec" ,ruby-rspec-2)
+ ("ruby-rake" ,ruby-rake)))
+ (synopsis
+ "Provides a RubyVersion class to simplify checking for the right Ruby version in your programs.")
+ (description
+ "Provides a RubyVersion class to simplify checking for the right Ruby version in your programs.")
+ (home-page
+ "https://github.com/janlelis/ruby_version")
+ (license license:expat)))