gql 0.0.11 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -2
- data/lib/gql/has_calls.rb +2 -2
- data/lib/gql/has_fields.rb +2 -2
- data/lib/gql/version.rb +1 -1
- metadata +1 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d558618a79185b2295c8f915f7c96aedccb92155
|
|
4
|
+
data.tar.gz: c8f61acb2a457c7b70ed6de9e5967b5e0a81e02a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 209fee25aec3f2cd00f8521a441a920f7bb60952301aa90b69a79eaddc51e2e805cc63d35a037eb43385e16fb430e9e2c833cc0183505af752c49187700693b0
|
|
7
|
+
data.tar.gz: 463586ba87299cf239e8a2433d9abe6c7bd51384e56cd93e005a75351c65283c1c0ae7b7f1db31027f2685d92cd2c232613084779be648e8f5e51bc6d4f27826
|
data/README.md
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
# gql
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://travis-ci.org/martinandert/gql)
|
|
4
|
+
[](https://codeclimate.com/github/martinandert/gql)
|
|
5
|
+
[](https://codeclimate.com/github/martinandert/gql)
|
|
6
|
+
[](https://gemnasium.com/martinandert/gql)
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
A Ruby implementation of Facebook's yet-to-be-released GraphQL specification, inspired by [graphql-ruby](https://github.com/rmosolgo/graphql-ruby), but with other/more/less features/bugs.
|
|
6
9
|
|
|
7
10
|
|
|
8
11
|
## Installation
|
data/lib/gql/has_calls.rb
CHANGED
|
@@ -14,10 +14,10 @@ module GQL
|
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
module ClassMethods
|
|
17
|
-
def call(id, *args)
|
|
17
|
+
def call(id, *args, &block)
|
|
18
18
|
options = args.extract_options!
|
|
19
19
|
|
|
20
|
-
call_spec = args.shift || proc_for_call(id)
|
|
20
|
+
call_spec = args.shift || block || proc_for_call(id)
|
|
21
21
|
result_spec = options[:returns] || call_spec.try(:result_class)
|
|
22
22
|
result_class = result_class_from_spec(result_spec)
|
|
23
23
|
|
data/lib/gql/has_fields.rb
CHANGED
|
@@ -13,10 +13,10 @@ module GQL
|
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
module ClassMethods
|
|
16
|
-
def field(id, *args)
|
|
16
|
+
def field(id, *args, &block)
|
|
17
17
|
options = args.extract_options!
|
|
18
18
|
type = options.delete(:type) || Node
|
|
19
|
-
proc = args.shift || proc_for_field(id)
|
|
19
|
+
proc = args.shift || block || proc_for_field(id)
|
|
20
20
|
|
|
21
21
|
Node.validate_is_subclass! type, 'type'
|
|
22
22
|
|
data/lib/gql/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gql
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.13
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Martin Andert
|
|
@@ -10,20 +10,6 @@ bindir: bin
|
|
|
10
10
|
cert_chain: []
|
|
11
11
|
date: 2015-03-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
|
-
- !ruby/object:Gem::Dependency
|
|
14
|
-
name: bundler
|
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
|
16
|
-
requirements:
|
|
17
|
-
- - "~>"
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: '1.8'
|
|
20
|
-
type: :development
|
|
21
|
-
prerelease: false
|
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
-
requirements:
|
|
24
|
-
- - "~>"
|
|
25
|
-
- !ruby/object:Gem::Version
|
|
26
|
-
version: '1.8'
|
|
27
13
|
- !ruby/object:Gem::Dependency
|
|
28
14
|
name: rake
|
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|