Skip to content

Commit

Permalink
patch daru as part of the packaging to hide unnecessary warning messages
Browse files Browse the repository at this point in the history
As SciRuby simply refuse to merge an PR from 2017 - which would have fixed this

(SciRuby/statsample#69)
  • Loading branch information
IsmailM committed Jun 11, 2021
1 parent 34f5d6c commit 6a302eb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
11 changes: 11 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,17 @@ namespace :package do
cd 'gems' do
mkdir APP_NAME
%w[aux lib].each { |d| cp_r "#{Rake.original_dir}/#{d}", APP_NAME }

# patch daru lib to hide unneccessary messages
cd 'daru-0.1.6/lib' do
orig = "'spreadsheet' => '~>1.1.1', 'mechanize' => '~>2.7.5'"
sh "sed \"s/#{orig}//\" daru.rb > daru.rb-1"
sh "rm daru.rb"

orig = "require 'backports'"
sh "sed \"s/#{orig}/# #{orig}/\" daru.rb-1 > daru.rb"
sh "rm daru.rb-1"
end
end

cd 'specifications' do
Expand Down
6 changes: 0 additions & 6 deletions genevalidator.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ Gem::Specification.new do |s|
s.add_dependency 'slim', '~>3.0'
s.add_dependency 'statsample', '2.1.0'

# Adding mechanize gem just to silence a message on load.
# This is due the Statsample gem
# See https://github.com/SciRuby/daru/issues/404
# See https://github.com/SciRuby/statsample/pull/69
s.add_dependency 'mechanize', '2.7.5'

s.files = `git ls-files -z`.split("\x0")
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
s.test_files = s.files.grep(%r{^(test|spec|features)/})
Expand Down

0 comments on commit 6a302eb

Please sign in to comment.