graphql-autotest 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -0
- data/README.md +4 -0
- data/lib/graphql/autotest/runner.rb +9 -4
- data/lib/graphql/autotest/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02c7dc964968ddb2024c3120913c4276e03112ecdd2a5f563c10165e6afb92ed
|
4
|
+
data.tar.gz: 3d0e03c20e2575ff8d68e0a553428ee11333e07371616facf74e22f2580707ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8281378f21b276b9db8e26f75a73db161841ea9feb6b2a63da46e2279fda5a1b5f227ba8e2f61a1285dfa8c2f87992330c30282c216c3775c031b156697c2d6
|
7
|
+
data.tar.gz: 66663b66fbf9a00fa4e2595ca4c8aa0291124c63c1cd8260d6e4a419031c0276bcd978bec60cef7a160037bf53bff3037c65091f88d5601ee2b5530fca0939bb
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# Change log
|
2
|
+
|
3
|
+
## master (unreleased)
|
4
|
+
|
5
|
+
## 0.2.0
|
6
|
+
|
7
|
+
* `GraphQL::Autotest::Runner` receives `logger` keyword argument.
|
8
|
+
|
9
|
+
## 0.1.2 (2020-03-18)
|
10
|
+
|
11
|
+
* Restrict `required_ruby_version` to Ruby 2.5.
|
12
|
+
|
13
|
+
## 0.1.1 (2020-03-15)
|
14
|
+
|
15
|
+
* Fix interface of `GraphQL::Autotest::Field#to_query` for smoke testing.
|
16
|
+
|
17
|
+
## 0.1.0 (2020-03-15)
|
18
|
+
|
19
|
+
* The first release!🎉
|
data/README.md
CHANGED
@@ -1,20 +1,21 @@
|
|
1
1
|
module GraphQL
|
2
2
|
module Autotest
|
3
3
|
class Runner
|
4
|
-
attr_reader :schema, :context, :arguments_fetcher, :max_depth, :skip_if
|
5
|
-
private :schema, :context, :arguments_fetcher, :max_depth, :skip_if
|
4
|
+
attr_reader :schema, :context, :arguments_fetcher, :max_depth, :skip_if, :logger
|
5
|
+
private :schema, :context, :arguments_fetcher, :max_depth, :skip_if, :logger
|
6
6
|
|
7
7
|
# @param schema [Class<GraphQL::Schema>]
|
8
8
|
# @param context [Hash] it passes to GraphQL::Schema.execute
|
9
9
|
# @param arguments_fetcher [Proc] A proc receives a field and ancestors keyword argument, and it returns a Hash. The hash is passed to call the field.
|
10
10
|
# @param max_depth [Integer] Max query depth. It is recommended to specify to avoid too large query.
|
11
11
|
# @param skip_if [Proc] A proc receives a field and ancestors keyword argument, and it returns a boolean. If it returns ture, the field is skipped.
|
12
|
-
def initialize(schema:, context:, arguments_fetcher: ArgumentsFetcher::DEFAULT, max_depth: 10, skip_if: -> (_field, **) { false })
|
12
|
+
def initialize(schema:, context:, arguments_fetcher: ArgumentsFetcher::DEFAULT, max_depth: 10, skip_if: -> (_field, **) { false }, logger:)
|
13
13
|
@schema = schema
|
14
14
|
@context = context
|
15
15
|
@arguments_fetcher = arguments_fetcher
|
16
16
|
@max_depth = max_depth
|
17
17
|
@skip_if = skip_if
|
18
|
+
@logger = logger
|
18
19
|
end
|
19
20
|
|
20
21
|
def report(dry_run: false)
|
@@ -28,7 +29,11 @@ module GraphQL
|
|
28
29
|
)
|
29
30
|
fields.each do |f|
|
30
31
|
q = f.to_query
|
31
|
-
|
32
|
+
|
33
|
+
if logger && logger.respond_to?(:info)
|
34
|
+
logger.info "Running Query: #{f.name}"
|
35
|
+
end
|
36
|
+
|
32
37
|
result = if dry_run
|
33
38
|
{}
|
34
39
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphql-autotest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masataka Pocke Kuwabara
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphql
|
@@ -33,6 +33,7 @@ extra_rdoc_files: []
|
|
33
33
|
files:
|
34
34
|
- ".gitignore"
|
35
35
|
- ".travis.yml"
|
36
|
+
- CHANGELOG.md
|
36
37
|
- Gemfile
|
37
38
|
- LICENSE
|
38
39
|
- README.md
|