apollo_upload_server 2.1.5 → 2.1.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: a93165fa220c06467d5073d0db5fc83e2e6f5a6350c959fbb4fc7cdb0efb24f2
4
- data.tar.gz: 571fbe6aa0ee74c4352bfdb6332440c07c5c26a3a7c489d9c6de09b84a407477
3
+ metadata.gz: e739eca091fe90c153387cc5637f871ad3e5d93734cf1f77f250ad470816357c
4
+ data.tar.gz: 917a7590be5410efc83de4c824c8e2a0848d334d2e1fa0fcfc876979fe49d442
5
5
  SHA512:
6
- metadata.gz: 72274e29023925309d0e700a3a91bcd51d5ffe1e383d304809c0d4e3ada385a8942ec6670a137e1c4790a99176e6bd4d14dbf05faedcae1aec221cb63a41963e
7
- data.tar.gz: 8582d1c6b9c5f69a5f79cc65585531a3ce31ec919b0e8652418a5d499119fd6742db14b1ac1a9033850ef8e8a8789019ba6aa3f0e1937ce35befc6aa549bae5d
6
+ metadata.gz: 8695e04ccabb84a9388bb74e3f8f73fc7346101edaf4468ff1eca79a36957657f1f963e7c0f9f8ef2d15cd1e7ae8311600427fc83758f84a0859a8901fed068f
7
+ data.tar.gz: 833777b4586c25cea707785588c66774b8271b894d17da5ef2e1ec244d80cd09eef3cf8d098903f6ec8b47c479825f360553772a2327595cd352a3f5bcb59bec
@@ -0,0 +1,16 @@
1
+ name: Rspec test suite
2
+ on: [push, pull_request]
3
+ jobs:
4
+ test:
5
+ strategy:
6
+ fail-fast: false
7
+ matrix:
8
+ ruby: ['2.7', '3.0', '3.1']
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v3
12
+ - uses: ruby/setup-ruby@v1
13
+ with:
14
+ ruby-version: ${{ matrix.ruby }}
15
+ bundler-cache: true
16
+ - run: bundle exec rspec
data/.gitignore CHANGED
@@ -6,3 +6,4 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ /vendor/bundle/
data/Gemfile.lock CHANGED
@@ -1,27 +1,27 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- apollo_upload_server (2.1.4)
4
+ apollo_upload_server (2.1.5)
5
5
  actionpack (>= 6.1.6)
6
6
  graphql (>= 1.8)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actionpack (7.0.3.1)
12
- actionview (= 7.0.3.1)
13
- activesupport (= 7.0.3.1)
11
+ actionpack (7.0.4)
12
+ actionview (= 7.0.4)
13
+ activesupport (= 7.0.4)
14
14
  rack (~> 2.0, >= 2.2.0)
15
15
  rack-test (>= 0.6.3)
16
16
  rails-dom-testing (~> 2.0)
17
17
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
18
- actionview (7.0.3.1)
19
- activesupport (= 7.0.3.1)
18
+ actionview (7.0.4)
19
+ activesupport (= 7.0.4)
20
20
  builder (~> 3.1)
21
21
  erubi (~> 1.4)
22
22
  rails-dom-testing (~> 2.0)
23
23
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
24
- activesupport (7.0.3.1)
24
+ activesupport (7.0.4)
25
25
  concurrent-ruby (~> 1.0, >= 1.0.2)
26
26
  i18n (>= 1.6, < 2)
27
27
  minitest (>= 5.1)
@@ -31,15 +31,15 @@ GEM
31
31
  crass (1.0.6)
32
32
  diff-lcs (1.5.0)
33
33
  erubi (1.11.0)
34
- graphql (2.0.13)
34
+ graphql (2.0.15)
35
35
  i18n (1.12.0)
36
36
  concurrent-ruby (~> 1.0)
37
- loofah (2.18.0)
37
+ loofah (2.19.0)
38
38
  crass (~> 1.0.2)
39
39
  nokogiri (>= 1.5.9)
40
40
  mini_portile2 (2.8.0)
41
41
  minitest (5.16.3)
42
- nokogiri (1.13.8)
42
+ nokogiri (1.13.9)
43
43
  mini_portile2 (~> 2.8.0)
44
44
  racc (~> 1.4)
45
45
  racc (1.6.0)
@@ -75,7 +75,7 @@ DEPENDENCIES
75
75
  apollo_upload_server!
76
76
  bundler (~> 2.1)
77
77
  rake (~> 13.0)
78
- rspec (~> 3.5)
78
+ rspec (~> 3.11)
79
79
 
80
80
  BUNDLED WITH
81
81
  2.3.17
data/README.md CHANGED
@@ -68,6 +68,8 @@ In strict mode, passing empty destination arrays will always fail.
68
68
 
69
69
  Bug reports and pull requests are welcome on GitHub at https://github.com/jetruby/apollo_upload_server-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
70
70
 
71
+ Tests can be run via `bundle exec rspec`.
72
+
71
73
  ## License
72
74
 
73
75
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -23,5 +23,5 @@ Gem::Specification.new do |spec|
23
23
 
24
24
  spec.add_development_dependency 'bundler', '~> 2.1'
25
25
  spec.add_development_dependency 'rake', '~> 13.0'
26
- spec.add_development_dependency 'rspec', '~> 3.5'
26
+ spec.add_development_dependency 'rspec', '~> 3.11'
27
27
  end
@@ -12,8 +12,8 @@ module ApolloUploadServer
12
12
  end
13
13
 
14
14
  def call(params)
15
- operations = safe_json_parse(params['operations'])
16
- file_mapper = safe_json_parse(params['map'])
15
+ operations = JSON.parse(params['operations'])
16
+ file_mapper = JSON.parse(params['map'])
17
17
 
18
18
  return nil if operations.nil? || file_mapper.nil?
19
19
  if operations.is_a?(Hash)
@@ -62,12 +62,6 @@ module ApolloUploadServer
62
62
  raise OutOfBounds, "Path #{path.join('.')} maps to out-of-bounds index: #{index}"
63
63
  end
64
64
 
65
- def safe_json_parse(data)
66
- JSON.parse(data)
67
- rescue JSON::ParserError
68
- nil
69
- end
70
-
71
65
  def get_parent_field(operations, splited_path)
72
66
  # returns parent element of file field
73
67
 
@@ -1,3 +1,3 @@
1
1
  module ApolloUploadServer
2
- VERSION = '2.1.5'.freeze
2
+ VERSION = '2.1.6'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apollo_upload_server
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.5
4
+ version: 2.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - JetRuby
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-15 00:00:00.000000000 Z
11
+ date: 2024-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '3.5'
75
+ version: '3.11'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '3.5'
82
+ version: '3.11'
83
83
  description: apollo-upload-server implementation for Ruby on Rails as middleware.
84
84
  email:
85
85
  - engineering@jetruby.com
@@ -87,9 +87,9 @@ executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
+ - ".github/workflows/specs.yml"
90
91
  - ".gitignore"
91
92
  - ".rspec"
92
- - ".travis.yml"
93
93
  - CODE_OF_CONDUCT.md
94
94
  - Gemfile
95
95
  - Gemfile.lock
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  - !ruby/object:Gem::Version
126
126
  version: '0'
127
127
  requirements: []
128
- rubygems_version: 3.3.23
128
+ rubygems_version: 3.3.25
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: Middleware which allows you to upload files using graphql and multipart/form-data.
data/.travis.yml DELETED
@@ -1,6 +0,0 @@
1
- language: ruby
2
- cache: bundler
3
- rvm:
4
- - 2.5
5
- install: bundle install --jobs=3 --retry=3
6
- script: bundle exec rspec