diff options
author | Ben Woodcroft <donttrustben@gmail.com> | 2018-02-05 12:02:01 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2018-08-05 17:15:44 +0100 |
commit | dd8ee66aa520227f6850721ba9ac77cc48db11d8 (patch) | |
tree | 32bc9f5fa0eeb428e5b1bb61b920b9794c9e945f | |
parent | 0fdd61091e256e1b929647e7cbc3ee5d7bb78bd0 (diff) | |
download | guix-dd8ee66aa520227f6850721ba9ac77cc48db11d8.tar guix-dd8ee66aa520227f6850721ba9ac77cc48db11d8.tar.gz |
gnu: Add tests for ruby-listen.
-rw-r--r-- | gnu/local.mk | 1 | ||||
-rw-r--r-- | gnu/packages/patches/ruby-listen-patch-gemspec.patch | 16 | ||||
-rw-r--r-- | gnu/packages/ruby.scm | 35 |
3 files changed, 44 insertions, 8 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 717b3e9d0d..76ab50fd17 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1122,6 +1122,7 @@ dist_patch_DATA = \ %D%/packages/patches/ruby-concurrent-test-arm.patch \ %D%/packages/patches/ruby-rack-ignore-failing-test.patch \ %D%/packages/patches/ruby-rspec-its-remove-rspec-gemspec.patch\ + %D%/packages/patches/ruby-listen-patch-gemspec.patch \ %D%/packages/patches/ruby-tzinfo-data-ignore-broken-test.patch\ %D%/packages/patches/rust-bootstrap-stage0-test.patch \ %D%/packages/patches/rust-coresimd-doctest.patch \ diff --git a/gnu/packages/patches/ruby-listen-patch-gemspec.patch b/gnu/packages/patches/ruby-listen-patch-gemspec.patch new file mode 100644 index 0000000000..dd4b190b3e --- /dev/null +++ b/gnu/packages/patches/ruby-listen-patch-gemspec.patch @@ -0,0 +1,16 @@ +diff --git a/listen.gemspec b/listen.gemspec +index 4e110b0..cda047b 100644 +--- a/listen.gemspec ++++ b/listen.gemspec +@@ -14,9 +14,8 @@ Gem::Specification.new do |s| + s.description = 'The Listen gem listens to file modifications and '\ + 'notifies you about the changes. Works everywhere!' + +- s.files = `git ls-files -z`.split("\x0").select do |f| +- %r{^(?:bin|lib)\/} =~ f +- end + %w(CHANGELOG.md CONTRIBUTING.md LICENSE.txt README.md) ++ s.files = `find bin lib -type f |sort`.split("\n") + ++ %w(CHANGELOG.md CONTRIBUTING.md LICENSE.txt README.md) + + s.test_files = [] + s.executable = 'listen' diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 2c8a84cefd..b322590425 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -4341,18 +4341,37 @@ a native C extension.") (source (origin (method url-fetch) - (uri (rubygems-uri "listen" version)) + ;; The gem does not include a Rakefile, so we fetch the tarball from + ;; Github. + (uri (string-append "https://github.com/guard/listen/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "01v5mrnfqm6sgm8xn2v5swxsn1wlmq7rzh2i48d4jzjsc7qvb6mx")))) + "0f0mx4nzpd17svvmkcb2q66w3gdvs1zkrpc0p3wq1s2va5b5cnss")) + (patches (search-patches "ruby-listen-patch-gemspec.patch")))) (build-system ruby-build-system) - (arguments '(#:tests? #f)) ; no tests + (arguments + `(#:test-target "spec" + #:phases + (modify-phases %standard-phases + (add-before 'check 'fix-dependencies' + (lambda _ + (substitute* "Rakefile" + ((".*rubocop.*") "")) + #t))))) + (native-inputs + `(("bundler" ,bundler) + ("ruby-rspec" ,ruby-rspec) + ("ruby-coveralls" ,ruby-coveralls))) (propagated-inputs - `(("ruby-rb-inotify" ,ruby-rb-inotify) - ("ruby-rb-fsevent" ,ruby-rb-fsevent))) - (synopsis "Listen to file modifications") - (description "The Listen gem listens to file modifications and notifies -you about the changes.") + `(("ruby-rb-fsevent" ,ruby-rb-fsevent) + ("ruby-rb-inotify" ,ruby-rb-inotify) + ("ruby-ruby-dep" ,ruby-ruby-dep))) + (synopsis + "The Listen gem listens to file modifications and notifies you about the changes. Works everywhere!") + (description + "The Listen gem listens to file modifications and notifies you about the changes. Works everywhere!") (home-page "https://github.com/guard/listen") (license license:expat))) |