pub const RUBOCOP: &str = "1.84.2";
pub const GEMS: &[(&str, &str)] = &[
("rubocop-rails", "2.34.3"),
("rubocop-performance", "1.26.1"),
("rubocop-rspec", "3.9.0"),
("rubocop-rspec_rails", "2.32.0"),
("rubocop-factory_bot", "2.28.0"),
];
pub const ABOUT: &str = concat!(
"Fast RuboCop-compatible Ruby linter (tree-sitter)\n",
"Corresponds to rubocop 1.84.2 with rubocop-rails 2.34.3, rubocop-performance 1.26.1, ",
"rubocop-rspec 3.9.0, rubocop-rspec_rails 2.32.0, rubocop-factory_bot 2.28.0"
);
pub const VERSION: &str = concat!(
env!("CARGO_PKG_VERSION"),
" (corresponds to rubocop 1.84.2 with rubocop-rails 2.34.3, rubocop-performance 1.26.1, ",
"rubocop-rspec 3.9.0, rubocop-rspec_rails 2.32.0, rubocop-factory_bot 2.28.0)"
);
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn about_and_version_match_baseline_json() {
let raw: serde_json::Map<String, serde_json::Value> =
serde_json::from_str(include_str!("resources/baseline.json")).unwrap();
for (name, ver) in raw {
let needle = format!("{name} {}", ver.as_str().unwrap());
assert!(ABOUT.contains(&needle), "{needle} missing from ABOUT");
assert!(VERSION.contains(&needle), "{needle} missing from VERSION");
}
assert_eq!(RUBOCOP, "1.84.2");
assert_eq!(GEMS.len(), 5);
}
}