lib/cutting_edge/langs/rust.rb in cutting_edge-0.0.1 vs lib/cutting_edge/langs/rust.rb in cutting_edge-0.1
- old
+ new
@@ -16,10 +16,14 @@
# Defaults for projects in this language
def locations(name = nil)
['Cargo.toml']
end
+
+ def website(name)
+ "https://crates.io/crates/#{name}"
+ end
# Parse a dependency file
#
# name - String contents of the file
# content - String contents of the file
@@ -42,10 +46,10 @@
version = content['crate']['max_version']
Gem::Version.new(canonical_version(version))
rescue StandardError, HTTP::Error => e
log_error("Encountered error when fetching latest version of #{name}: #{e.class} #{e.message}")
nil
- end
+ end
end
# Translate Cargo version requirement syntax to a String or Array of Strings that Gem::Dependency.new understands
# Cargo.toml files support * and ^ (wildcard and caret) requirements, which Ruby does not
# See: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html
\ No newline at end of file