Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename meta to dist. #30

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pgxn_meta = "0.2"

``` rust
use serde_json::json;
use pgxn_meta::meta::Distribution;
use pgxn_meta::dist::Distribution;

func main() {
// Load the contents of a META.json file into a serde_json::Value.
Expand Down
8 changes: 4 additions & 4 deletions src/meta/mod.rs → src/dist/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
PGXN `META.json` validation and management.

This module provides interfaces to load, validate, and manipulate PGXN
`META.json` files. It supports both the [v1] and [v2] specs.
distribution `META.json` files. It supports both the [v1] and [v2] specs.

[v1]: https://rfcs.pgxn.org/0001-meta-spec-v1.html
[v2]: https://github.com/pgxn/rfcs/pull/3
Expand Down Expand Up @@ -931,7 +931,7 @@ impl TryFrom<Value> for Distribution {
/// ``` rust
/// # use std::error::Error;
/// use serde_json::json;
/// use pgxn_meta::meta::*;
/// use pgxn_meta::dist::*;
///
/// let meta_json = json!({
/// "name": "pair",
Expand Down Expand Up @@ -981,7 +981,7 @@ impl TryFrom<&[&Value]> for Distribution {
/// ``` rust
/// # use std::error::Error;
/// use serde_json::json;
/// use pgxn_meta::meta::*;
/// use pgxn_meta::dist::*;
///
/// let meta_json = json!({
/// "name": "pair",
Expand Down Expand Up @@ -1048,7 +1048,7 @@ impl TryFrom<Distribution> for Value {
/// ``` rust
/// # use std::error::Error;
/// use serde_json::{json, Value};
/// use pgxn_meta::meta::*;
/// use pgxn_meta::dist::*;
///
/// let meta_json = json!({
/// "name": "pair",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ files. It supports both the [v1] and [v2] specs.

*/

pub mod meta;
pub mod dist;
pub mod release;
mod util; // private utilities
pub mod valid;
Expand Down
2 changes: 1 addition & 1 deletion src/release/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ It supports both the [v1] and [v2] specs.

*/

use crate::meta::*;
use crate::dist::*;
use crate::util;

use chrono::{DateTime, Utc};
Expand Down
2 changes: 1 addition & 1 deletion src/release/v1/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::Release;
use crate::meta::v1 as dist;
use crate::dist::v1 as dist;
use serde_json::{json, Value};
use std::error::Error;

Expand Down
2 changes: 1 addition & 1 deletion src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mod v2;

#[test]
fn test_readme_example() {
use crate::meta::Distribution;
use crate::dist::Distribution;
use serde_json::json;

// Load the contents of a META.json file into a serde_json::Value.
Expand Down