cm-graphql 0.0.3 → 0.0.6

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: 7bfab7b28788ebbc885ae022e0968183caaae84a666dc3368dd9139b671188ce
4
- data.tar.gz: b392401f10dd7227b968d35000df97d98def50880cced1fe3922742908b4c70b
3
+ metadata.gz: d1a6afa908507f31c6c11f19e42e1e34c59963b80fb8d4e4f26f2661199910e3
4
+ data.tar.gz: '017878eb571de1b93072801b45f3fdb221013ff42d722b6827e18c12afe2f5f0'
5
5
  SHA512:
6
- metadata.gz: b6bdaa32b7d99300a3d78a4397024eb7d34cea339ad0dd3e0b27895d718e99d8327c6592578f9cbb971d1705f7f484a10d3773220db8a998fd8e0e600b30a2fb
7
- data.tar.gz: f5a5aeb6e08e3272a7ab2a3534c089e4d2ed3f2c3e352391ff925c2d61449bb63ed9bec646af6743a5b8e99ffc6d4210721fccd5e8529401dfd8ed3ebb38ba56
6
+ metadata.gz: 8f340a1be6e20126f347786dd53a68c158972cf76044db36311666506e8d72c775dec5ac737ee110ff76b4ffa38a42ff6c99e92359048c27f043b94e1feedbfb
7
+ data.tar.gz: 2fd871043d2cbb44853f2cc2048fa0240ca1550b2c8c4de480d52252f81e061055ee5a4e73ca1405c4cf3ec9734fe183c13dc9a517d92519149d11066fac9705
data/Gemfile CHANGED
@@ -1,4 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
- source 'https://rails-assets.org'
3
4
 
4
- gemspec
5
+ gemspec
data/Gemfile.lock CHANGED
@@ -1,57 +1,70 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cm-graphql (0.0.3)
5
- graphiql-rails (~> 1.8.0)
6
- graphql (~> 1.13.1)
7
- graphql-errors (~> 0.4.0)
8
- graphql-rails_logger (~> 1.2.3)
9
- kaminari (~> 1.2.2)
4
+ cm-graphql (0.0.6)
5
+ graphiql-rails (~> 1.9)
6
+ graphql (~> 2.2, >= 2.2.5)
7
+ graphql-rails_logger (~> 1.2, >= 1.2.4)
8
+ kaminari (~> 1.2, >= 1.2.2)
10
9
 
11
10
  GEM
12
11
  remote: https://rubygems.org/
13
- remote: https://rails-assets.org/
14
12
  specs:
15
- actionpack (7.0.5.1)
16
- actionview (= 7.0.5.1)
17
- activesupport (= 7.0.5.1)
18
- rack (~> 2.0, >= 2.2.4)
13
+ actionpack (7.1.3.3)
14
+ actionview (= 7.1.3.3)
15
+ activesupport (= 7.1.3.3)
16
+ nokogiri (>= 1.8.5)
17
+ racc
18
+ rack (>= 2.2.4)
19
+ rack-session (>= 1.0.1)
19
20
  rack-test (>= 0.6.3)
20
- rails-dom-testing (~> 2.0)
21
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
22
- actionview (7.0.5.1)
23
- activesupport (= 7.0.5.1)
21
+ rails-dom-testing (~> 2.2)
22
+ rails-html-sanitizer (~> 1.6)
23
+ actionview (7.1.3.3)
24
+ activesupport (= 7.1.3.3)
24
25
  builder (~> 3.1)
25
- erubi (~> 1.4)
26
- rails-dom-testing (~> 2.0)
27
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
28
- activemodel (7.0.5.1)
29
- activesupport (= 7.0.5.1)
30
- activerecord (7.0.5.1)
31
- activemodel (= 7.0.5.1)
32
- activesupport (= 7.0.5.1)
33
- activesupport (7.0.5.1)
26
+ erubi (~> 1.11)
27
+ rails-dom-testing (~> 2.2)
28
+ rails-html-sanitizer (~> 1.6)
29
+ activemodel (7.1.3.3)
30
+ activesupport (= 7.1.3.3)
31
+ activerecord (7.1.3.3)
32
+ activemodel (= 7.1.3.3)
33
+ activesupport (= 7.1.3.3)
34
+ timeout (>= 0.4.0)
35
+ activesupport (7.1.3.3)
36
+ base64
37
+ bigdecimal
34
38
  concurrent-ruby (~> 1.0, >= 1.0.2)
39
+ connection_pool (>= 2.2.5)
40
+ drb
35
41
  i18n (>= 1.6, < 2)
36
42
  minitest (>= 5.1)
43
+ mutex_m
37
44
  tzinfo (~> 2.0)
38
- builder (3.2.4)
39
- concurrent-ruby (1.2.2)
45
+ base64 (0.2.0)
46
+ bigdecimal (3.1.8)
47
+ builder (3.3.0)
48
+ concurrent-ruby (1.3.1)
49
+ connection_pool (2.4.1)
40
50
  crass (1.0.6)
51
+ drb (2.2.1)
41
52
  erubi (1.12.0)
42
- graphiql-rails (1.8.0)
53
+ graphiql-rails (1.10.0)
43
54
  railties
44
- sprockets-rails
45
- graphql (1.13.19)
46
- graphql-errors (0.4.0)
47
- graphql (>= 1.6.0, < 2)
55
+ graphql (2.3.4)
56
+ base64
48
57
  graphql-rails_logger (1.2.4)
49
58
  actionpack (> 5.0)
50
59
  activesupport (> 5.0)
51
60
  railties (> 5.0)
52
61
  rouge (~> 3.0)
53
- i18n (1.14.1)
62
+ i18n (1.14.5)
54
63
  concurrent-ruby (~> 1.0)
64
+ io-console (0.7.2)
65
+ irb (1.13.1)
66
+ rdoc (>= 4.0.0)
67
+ reline (>= 0.4.2)
55
68
  kaminari (1.2.2)
56
69
  activesupport (>= 4.1.0)
57
70
  kaminari-actionview (= 1.2.2)
@@ -64,46 +77,57 @@ GEM
64
77
  activerecord
65
78
  kaminari-core (= 1.2.2)
66
79
  kaminari-core (1.2.2)
67
- loofah (2.21.3)
80
+ loofah (2.22.0)
68
81
  crass (~> 1.0.2)
69
82
  nokogiri (>= 1.12.0)
70
- method_source (1.0.0)
71
- minitest (5.18.1)
72
- nokogiri (1.15.2-arm64-darwin)
83
+ minitest (5.23.1)
84
+ mutex_m (0.2.0)
85
+ nokogiri (1.16.5-arm64-darwin)
73
86
  racc (~> 1.4)
74
- racc (1.7.1)
75
- rack (2.2.7)
87
+ psych (5.1.2)
88
+ stringio
89
+ racc (1.8.0)
90
+ rack (3.0.11)
91
+ rack-session (2.0.0)
92
+ rack (>= 3.0.0)
76
93
  rack-test (2.1.0)
77
94
  rack (>= 1.3)
78
- rails-dom-testing (2.0.3)
79
- activesupport (>= 4.2.0)
95
+ rackup (2.1.0)
96
+ rack (>= 3)
97
+ webrick (~> 1.8)
98
+ rails-dom-testing (2.2.0)
99
+ activesupport (>= 5.0.0)
100
+ minitest
80
101
  nokogiri (>= 1.6)
81
102
  rails-html-sanitizer (1.6.0)
82
103
  loofah (~> 2.21)
83
104
  nokogiri (~> 1.14)
84
- railties (7.0.5.1)
85
- actionpack (= 7.0.5.1)
86
- activesupport (= 7.0.5.1)
87
- method_source
105
+ railties (7.1.3.3)
106
+ actionpack (= 7.1.3.3)
107
+ activesupport (= 7.1.3.3)
108
+ irb
109
+ rackup (>= 1.0.0)
88
110
  rake (>= 12.2)
89
- thor (~> 1.0)
90
- zeitwerk (~> 2.5)
91
- rake (13.0.6)
111
+ thor (~> 1.0, >= 1.2.2)
112
+ zeitwerk (~> 2.6)
113
+ rake (13.2.1)
114
+ rdoc (6.7.0)
115
+ psych (>= 4.0.0)
116
+ reline (0.5.8)
117
+ io-console (~> 0.5)
92
118
  rouge (3.30.0)
93
- sprockets (4.2.0)
94
- concurrent-ruby (~> 1.0)
95
- rack (>= 2.2.4, < 4)
96
- sprockets-rails (3.4.2)
97
- actionpack (>= 5.2)
98
- activesupport (>= 5.2)
99
- sprockets (>= 3.0.0)
100
- thor (1.2.2)
119
+ stringio (3.1.0)
120
+ thor (1.3.1)
121
+ timeout (0.4.1)
101
122
  tzinfo (2.0.6)
102
123
  concurrent-ruby (~> 1.0)
103
- zeitwerk (2.6.8)
124
+ webrick (1.8.1)
125
+ zeitwerk (2.6.15)
104
126
 
105
127
  PLATFORMS
106
128
  arm64-darwin-20
129
+ arm64-darwin-22
130
+ ruby
107
131
 
108
132
  DEPENDENCIES
109
133
  cm-graphql!
@@ -3,6 +3,7 @@ module Types::Objects::Base
3
3
  field :id, Int, nil, null: false
4
4
  field :filename, String, nil, null: false
5
5
  field :url, String, nil, null: false
6
+ field :base64, String, nil, null: false
6
7
 
7
8
  def id
8
9
  if object.class.eql?(ActiveStorage::Variant)
@@ -29,5 +30,14 @@ module Types::Objects::Base
29
30
  object.url
30
31
  end
31
32
  end
33
+
34
+ def base64
35
+ data = if object.class.eql?(ActiveStorage::Variant)
36
+ Base64.strict_encode64(object.blob.download)
37
+ else
38
+ Base64.strict_encode64(object.download)
39
+ end
40
+ "data:#{object.content_type};base64,#{data}"
41
+ end
32
42
  end
33
43
  end
data/cm-graphql.gemspec CHANGED
@@ -1,25 +1,25 @@
1
+ # frozen_string_literal: true
2
+
1
3
  Gem::Specification.new do |spec|
2
- spec.name = 'cm-graphql'
3
- spec.version = '0.0.3'
4
- spec.date = '2022-09-14'
5
- spec.summary = "A gem to setup grapqhl basics like pagination, file upload"
6
- spec.description = "A gem to setup grapqhl basics like pagination, file upload"
7
- spec.authors = ["Anbazhagan Palani"]
8
- spec.email = 'anbu@commutatus.com'
9
- spec.homepage =
10
- 'https://github.com/commutatus/template-paging-api'
4
+ spec.name = 'cm-graphql'
5
+ spec.version = '0.0.6'
6
+ spec.date = '2022-09-14'
7
+ spec.summary = 'A gem to setup grapqhl basics like pagination, file upload'
8
+ spec.description = 'A gem to setup grapqhl basics like pagination, file upload'
9
+ spec.authors = ['Anbazhagan Palani']
10
+ spec.email = ['anbu@commutatus.com']
11
+ spec.homepage = 'https://github.com/commutatus/template-paging-api'
11
12
  spec.license = 'MIT'
12
-
13
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
13
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
14
14
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
15
15
  end
16
- spec.bindir = "exe"
16
+ spec.bindir = 'exe'
17
17
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
18
- spec.require_paths = ["lib"]
18
+ spec.require_paths = ['lib']
19
+ spec.required_ruby_version = '>= 3.0.0'
19
20
 
20
- spec.add_runtime_dependency 'graphql', '~> 1.13.1'
21
- spec.add_runtime_dependency 'graphql-errors', '~> 0.4.0'
22
- spec.add_runtime_dependency 'graphql-rails_logger', '~> 1.2.3'
23
- spec.add_runtime_dependency 'graphiql-rails', '~> 1.8.0'
24
- spec.add_runtime_dependency 'kaminari', '~> 1.2.2'
21
+ spec.add_runtime_dependency 'graphiql-rails', '~> 1.9'
22
+ spec.add_runtime_dependency 'graphql', '~> 2.2', '>= 2.2.5'
23
+ spec.add_runtime_dependency 'graphql-rails_logger', '~> 1.2', '>= 1.2.4'
24
+ spec.add_runtime_dependency 'kaminari', '~> 1.2', '>= 1.2.2'
25
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cm-graphql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anbazhagan Palani
@@ -11,66 +11,67 @@ cert_chain: []
11
11
  date: 2022-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: graphql
14
+ name: graphiql-rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.13.1
19
+ version: '1.9'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.13.1
26
+ version: '1.9'
27
27
  - !ruby/object:Gem::Dependency
28
- name: graphql-errors
28
+ name: graphql
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.4.0
33
+ version: '2.2'
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: 2.2.5
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
38
41
  - - "~>"
39
42
  - !ruby/object:Gem::Version
40
- version: 0.4.0
43
+ version: '2.2'
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 2.2.5
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: graphql-rails_logger
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
51
  - - "~>"
46
52
  - !ruby/object:Gem::Version
47
- version: 1.2.3
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: 1.2.3
55
- - !ruby/object:Gem::Dependency
56
- name: graphiql-rails
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
53
+ version: '1.2'
54
+ - - ">="
60
55
  - !ruby/object:Gem::Version
61
- version: 1.8.0
56
+ version: 1.2.4
62
57
  type: :runtime
63
58
  prerelease: false
64
59
  version_requirements: !ruby/object:Gem::Requirement
65
60
  requirements:
66
61
  - - "~>"
67
62
  - !ruby/object:Gem::Version
68
- version: 1.8.0
63
+ version: '1.2'
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: 1.2.4
69
67
  - !ruby/object:Gem::Dependency
70
68
  name: kaminari
71
69
  requirement: !ruby/object:Gem::Requirement
72
70
  requirements:
73
71
  - - "~>"
72
+ - !ruby/object:Gem::Version
73
+ version: '1.2'
74
+ - - ">="
74
75
  - !ruby/object:Gem::Version
75
76
  version: 1.2.2
76
77
  type: :runtime
@@ -78,10 +79,14 @@ dependencies:
78
79
  version_requirements: !ruby/object:Gem::Requirement
79
80
  requirements:
80
81
  - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '1.2'
84
+ - - ">="
81
85
  - !ruby/object:Gem::Version
82
86
  version: 1.2.2
83
87
  description: A gem to setup grapqhl basics like pagination, file upload
84
- email: anbu@commutatus.com
88
+ email:
89
+ - anbu@commutatus.com
85
90
  executables: []
86
91
  extensions: []
87
92
  extra_rdoc_files: []
@@ -127,7 +132,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
127
132
  requirements:
128
133
  - - ">="
129
134
  - !ruby/object:Gem::Version
130
- version: '0'
135
+ version: 3.0.0
131
136
  required_rubygems_version: !ruby/object:Gem::Requirement
132
137
  requirements:
133
138
  - - ">="