Skip to content

Commit

Permalink
extra: move glob to libglob
Browse files Browse the repository at this point in the history
In line with the dissolution of libextra - moves glob to its own library libglob.
Changes based on PR #11787. Updates .gitignore to ignore doc/glob.
  • Loading branch information
dmanescu committed Jan 29, 2014
1 parent 4d0d3da commit 93398d1
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -77,6 +77,7 @@ src/.DS_Store
/doc/arena
/doc/extra
/doc/flate
/doc/glob
/doc/green
/doc/native
/doc/rustc
Expand Down
1 change: 1 addition & 0 deletions doc/index.md
Expand Up @@ -39,6 +39,7 @@ li {list-style-type: none; }

* [The `arena` allocation library](arena/index.html)
* [The `flate` compression library](flate/index.html)
* [The `glob` file path matching library](glob/index.html)

# Tooling

Expand Down
3 changes: 2 additions & 1 deletion mk/crates.mk
Expand Up @@ -49,7 +49,7 @@
# automatically generated for all stage/host/target combinations.
################################################################################

TARGET_CRATES := std extra green rustuv native flate arena
TARGET_CRATES := std extra green rustuv native flate arena glob
HOST_CRATES := syntax rustc rustdoc rustpkg
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
TOOLS := compiletest rustpkg rustdoc rustc
Expand All @@ -65,6 +65,7 @@ DEPS_rustdoc := rustc native:sundown
DEPS_rustpkg := rustc
DEPS_flate := std native:miniz
DEPS_arena := std extra
DEPS_glob := std

TOOL_DEPS_compiletest := extra green rustuv
TOOL_DEPS_rustpkg := rustpkg green rustuv
Expand Down
1 change: 0 additions & 1 deletion src/libextra/lib.rs
Expand Up @@ -67,7 +67,6 @@ pub mod ebml;
pub mod getopts;
pub mod json;
pub mod tempfile;
pub mod glob;
pub mod term;
pub mod time;
pub mod base64;
Expand Down
11 changes: 8 additions & 3 deletions src/libextra/glob.rs → src/libglob/lib.rs
Expand Up @@ -23,6 +23,11 @@
* `glob`/`fnmatch` functions.
*/

#[crate_id = "glob#0.10-pre"];
#[crate_type = "rlib"];
#[crate_type = "dylib"];
#[license = "MIT/ASL2"];

use std::{os, path};
use std::io;
use std::io::fs;
Expand Down Expand Up @@ -53,7 +58,7 @@ pub struct Paths {
/// `puppies.jpg` and `hamsters.gif`:
///
/// ```rust
/// use extra::glob::glob;
/// use glob::glob;
///
/// for path in glob("/media/pictures/*.jpg") {
/// println!("{}", path.display());
Expand Down Expand Up @@ -297,7 +302,7 @@ impl Pattern {
* # Example
*
* ```rust
* use extra::glob::Pattern;
* use glob::Pattern;
*
* assert!(Pattern::new("c?t").matches("cat"));
* assert!(Pattern::new("k[!e]tteh").matches("kitteh"));
Expand Down Expand Up @@ -537,7 +542,7 @@ impl MatchOptions {
#[cfg(test)]
mod test {
use std::os;
use super::*;
use super::{glob, Pattern, MatchOptions};

#[test]
fn test_absolute_pattern() {
Expand Down
3 changes: 2 additions & 1 deletion src/test/run-pass/glob-std.rs
Expand Up @@ -12,8 +12,9 @@
// xfail-win32 TempDir may cause IoError on windows: #10462

extern mod extra;
extern mod glob;

use extra::glob::glob;
use glob::glob;
use extra::tempfile::TempDir;
use std::unstable::finally::Finally;
use std::{os, unstable};
Expand Down

9 comments on commit 93398d1

@bors
Copy link
Contributor

@bors bors commented on 93398d1 Jan 29, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from huonw
at dmanescu@93398d1

@bors
Copy link
Contributor

@bors bors commented on 93398d1 Jan 29, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging dmanescu/rust/8784-arena-glob = 93398d1 into auto

@bors
Copy link
Contributor

@bors bors commented on 93398d1 Jan 29, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dmanescu/rust/8784-arena-glob = 93398d1 merged ok, testing candidate = 769f8ae6

@bors
Copy link
Contributor

@bors bors commented on 93398d1 Jan 29, 2014

@bors
Copy link
Contributor

@bors bors commented on 93398d1 Jan 29, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from huonw
at dmanescu@93398d1

@bors
Copy link
Contributor

@bors bors commented on 93398d1 Jan 29, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging dmanescu/rust/8784-arena-glob = 93398d1 into auto

@bors
Copy link
Contributor

@bors bors commented on 93398d1 Jan 29, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dmanescu/rust/8784-arena-glob = 93398d1 merged ok, testing candidate = 87004db

@bors
Copy link
Contributor

@bors bors commented on 93398d1 Jan 29, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 93398d1 Jan 29, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 87004db

Please sign in to comment.