Skip to content

Commit 6a302eb

Browse files
committed
patch daru as part of the packaging to hide unnecessary warning messages
As SciRuby simply refuse to merge an PR from 2017 - which would have fixed this (SciRuby/statsample#69)
1 parent 34f5d6c commit 6a302eb

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

Rakefile

+11
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,17 @@ namespace :package do
222222
cd 'gems' do
223223
mkdir APP_NAME
224224
%w[aux lib].each { |d| cp_r "#{Rake.original_dir}/#{d}", APP_NAME }
225+
226+
# patch daru lib to hide unneccessary messages
227+
cd 'daru-0.1.6/lib' do
228+
orig = "'spreadsheet' => '~>1.1.1', 'mechanize' => '~>2.7.5'"
229+
sh "sed \"s/#{orig}//\" daru.rb > daru.rb-1"
230+
sh "rm daru.rb"
231+
232+
orig = "require 'backports'"
233+
sh "sed \"s/#{orig}/# #{orig}/\" daru.rb-1 > daru.rb"
234+
sh "rm daru.rb-1"
235+
end
225236
end
226237

227238
cd 'specifications' do

genevalidator.gemspec

-6
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ Gem::Specification.new do |s|
2929
s.add_dependency 'slim', '~>3.0'
3030
s.add_dependency 'statsample', '2.1.0'
3131

32-
# Adding mechanize gem just to silence a message on load.
33-
# This is due the Statsample gem
34-
# See https://github.com/SciRuby/daru/issues/404
35-
# See https://github.com/SciRuby/statsample/pull/69
36-
s.add_dependency 'mechanize', '2.7.5'
37-
3832
s.files = `git ls-files -z`.split("\x0")
3933
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
4034
s.test_files = s.files.grep(%r{^(test|spec|features)/})

0 commit comments

Comments
 (0)