Update pulldown-cmark to 0.7

Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
epel9
Igor Raits 5 years ago
parent 348aa4a585
commit a6dfa54484
No known key found for this signature in database
GPG Key ID: 695714BD1BBC5F4C

@ -1,67 +0,0 @@
From f6a22b95f36f4918ed2f53a2920690ad8aec5bff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com>
Date: Wed, 31 Jul 2019 22:11:03 +0200
Subject: [PATCH] Bump cargo_metadata to 0.8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
---
Cargo.toml | 3 ++-
lib.rs | 14 +++++++++-----
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
index 57a07f4..33341a1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -36,6 +36,9 @@ version = "0.8"
version = "0.12"
default-features = false
+[dependencies.failure]
+version = "0.1"
+
[dependencies.glob]
version = "0.3"
diff --git a/lib.rs b/lib.rs
index 08c0066..de24c98 100644
--- a/lib.rs
+++ b/lib.rs
@@ -1,5 +1,6 @@
#[macro_use]
extern crate error_chain;
+extern crate failure;
extern crate pulldown_cmark as cmark;
extern crate tempdir;
extern crate glob;
@@ -533,12 +534,14 @@ pub mod rt {
use self::walkdir::WalkDir;
use self::serde_json::Value;
+
+ use failure::ResultExt as _;
error_chain! {
errors { Fingerprint }
foreign_links {
Io(std::io::Error);
- Metadata(cargo_metadata::Error);
+ Metadata(failure::Compat<cargo_metadata::Error>);
Json(serde_json::Error);
}
}
@@ -556,7 +559,7 @@ pub mod rt {
}
fn get_cargo_meta<P: AsRef<Path>>(pth: P) -> Result<cargo_metadata::Metadata> {
- Ok(cargo_metadata::MetadataCommand::new().manifest_path(&pth).exec()?)
+ Ok(cargo_metadata::MetadataCommand::new().manifest_path(&pth).exec().compat()?)
}
impl LockedDeps {
--
2.21.0

@ -1,18 +1,18 @@
From 22423be7b62af427d062f09068c7a42af35b1fb2 Mon Sep 17 00:00:00 2001
From 5464c90b9c083dab4dae89adf06f38fe3f3d8755 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] Bump pulldown-cmark to 0.6
Subject: [PATCH 1/2] Bump pulldown-cmark to 0.6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
---
lib.rs | 28 ++++++++++------------------
2 files changed, 10 insertions(+), 18 deletions(-)
lib.rs | 26 +++++++++-----------------
1 file changed, 9 insertions(+), 17 deletions(-)
diff --git a/lib.rs b/lib.rs
index 08c0066..c6d23f8 100644
index 08c0066..bcf59bd 100644
--- a/lib.rs
+++ b/lib.rs
@@ -169,7 +169,7 @@ fn extract_tests(config: &Config) -> Result<DocTestSuite, IoError> {
@ -24,11 +24,10 @@ index 08c0066..c6d23f8 100644
}
fn extract_tests_from_file(path: &Path) -> Result<DocTest, IoError> {
@@ -199,24 +199,16 @@ fn extract_tests_from_string(s: &str, file_stem: &str) -> (Vec<Test>, Option<Str
let mut code_block_start = 0;
@@ -200,23 +200,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;
-
- // In order to call get_offset() on the parser,
- // this loop must not hold an exclusive reference to the parser.
- loop {
@ -39,7 +38,6 @@ index 08c0066..c6d23f8 100644
- } else {
- break;
- };
+
+ for (event, range) in parser.into_offset_iter() {
+ let line_number = bytecount::count(&s.as_bytes()[0..range.start], b'\n');
match event {
@ -68,5 +66,5 @@ index 08c0066..c6d23f8 100644
}
}
--
2.21.0
2.25.0

@ -1,12 +1,12 @@
From 765ec44a41410de6190af2067b3f1f9ca1dc170e Mon Sep 17 00:00:00 2001
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 files changed, 10 insertions(+), 9 deletions(-)
lib.rs | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/lib.rs b/lib.rs
index b24c5a2..2f47049 100644
@ -62,3 +62,6 @@ index b24c5a2..2f47049 100644
.map(|package| &package.edition)
.max_by_key(|edition| u64::from_str(edition).unwrap())
.unwrap()
--
2.25.0

@ -0,0 +1,71 @@
From 4c58547f971776f63db9f8735c67ca4178596449 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 ++++++------
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};
/// Returns a list of markdown files under a directory.
///
@@ -194,7 +194,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;
- let mut parser = Parser::new(s);
+ let parser = Parser::new(s);
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
section = Some(sanitize_test_name(&sect));
}
}
- Event::Start(Tag::CodeBlock(ref info)) => {
+ Event::Start(Tag::CodeBlock(CodeBlockKind::Fenced(ref info))) => {
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
buf.push_str(&*text);
}
}
- Event::End(Tag::CodeBlock(ref info)) => {
+ Event::End(Tag::CodeBlock(CodeBlockKind::Fenced(ref info))) => {
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> {
for event in parser {
match event {
- Event::Start(Tag::CodeBlock(ref info)) => {
+ Event::Start(Tag::CodeBlock(CodeBlockKind::Fenced(ref info))) => {
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> {
buf.push(text.to_string());
}
}
- Event::End(Tag::CodeBlock(ref info)) => {
+ Event::End(Tag::CodeBlock(CodeBlockKind::Fenced(ref info))) => {
let code_block_info = parse_code_block_info(info);
if let Some(buf) = code_buffer.take() {
if let Some(t) = code_block_info.template {
--
2.25.0

@ -1,5 +1,5 @@
# Generated by rust2rpm 10
# Needs test files not provided in the crate
# Generated by rust2rpm 13
# * Needs test files not provided in the crate
%bcond_with check
%global debug_package %{nil}
@ -7,22 +7,23 @@
Name: rust-%{crate}
Version: 0.13.4
Release: 7%{?dist}
Release: 8%{?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 https://github.com/budziq/rust-skeptic/pull/109
# - 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.6 https://github.com/budziq/rust-skeptic/pull/108
# * Bump pulldown-cmark to 0.7, https://github.com/budziq/rust-skeptic/pull/116
Patch0: skeptic-fix-metadata.diff
Patch1: 0001-Bumped-glob-and-cargo_metadata-to-latest-version.patch
Patch2: 0001-Bump-cargo_metadata-to-0.8.patch
Patch3: 0001-Bump-pulldown-cmark-to-0.6.patch
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
ExclusiveArch: %{rust_arches}
%if %{__cargo_skip_build}
@ -47,7 +48,7 @@ which use "%{crate}" crate.
%files devel
%doc README.md
%{cargo_registry}/%{crate}-%{version}/
%{cargo_registry}/%{crate}-%{version_no_tilde}/
%package -n %{name}+default-devel
Summary: %{summary}
@ -59,7 +60,7 @@ This package contains library source intended for building other packages
which use "default" feature of "%{crate}" crate.
%files -n %{name}+default-devel
%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
@ -80,6 +81,9 @@ which use "default" feature of "%{crate}" crate.
%endif
%changelog
* Sat Feb 22 19:15:34 CET 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.13.4-8
- Update pulldown-cmark to 0.7
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.4-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

@ -1,5 +1,5 @@
--- skeptic-0.13.4/Cargo.toml 1970-01-01T00:00:00+00:00
+++ skeptic-0.13.4/Cargo.toml 2019-09-13T15:49:45.807251+00:00
--- 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"
@ -21,7 +21,7 @@
[dependencies.pulldown-cmark]
-version = "0.2"
+version = "0.6"
+version = "0.7"
default-features = false
[dependencies.serde_json]

Loading…
Cancel
Save