apollo_upload_server 2.0.0 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 97e491553bdb29a03386d2229bca43ebf512ac6ddeddba29994ad5c0bb43ded9
4
- data.tar.gz: 28aebd6de26820cd8eb2ef74d7a5d9664253f73e83322e79bfcb72710a54b3ef
3
+ metadata.gz: 28de01ef8ade8b660d60ba6f27c259e47d53d680ebd5271025f6943b0829ed6e
4
+ data.tar.gz: 98879e0bb8bfe463b6174337eca9fe83269b7364e46642de3c067a198f2e9c07
5
5
  SHA512:
6
- metadata.gz: 84a5f11fc3cc6a35540769c358b5d43679e085b6248196c72216613d8f2aeb8d8200ff38faebccbe93abb4a1ec9cafaa7d712c06f9d967a24613834a6933a399
7
- data.tar.gz: bcf33efcee3ddf57e9106c7d408dee97254e273d590e1b707155fbbeb64c88ede322c43a8fc2e037fcabb9c5d769aaadbb74502a5bf2afd4ade5eb7a24277863
6
+ metadata.gz: 22ce039d4b7962fd6494476c22da5a9de0f97779798584d376e59564895efec81af01848abc190d68a08191980ed99df04490ef3f2949f95b9f15c82a7052f05
7
+ data.tar.gz: 6902346ec482512cea834ada0acaafe8f3faf2e14bf150aa5459cfa82ccfc7d1c11d688bfaa6ee45f6dac72004b942bb4af600f48c050aa5fe3fb0cbb6ee080a
data/Gemfile.lock CHANGED
@@ -8,101 +8,116 @@ PATH
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actioncable (5.2.2)
12
- actionpack (= 5.2.2)
11
+ actioncable (6.0.2.2)
12
+ actionpack (= 6.0.2.2)
13
13
  nio4r (~> 2.0)
14
14
  websocket-driver (>= 0.6.1)
15
- actionmailer (5.2.2)
16
- actionpack (= 5.2.2)
17
- actionview (= 5.2.2)
18
- activejob (= 5.2.2)
15
+ actionmailbox (6.0.2.2)
16
+ actionpack (= 6.0.2.2)
17
+ activejob (= 6.0.2.2)
18
+ activerecord (= 6.0.2.2)
19
+ activestorage (= 6.0.2.2)
20
+ activesupport (= 6.0.2.2)
21
+ mail (>= 2.7.1)
22
+ actionmailer (6.0.2.2)
23
+ actionpack (= 6.0.2.2)
24
+ actionview (= 6.0.2.2)
25
+ activejob (= 6.0.2.2)
19
26
  mail (~> 2.5, >= 2.5.4)
20
27
  rails-dom-testing (~> 2.0)
21
- actionpack (5.2.2)
22
- actionview (= 5.2.2)
23
- activesupport (= 5.2.2)
24
- rack (~> 2.0)
28
+ actionpack (6.0.2.2)
29
+ actionview (= 6.0.2.2)
30
+ activesupport (= 6.0.2.2)
31
+ rack (~> 2.0, >= 2.0.8)
25
32
  rack-test (>= 0.6.3)
26
33
  rails-dom-testing (~> 2.0)
27
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
28
- actionview (5.2.2)
29
- activesupport (= 5.2.2)
34
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
35
+ actiontext (6.0.2.2)
36
+ actionpack (= 6.0.2.2)
37
+ activerecord (= 6.0.2.2)
38
+ activestorage (= 6.0.2.2)
39
+ activesupport (= 6.0.2.2)
40
+ nokogiri (>= 1.8.5)
41
+ actionview (6.0.2.2)
42
+ activesupport (= 6.0.2.2)
30
43
  builder (~> 3.1)
31
44
  erubi (~> 1.4)
32
45
  rails-dom-testing (~> 2.0)
33
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
34
- activejob (5.2.2)
35
- activesupport (= 5.2.2)
46
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
47
+ activejob (6.0.2.2)
48
+ activesupport (= 6.0.2.2)
36
49
  globalid (>= 0.3.6)
37
- activemodel (5.2.2)
38
- activesupport (= 5.2.2)
39
- activerecord (5.2.2)
40
- activemodel (= 5.2.2)
41
- activesupport (= 5.2.2)
42
- arel (>= 9.0)
43
- activestorage (5.2.2)
44
- actionpack (= 5.2.2)
45
- activerecord (= 5.2.2)
50
+ activemodel (6.0.2.2)
51
+ activesupport (= 6.0.2.2)
52
+ activerecord (6.0.2.2)
53
+ activemodel (= 6.0.2.2)
54
+ activesupport (= 6.0.2.2)
55
+ activestorage (6.0.2.2)
56
+ actionpack (= 6.0.2.2)
57
+ activejob (= 6.0.2.2)
58
+ activerecord (= 6.0.2.2)
46
59
  marcel (~> 0.3.1)
47
- activesupport (5.2.2)
60
+ activesupport (6.0.2.2)
48
61
  concurrent-ruby (~> 1.0, >= 1.0.2)
49
62
  i18n (>= 0.7, < 2)
50
63
  minitest (~> 5.1)
51
64
  tzinfo (~> 1.1)
52
- arel (9.0.0)
53
- builder (3.2.3)
54
- concurrent-ruby (1.1.4)
55
- crass (1.0.5)
65
+ zeitwerk (~> 2.2)
66
+ builder (3.2.4)
67
+ concurrent-ruby (1.1.6)
68
+ crass (1.0.6)
56
69
  diff-lcs (1.3)
57
- erubi (1.8.0)
70
+ erubi (1.9.0)
58
71
  globalid (0.4.2)
59
72
  activesupport (>= 4.2.0)
60
73
  graphql (1.8.13)
61
- i18n (1.5.3)
74
+ i18n (1.8.2)
62
75
  concurrent-ruby (~> 1.0)
63
- loofah (2.3.1)
76
+ loofah (2.4.0)
64
77
  crass (~> 1.0.2)
65
78
  nokogiri (>= 1.5.9)
66
79
  mail (2.7.1)
67
80
  mini_mime (>= 0.1.1)
68
81
  marcel (0.3.3)
69
82
  mimemagic (~> 0.3.2)
70
- method_source (0.9.2)
71
- mimemagic (0.3.3)
72
- mini_mime (1.0.1)
83
+ method_source (1.0.0)
84
+ mimemagic (0.3.4)
85
+ mini_mime (1.0.2)
73
86
  mini_portile2 (2.4.0)
74
- minitest (5.11.3)
75
- nio4r (2.3.1)
76
- nokogiri (1.10.5)
87
+ minitest (5.14.0)
88
+ nio4r (2.5.2)
89
+ nokogiri (1.10.9)
77
90
  mini_portile2 (~> 2.4.0)
78
- rack (2.0.8)
91
+ rack (2.2.2)
79
92
  rack-test (1.1.0)
80
93
  rack (>= 1.0, < 3)
81
- rails (5.2.2)
82
- actioncable (= 5.2.2)
83
- actionmailer (= 5.2.2)
84
- actionpack (= 5.2.2)
85
- actionview (= 5.2.2)
86
- activejob (= 5.2.2)
87
- activemodel (= 5.2.2)
88
- activerecord (= 5.2.2)
89
- activestorage (= 5.2.2)
90
- activesupport (= 5.2.2)
94
+ rails (6.0.2.2)
95
+ actioncable (= 6.0.2.2)
96
+ actionmailbox (= 6.0.2.2)
97
+ actionmailer (= 6.0.2.2)
98
+ actionpack (= 6.0.2.2)
99
+ actiontext (= 6.0.2.2)
100
+ actionview (= 6.0.2.2)
101
+ activejob (= 6.0.2.2)
102
+ activemodel (= 6.0.2.2)
103
+ activerecord (= 6.0.2.2)
104
+ activestorage (= 6.0.2.2)
105
+ activesupport (= 6.0.2.2)
91
106
  bundler (>= 1.3.0)
92
- railties (= 5.2.2)
107
+ railties (= 6.0.2.2)
93
108
  sprockets-rails (>= 2.0.0)
94
109
  rails-dom-testing (2.0.3)
95
110
  activesupport (>= 4.2.0)
96
111
  nokogiri (>= 1.6)
97
- rails-html-sanitizer (1.0.4)
98
- loofah (~> 2.2, >= 2.2.2)
99
- railties (5.2.2)
100
- actionpack (= 5.2.2)
101
- activesupport (= 5.2.2)
112
+ rails-html-sanitizer (1.3.0)
113
+ loofah (~> 2.3)
114
+ railties (6.0.2.2)
115
+ actionpack (= 6.0.2.2)
116
+ activesupport (= 6.0.2.2)
102
117
  method_source
103
118
  rake (>= 0.8.7)
104
- thor (>= 0.19.0, < 2.0)
105
- rake (10.5.0)
119
+ thor (>= 0.20.3, < 2.0)
120
+ rake (13.0.1)
106
121
  rspec (3.8.0)
107
122
  rspec-core (~> 3.8.0)
108
123
  rspec-expectations (~> 3.8.0)
@@ -116,20 +131,21 @@ GEM
116
131
  diff-lcs (>= 1.2.0, < 2.0)
117
132
  rspec-support (~> 3.8.0)
118
133
  rspec-support (3.8.0)
119
- sprockets (3.7.2)
134
+ sprockets (4.0.0)
120
135
  concurrent-ruby (~> 1.0)
121
136
  rack (> 1, < 3)
122
137
  sprockets-rails (3.2.1)
123
138
  actionpack (>= 4.0)
124
139
  activesupport (>= 4.0)
125
140
  sprockets (>= 3.0.0)
126
- thor (0.20.3)
141
+ thor (1.0.1)
127
142
  thread_safe (0.3.6)
128
- tzinfo (1.2.5)
143
+ tzinfo (1.2.6)
129
144
  thread_safe (~> 0.1)
130
- websocket-driver (0.7.0)
145
+ websocket-driver (0.7.1)
131
146
  websocket-extensions (>= 0.1.0)
132
- websocket-extensions (0.1.3)
147
+ websocket-extensions (0.1.4)
148
+ zeitwerk (2.3.0)
133
149
 
134
150
  PLATFORMS
135
151
  ruby
@@ -137,7 +153,7 @@ PLATFORMS
137
153
  DEPENDENCIES
138
154
  apollo_upload_server!
139
155
  bundler (~> 2.1)
140
- rake (~> 10.0)
156
+ rake (~> 13.0)
141
157
  rspec (~> 3.5)
142
158
 
143
159
  BUNDLED WITH
data/README.md CHANGED
@@ -9,7 +9,7 @@ use [version 1.0.0](https://github.com/jetruby/apollo_upload_server-ruby/tree/1.
9
9
  Add this line to your application's Gemfile:
10
10
 
11
11
  ```ruby
12
- gem 'apollo_upload_server', '2.0.0.beta.3'
12
+ gem 'apollo_upload_server', '2.0.5'
13
13
  ```
14
14
 
15
15
  And then execute:
@@ -16,14 +16,12 @@ Gem::Specification.new do |spec|
16
16
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
17
17
  f.match(%r{^(test|spec|features)/})
18
18
  end
19
- spec.bindir = 'bin'
20
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
21
19
  spec.require_paths = ['lib']
22
20
 
23
- spec.add_dependency 'rails', '>= 4.2'
21
+ spec.add_dependency 'actionpack', '>= 4.2'
24
22
  spec.add_dependency 'graphql', '>= 1.8'
25
23
 
26
24
  spec.add_development_dependency 'bundler', '~> 2.1'
27
- spec.add_development_dependency 'rake', '~> 10.0'
25
+ spec.add_development_dependency 'rake', '~> 13.0'
28
26
  spec.add_development_dependency 'rspec', '~> 3.5'
29
27
  end
@@ -7,10 +7,14 @@ module ApolloUploadServer
7
7
  end
8
8
 
9
9
  def call(env)
10
+ unless env['CONTENT_TYPE'].to_s.include?('multipart/form-data')
11
+ return @app.call(env)
12
+ end
13
+
10
14
  request = ActionDispatch::Request.new(env)
11
15
  params = request.params
12
16
 
13
- if env['CONTENT_TYPE'].to_s.include?('multipart/form-data') && params['operations'].present? && params['map'].present?
17
+ if params['operations'].present? && params['map'].present?
14
18
  result = GraphQLDataBuilder.new.call(request.params)
15
19
  result&.each do |key, value|
16
20
  request.update_param(key, value)
@@ -7,10 +7,12 @@ module ApolloUploadServer
7
7
  graphql_name "Upload"
8
8
 
9
9
  def self.coerce_input(value, _ctx)
10
+ raise GraphQL::CoercionError, "#{value.inspect} is not a valid upload" unless value.nil? || value.is_a?(::ApolloUploadServer::Wrappers::UploadedFile)
11
+
10
12
  value
11
13
  end
12
14
 
13
- def self.coerse_result(value, _ctx)
15
+ def self.coerce_result(value, _ctx)
14
16
  value
15
17
  end
16
18
  end
@@ -1,3 +1,3 @@
1
1
  module ApolloUploadServer
2
- VERSION = '2.0.0'.freeze
2
+ VERSION = '2.0.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apollo_upload_server
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - JetRuby
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-14 00:00:00.000000000 Z
11
+ date: 2021-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rails
14
+ name: actionpack
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '10.0'
61
+ version: '13.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '10.0'
68
+ version: '13.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -83,9 +83,7 @@ dependencies:
83
83
  description: apollo-upload-server implementation for Ruby on Rails as middleware.
84
84
  email:
85
85
  - engineering@jetruby.com
86
- executables:
87
- - console
88
- - setup
86
+ executables: []
89
87
  extensions: []
90
88
  extra_rdoc_files: []
91
89
  files:
@@ -112,7 +110,7 @@ homepage: https://github.com/jetruby/apollo_upload_server-ruby
112
110
  licenses:
113
111
  - MIT
114
112
  metadata: {}
115
- post_install_message:
113
+ post_install_message:
116
114
  rdoc_options: []
117
115
  require_paths:
118
116
  - lib
@@ -127,9 +125,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
125
  - !ruby/object:Gem::Version
128
126
  version: '0'
129
127
  requirements: []
130
- rubyforge_project:
128
+ rubyforge_project:
131
129
  rubygems_version: 2.7.3
132
- signing_key:
130
+ signing_key:
133
131
  specification_version: 4
134
132
  summary: Middleware which allows you to upload files using graphql and multipart/form-data.
135
133
  test_files: []