graphql-relay 0.4.4 → 0.4.5

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: 3ef33be1f3e6ae5251b8ad8248e208b1d884bc80
4
- data.tar.gz: 01b0b8d1d1e0ca687f1580b7b2d2e7f45303468f
3
+ metadata.gz: 3d0bd634a71aa2be9428940eab50e6f6e7c9853f
4
+ data.tar.gz: f32a8964ce51f8f905805ccde48e841e8d1ccf5a
5
5
  SHA512:
6
- metadata.gz: cafa3a911d77401ba5bc525d1ccac55b388bfe861f12209c70d1bb47c62e08a423dee71512c0d6b860ed6260275a2d74a2f8dc91d94c397f676ce56d8528385f
7
- data.tar.gz: 99234b626e2f8122d8bf304041bde214e4f8d5930176a255cd121f1b7fbd895e058d0d71a98e400ed2efe535ea41c8d3e2aa8dcfed5ef1428dd54a3eec986854
6
+ metadata.gz: 186e7f8a0ad72dfbaf01580f796e5c39370f14025b65d8d28ce71ea9104c627e3a3d5fc60b3bf37300fba219c9067deffe555d18d79f488f2b325851a7e8c6bf
7
+ data.tar.gz: c586420ab30495c62ef769e6b319dfdd6f46174476412715623cccf485a6352c54bcda0220a84bef2477dbdb6d595cdd6a0e0a2a33e58101f44f597797f40dfe
@@ -11,24 +11,17 @@ module GraphQL
11
11
  attr_accessor :object_from_id_proc, :type_from_object_proc
12
12
 
13
13
  class << self
14
+ attr_reader :instance
14
15
  def new(*args, &block)
15
- if @instance.nil?
16
- @instance = super
17
- else
18
- raise("Can't make a second global identifier!")
19
- end
20
- end
21
-
22
- def instance
23
- @instance
16
+ @instance = super
24
17
  end
25
18
 
26
19
  def from_global_id(id)
27
- @instance.from_global_id(id)
20
+ instance.from_global_id(id)
28
21
  end
29
22
 
30
23
  def to_global_id(type_name, id)
31
- @instance.to_global_id(type_name, id)
24
+ instance.to_global_id(type_name, id)
32
25
  end
33
26
  end
34
27
 
@@ -29,7 +29,7 @@ module GraphQL
29
29
  items = object
30
30
 
31
31
  if order
32
- items = items.order(order_name => order_direction)
32
+ items = items.order(items.table[order_name].public_send(order_direction))
33
33
  end
34
34
 
35
35
  if after
@@ -1,5 +1,5 @@
1
1
  module GraphQL
2
2
  module Relay
3
- VERSION = '0.4.4'
3
+ VERSION = '0.4.5'
4
4
  end
5
5
  end
@@ -48,11 +48,11 @@ describe GraphQL::Relay::GlobalNodeIdentification do
48
48
  end
49
49
 
50
50
  describe 'making a second instance' do
51
- it 'raises an error' do
52
- err = assert_raises(RuntimeError) do
53
- GraphQL::Relay::GlobalNodeIdentification.define {}
54
- end
55
- assert_includes(err.message, "Can't make a second")
51
+ it 'overrides the first instance' do
52
+ first_instance = GraphQL::Relay::GlobalNodeIdentification.instance
53
+ GraphQL::Relay::GlobalNodeIdentification.define {}
54
+ second_instance = GraphQL::Relay::GlobalNodeIdentification.instance
55
+ refute_equal(first_instance, second_instance)
56
56
  end
57
57
  end
58
58
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql-relay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Mosolgo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-29 00:00:00.000000000 Z
11
+ date: 2015-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphql
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: appraisal
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: codeclimate-test-reporter
43
57
  requirement: !ruby/object:Gem::Requirement