Perhaps the regex has gone out of date as we've used different ways to specify dependency versions.
IO.read('Cargo.toml').split('[dependencies]').last.split("\n").
select {|line| line =~ /=/ }.
each {|line| puts "%s\t%s" % line.match(/(\S+)[ ="']{1,4}([\d.]+)["']?/).captures }
puts
Output:
NoMethodError: undefined method `captures' for nil:NilClass
/home/danielpclark/dev/faster_path/Rakefile:14:in `block (2 levels) in <top (required)>'
/home/danielpclark/dev/faster_path/Rakefile:14:in `each'
/home/danielpclark/dev/faster_path/Rakefile:14:in `block in <top (required)>'
/home/danielpclark/.rvm/gems/ruby-2.5.0@global/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
/home/danielpclark/.rvm/gems/ruby-2.5.0/bin/ruby_executable_hooks:15:in `eval'
/home/danielpclark/.rvm/gems/ruby-2.5.0/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => sysinfo
(See full trace by running task with --trace)
I think the Github dependency references have much to do with this.
Perhaps the regex has gone out of date as we've used different ways to specify dependency versions.
Output:
I think the Github dependency references have much to do with this.