Skip to content

Commit d92681d

Browse files
committed
Set up CI (Travis)
1 parent 880b061 commit d92681d

File tree

8 files changed

+21
-11
lines changed

8 files changed

+21
-11
lines changed

.travis.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
language: rust
2+
rust:
3+
- stable
4+
- beta
5+
- nightly
6+
cache: cargo
7+
script:
8+
- cargo test --verbose
9+
- cd graphql_query_derive && cargo test --verbose
10+
- cd ../examples/github && cargo build

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
2-
name = "graphql_query"
3-
version = "0.1.0"
2+
name = "graphql_client"
3+
version = "0.0.1"
44
authors = ["Tom Houlé <[email protected]>"]
55

66
[dependencies]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ struct MyQuery;
1313
fn perform_my_query(variables: &my_query::Variables) -> Result<(), failure::Error> {
1414
let body = MyQuery::expand(variables);
1515
let client = reqwest::Client::new();
16-
let res: HttpResponse<graphql_query::Response<my_query::ResponseData>> = client.post("/graphql", body)?;
16+
let res: HttpResponse<graphql_client::Response<my_query::ResponseData>> = client.post("/graphql", body)?;
1717
println!("{:#?}", res.body);
1818
}
1919
```

examples/github/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors = ["Tom Houlé <[email protected]>"]
55

66
[dependencies]
77
failure = "*"
8-
graphql_query = { path = "../.." }
8+
graphql_client = { path = "../.." }
99
serde = "1.0"
1010
serde_derive = "1.0"
1111
serde_json = "1.0"

examples/github/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
extern crate failure;
22
#[macro_use]
3-
extern crate graphql_query;
3+
extern crate graphql_client;
44
extern crate reqwest;
55
extern crate serde;
66
extern crate serde_json;
77
#[macro_use]
88
extern crate serde_derive;
99

10-
use graphql_query::*;
10+
use graphql_client::*;
1111

1212
#[derive(GraphQLQuery)]
1313
#[GraphQLQuery(schema_path = "src/schema.graphql", query_path = "src/query_1.graphql")]

graphql_query_derive/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,12 @@ fn impl_gql_query(input: &syn::DeriveInput) -> Result<TokenStream, failure::Erro
9595
#schema_output
9696
}
9797

98-
impl<'de> ::graphql_query::GraphQLQuery<'de> for #struct_name {
98+
impl<'de> ::graphql_client::GraphQLQuery<'de> for #struct_name {
9999
type Variables = #module_name::Variables;
100100
type ResponseData = #module_name::ResponseData;
101101

102-
fn build_query(variables: Self::Variables) -> ::graphql_query::GraphQLQueryBody<Self::Variables> {
103-
::graphql_query::GraphQLQueryBody {
102+
fn build_query(variables: Self::Variables) -> ::graphql_client::GraphQLQueryBody<Self::Variables> {
103+
::graphql_client::GraphQLQueryBody {
104104
variables,
105105
query: #module_name::QUERY,
106106
}

tests/introspection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#[macro_use]
2-
extern crate graphql_query;
2+
extern crate graphql_client;
33
#[macro_use]
44
extern crate serde_derive;
55
extern crate serde;

tests/star_wars.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#[macro_use]
2-
extern crate graphql_query;
2+
extern crate graphql_client;
33
#[macro_use]
44
extern crate serde_derive;
55
extern crate serde;

0 commit comments

Comments
 (0)