Rakefile in rbs-2.5.1 vs Rakefile in rbs-2.6.0
- old
+ new
@@ -52,51 +52,19 @@
sh "#{ruby} #{__dir__}/bin/run_in_md.rb #{files.join(" ")}"
end
task :validate => :compile do
+ require 'yaml'
+
sh "#{ruby} #{rbs} validate --silent"
FileList["stdlib/*"].each do |path|
lib = [File.basename(path).to_s]
-
- if lib == ["bigdecimal-math"]
- lib << "bigdecimal"
- end
-
- if lib == ["yaml"]
- lib << "dbm"
- lib << "pstore"
- end
-
- if lib == ["logger"]
- lib << "monitor"
- end
-
- if lib == ["cgi"]
- lib << "tempfile"
- end
-
- if lib == ["csv"]
- lib << "forwardable"
- end
-
- if lib == ["prime"]
- lib << "singleton"
- end
-
- if lib == ["net-http"]
- lib << "uri"
- lib << "timeout"
- end
-
- if lib == ["resolv"]
- lib << "socket"
- lib << "timeout"
- end
-
- if lib == ["openssl"]
- lib << "socket"
+ if File.exist?("#{path}/0/manifest.yaml")
+ YAML.load_file("#{path}/0/manifest.yaml")["dependencies"].each do |dep|
+ lib << dep["name"]
+ end
end
sh "#{ruby} #{rbs} #{lib.map {|l| "-r #{l}"}.join(" ")} validate --silent"
end
end