Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package phraze for openSUSE:Factory checked 
in at 2024-07-31 14:41:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/phraze (Old)
 and      /work/SRC/openSUSE:Factory/.phraze.new.7232 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "phraze"

Wed Jul 31 14:41:47 2024 rev:3 rq:1190627 version:0.3.13

Changes:
--------
--- /work/SRC/openSUSE:Factory/phraze/phraze.changes    2024-07-15 
19:50:12.841751753 +0200
+++ /work/SRC/openSUSE:Factory/.phraze.new.7232/phraze.changes  2024-07-31 
14:41:49.174940150 +0200
@@ -1,0 +2,8 @@
+Wed Jul 31 08:24:02 UTC 2024 - felix.niederwan...@suse.com
+
+- Update to version 0.3.13:
+  * bumps cargo-dist version and internal version
+  * feat: add man pages and shell completions
+  * better wording of the features in readme
+
+-------------------------------------------------------------------

Old:
----
  phraze-0.3.12.obscpio

New:
----
  phraze-0.3.13.obscpio

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ phraze.spec ++++++
--- /var/tmp/diff_new_pack.0BlQGa/_old  2024-07-31 14:41:50.534996743 +0200
+++ /var/tmp/diff_new_pack.0BlQGa/_new  2024-07-31 14:41:50.534996743 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           phraze
-Version:        0.3.12
+Version:        0.3.13
 Release:        0
 Summary:        Generate random passphrases
 License:        MPL-2.0

++++++ _service ++++++
--- /var/tmp/diff_new_pack.0BlQGa/_old  2024-07-31 14:41:50.566998074 +0200
+++ /var/tmp/diff_new_pack.0BlQGa/_new  2024-07-31 14:41:50.566998074 +0200
@@ -2,7 +2,7 @@
   <service mode="disabled" name="obs_scm">
     <param name="url">https://github.com/sts10/phraze.git</param>
     <param name="scm">git</param>
-    <param name="revision">v0.3.12</param>
+    <param name="revision">v0.3.13</param>
     <param name="versionformat">@PARENT_TAG@</param>
     <param name="versionrewrite-pattern">.*v(\d+\.\d+\.\d+)</param>
     <param name="versionrewrite-replacement">\1</param>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.0BlQGa/_old  2024-07-31 14:41:50.586998907 +0200
+++ /var/tmp/diff_new_pack.0BlQGa/_new  2024-07-31 14:41:50.590999074 +0200
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param name="url">https://github.com/sts10/phraze.git</param>
-              <param 
name="changesrevision">cef597aa53a1f913ea70f32eb0e8ba74d1508541</param></service></servicedata>
+              <param 
name="changesrevision">f24031b6e4e2268a6f842fca1a2e99bdc2ea70bd</param></service></servicedata>
 (No newline at EOF)
 

++++++ phraze-0.3.12.obscpio -> phraze-0.3.13.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/phraze-0.3.12/.github/workflows/release.yml 
new/phraze-0.3.13/.github/workflows/release.yml
--- old/phraze-0.3.12/.github/workflows/release.yml     2024-07-05 
20:28:23.000000000 +0200
+++ new/phraze-0.3.13/.github/workflows/release.yml     2024-07-30 
17:57:24.000000000 +0200
@@ -61,7 +61,7 @@
         # we specify bash to get pipefail; it guards against the `curl` command
         # failing. otherwise `sh` won't catch that `curl` returned non-0
         shell: bash
-        run: "curl --proto '=https' --tlsv1.2 -LsSf 
https://github.com/axodotdev/cargo-dist/releases/download/v0.18.0/cargo-dist-installer.sh
 | sh"
+        run: "curl --proto '=https' --tlsv1.2 -LsSf 
https://github.com/axodotdev/cargo-dist/releases/download/v0.19.1/cargo-dist-installer.sh
 | sh"
       - name: Cache cargo-dist
         uses: actions/upload-artifact@v4
         with:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/phraze-0.3.12/Cargo.lock new/phraze-0.3.13/Cargo.lock
--- old/phraze-0.3.12/Cargo.lock        2024-07-05 20:28:23.000000000 +0200
+++ new/phraze-0.3.13/Cargo.lock        2024-07-30 17:57:24.000000000 +0200
@@ -146,6 +146,15 @@
 ]
 
 [[package]]
+name = "clap_complete"
+version = "4.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "b5a2d6eec27fce550d708b2be5d798797e5a55b246b323ef36924a0001996352"
+dependencies = [
+ "clap",
+]
+
+[[package]]
 name = "clap_derive"
 version = "4.5.4"
 source = "registry+https://github.com/rust-lang/crates.io-index";
@@ -164,6 +173,16 @@
 checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce"
 
 [[package]]
+name = "clap_mangen"
+version = "0.2.23"
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "f17415fd4dfbea46e3274fcd8d368284519b358654772afb700dc2e8d2b24eeb"
+dependencies = [
+ "clap",
+ "roff",
+]
+
+[[package]]
 name = "colorchoice"
 version = "1.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index";
@@ -399,9 +418,11 @@
 
 [[package]]
 name = "phraze"
-version = "0.3.12"
+version = "0.3.13"
 dependencies = [
  "clap",
+ "clap_complete",
+ "clap_mangen",
  "criterion",
  "include-lines",
  "rand",
@@ -540,6 +561,12 @@
 checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
 
 [[package]]
+name = "roff"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index";
+checksum = "88f8660c1ff60292143c98d08fc6e2f654d722db50410e3f3797d40baaf9d8f3"
+
+[[package]]
 name = "rustix"
 version = "0.38.20"
 source = "registry+https://github.com/rust-lang/crates.io-index";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/phraze-0.3.12/Cargo.toml new/phraze-0.3.13/Cargo.toml
--- old/phraze-0.3.12/Cargo.toml        2024-07-05 20:28:23.000000000 +0200
+++ new/phraze-0.3.13/Cargo.toml        2024-07-30 17:57:24.000000000 +0200
@@ -1,7 +1,7 @@
 [package]
 name = "phraze"
 description = "Random passphrase generator"
-version = "0.3.12"
+version = "0.3.13"
 edition = "2021"
 authors = ["sts10 <sschlink...@gmail.com>"]
 license = "MPL-2.0"
@@ -16,6 +16,11 @@
 unicode-normalization = "0.1.23"
 include-lines = "1.1.2"
 
+[build-dependencies]
+clap = { version = "4.5.4", features = ["derive"] }
+clap_complete = "4.5.2"
+clap_mangen = "0.2.20"
+
 [dev-dependencies]
 criterion = "0.5.1"
 
@@ -31,7 +36,7 @@
 # Config for 'cargo dist'
 [workspace.metadata.dist]
 # The preferred cargo-dist version to use in CI (Cargo.toml SemVer syntax)
-cargo-dist-version = "0.18.0"
+cargo-dist-version = "0.19.1"
 # CI backends to support
 ci = "github"
 # The installers to generate for each app
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/phraze-0.3.12/benches/generate_passphrase.rs 
new/phraze-0.3.13/benches/generate_passphrase.rs
--- old/phraze-0.3.12/benches/generate_passphrase.rs    2024-07-05 
20:28:23.000000000 +0200
+++ new/phraze-0.3.13/benches/generate_passphrase.rs    2024-07-30 
17:57:24.000000000 +0200
@@ -1,4 +1,5 @@
 use criterion::{criterion_group, criterion_main, Criterion};
+use phraze::cli::ListChoice;
 use phraze::*;
 
 fn criterion_benchmark(c: &mut Criterion) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/phraze-0.3.12/build.rs new/phraze-0.3.13/build.rs
--- old/phraze-0.3.12/build.rs  1970-01-01 01:00:00.000000000 +0100
+++ new/phraze-0.3.13/build.rs  2024-07-30 17:57:24.000000000 +0200
@@ -0,0 +1,40 @@
+#[path = "src/cli.rs"]
+mod cli;
+
+use clap::Command;
+use clap::CommandFactory;
+use clap_complete::generate_to;
+use clap_complete::Shell::{Bash, Fish, Zsh};
+use clap_mangen::Man;
+use cli::Args;
+use std::fs;
+use std::path::PathBuf;
+
+static NAME: &str = "phraze";
+
+fn generate_man_pages(cmd: Command) {
+    let man_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("target/man");
+    let mut buffer = Vec::default();
+
+    Man::new(cmd.clone()).render(&mut buffer).unwrap();
+    fs::create_dir_all(&man_dir).unwrap();
+    fs::write(man_dir.join(NAME.to_owned() + ".1"), buffer).unwrap();
+}
+
+fn generate_shell_completions(mut cmd: Command) {
+    let comp_dir = 
PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("target/completions");
+
+    fs::create_dir_all(&comp_dir).unwrap();
+
+    for shell in [Bash, Fish, Zsh] {
+        generate_to(shell, &mut cmd, NAME, &comp_dir).unwrap();
+    }
+}
+
+fn main() {
+    let mut cmd = Args::command();
+    cmd.set_bin_name(NAME);
+
+    generate_man_pages(cmd.clone());
+    generate_shell_completions(cmd);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/phraze-0.3.12/readme.markdown 
new/phraze-0.3.13/readme.markdown
--- old/phraze-0.3.12/readme.markdown   2024-07-05 20:28:23.000000000 +0200
+++ new/phraze-0.3.13/readme.markdown   2024-07-30 17:57:24.000000000 +0200
@@ -15,7 +15,7 @@
 ## Features
 
 * 🎚️  Allows user to set a minimum entropy, freeing them from having to 
figure how many words from a given list they need to create a strong passphrase
-* 🎯 All built-in word lists are uniquely decodable, ensuring that 
passphrase entropy estimates remain accurate when no separator is used
+* 🎯 Includes a variety of built-in word lists, all of which are uniquely 
decodable, ensuring that passphrase entropy estimates remain accurate when no 
separator is used
 * ⚡ Fast: Takes about 2 milliseconds to generate a passphrase
 * 🔣 Can insert numbers, symbols, and/or capital letters if necessary (e.g. 
`phraze -s _b -t`)
 * 🛁 Default word list is (hopefully) free of profane words
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/phraze-0.3.12/src/cli.rs new/phraze-0.3.13/src/cli.rs
--- old/phraze-0.3.12/src/cli.rs        1970-01-01 01:00:00.000000000 +0100
+++ new/phraze-0.3.13/src/cli.rs        2024-07-30 17:57:24.000000000 +0200
@@ -0,0 +1,115 @@
+use clap::Parser;
+use std::path::PathBuf;
+
+/// This enum, `ListChoice`, represents all of the "built-in" word lists that 
Phraze can use.
+#[derive(Clone, Debug, Copy)]
+pub enum ListChoice {
+    Long,
+    Medium,
+    Eff,
+    Mnemonicode,
+    Effshort,
+    Qwerty,
+    Alpha,
+}
+
+/// Generate random passphrases
+#[derive(Parser, Debug)]
+#[clap(version, name = "phraze")]
+pub struct Args {
+    /// Strengthen your passphrase the easy way: Each -S flag increases 
minimum entropy by 20 bits (above the default of
+    /// 80 bits).
+    #[clap(short = 'S', long = "strength", conflicts_with = "number_of_words", 
conflicts_with = "minimum_entropy", action = clap::ArgAction::Count)]
+    pub strength_count: u8,
+
+    /// Set minimum amount of entropy in bits for generated passphrase. If 
neither minimum_entropy or
+    /// number_of_words is specified, Phraze will default to an 80-bit minimum.
+    #[clap(
+        short = 'e',
+        long = "minimum-entropy",
+        conflicts_with = "number_of_words",
+        conflicts_with = "strength_count"
+    )]
+    pub minimum_entropy: Option<usize>,
+
+    /// Set exactly how many words to use in generated passphrase. If neither 
number_of_words or
+    /// minimum_entropy is specified, Phraze will default to an 80-bit minimum.
+    #[clap(
+        short = 'w',
+        long = "words",
+        conflicts_with = "minimum_entropy",
+        conflicts_with = "strength_count"
+    )]
+    pub number_of_words: Option<usize>,
+
+    /// Number of passphrases to generate
+    #[clap(short = 'n', long = "passphrases", default_value = "1")]
+    pub n_passphrases: usize,
+
+    /// Word separator. Can accept single quotes around the separator. To not 
use a separator,
+    /// use empty single quotes: ''.
+    ///
+    /// There are special values that will trigger generated separators:
+    ///
+    /// _n: separators will be random numbers
+    ///
+    /// _s: separators will be random symbols
+    ///
+    /// _b: separators will be a mix of random numbers and symbols
+    #[clap(short = 's', long = "sep", default_value = "-")]
+    pub separator: String,
+
+    /// Choose a word list to use.
+    ///
+    /// Options:
+    ///
+    /// m: Orchard Street Medium List (8,192 words) [DEFAULT]
+    ///
+    /// l: Orchard Street Long List (17,576 words)
+    ///
+    /// e: EFF long list (7,776 words)
+    ///
+    /// n: Mnemonicode list (1,633 words). Good if you know you're going to be 
speaking
+    /// passphrases out loud.
+    ///
+    /// s: EFF short list (1,296 words)
+    ///
+    /// q: Orchard Street QWERTY list (1,296 words). Optimized to minimize 
travel
+    /// distance on QWERTY keyboard layout.
+    ///
+    /// a: Orchard Street Alpha list (1,296 words). Optimized to minimize 
travel
+    /// distance on alphabetical keyboard layout.
+    #[clap(short = 'l', long = "list", value_parser=parse_list_choice, 
default_value="m")]
+    pub list_choice: ListChoice,
+
+    /// Provide a text file with a list of words to randomly generate 
passphrase
+    /// from. Should be a text file with one word per line.
+    #[clap(short = 'c', long = "custom-list", conflicts_with = "list_choice")]
+    pub custom_list_file_path: Option<PathBuf>,
+
+    /// Use Title Case for words in generated passphrase
+    #[clap(short = 't', long = "title-case")]
+    pub title_case: bool,
+
+    /// Print estimated entropy of generated passphrase, in bits, along with
+    /// the passphrase itself
+    #[clap(short = 'v', long = "verbose")]
+    pub verbose: bool,
+}
+
+/// Convert list_choice string slice into a ListChoice enum. Clap calls this 
function.
+fn parse_list_choice(list_choice: &str) -> Result<ListChoice, String> {
+    match list_choice.to_lowercase().as_ref() {
+        "l" => Ok(ListChoice::Long),
+        "m" => Ok(ListChoice::Medium),
+        "e" => Ok(ListChoice::Eff),
+        "n" => Ok(ListChoice::Mnemonicode),
+        "s" => Ok(ListChoice::Effshort),
+        "q" => Ok(ListChoice::Qwerty),
+        "a" => Ok(ListChoice::Alpha),
+        _ => Err(format!(
+            "Inputted list choice '{}' doesn't correspond to an available word 
list",
+            list_choice
+        )),
+    }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/phraze-0.3.12/src/lib.rs new/phraze-0.3.13/src/lib.rs
--- old/phraze-0.3.12/src/lib.rs        2024-07-05 20:28:23.000000000 +0200
+++ new/phraze-0.3.13/src/lib.rs        2024-07-30 17:57:24.000000000 +0200
@@ -1,23 +1,13 @@
+pub mod cli;
 pub mod file_reader;
 pub mod separators;
 pub mod unicode_normalization_check;
 
+use crate::cli::ListChoice;
 use crate::separators::make_separator;
 use include_lines::include_lines;
 use rand::{seq::SliceRandom, thread_rng, Rng};
 
-/// This enum, `ListChoice`, represents all of the "built-in" word lists that 
Phraze can use.
-#[derive(Clone, Debug, Copy)]
-pub enum ListChoice {
-    Long,
-    Medium,
-    Eff,
-    Mnemonicode,
-    Effshort,
-    Qwerty,
-    Alpha,
-}
-
 /// Given user's inputs, figure out how many words the generated passphrase 
will need. If user
 /// specified an exact `number_of_words`, just return that `number_of_words`. 
If user is using a
 /// strength_count, do the necessary math. If user specified a 
`minimum_entropy`, we need to do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/phraze-0.3.12/src/main.rs 
new/phraze-0.3.13/src/main.rs
--- old/phraze-0.3.12/src/main.rs       2024-07-05 20:28:23.000000000 +0200
+++ new/phraze-0.3.13/src/main.rs       2024-07-30 17:57:24.000000000 +0200
@@ -1,91 +1,7 @@
+use crate::cli::Args;
 use crate::file_reader::read_in_custom_list;
 use clap::Parser;
 use phraze::*;
-use std::path::PathBuf;
-
-/// Generate random passphrases
-#[derive(Parser, Debug)]
-#[clap(version, name = "phraze")]
-struct Args {
-    /// Strengthen your passphrase the easy way: Each -S flag increases 
minimum entropy by 20 bits (above the default of
-    /// 80 bits).
-    #[clap(short = 'S', long = "strength", conflicts_with = "number_of_words", 
conflicts_with = "minimum_entropy", action = clap::ArgAction::Count)]
-    strength_count: u8,
-
-    /// Set minimum amount of entropy in bits for generated passphrase. If 
neither minimum_entropy or
-    /// number_of_words is specified, Phraze will default to an 80-bit minimum.
-    #[clap(
-        short = 'e',
-        long = "minimum-entropy",
-        conflicts_with = "number_of_words",
-        conflicts_with = "strength_count"
-    )]
-    minimum_entropy: Option<usize>,
-
-    /// Set exactly how many words to use in generated passphrase. If neither 
number_of_words or
-    /// minimum_entropy is specified, Phraze will default to an 80-bit minimum.
-    #[clap(
-        short = 'w',
-        long = "words",
-        conflicts_with = "minimum_entropy",
-        conflicts_with = "strength_count"
-    )]
-    number_of_words: Option<usize>,
-
-    /// Number of passphrases to generate
-    #[clap(short = 'n', long = "passphrases", default_value = "1")]
-    n_passphrases: usize,
-
-    /// Word separator. Can accept single quotes around the separator. To not 
use a separator,
-    /// use empty single quotes: ''.
-    ///
-    /// There are special values that will trigger generated separators:
-    ///
-    /// _n: separators will be random numbers
-    ///
-    /// _s: separators will be random symbols
-    ///
-    /// _b: separators will be a mix of random numbers and symbols
-    #[clap(short = 's', long = "sep", default_value = "-")]
-    separator: String,
-
-    /// Choose a word list to use.
-    ///
-    /// Options:
-    ///
-    /// m: Orchard Street Medium List (8,192 words) [DEFAULT]
-    ///
-    /// l: Orchard Street Long List (17,576 words)
-    ///
-    /// e: EFF long list (7,776 words)
-    ///
-    /// n: Mnemonicode list (1,633 words). Good if you know you're going to be 
speaking
-    /// passphrases out loud.
-    ///
-    /// s: EFF short list (1,296 words)
-    ///
-    /// q: Orchard Street QWERTY list (1,296 words). Optimized to minimize 
travel
-    /// distance on QWERTY keyboard layout.
-    ///
-    /// a: Orchard Street Alpha list (1,296 words). Optimized to minimize 
travel
-    /// distance on alphabetical keyboard layout.
-    #[clap(short = 'l', long = "list", value_parser=parse_list_choice, 
default_value="m")]
-    list_choice: ListChoice,
-
-    /// Provide a text file with a list of words to randomly generate 
passphrase
-    /// from. Should be a text file with one word per line.
-    #[clap(short = 'c', long = "custom-list", conflicts_with = "list_choice")]
-    custom_list_file_path: Option<PathBuf>,
-
-    /// Use Title Case for words in generated passphrase
-    #[clap(short = 't', long = "title-case")]
-    title_case: bool,
-
-    /// Print estimated entropy of generated passphrase, in bits, along with
-    /// the passphrase itself
-    #[clap(short = 'v', long = "verbose")]
-    verbose: bool,
-}
 
 fn main() -> Result<(), String> {
     let opt = Args::parse();
@@ -139,20 +55,3 @@
         println!("{}", passphrase);
     }
 }
-
-/// Convert list_choice string slice into a ListChoice enum. Clap calls this 
function.
-fn parse_list_choice(list_choice: &str) -> Result<ListChoice, String> {
-    match list_choice.to_lowercase().as_ref() {
-        "l" => Ok(ListChoice::Long),
-        "m" => Ok(ListChoice::Medium),
-        "e" => Ok(ListChoice::Eff),
-        "n" => Ok(ListChoice::Mnemonicode),
-        "s" => Ok(ListChoice::Effshort),
-        "q" => Ok(ListChoice::Qwerty),
-        "a" => Ok(ListChoice::Alpha),
-        _ => Err(format!(
-            "Inputted list choice '{}' doesn't correspond to an available word 
list",
-            list_choice
-        )),
-    }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/phraze-0.3.12/tests/list_reading_tests.rs 
new/phraze-0.3.13/tests/list_reading_tests.rs
--- old/phraze-0.3.12/tests/list_reading_tests.rs       2024-07-05 
20:28:23.000000000 +0200
+++ new/phraze-0.3.13/tests/list_reading_tests.rs       2024-07-30 
17:57:24.000000000 +0200
@@ -1,4 +1,5 @@
 mod minimum_entropy_tests {
+    use phraze::cli::ListChoice;
     use phraze::*;
 
     #[test]

++++++ phraze.obsinfo ++++++
--- /var/tmp/diff_new_pack.0BlQGa/_old  2024-07-31 14:41:50.707003901 +0200
+++ /var/tmp/diff_new_pack.0BlQGa/_new  2024-07-31 14:41:50.711004067 +0200
@@ -1,5 +1,5 @@
 name: phraze
-version: 0.3.12
-mtime: 1720204103
-commit: cef597aa53a1f913ea70f32eb0e8ba74d1508541
+version: 0.3.13
+mtime: 1722355044
+commit: f24031b6e4e2268a6f842fca1a2e99bdc2ea70bd
 

++++++ vendor.tar.xz ++++++
/work/SRC/openSUSE:Factory/phraze/vendor.tar.xz 
/work/SRC/openSUSE:Factory/.phraze.new.7232/vendor.tar.xz differ: char 15, line 
1

Reply via email to