active_decorator-graphql 0.2.0 → 0.3.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
- SHA1:
3
- metadata.gz: 108e2d8ff610ce64f923477f0bfcc2ec6345cfff
4
- data.tar.gz: d4fa650fcdee5fb6e8ca9bd86ecda1e5a30181d1
2
+ SHA256:
3
+ metadata.gz: e08195250d871bcd9d61e13cfa581311bb9c725fcb3c691a3821b045cb1ab893
4
+ data.tar.gz: 7e7444f8943d340df28d0ac6ff4dafaf98329f1db7a8ff066c2f8add3f1f365b
5
5
  SHA512:
6
- metadata.gz: d0838c082fdcd41bc8a2c5797976558878302bd392003f58000c1ed84009477e4f81fe9cbba353ed35b496c7261b2bbde3b29f74b896e8897c33155a08c431d4
7
- data.tar.gz: 7ffa932d27f8b3d878ab65a7a81f9a2cc8a6a5f66041a5bc597aa4f4f8661aac4374eb0e971c96e078825f57388df092f62d4e052b3154e8bc9b0705df36f85d
6
+ metadata.gz: 327e28f4c2987fcdc2b124c7877e8795f4344f865e9ccf55e5cb9b461699472cc6e3972bab1a08edef9c6e27b3de219c0b5bdce9dd2d9766e406363a814cdb24
7
+ data.tar.gz: 93310af2264328f537d1a2bb2f7cc3336ceac49769d8b774411c1c2d374ef3a2bb1935fd95a5f18d4df7debf4c5cbacb556fe43fddaea6a496ed563da4eb588f
@@ -1,13 +1,25 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.2.7
5
- - 2.3.4
6
- - 2.4.1
4
+ - 2.2.10
5
+ - 2.3.8
6
+ - 2.4.9
7
+ - 2.5.7
8
+ - 2.6.5
7
9
  gemfile:
8
10
  - gemfiles/rails_4_2.gemfile
9
11
  - gemfiles/rails_5_0.gemfile
10
12
  - gemfiles/rails_5_1.gemfile
13
+ - gemfiles/rails_5_2.gemfile
14
+ - gemfiles/rails_6_0.gemfile
15
+ jobs:
16
+ exclude:
17
+ - rvm: 2.2.10
18
+ gemfile: gemfiles/rails_6_0.gemfile
19
+ - rvm: 2.3.8
20
+ gemfile: gemfiles/rails_6_0.gemfile
21
+ - rvm: 2.4.9
22
+ gemfile: gemfiles/rails_6_0.gemfile
11
23
  notifications:
12
24
  email: false
13
- before_install: gem install bundler
25
+ before_install: gem install bundler -v 1.17.3
@@ -0,0 +1,7 @@
1
+ ## 0.3.0
2
+
3
+ * Support Class based API [@ogidow]
4
+
5
+ ## 0.2.0
6
+
7
+ * Support decoration control options
data/README.md CHANGED
@@ -56,6 +56,7 @@ then GraphQL::Field resolves `full_name` by decorated Author objects.
56
56
  ### Decorate only specific fields
57
57
 
58
58
  If you want to decorate only specific fields ActiveDecorater::GraphQL provides options to control decoration default and field decoration.
59
+ Class-based API does not support decorate option.
59
60
 
60
61
  - Control decoration defaults (config/initializers/active_decorator-graphql.rb)
61
62
 
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'active_decorator'
4
+ gem 'graphql'
5
+ gem 'rails', "~> 5.2.0"
6
+
7
+ gemspec :path => '../'
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'active_decorator'
4
+ gem 'graphql'
5
+ gem 'rails', "~> 6.0.0"
6
+
7
+ gemspec :path => '../'
@@ -13,7 +13,13 @@ module GraphQL
13
13
 
14
14
  alias resolve_org resolve
15
15
  def resolve(object, arguments, context)
16
- ::ActiveDecorator::Decorator.instance.decorate(object) if need_decorate?
16
+ if need_decorate?
17
+ if object.respond_to?(:object)
18
+ ::ActiveDecorator::Decorator.instance.decorate(object.object)
19
+ else
20
+ ::ActiveDecorator::Decorator.instance.decorate(object)
21
+ end
22
+ end
17
23
  resolve_org(object, arguments, context)
18
24
  end
19
25
 
@@ -1,5 +1,5 @@
1
1
  module ActiveDecorator
2
2
  module GraphQL
3
- VERSION = "0.2.0"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_decorator-graphql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shimoyama, Hiroyasu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-23 00:00:00.000000000 Z
11
+ date: 2019-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -118,6 +118,7 @@ files:
118
118
  - ".gitignore"
119
119
  - ".rspec"
120
120
  - ".travis.yml"
121
+ - CHANGELOG.md
121
122
  - Gemfile
122
123
  - LICENSE
123
124
  - LICENSE.txt
@@ -129,6 +130,8 @@ files:
129
130
  - gemfiles/rails_4_2.gemfile
130
131
  - gemfiles/rails_5_0.gemfile
131
132
  - gemfiles/rails_5_1.gemfile
133
+ - gemfiles/rails_5_2.gemfile
134
+ - gemfiles/rails_6_0.gemfile
132
135
  - lib/active_decorator/graphql.rb
133
136
  - lib/active_decorator/graphql/config.rb
134
137
  - lib/active_decorator/graphql/version.rb
@@ -151,8 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
154
  - !ruby/object:Gem::Version
152
155
  version: '0'
153
156
  requirements: []
154
- rubyforge_project:
155
- rubygems_version: 2.6.11
157
+ rubygems_version: 3.0.1
156
158
  signing_key:
157
159
  specification_version: 4
158
160
  summary: A toolkit for decorating GraphQL field objects.