Update to 0.13.5

Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
epel9
Igor Raits 4 years ago
parent 7446945178
commit 61c45634ac
No known key found for this signature in database
GPG Key ID: 115D5AB89C5C1E1E

1
.gitignore vendored

@ -1 +1,2 @@
/skeptic-0.13.4.crate
/skeptic-0.13.5.crate

@ -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?= <zebob.m@gmail.com>
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 <zebob.m@gmail.com>
---
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<DocTestSuite, IoError> {
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<DocTestSuite, IoError> {
enum Buffer {
None,
Code(Vec<String>),
@ -24,7 +24,7 @@ index 08c0066..bcf59bd 100644
}
fn extract_tests_from_file(path: &Path) -> Result<DocTest, IoError> {
@@ -200,23 +200,15 @@ fn extract_tests_from_string(s: &str, file_stem: &str) -> (Vec<Test>, Option<Str
@@ -205,23 +205,15 @@ fn extract_tests_from_string(s: &str, file_stem: &str) -> (Vec<Test>, Option<Str
// Oh this isn't actually a test but a legacy template
let mut old_template = None;
@ -54,7 +54,7 @@ index 08c0066..bcf59bd 100644
section = Some(sanitize_test_name(&sect));
}
}
@@ -231,8 +223,8 @@ fn extract_tests_from_string(s: &str, file_stem: &str) -> (Vec<Test>, Option<Str
@@ -236,8 +228,8 @@ fn extract_tests_from_string(s: &str, file_stem: &str) -> (Vec<Test>, Option<Str
if buf.is_empty() {
code_block_start = line_number;
}
@ -66,5 +66,5 @@ index 08c0066..bcf59bd 100644
}
}
--
2.25.0
2.30.0.rc2

@ -1,67 +0,0 @@
From 765ec44a41410de6190af2067b3f1f9ca1dc170e Mon Sep 17 00:00:00 2001
From: Michal Budzynski <budziq@gmail.com>
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<PathBuf> {
};
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<String>,
}
+ fn get_cargo_meta<P: AsRef<Path>>(pth: P) -> Result<cargo_metadata::Metadata> {
+ Ok(cargo_metadata::MetadataCommand::new().manifest_path(&pth).exec()?)
+ }
+
impl LockedDeps {
fn from_path<P: AsRef<Path>>(pth: P) -> Result<LockedDeps> {
let pth = pth.as_ref().join("Cargo.toml");
- let metadata = cargo_metadata::metadata_deps(Some(&pth), true)?;
- let workspace_members:Vec<String> = 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<P: AsRef<Path>>(path: P) -> Result<String> {
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

@ -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 <i.gnatenko.brain@gmail.com>
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 <i.gnatenko.brain@gmail.com>
---
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<DocTest, IoError> {
-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<DocTest, IoError> {
fn extract_tests_from_string(s: &str, file_stem: &str) -> (Vec<Test>, Option<String>) {
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<Test>, Option<Str
@@ -217,7 +217,7 @@ fn extract_tests_from_string(s: &str, file_stem: &str) -> (Vec<Test>, Option<Str
section = Some(sanitize_test_name(&sect));
}
}
@ -39,7 +38,7 @@ index bcf59bd..f8d1295 100644
let code_block_info = parse_code_block_info(info);
if code_block_info.is_rust {
buffer = Buffer::Code(Vec::new());
@@ -228,7 +228,7 @@ fn extract_tests_from_string(s: &str, file_stem: &str) -> (Vec<Test>, Option<Str
@@ -233,7 +233,7 @@ fn extract_tests_from_string(s: &str, file_stem: &str) -> (Vec<Test>, Option<Str
buf.push_str(&*text);
}
}
@ -48,7 +47,7 @@ index bcf59bd..f8d1295 100644
let code_block_info = parse_code_block_info(info);
if let Buffer::Code(buf) = mem::replace(&mut buffer, Buffer::None) {
if code_block_info.is_old_template {
@@ -277,7 +277,7 @@ fn load_templates(path: &Path) -> Result<HashMap<String, String>, IoError> {
@@ -282,7 +282,7 @@ fn load_templates(path: &Path) -> Result<HashMap<String, String>, 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<HashMap<String, String>, IoError> {
@@ -293,7 +293,7 @@ fn load_templates(path: &Path) -> Result<HashMap<String, String>, 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

@ -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 <ignatenkobrain@fedoraproject.org> - 0.13.5-1
- Update to 0.13.5
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.4-10
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

@ -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]

@ -1 +1 @@
SHA512 (skeptic-0.13.4.crate) = ae0c236f9857ec8d82c2733f4f555e5fa0f0530a08105015d933fe5717c41b56d096c6c140e2d7a302a2c16ba7cd962213bdb3a6adbe084c55704e71902d8edb
SHA512 (skeptic-0.13.5.crate) = c9764be9cc237592439feb401151736078e98b360aed04c3b2451e4db258b0f634d2dd4cac1d0792b23f946ef4ffaeafb27982519940798d00721ea12e0de105

Loading…
Cancel
Save