graphql_activerecord_autoselect 1.0.1 → 2.0.0

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
  SHA256:
3
- metadata.gz: caecb8f7b7d48b1b7c9142fe3da73950aa80318d1479e38a54359c6d3ff5ca36
4
- data.tar.gz: 52498c2f7bef76df343f6b5d4b3d1e8f3dc79436840730048eea1b44ae5f4841
3
+ metadata.gz: 660fb97204acd0358394fcddcdadf783cac1905a18c8b5c920415b8a45e0b888
4
+ data.tar.gz: 4e2404e946df00b9c23d36711e5a244a74824f13561735b96fec34a0537aa244
5
5
  SHA512:
6
- metadata.gz: 3e796c6d19a6c2965d6b34dcb0dfafad3d01633da4f2c8828829743c8d574cf260d249483e8b1575cc98df1d5840fe61bf2a519e147c963b7a35d9f41453a4f9
7
- data.tar.gz: c418278df367e06b6beb79dadce9929e6d3fe1e4ef20d55dbfbbfd29897661f8e3f8f285289a11201bacd823200ce412e9dd2007921e6097c97de63427357c91
6
+ metadata.gz: c888dc8c6c8f4ebade7f1739098130500dca49cbe5e68e531badf43204f4e2e033bc51c59b395832a712e94657c4314d7e81f8121dfa6fc1f225b2122849d0fe
7
+ data.tar.gz: 15d7366dfac45310b33a2518241d0b229ea54332bae869d64f1820f5affdbaaa6816aca1b5034c0097e61f4d03aad8a5ff2bea9785fb2a2a67c84194b01eb548
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## v2.0.0
2
+
3
+ * Add support for Ruby 3.0
4
+ * Add support for Ruby 3.1
5
+ * Add support for ActiveRecord 7
6
+ * Drop support for Ruby 2.5
7
+ * Drop support for Ruby 2.6
8
+ * Drop support for ActiveRecord 5
9
+
10
+
1
11
  ## v1.0.1
2
12
 
3
13
  * Added support for ActiveRecord 5+.
data/README.md CHANGED
@@ -12,8 +12,8 @@ The documentation can be found on [RubyDoc].
12
12
 
13
13
  ### Compatibility
14
14
 
15
- - Ruby 2.5+
16
- - ActiveRecord 5.0+
15
+ - Ruby 2.7+
16
+ - ActiveRecord 6.0+
17
17
  - GraphQL (Ruby) 1.9+
18
18
 
19
19
 
@@ -22,7 +22,7 @@ The documentation can be found on [RubyDoc].
22
22
  Add the gem to your Gemfile and run `bundle`.
23
23
 
24
24
  ```ruby
25
- gem "graphql_activerecord_autoselect", "~> 1"
25
+ gem "graphql_activerecord_autoselect", "~> 2"
26
26
  ```
27
27
 
28
28
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GraphQLActiveRecordAutoSelect
4
- VERSION = "1.0.1"
4
+ VERSION = "2.0.0"
5
5
  end
@@ -10,9 +10,9 @@ module GraphQLActiveRecordAutoSelect
10
10
  def autoselect(lookahead, dependents = {})
11
11
  select(
12
12
  GraphQLActiveRecordAutoSelect.call(
13
- :model => self,
14
- :lookahead => lookahead,
15
- :dependents => dependents,
13
+ model: self,
14
+ lookahead: lookahead,
15
+ dependents: dependents
16
16
  )
17
17
  )
18
18
  end
@@ -22,9 +22,9 @@ module GraphQLActiveRecordAutoSelect
22
22
  def autoselect(lookahead, dependents = {})
23
23
  select(
24
24
  GraphQLActiveRecordAutoSelect.call(
25
- :model => model,
26
- :lookahead => lookahead,
27
- :dependents => dependents
25
+ model: model,
26
+ lookahead: lookahead,
27
+ dependents: dependents
28
28
  )
29
29
  )
30
30
  end
@@ -32,10 +32,10 @@ module GraphQLActiveRecordAutoSelect
32
32
 
33
33
  def call(model:, lookahead:, dependents:)
34
34
  primary_key = model.primary_key
35
- columns = model.column_names
36
- fields = get_fields(lookahead)
35
+ columns = model.column_names
36
+ fields = get_fields(lookahead)
37
37
 
38
- Array.new.tap do |selection|
38
+ [].tap do |selection|
39
39
  selection.concat filter_by_columns(fields, columns)
40
40
  selection.concat include_identifier_columns(primary_key, columns)
41
41
  selection.concat include_dependents(fields, dependents)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql_activerecord_autoselect
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael van Rooijen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-05 00:00:00.000000000 Z
11
+ date: 2022-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -16,20 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 5.0.0
19
+ version: 6.0.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: 7.0.0
22
+ version: 8.0.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 5.0.0
29
+ version: 6.0.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: 7.0.0
32
+ version: 8.0.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: graphql
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -56,56 +56,56 @@ dependencies:
56
56
  requirements:
57
57
  - - '='
58
58
  - !ruby/object:Gem::Version
59
- version: 12.3.3
59
+ version: 13.0.6
60
60
  type: :development
61
61
  prerelease: false
62
62
  version_requirements: !ruby/object:Gem::Requirement
63
63
  requirements:
64
64
  - - '='
65
65
  - !ruby/object:Gem::Version
66
- version: 12.3.3
66
+ version: 13.0.6
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: yard
69
69
  requirement: !ruby/object:Gem::Requirement
70
70
  requirements:
71
71
  - - '='
72
72
  - !ruby/object:Gem::Version
73
- version: 0.9.25
73
+ version: 0.9.27
74
74
  type: :development
75
75
  prerelease: false
76
76
  version_requirements: !ruby/object:Gem::Requirement
77
77
  requirements:
78
78
  - - '='
79
79
  - !ruby/object:Gem::Version
80
- version: 0.9.25
80
+ version: 0.9.27
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: minitest
83
83
  requirement: !ruby/object:Gem::Requirement
84
84
  requirements:
85
85
  - - '='
86
86
  - !ruby/object:Gem::Version
87
- version: 5.14.1
87
+ version: 5.15.0
88
88
  type: :development
89
89
  prerelease: false
90
90
  version_requirements: !ruby/object:Gem::Requirement
91
91
  requirements:
92
92
  - - '='
93
93
  - !ruby/object:Gem::Version
94
- version: 5.14.1
94
+ version: 5.15.0
95
95
  - !ruby/object:Gem::Dependency
96
96
  name: simplecov
97
97
  requirement: !ruby/object:Gem::Requirement
98
98
  requirements:
99
99
  - - '='
100
100
  - !ruby/object:Gem::Version
101
- version: 0.18.5
101
+ version: 0.21.2
102
102
  type: :development
103
103
  prerelease: false
104
104
  version_requirements: !ruby/object:Gem::Requirement
105
105
  requirements:
106
106
  - - '='
107
107
  - !ruby/object:Gem::Version
108
- version: 0.18.5
108
+ version: 0.21.2
109
109
  description:
110
110
  email:
111
111
  - michael@vanrooijen.io
@@ -126,7 +126,7 @@ metadata:
126
126
  source_code_uri: https://github.com/mrrooijen/graphql_activerecord_autoselect
127
127
  changelog_uri: https://github.com/mrrooijen/graphql_activerecord_autoselect/blob/master/CHANGELOG.md
128
128
  bug_tracker_uri: https://github.com/mrrooijen/graphql_activerecord_autoselect/issues
129
- documentation_uri: https://rubydoc.info/gems/graphql_activerecord_autoselect/1.0.1
129
+ documentation_uri: https://rubydoc.info/gems/graphql_activerecord_autoselect/2.0.0
130
130
  post_install_message:
131
131
  rdoc_options: []
132
132
  require_paths:
@@ -135,14 +135,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
- version: 2.5.0
138
+ version: 2.7.0
139
139
  required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  requirements:
141
141
  - - ">="
142
142
  - !ruby/object:Gem::Version
143
143
  version: '0'
144
144
  requirements: []
145
- rubygems_version: 3.1.2
145
+ rubygems_version: 3.2.22
146
146
  signing_key:
147
147
  specification_version: 4
148
148
  summary: Automatic ActiveRecord column selection for GraphQL (Ruby) fields.