grape-app 0.8.8 → 0.9.0

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: ba29de5fd70e82430c9bedfe0381fbabf43cd420d16c416e162582926f7bbec1
4
- data.tar.gz: 71f550566eb3fccf9d66baf45c2e987bef0876a48daf139aac0eedf0746f350e
3
+ metadata.gz: 28f6b7de85ab1f92ac5b216e20c087d3ec2bf42d2a1248eb29080b7857b8a84d
4
+ data.tar.gz: 9881ddbbf2a478bb08aea7fe96d4b495c40530b50e2d4809e8275d6b354e3b62
5
5
  SHA512:
6
- metadata.gz: 74835d8b690aacee9164288561974a4954823cb9cac45206e93927c17fbde803f2b13a8bbab437fea84470c36cf518d17c20b00e3459702c965e9c74522ddfd5
7
- data.tar.gz: 97cbb35a1ade9fb541759efc71789163161c2bf255b36a94febe0ba1698a364d333dbec8a30a8e923d6f2ecbce80edffa164557737d071ae6a8016db2bde94f4
6
+ metadata.gz: 7825c7dfca1769b0e8248ed3e573a3269680f2d223dd33d00e64c955e4d45533baf4892329e9684b31f1ca1657ec45ffe12823908d3feb164cef140b9caeac42
7
+ data.tar.gz: 418375f83c0020d081dc40a05bfb92272a1173d06e53a70c14360c6b44ffc045d105c928e65530864add0853b90fac060c7ffa238e800870f47024a2b59e5350
@@ -11,7 +11,7 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
  strategy:
13
13
  matrix:
14
- ruby-version: ["2.6", "2.7", "3.0"]
14
+ ruby-version: ["2.7", "3.0", "3.1"]
15
15
  steps:
16
16
  - uses: actions/checkout@v2
17
17
  - uses: ruby/setup-ruby@v1
data/.rubocop.yml CHANGED
@@ -6,7 +6,7 @@ inherit_mode:
6
6
  - Exclude
7
7
 
8
8
  AllCops:
9
- TargetRubyVersion: "2.6"
9
+ TargetRubyVersion: "2.7"
10
10
  Metrics/ParameterLists:
11
11
  Exclude:
12
12
  - lib/grape/app/helpers/caching.rb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- grape-app (0.8.8)
4
+ grape-app (0.9.0)
5
5
  activesupport
6
6
  grape (>= 1.2)
7
7
  grape-entity
@@ -13,31 +13,30 @@ PATH
13
13
  GEM
14
14
  remote: https://rubygems.org/
15
15
  specs:
16
- activemodel (6.1.3.1)
17
- activesupport (= 6.1.3.1)
18
- activerecord (6.1.3.1)
19
- activemodel (= 6.1.3.1)
20
- activesupport (= 6.1.3.1)
21
- activesupport (6.1.3.1)
16
+ activemodel (7.0.1)
17
+ activesupport (= 7.0.1)
18
+ activerecord (7.0.1)
19
+ activemodel (= 7.0.1)
20
+ activesupport (= 7.0.1)
21
+ activesupport (7.0.1)
22
22
  concurrent-ruby (~> 1.0, >= 1.0.2)
23
23
  i18n (>= 1.6, < 2)
24
24
  minitest (>= 5.1)
25
25
  tzinfo (~> 2.0)
26
- zeitwerk (~> 2.3)
27
26
  ast (2.4.2)
28
27
  builder (3.2.4)
29
- concurrent-ruby (1.1.8)
30
- diff-lcs (1.4.4)
31
- dry-configurable (0.12.1)
28
+ concurrent-ruby (1.1.9)
29
+ diff-lcs (1.5.0)
30
+ dry-configurable (0.14.0)
32
31
  concurrent-ruby (~> 1.0)
33
- dry-core (~> 0.5, >= 0.5.0)
34
- dry-container (0.7.2)
32
+ dry-core (~> 0.6)
33
+ dry-container (0.9.0)
35
34
  concurrent-ruby (~> 1.0)
36
- dry-configurable (~> 0.1, >= 0.1.3)
37
- dry-core (0.5.0)
35
+ dry-configurable (~> 0.13, >= 0.13.0)
36
+ dry-core (0.7.1)
38
37
  concurrent-ruby (~> 1.0)
39
- dry-inflector (0.2.0)
40
- dry-logic (1.1.1)
38
+ dry-inflector (0.2.1)
39
+ dry-logic (1.2.0)
41
40
  concurrent-ruby (~> 1.0)
42
41
  dry-core (~> 0.5, >= 0.5)
43
42
  dry-types (1.5.1)
@@ -46,26 +45,26 @@ GEM
46
45
  dry-core (~> 0.5, >= 0.5)
47
46
  dry-inflector (~> 0.1, >= 0.1.2)
48
47
  dry-logic (~> 1.0, >= 1.0.2)
49
- grape (1.5.3)
48
+ grape (1.6.2)
50
49
  activesupport
51
50
  builder
52
51
  dry-types (>= 1.1)
53
52
  mustermann-grape (~> 1.0.0)
54
53
  rack (>= 1.3.0)
55
54
  rack-accept
56
- grape-entity (0.9.0)
55
+ grape-entity (0.10.1)
57
56
  activesupport (>= 3.0.0)
58
57
  multi_json (>= 1.3.2)
59
- i18n (1.8.10)
58
+ i18n (1.9.0)
60
59
  concurrent-ruby (~> 1.0)
61
- minitest (5.14.4)
60
+ minitest (5.15.0)
62
61
  multi_json (1.15.0)
63
62
  mustermann (1.1.1)
64
63
  ruby2_keywords (~> 0.0.1)
65
64
  mustermann-grape (1.0.1)
66
65
  mustermann (>= 1.0.0)
67
- parallel (1.20.1)
68
- parser (3.0.1.0)
66
+ parallel (1.21.0)
67
+ parser (3.1.0.0)
69
68
  ast (~> 2.4.1)
70
69
  rack (2.2.3)
71
70
  rack-accept (0.4.5)
@@ -75,9 +74,9 @@ GEM
75
74
  rack-ssl-enforcer (0.2.9)
76
75
  rack-test (1.1.0)
77
76
  rack (>= 1.0, < 3)
78
- rainbow (3.0.0)
79
- rake (13.0.3)
80
- regexp_parser (2.1.1)
77
+ rainbow (3.1.1)
78
+ rake (13.0.6)
79
+ regexp_parser (2.2.0)
81
80
  rexml (3.2.5)
82
81
  rspec (3.10.0)
83
82
  rspec-core (~> 3.10.0)
@@ -85,50 +84,44 @@ GEM
85
84
  rspec-mocks (~> 3.10.0)
86
85
  rspec-core (3.10.1)
87
86
  rspec-support (~> 3.10.0)
88
- rspec-expectations (3.10.1)
87
+ rspec-expectations (3.10.2)
89
88
  diff-lcs (>= 1.2.0, < 2.0)
90
89
  rspec-support (~> 3.10.0)
91
90
  rspec-mocks (3.10.2)
92
91
  diff-lcs (>= 1.2.0, < 2.0)
93
92
  rspec-support (~> 3.10.0)
94
- rspec-support (3.10.2)
95
- rubocop (1.12.1)
93
+ rspec-support (3.10.3)
94
+ rubocop (1.25.0)
96
95
  parallel (~> 1.10)
97
- parser (>= 3.0.0.0)
96
+ parser (>= 3.1.0.0)
98
97
  rainbow (>= 2.2.2, < 4.0)
99
98
  regexp_parser (>= 1.8, < 3.0)
100
99
  rexml
101
- rubocop-ast (>= 1.2.0, < 2.0)
100
+ rubocop-ast (>= 1.15.1, < 2.0)
102
101
  ruby-progressbar (~> 1.7)
103
102
  unicode-display_width (>= 1.4.0, < 3.0)
104
- rubocop-ast (1.4.1)
105
- parser (>= 2.7.1.5)
106
- rubocop-bsm (0.5.6)
103
+ rubocop-ast (1.15.1)
104
+ parser (>= 3.0.1.1)
105
+ rubocop-bsm (0.6.0)
107
106
  rubocop (~> 1.0)
108
107
  rubocop-performance
109
- rubocop-rails
110
108
  rubocop-rake
111
109
  rubocop-rspec
112
- rubocop-performance (1.10.2)
113
- rubocop (>= 0.90.0, < 2.0)
110
+ rubocop-performance (1.13.2)
111
+ rubocop (>= 1.7.0, < 2.0)
114
112
  rubocop-ast (>= 0.4.0)
115
- rubocop-rails (2.9.1)
116
- activesupport (>= 4.2.0)
117
- rack (>= 1.1)
118
- rubocop (>= 0.90.0, < 2.0)
119
- rubocop-rake (0.5.1)
120
- rubocop
121
- rubocop-rspec (2.2.0)
113
+ rubocop-rake (0.6.0)
122
114
  rubocop (~> 1.0)
123
- rubocop-ast (>= 1.1.0)
115
+ rubocop-rspec (2.8.0)
116
+ rubocop (~> 1.19)
124
117
  ruby-progressbar (1.11.0)
125
- ruby2_keywords (0.0.4)
118
+ ruby2_keywords (0.0.5)
126
119
  sqlite3 (1.4.2)
127
- thor (1.1.0)
120
+ thor (1.2.1)
128
121
  tzinfo (2.0.4)
129
122
  concurrent-ruby (~> 1.0)
130
- unicode-display_width (2.0.0)
131
- zeitwerk (2.4.2)
123
+ unicode-display_width (2.1.0)
124
+ zeitwerk (2.5.3)
132
125
 
133
126
  PLATFORMS
134
127
  ruby
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.8.8'
3
+ s.version = '0.9.0'
4
4
  s.authors = ['Black Square Media Ltd']
5
5
  s.email = ['info@blacksquaremedia.com']
6
6
  s.summary = %(Standalone Grape API apps)
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.test_files = `git ls-files -z -- spec/*`.split("\x0")
13
13
  s.executables = ['grape-app']
14
14
  s.require_paths = ['lib']
15
- s.required_ruby_version = '>= 2.6'
15
+ s.required_ruby_version = '>= 2.7'
16
16
 
17
17
  s.add_dependency 'activesupport'
18
18
  s.add_dependency 'grape', '>= 1.2'
@@ -29,4 +29,5 @@ Gem::Specification.new do |s|
29
29
  s.add_development_dependency 'rspec'
30
30
  s.add_development_dependency 'rubocop-bsm'
31
31
  s.add_development_dependency 'sqlite3'
32
+ s.metadata['rubygems_mfa_required'] = 'true'
32
33
  end
@@ -13,8 +13,12 @@ if defined?(ActiveRecord)
13
13
  configurations[Grape::App.env.to_s]['url'] ||= ENV['DATABASE_URL']
14
14
  end
15
15
 
16
+ if ActiveRecord.respond_to?(:default_timezone=)
17
+ ActiveRecord.default_timezone = :utc
18
+ else
19
+ ActiveRecord::Base.default_timezone = :utc
20
+ end
16
21
  ActiveRecord::Base.configurations = configurations
17
- ActiveRecord::Base.default_timezone = :utc
18
22
  ActiveRecord::Base.establish_connection(Grape::App.env.to_sym)
19
23
 
20
24
  Grape::App.middleware.use ActiveRecord::ConnectionAdapters::ConnectionManagement if defined?(ActiveRecord::ConnectionAdapters::ConnectionManagement)
@@ -1,4 +1,12 @@
1
1
  Grape::App.configure do |config|
2
+ # Eager load code on boot. This eager loads most of your application in
3
+ # memory, allowing both threaded web servers and those relying on copy on
4
+ # write to perform better.
5
+ config.eager_load = true
6
+
7
+ # Don't raise errors on missing translations
8
+ # config.raise_on_missing_translations = false
9
+
2
10
  # Force SSL, please see https://github.com/tobmatth/rack-ssl-enforcer
3
11
  # for configuration options.
4
12
  #
@@ -20,7 +28,4 @@ Grape::App.configure do |config|
20
28
  # use Rack::ETag
21
29
  # insert_before Rack::Cors, Rack::ContentLength
22
30
  # end
23
-
24
- # Don't raise errors on missing translations
25
- # config.raise_on_missing_translations = false
26
31
  end
data/lib/grape/app.rb CHANGED
@@ -35,6 +35,7 @@ class Grape::App < Grape::API
35
35
 
36
36
  # Load app
37
37
  require_one 'app', 'api'
38
+ Zeitwerk::Loader.eager_load_all if Grape::App.config.eager_load
38
39
  end
39
40
 
40
41
  # @return [Grape::App::Configuration] the configuration
@@ -1,6 +1,7 @@
1
1
  require 'my_lib'
2
2
 
3
3
  Grape::App.configure do |c|
4
+ c.eager_load = true
4
5
  c.test_specific = true
5
6
  c.raise_on_missing_translations = true
6
7
  c.cors do
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.8.8
4
+ version: 0.9.0
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: 2021-04-16 00:00:00.000000000 Z
11
+ date: 2022-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -271,7 +271,8 @@ files:
271
271
  homepage: https://github.com/bsm/grape-app
272
272
  licenses:
273
273
  - MIT
274
- metadata: {}
274
+ metadata:
275
+ rubygems_mfa_required: 'true'
275
276
  post_install_message:
276
277
  rdoc_options: []
277
278
  require_paths:
@@ -280,14 +281,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
280
281
  requirements:
281
282
  - - ">="
282
283
  - !ruby/object:Gem::Version
283
- version: '2.6'
284
+ version: '2.7'
284
285
  required_rubygems_version: !ruby/object:Gem::Requirement
285
286
  requirements:
286
287
  - - ">="
287
288
  - !ruby/object:Gem::Version
288
289
  version: '0'
289
290
  requirements: []
290
- rubygems_version: 3.1.4
291
+ rubygems_version: 3.3.3
291
292
  signing_key:
292
293
  specification_version: 4
293
294
  summary: Standalone Grape API apps