gql 0.0.11 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: defb9d23450cd1caa407d256c9cc8606ced22880
4
- data.tar.gz: 069be6463c76f8add762ce9dff462e3d36a15a0c
3
+ metadata.gz: d558618a79185b2295c8f915f7c96aedccb92155
4
+ data.tar.gz: c8f61acb2a457c7b70ed6de9e5967b5e0a81e02a
5
5
  SHA512:
6
- metadata.gz: c5d31f91c8bb62a86e08a1fe77ba99a860766b67b91099aa8ada33e75cd13f8a57934795b2d14722dd435407a40c775c378deab6922790e6d41252a5faaa7d5a
7
- data.tar.gz: d7edece3f9ff42860d183bdbd41584ae69bc0d96b82936c8e7b7c625857746edda3f0c27826a72c6ff7f0b989a5a3796a0dae2a241c47274d32d581864c44b81
6
+ metadata.gz: 209fee25aec3f2cd00f8521a441a920f7bb60952301aa90b69a79eaddc51e2e805cc63d35a037eb43385e16fb430e9e2c833cc0183505af752c49187700693b0
7
+ data.tar.gz: 463586ba87299cf239e8a2433d9abe6c7bd51384e56cd93e005a75351c65283c1c0ae7b7f1db31027f2685d92cd2c232613084779be648e8f5e51bc6d4f27826
data/README.md CHANGED
@@ -1,8 +1,11 @@
1
1
  # gql
2
2
 
3
- 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.
3
+ [![Build Status](https://travis-ci.org/martinandert/gql.svg?branch=master)](https://travis-ci.org/martinandert/gql)
4
+ [![Code Climate](https://codeclimate.com/github/martinandert/gql/badges/gpa.svg)](https://codeclimate.com/github/martinandert/gql)
5
+ [![Test Coverage](https://codeclimate.com/github/martinandert/gql/badges/coverage.svg)](https://codeclimate.com/github/martinandert/gql)
6
+ [![Dependency Status](https://gemnasium.com/martinandert/gql.svg)](https://gemnasium.com/martinandert/gql)
4
7
 
5
- Caution! This is pre-alpha software. Use at your own risk.
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
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module GQL
2
- VERSION = '0.0.11'
2
+ VERSION = '0.0.13'
3
3
  end
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.11
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