diff --git a/.gitignore b/.gitignore index d0b11d6..3cda3c3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /skeptic-0.13.4.crate +/skeptic-0.13.5.crate diff --git a/0001-Bump-pulldown-cmark-to-0.6.patch b/0001-Bump-pulldown-cmark-to-0.6.patch index fe55417..e4ddc33 100644 --- a/0001-Bump-pulldown-cmark-to-0.6.patch +++ b/0001-Bump-pulldown-cmark-to-0.6.patch @@ -1,4 +1,4 @@ -From 5464c90b9c083dab4dae89adf06f38fe3f3d8755 Mon Sep 17 00:00:00 2001 +From eae886def89134a34bec859c5d20d8c1b3b5baa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= Date: Thu, 1 Aug 2019 00:18:55 +0200 Subject: [PATCH 1/2] Bump pulldown-cmark to 0.6 @@ -8,14 +8,14 @@ Content-Transfer-Encoding: 8bit Signed-off-by: Robert-André Mauchin --- - lib.rs | 26 +++++++++----------------- + src/lib.rs | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) -diff --git a/lib.rs b/lib.rs -index 08c0066..bcf59bd 100644 ---- a/lib.rs -+++ b/lib.rs -@@ -169,7 +169,7 @@ fn extract_tests(config: &Config) -> Result { +diff --git a/src/lib.rs b/src/lib.rs +index 14ac237..557459d 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -174,7 +174,7 @@ fn extract_tests(config: &Config) -> Result { enum Buffer { None, Code(Vec), @@ -24,7 +24,7 @@ index 08c0066..bcf59bd 100644 } fn extract_tests_from_file(path: &Path) -> Result { -@@ -200,23 +200,15 @@ fn extract_tests_from_string(s: &str, file_stem: &str) -> (Vec, Option (Vec, Option (Vec, Option (Vec, Option -Date: Thu, 14 Mar 2019 10:23:11 +0100 -Subject: [PATCH] Bumped glob and cargo_metadata to latest version - -bumped minimal rust version to 1.26 due to usage of underscore lifetimes in cargo_metadata ---- - lib.rs | 19 ++++++++++--------- - 1 file changed, 10 insertions(+), 9 deletions(-) - -diff --git a/lib.rs b/lib.rs -index b24c5a2..2f47049 100644 ---- a/lib.rs -+++ b/lib.rs -@@ -38,7 +38,7 @@ pub fn markdown_files_of_directory(dir: &str) -> Vec { - }; - let mut out = Vec::new(); - -- for path in glob_with(&format!("{}/**/*.md", dir), &opts) -+ for path in glob_with(&format!("{}/**/*.md", dir), opts) - .expect("Failed to read glob pattern") - .filter_map(Result::ok) - { -@@ -549,14 +549,15 @@ pub mod rt { - dependencies: Vec, - } - -+ fn get_cargo_meta>(pth: P) -> Result { -+ Ok(cargo_metadata::MetadataCommand::new().manifest_path(&pth).exec()?) -+ } -+ - impl LockedDeps { - fn from_path>(pth: P) -> Result { - let pth = pth.as_ref().join("Cargo.toml"); -- let metadata = cargo_metadata::metadata_deps(Some(&pth), true)?; -- let workspace_members:Vec = metadata.workspace_members -- .into_iter() -- .map(|workspace| {format!("{} {} ({})", workspace.name(), workspace.version(), workspace.url())}) -- .collect(); -+ let metadata = get_cargo_meta(&pth)?; -+ let workspace_members = metadata.workspace_members; - let deps = metadata.resolve.ok_or("Missing dependency metadata")? - .nodes - .into_iter() -@@ -564,7 +565,7 @@ pub mod rt { - .flat_map(|node| node.dependencies.into_iter()) - .chain(workspace_members.clone()); - -- Ok(LockedDeps { dependencies: deps.collect() }) -+ Ok(LockedDeps { dependencies: deps.map(|node| node.repr ).collect() }) - } - } - -@@ -655,8 +656,8 @@ pub mod rt { - - fn get_edition>(path: P) -> Result { - let path = path.as_ref().join("Cargo.toml"); -- let manifest = cargo_metadata::metadata(Some(&path))?; -- let edition = manifest.packages.iter() -+ let metadata = get_cargo_meta(&path)?; -+ let edition = metadata.packages.iter() - .map(|package| &package.edition) - .max_by_key(|edition| u64::from_str(edition).unwrap()) - .unwrap() --- -2.25.0 - diff --git a/0002-chore-Update-pulldown-cmark-to-0.7.patch b/0002-chore-Update-pulldown-cmark-to-0.7.patch index 0603ebb..d126b71 100644 --- a/0002-chore-Update-pulldown-cmark-to-0.7.patch +++ b/0002-chore-Update-pulldown-cmark-to-0.7.patch @@ -1,27 +1,26 @@ -From 4c58547f971776f63db9f8735c67ca4178596449 Mon Sep 17 00:00:00 2001 +From 7d8af9889d8bcef4031ca1373819342480c681ab Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Sat, 22 Feb 2020 19:03:02 +0100 Subject: [PATCH 2/2] chore: Update pulldown-cmark to 0.7 -Signed-off-by: Igor Raits --- - lib.rs | 12 ++++++------ + src/lib.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -diff --git a/lib.rs b/lib.rs -index bcf59bd..f8d1295 100644 ---- a/lib.rs -+++ b/lib.rs -@@ -11,7 +11,7 @@ use std::io::{self, Read, Write, Error as IoError}; - use std::mem; - use std::path::{PathBuf, Path}; - use std::collections::HashMap; --use cmark::{Parser, Event, Tag}; -+use cmark::{Parser, Event, Tag, CodeBlockKind}; +diff --git a/src/lib.rs b/src/lib.rs +index 557459d..eff9a12 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -5,7 +5,7 @@ extern crate glob; + extern crate pulldown_cmark as cmark; + extern crate tempfile; - /// Returns a list of markdown files under a directory. - /// -@@ -194,7 +194,7 @@ fn extract_tests_from_file(path: &Path) -> Result { +-use cmark::{Event, Parser, Tag}; ++use cmark::{CodeBlockKind, Event, Parser, Tag}; + use std::collections::HashMap; + use std::env; + use std::fs::File; +@@ -199,7 +199,7 @@ fn extract_tests_from_file(path: &Path) -> Result { fn extract_tests_from_string(s: &str, file_stem: &str) -> (Vec, Option) { let mut tests = Vec::new(); let mut buffer = Buffer::None; @@ -30,7 +29,7 @@ index bcf59bd..f8d1295 100644 let mut section = None; let mut code_block_start = 0; // Oh this isn't actually a test but a legacy template -@@ -212,7 +212,7 @@ fn extract_tests_from_string(s: &str, file_stem: &str) -> (Vec, Option (Vec, Option (Vec, Option (Vec, Option Result, IoError> { +@@ -282,7 +282,7 @@ fn load_templates(path: &Path) -> Result, IoError> { for event in parser { match event { @@ -57,7 +56,7 @@ index bcf59bd..f8d1295 100644 let code_block_info = parse_code_block_info(info); if code_block_info.is_rust { code_buffer = Some(Vec::new()); -@@ -288,7 +288,7 @@ fn load_templates(path: &Path) -> Result, IoError> { +@@ -293,7 +293,7 @@ fn load_templates(path: &Path) -> Result, IoError> { buf.push(text.to_string()); } } @@ -67,5 +66,5 @@ index bcf59bd..f8d1295 100644 if let Some(buf) = code_buffer.take() { if let Some(t) = code_block_info.template { -- -2.25.0 +2.30.0.rc2 diff --git a/rust-skeptic.spec b/rust-skeptic.spec index d9d947f..214833f 100644 --- a/rust-skeptic.spec +++ b/rust-skeptic.spec @@ -1,4 +1,4 @@ -# Generated by rust2rpm 13 +# Generated by rust2rpm 16 # * Needs test files not provided in the crate %bcond_with check %global debug_package %{nil} @@ -6,24 +6,19 @@ %global crate skeptic Name: rust-%{crate} -Version: 0.13.4 -Release: 10%{?dist} +Version: 0.13.5 +Release: 1%{?dist} Summary: Test your Rust markdown documentation via Cargo # Upstream license specification: MIT/Apache-2.0 -# https://github.com/budziq/rust-skeptic/pull/98 License: MIT or ASL 2.0 URL: https://crates.io/crates/skeptic Source: %{crates_source} # Initial patched metadata -# - Bump bytecount to 0.6 (upstreamed) -# - Bump cargo_metadata to 0.9 https://github.com/budziq/rust-skeptic/pull/107 -# - Bump glob to 0.3 (upstreamed) -# * Bump pulldown-cmark to 0.7, https://github.com/budziq/rust-skeptic/pull/116 +# * Bump pulldown-cmark to 0.7, https://github.com/budziq/rust-skeptic/pull/126 Patch0: skeptic-fix-metadata.diff -Patch0001: 0001-Bumped-glob-and-cargo_metadata-to-latest-version.patch -Patch0002: 0001-Bump-pulldown-cmark-to-0.6.patch -Patch0003: 0002-chore-Update-pulldown-cmark-to-0.7.patch +Patch0001: 0001-Bump-pulldown-cmark-to-0.6.patch +Patch0002: 0002-chore-Update-pulldown-cmark-to-0.7.patch ExclusiveArch: %{rust_arches} %if %{__cargo_skip_build} @@ -47,6 +42,7 @@ This package contains library source intended for building other packages which use "%{crate}" crate. %files devel +%license LICENSE-MIT LICENSE-APACHE %doc README.md %{cargo_registry}/%{crate}-%{version_no_tilde}/ @@ -81,6 +77,9 @@ which use "default" feature of "%{crate}" crate. %endif %changelog +* Fri Dec 25 12:18:32 CET 2020 Igor Raits - 0.13.5-1 +- Update to 0.13.5 + * Sat Aug 01 2020 Fedora Release Engineering - 0.13.4-10 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/skeptic-fix-metadata.diff b/skeptic-fix-metadata.diff index eadd720..de4effd 100644 --- a/skeptic-fix-metadata.diff +++ b/skeptic-fix-metadata.diff @@ -1,27 +1,11 @@ ---- skeptic-0.13.4/Cargo.toml 1970-01-01T00:00:00+00:00 -+++ skeptic-0.13.4/Cargo.toml 2020-02-22T18:15:33.364847+00:00 -@@ -27,20 +27,20 @@ - name = "skeptic" - path = "lib.rs" - [dependencies.bytecount] --version = "0.4" -+version = "0.6" - - [dependencies.cargo_metadata] --version = "0.6" -+version = "0.9" - - [dependencies.error-chain] - version = "0.12" - default-features = false - - [dependencies.glob] --version = "0.2" -+version = "0.3" +--- skeptic-0.13.5/Cargo.toml 2020-10-29T14:33:10+00:00 ++++ skeptic-0.13.5/Cargo.toml 2020-12-25T11:18:32.572704+00:00 +@@ -36,7 +36,7 @@ + version = "0.3" [dependencies.pulldown-cmark] -version = "0.2" -+version = "0.7" ++version = "0.8" default-features = false - [dependencies.serde_json] + [dependencies.tempfile] diff --git a/sources b/sources index a0f000b..fe1a018 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (skeptic-0.13.4.crate) = ae0c236f9857ec8d82c2733f4f555e5fa0f0530a08105015d933fe5717c41b56d096c6c140e2d7a302a2c16ba7cd962213bdb3a6adbe084c55704e71902d8edb +SHA512 (skeptic-0.13.5.crate) = c9764be9cc237592439feb401151736078e98b360aed04c3b2451e4db258b0f634d2dd4cac1d0792b23f946ef4ffaeafb27982519940798d00721ea12e0de105