grape-app 0.11.1 → 0.11.3

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: 1140bc1f7139b14493c0775becbe051c8c29f5ff3c563fc25cc10e7969b19725
4
- data.tar.gz: 387ac09791e600b406e6fd95b18a52e04af0efec9bbac58ba307a0a7278de0d0
3
+ metadata.gz: a31c608d02260732fe4045be694e876579d73ee4d82abecdadb3754efd58baf1
4
+ data.tar.gz: c2dcba2039bff17833e67b70bb38d8d362eef338b4c050b67e2a84d957a042d0
5
5
  SHA512:
6
- metadata.gz: c36157ce17c772fd0b02ef467568445f6e9a75729f25b02ce0a5b6bd55fefb46e6605d59c5780a71fefb52deedc8948e3af4d2d92730157a8c4c502976918ed5
7
- data.tar.gz: 6d6f92bf42013a50af3aea271f263ac503fcb36a0138d32b54cbeeb0c470d82b20d177fed834051ee9e4a2100528b95223a99a7a69b6b9a9e8a312fe58448724
6
+ metadata.gz: 67fe5d4eb991f356639893a13d28e0ee3870387a122a68d5026a521f5b077ced3cdbee289f059ecb5c3e7687572bad5572cbf97932056e3b9913dfc34a60ca29
7
+ data.tar.gz: 7aa5cd52c437e2ae879d4841198342870562f71970a6959b73ca06f11eb362d6cc0dce8e520f2096b25027fac19e3ac8992f644aed75fefcb9d71b6417e0254a
@@ -11,7 +11,7 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
  strategy:
13
13
  matrix:
14
- ruby-version: ["2.7", "3.0", "3.1", "3.2"]
14
+ ruby-version: ["3.0", "3.1", "3.2", "3.3"]
15
15
  gemfiles: ["Gemfile", "Gemfile.rails6"]
16
16
  env:
17
17
  BUNDLE_GEMFILE: ${{ matrix.gemfile }}
data/Gemfile CHANGED
@@ -3,6 +3,7 @@ gemspec
3
3
 
4
4
  gem 'activejob'
5
5
  gem 'activerecord'
6
+ gem 'rack-cors', '2.0.0' # https://github.com/cyu/rack-cors/issues/274
6
7
  gem 'rack-test'
7
8
  gem 'rake'
8
9
  gem 'rspec'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- grape-app (0.11.1)
4
+ grape-app (0.11.3)
5
5
  activesupport
6
6
  grape (>= 1.7)
7
7
  grape-entity
@@ -14,24 +14,35 @@ PATH
14
14
  GEM
15
15
  remote: https://rubygems.org/
16
16
  specs:
17
- activejob (7.0.4.3)
18
- activesupport (= 7.0.4.3)
17
+ activejob (7.1.3)
18
+ activesupport (= 7.1.3)
19
19
  globalid (>= 0.3.6)
20
- activemodel (7.0.4.3)
21
- activesupport (= 7.0.4.3)
22
- activerecord (7.0.4.3)
23
- activemodel (= 7.0.4.3)
24
- activesupport (= 7.0.4.3)
25
- activesupport (7.0.4.3)
20
+ activemodel (7.1.3)
21
+ activesupport (= 7.1.3)
22
+ activerecord (7.1.3)
23
+ activemodel (= 7.1.3)
24
+ activesupport (= 7.1.3)
25
+ timeout (>= 0.4.0)
26
+ activesupport (7.1.3)
27
+ base64
28
+ bigdecimal
26
29
  concurrent-ruby (~> 1.0, >= 1.0.2)
30
+ connection_pool (>= 2.2.5)
31
+ drb
27
32
  i18n (>= 1.6, < 2)
28
33
  minitest (>= 5.1)
34
+ mutex_m
29
35
  tzinfo (~> 2.0)
30
36
  ast (2.4.2)
37
+ base64 (0.2.0)
38
+ bigdecimal (3.1.6)
31
39
  builder (3.2.4)
32
- concurrent-ruby (1.2.2)
40
+ concurrent-ruby (1.2.3)
41
+ connection_pool (2.4.1)
33
42
  diff-lcs (1.5.0)
34
- dry-core (1.0.0)
43
+ drb (2.2.0)
44
+ ruby2_keywords
45
+ dry-core (1.0.1)
35
46
  concurrent-ruby (~> 1.0)
36
47
  zeitwerk (~> 2.6)
37
48
  dry-inflector (1.0.0)
@@ -39,16 +50,17 @@ GEM
39
50
  concurrent-ruby (~> 1.0)
40
51
  dry-core (~> 1.0, < 2)
41
52
  zeitwerk (~> 2.6)
42
- dry-types (1.7.1)
53
+ dry-types (1.7.2)
54
+ bigdecimal (~> 3.0)
43
55
  concurrent-ruby (~> 1.0)
44
56
  dry-core (~> 1.0)
45
57
  dry-inflector (~> 1.0)
46
58
  dry-logic (~> 1.4)
47
59
  zeitwerk (~> 2.6)
48
- globalid (1.1.0)
49
- activesupport (>= 5.0)
50
- grape (1.7.0)
51
- activesupport
60
+ globalid (1.2.1)
61
+ activesupport (>= 6.1)
62
+ grape (2.0.0)
63
+ activesupport (>= 5)
52
64
  builder
53
65
  dry-types (>= 1.1)
54
66
  mustermann-grape (~> 1.0.0)
@@ -57,81 +69,90 @@ GEM
57
69
  grape-entity (1.0.0)
58
70
  activesupport (>= 3.0.0)
59
71
  multi_json (>= 1.3.2)
60
- i18n (1.12.0)
72
+ i18n (1.14.1)
61
73
  concurrent-ruby (~> 1.0)
62
- json (2.6.3)
63
- mini_portile2 (2.8.1)
64
- minitest (5.18.0)
74
+ json (2.7.1)
75
+ language_server-protocol (3.17.0.3)
76
+ mini_portile2 (2.8.5)
77
+ minitest (5.21.2)
65
78
  multi_json (1.15.0)
66
79
  mustermann (3.0.0)
67
80
  ruby2_keywords (~> 0.0.1)
68
81
  mustermann-grape (1.0.2)
69
82
  mustermann (>= 1.0.0)
70
- openssl (3.1.0)
71
- parallel (1.22.1)
72
- parser (3.2.1.1)
83
+ mutex_m (0.2.0)
84
+ openssl (3.2.0)
85
+ parallel (1.24.0)
86
+ parser (3.3.0.4)
73
87
  ast (~> 2.4.1)
74
- rack (3.0.7)
88
+ racc
89
+ racc (1.7.3)
90
+ rack (3.0.9.1)
75
91
  rack-accept (0.4.5)
76
92
  rack (>= 0.4)
77
- rack-cors (2.0.1)
93
+ rack-cors (2.0.0)
78
94
  rack (>= 2.0.0)
79
95
  rack-ssl-enforcer (0.2.9)
80
96
  rack-test (2.1.0)
81
97
  rack (>= 1.3)
82
98
  rainbow (3.1.1)
83
- rake (13.0.6)
84
- regexp_parser (2.7.0)
85
- rexml (3.2.5)
99
+ rake (13.1.0)
100
+ regexp_parser (2.9.0)
101
+ rexml (3.2.6)
86
102
  rspec (3.12.0)
87
103
  rspec-core (~> 3.12.0)
88
104
  rspec-expectations (~> 3.12.0)
89
105
  rspec-mocks (~> 3.12.0)
90
- rspec-core (3.12.1)
106
+ rspec-core (3.12.2)
91
107
  rspec-support (~> 3.12.0)
92
- rspec-expectations (3.12.2)
108
+ rspec-expectations (3.12.3)
93
109
  diff-lcs (>= 1.2.0, < 2.0)
94
110
  rspec-support (~> 3.12.0)
95
- rspec-mocks (3.12.4)
111
+ rspec-mocks (3.12.6)
96
112
  diff-lcs (>= 1.2.0, < 2.0)
97
113
  rspec-support (~> 3.12.0)
98
- rspec-support (3.12.0)
99
- rubocop (1.48.1)
114
+ rspec-support (3.12.1)
115
+ rubocop (1.60.1)
100
116
  json (~> 2.3)
117
+ language_server-protocol (>= 3.17.0)
101
118
  parallel (~> 1.10)
102
- parser (>= 3.2.0.0)
119
+ parser (>= 3.3.0.2)
103
120
  rainbow (>= 2.2.2, < 4.0)
104
121
  regexp_parser (>= 1.8, < 3.0)
105
122
  rexml (>= 3.2.5, < 4.0)
106
- rubocop-ast (>= 1.26.0, < 2.0)
123
+ rubocop-ast (>= 1.30.0, < 2.0)
107
124
  ruby-progressbar (~> 1.7)
108
125
  unicode-display_width (>= 2.4.0, < 3.0)
109
- rubocop-ast (1.27.0)
126
+ rubocop-ast (1.30.0)
110
127
  parser (>= 3.2.1.0)
111
128
  rubocop-bsm (0.6.1)
112
129
  rubocop (~> 1.0)
113
130
  rubocop-performance
114
131
  rubocop-rake
115
132
  rubocop-rspec
116
- rubocop-capybara (2.17.1)
133
+ rubocop-capybara (2.20.0)
134
+ rubocop (~> 1.41)
135
+ rubocop-factory_bot (2.25.1)
117
136
  rubocop (~> 1.41)
118
- rubocop-performance (1.16.0)
119
- rubocop (>= 1.7.0, < 2.0)
120
- rubocop-ast (>= 0.4.0)
137
+ rubocop-performance (1.20.2)
138
+ rubocop (>= 1.48.1, < 2.0)
139
+ rubocop-ast (>= 1.30.0, < 2.0)
121
140
  rubocop-rake (0.6.0)
122
141
  rubocop (~> 1.0)
123
- rubocop-rspec (2.19.0)
124
- rubocop (~> 1.33)
142
+ rubocop-rspec (2.26.1)
143
+ rubocop (~> 1.40)
125
144
  rubocop-capybara (~> 2.17)
145
+ rubocop-factory_bot (~> 2.22)
126
146
  ruby-progressbar (1.13.0)
127
147
  ruby2_keywords (0.0.5)
128
- sqlite3 (1.6.1)
148
+ sqlite3 (1.7.0)
129
149
  mini_portile2 (~> 2.8.0)
130
- thor (1.2.1)
150
+ thor (1.3.0)
151
+ timeout (0.4.1)
131
152
  tzinfo (2.0.6)
132
153
  concurrent-ruby (~> 1.0)
133
- unicode-display_width (2.4.2)
134
- zeitwerk (2.6.7)
154
+ unicode-display_width (2.5.0)
155
+ zeitwerk (2.6.12)
135
156
 
136
157
  PLATFORMS
137
158
  ruby
@@ -140,6 +161,7 @@ DEPENDENCIES
140
161
  activejob
141
162
  activerecord
142
163
  grape-app!
164
+ rack-cors (= 2.0.0)
143
165
  rack-test
144
166
  rake
145
167
  rspec
@@ -147,4 +169,4 @@ DEPENDENCIES
147
169
  sqlite3
148
170
 
149
171
  BUNDLED WITH
150
- 2.3.9
172
+ 2.4.22
data/Gemfile.rails6 CHANGED
@@ -4,6 +4,7 @@ gemspec
4
4
  gem 'activejob', '~> 6.1'
5
5
  gem 'activesupport', '~> 6.1'
6
6
  gem 'activerecord', '~> 6.1'
7
+ gem 'rack-cors', '2.0.0' # https://github.com/cyu/rack-cors/issues/274
7
8
  gem 'rack-test'
8
9
  gem 'rake'
9
10
  gem 'rspec'
data/Gemfile.rails6.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- grape-app (0.11.1)
4
+ grape-app (0.11.3)
5
5
  activesupport
6
6
  grape (>= 1.7)
7
7
  grape-entity
@@ -14,25 +14,27 @@ PATH
14
14
  GEM
15
15
  remote: https://rubygems.org/
16
16
  specs:
17
- activejob (6.1.7.3)
18
- activesupport (= 6.1.7.3)
17
+ activejob (6.1.7.6)
18
+ activesupport (= 6.1.7.6)
19
19
  globalid (>= 0.3.6)
20
- activemodel (6.1.7.3)
21
- activesupport (= 6.1.7.3)
22
- activerecord (6.1.7.3)
23
- activemodel (= 6.1.7.3)
24
- activesupport (= 6.1.7.3)
25
- activesupport (6.1.7.3)
20
+ activemodel (6.1.7.6)
21
+ activesupport (= 6.1.7.6)
22
+ activerecord (6.1.7.6)
23
+ activemodel (= 6.1.7.6)
24
+ activesupport (= 6.1.7.6)
25
+ activesupport (6.1.7.6)
26
26
  concurrent-ruby (~> 1.0, >= 1.0.2)
27
27
  i18n (>= 1.6, < 2)
28
28
  minitest (>= 5.1)
29
29
  tzinfo (~> 2.0)
30
30
  zeitwerk (~> 2.3)
31
31
  ast (2.4.2)
32
+ base64 (0.1.1)
33
+ bigdecimal (3.1.6)
32
34
  builder (3.2.4)
33
35
  concurrent-ruby (1.2.2)
34
36
  diff-lcs (1.5.0)
35
- dry-core (1.0.0)
37
+ dry-core (1.0.1)
36
38
  concurrent-ruby (~> 1.0)
37
39
  zeitwerk (~> 2.6)
38
40
  dry-inflector (1.0.0)
@@ -40,7 +42,8 @@ GEM
40
42
  concurrent-ruby (~> 1.0)
41
43
  dry-core (~> 1.0, < 2)
42
44
  zeitwerk (~> 2.6)
43
- dry-types (1.7.1)
45
+ dry-types (1.7.2)
46
+ bigdecimal (~> 3.0)
44
47
  concurrent-ruby (~> 1.0)
45
48
  dry-core (~> 1.0)
46
49
  dry-inflector (~> 1.0)
@@ -48,8 +51,8 @@ GEM
48
51
  zeitwerk (~> 2.6)
49
52
  globalid (1.1.0)
50
53
  activesupport (>= 5.0)
51
- grape (1.7.0)
52
- activesupport
54
+ grape (2.0.0)
55
+ activesupport (>= 5)
53
56
  builder
54
57
  dry-types (>= 1.1)
55
58
  mustermann-grape (~> 1.0.0)
@@ -58,79 +61,87 @@ GEM
58
61
  grape-entity (1.0.0)
59
62
  activesupport (>= 3.0.0)
60
63
  multi_json (>= 1.3.2)
61
- i18n (1.12.0)
64
+ i18n (1.14.1)
62
65
  concurrent-ruby (~> 1.0)
63
66
  json (2.6.3)
64
- minitest (5.18.0)
67
+ language_server-protocol (3.17.0.3)
68
+ minitest (5.19.0)
65
69
  multi_json (1.15.0)
66
70
  mustermann (3.0.0)
67
71
  ruby2_keywords (~> 0.0.1)
68
72
  mustermann-grape (1.0.2)
69
73
  mustermann (>= 1.0.0)
70
- openssl (3.1.0)
71
- parallel (1.22.1)
72
- parser (3.2.1.1)
74
+ openssl (3.2.0)
75
+ parallel (1.23.0)
76
+ parser (3.2.2.3)
73
77
  ast (~> 2.4.1)
74
- rack (3.0.7)
78
+ racc
79
+ racc (1.7.1)
80
+ rack (2.2.8)
75
81
  rack-accept (0.4.5)
76
82
  rack (>= 0.4)
77
- rack-cors (2.0.1)
83
+ rack-cors (2.0.0)
78
84
  rack (>= 2.0.0)
79
85
  rack-ssl-enforcer (0.2.9)
80
86
  rack-test (2.1.0)
81
87
  rack (>= 1.3)
82
88
  rainbow (3.1.1)
83
89
  rake (13.0.6)
84
- regexp_parser (2.7.0)
85
- rexml (3.2.5)
90
+ regexp_parser (2.8.1)
91
+ rexml (3.2.6)
86
92
  rspec (3.12.0)
87
93
  rspec-core (~> 3.12.0)
88
94
  rspec-expectations (~> 3.12.0)
89
95
  rspec-mocks (~> 3.12.0)
90
- rspec-core (3.12.1)
96
+ rspec-core (3.12.2)
91
97
  rspec-support (~> 3.12.0)
92
- rspec-expectations (3.12.2)
98
+ rspec-expectations (3.12.3)
93
99
  diff-lcs (>= 1.2.0, < 2.0)
94
100
  rspec-support (~> 3.12.0)
95
- rspec-mocks (3.12.4)
101
+ rspec-mocks (3.12.6)
96
102
  diff-lcs (>= 1.2.0, < 2.0)
97
103
  rspec-support (~> 3.12.0)
98
- rspec-support (3.12.0)
99
- rubocop (1.48.1)
104
+ rspec-support (3.12.1)
105
+ rubocop (1.56.2)
106
+ base64 (~> 0.1.1)
100
107
  json (~> 2.3)
108
+ language_server-protocol (>= 3.17.0)
101
109
  parallel (~> 1.10)
102
- parser (>= 3.2.0.0)
110
+ parser (>= 3.2.2.3)
103
111
  rainbow (>= 2.2.2, < 4.0)
104
112
  regexp_parser (>= 1.8, < 3.0)
105
113
  rexml (>= 3.2.5, < 4.0)
106
- rubocop-ast (>= 1.26.0, < 2.0)
114
+ rubocop-ast (>= 1.28.1, < 2.0)
107
115
  ruby-progressbar (~> 1.7)
108
116
  unicode-display_width (>= 2.4.0, < 3.0)
109
- rubocop-ast (1.27.0)
117
+ rubocop-ast (1.29.0)
110
118
  parser (>= 3.2.1.0)
111
119
  rubocop-bsm (0.6.1)
112
120
  rubocop (~> 1.0)
113
121
  rubocop-performance
114
122
  rubocop-rake
115
123
  rubocop-rspec
116
- rubocop-capybara (2.17.1)
124
+ rubocop-capybara (2.18.0)
117
125
  rubocop (~> 1.41)
118
- rubocop-performance (1.16.0)
126
+ rubocop-factory_bot (2.23.1)
127
+ rubocop (~> 1.33)
128
+ rubocop-performance (1.19.0)
119
129
  rubocop (>= 1.7.0, < 2.0)
120
130
  rubocop-ast (>= 0.4.0)
121
131
  rubocop-rake (0.6.0)
122
132
  rubocop (~> 1.0)
123
- rubocop-rspec (2.19.0)
133
+ rubocop-rspec (2.23.2)
124
134
  rubocop (~> 1.33)
125
135
  rubocop-capybara (~> 2.17)
136
+ rubocop-factory_bot (~> 2.22)
126
137
  ruby-progressbar (1.13.0)
127
138
  ruby2_keywords (0.0.5)
128
- sqlite3 (1.6.1-x86_64-linux)
129
- thor (1.2.1)
139
+ sqlite3 (1.6.4-x86_64-linux)
140
+ thor (1.3.1)
130
141
  tzinfo (2.0.6)
131
142
  concurrent-ruby (~> 1.0)
132
143
  unicode-display_width (2.4.2)
133
- zeitwerk (2.6.7)
144
+ zeitwerk (2.6.11)
134
145
 
135
146
  PLATFORMS
136
147
  x86_64-linux
@@ -140,6 +151,7 @@ DEPENDENCIES
140
151
  activerecord (~> 6.1)
141
152
  activesupport (~> 6.1)
142
153
  grape-app!
154
+ rack-cors (= 2.0.0)
143
155
  rack-test
144
156
  rake
145
157
  rspec
data/grape-app.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'grape-app'
3
- s.version = '0.11.1'
3
+ s.version = '0.11.3'
4
4
  s.authors = ['Black Square Media Ltd']
5
5
  s.email = ['info@blacksquaremedia.com']
6
6
  s.summary = %(Standalone Grape API apps)
@@ -25,9 +25,9 @@ module Grape::App::Helpers::Caching
25
25
  header 'Last-Modified', last_modified.httpdate if last_modified
26
26
  cache_control(**cache_control) unless cache_control.empty?
27
27
 
28
- if_modified_since = headers['If-Modified-Since']
28
+ if_modified_since = headers['if-modified-since']
29
29
  if_modified_since = Time.rfc2822(if_modified_since) rescue nil if if_modified_since # rubocop:disable Style/RescueModifier
30
- if_none_match = headers['If-None-Match']
30
+ if_none_match = headers['if-none-match']
31
31
  return unless if_modified_since || if_none_match
32
32
 
33
33
  fresh = true
@@ -8,6 +8,7 @@ ActiveSupport::Digest.hash_digest_class = OpenSSL::Digest::SHA256
8
8
  ActiveSupport::KeyGenerator.hash_digest_class = OpenSSL::Digest::SHA256 if ActiveSupport::KeyGenerator.respond_to?(:hash_digest_class=)
9
9
  ActiveSupport::MessageEncryptor.use_authenticated_message_encryption = true
10
10
  ActiveSupport::IsolatedExecutionState.isolation_level = :thread if defined?(ActiveSupport::IsolatedExecutionState)
11
+ # This is legacy and removed in removed with Rails 7.1
11
12
  Digest::UUID.use_rfc4122_namespaced_uuids = true if Digest::UUID.respond_to?(:use_rfc4122_namespaced_uuids=)
12
13
 
13
14
  # Set default time-zone
@@ -43,10 +44,13 @@ if defined?(ActiveRecord)
43
44
  ActiveRecord::Base.default_timezone = :utc
44
45
  end
45
46
 
46
- if ActiveRecord.respond_to?(:legacy_connection_handling=)
47
- ActiveRecord.legacy_connection_handling = false
48
- else
49
- ActiveRecord::Base.legacy_connection_handling = false
47
+ # legacy_connection_handling was deprecated in ActiveRecord 7
48
+ if ActiveRecord::VERSION::MAJOR < 7
49
+ if ActiveRecord.respond_to?(:legacy_connection_handling=)
50
+ ActiveRecord.legacy_connection_handling = false
51
+ else
52
+ ActiveRecord::Base.legacy_connection_handling = false
53
+ end
50
54
  end
51
55
 
52
56
  ActiveRecord.tap do |c|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-app
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.11.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Black Square Media Ltd
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-20 00:00:00.000000000 Z
11
+ date: 2024-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -193,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
195
  requirements: []
196
- rubygems_version: 3.4.6
196
+ rubygems_version: 3.5.4
197
197
  signing_key:
198
198
  specification_version: 4
199
199
  summary: Standalone Grape API apps