grape-starter 2.1.3 → 3.0.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 +4 -4
- data/.github/workflows/pipeline.yml +2 -2
- data/.rubocop.yml +1 -1
- data/.ruby-version +1 -0
- data/CHANGELOG.md +6 -0
- data/Gemfile +1 -1
- data/grape-starter.gemspec +1 -1
- data/lib/starter/importer/parameter.rb +2 -2
- data/lib/starter/version.rb +1 -1
- data/template/.rubocop.yml +1 -0
- data/template/Gemfile +5 -2
- data/template/config/boot.rb +4 -4
- data/template/script/console +5 -0
- data/template/spec/spec_helper.rb +1 -1
- metadata +5 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16ec3abd585c9a25a9fdf30d877561ccbd9b7c1b848b539cd8c63ec648492c60
|
4
|
+
data.tar.gz: f98a11d9d911ca17d66a69302067f110431dd423224a0104ca5649f9268e9c76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d2e6eff8352128af22fa344d6d7ddf80b208b3a2ecb65077023fffe6b5b0a5199d09958a70b586c79f94479bda70b69e80e0a5c2a3b599326b7d8a1a5cf0514
|
7
|
+
data.tar.gz: fab8485bdc93e8853e37e6fc345eb87da1f281d78584fe88d50a90706adf1876b7d9fcd3d0d4ed732333415cf0d34c877822a64ac3438e5e9175cadb58337add
|
@@ -16,7 +16,7 @@ jobs:
|
|
16
16
|
- uses: actions/checkout@v3
|
17
17
|
- uses: ruby/setup-ruby@v1
|
18
18
|
with:
|
19
|
-
ruby-version: '3.
|
19
|
+
ruby-version: '3.4'
|
20
20
|
bundler-cache: true
|
21
21
|
- name: Run rubocop
|
22
22
|
run: bundle exec rubocop --parallel --format progress
|
@@ -28,7 +28,7 @@ jobs:
|
|
28
28
|
RACK_ENV: test
|
29
29
|
strategy:
|
30
30
|
matrix:
|
31
|
-
ruby-version: ['3.
|
31
|
+
ruby-version: ['3.2', '3.3', '3.4', head]
|
32
32
|
|
33
33
|
steps:
|
34
34
|
- uses: actions/checkout@v3
|
data/.rubocop.yml
CHANGED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.4.2
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
- contributions
|
4
4
|
|
5
|
+
### v3.0.0 / 2025-04-14
|
6
|
+
|
7
|
+
|
8
|
+
- [(bb23d)](https://github.com/LeFnord/grape-starter/commit/bb23d62cbd04b445c616565c6788b28cde03507c) Updates grape requirement to ~> 2.0 [LeFnord](https://github.com/LeFnord)
|
9
|
+
- [(#50)](https://github.com/LeFnord/grape-starter/pull/50) Adds Ruby 3.4, drops 3.1 [LeFnord](https://github.com/LeFnord)
|
10
|
+
|
5
11
|
### v2.1.3 / 2023-10-31
|
6
12
|
|
7
13
|
- [(#47)](https://github.com/LeFnord/grape-starter/pull/47) Minor Fixes. [LeFnord](https://github.com/LeFnord)
|
data/Gemfile
CHANGED
data/grape-starter.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
23
23
|
spec.require_paths = ['lib']
|
24
24
|
|
25
|
-
spec.required_ruby_version = '>= 3.
|
25
|
+
spec.required_ruby_version = '>= 3.2'
|
26
26
|
|
27
27
|
spec.add_dependency 'gli', '~> 2.20'
|
28
28
|
spec.add_dependency 'activesupport', '>= 6', '< 8'
|
@@ -95,7 +95,7 @@ module Starter
|
|
95
95
|
#
|
96
96
|
def object?(definition:)
|
97
97
|
definition['type'] == 'object' ||
|
98
|
-
definition['content']&.keys&.first&.include?('application/json')
|
98
|
+
definition['content']&.keys&.first&.include?('application/json') # rubocop:disable Style/SafeNavigationChainLength
|
99
99
|
end
|
100
100
|
|
101
101
|
def simple_object?(properties:)
|
@@ -135,7 +135,7 @@ module Starter
|
|
135
135
|
|
136
136
|
def serialized
|
137
137
|
type = definition['type'] || definition['schema']['type']
|
138
|
-
type.scan(/\w+/).each { |x| type.match?('JSON') ? type : type.sub!(x, x.capitalize) }
|
138
|
+
type.scan(/\w+/).each { |x| type.match?('JSON') ? type : type.sub!(x, x.capitalize) } # rubocop:disable Lint/Void
|
139
139
|
|
140
140
|
if type == 'Array' && definition.key?('items')
|
141
141
|
sub = definition.dig('items', 'type').to_s.capitalize
|
data/lib/starter/version.rb
CHANGED
data/template/.rubocop.yml
CHANGED
data/template/Gemfile
CHANGED
@@ -2,14 +2,17 @@
|
|
2
2
|
|
3
3
|
source 'http://rubygems.org'
|
4
4
|
|
5
|
+
# moved from StdLib to gems
|
6
|
+
gem 'ostruct', require: false
|
7
|
+
|
5
8
|
# Server stuff
|
6
9
|
gem 'puma'
|
7
10
|
|
8
|
-
gem 'rack'
|
11
|
+
gem 'rack'
|
9
12
|
gem 'rack-cors'
|
10
13
|
|
11
14
|
# API stuff
|
12
|
-
gem 'grape'
|
15
|
+
gem 'grape', '~> 2.0'
|
13
16
|
gem 'grape-entity'
|
14
17
|
gem 'grape-swagger'
|
15
18
|
gem 'grape-swagger-entity'
|
data/template/config/boot.rb
CHANGED
@@ -10,18 +10,18 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|
10
10
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'api'))
|
11
11
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
12
12
|
|
13
|
-
Dir[File.expand_path('../config/initializers/*.rb', __dir__)].
|
13
|
+
Dir[File.expand_path('../config/initializers/*.rb', __dir__)].each do |initializer|
|
14
14
|
require initializer
|
15
15
|
end
|
16
16
|
|
17
|
-
Dir[File.expand_path('../lib/**/*.rb', __dir__)].
|
17
|
+
Dir[File.expand_path('../lib/**/*.rb', __dir__)].each do |lib|
|
18
18
|
require lib
|
19
19
|
end
|
20
20
|
|
21
|
-
Dir[File.expand_path('../api/entities/*.rb', __dir__)].
|
21
|
+
Dir[File.expand_path('../api/entities/*.rb', __dir__)].each do |entity|
|
22
22
|
require entity
|
23
23
|
end
|
24
24
|
|
25
|
-
Dir[File.expand_path('../api/endpoints/*.rb', __dir__)].
|
25
|
+
Dir[File.expand_path('../api/endpoints/*.rb', __dir__)].each do |endpoint|
|
26
26
|
require endpoint
|
27
27
|
end
|
data/template/script/console
CHANGED
@@ -6,7 +6,7 @@ require 'rack/test'
|
|
6
6
|
require File.expand_path('../config/application', __dir__)
|
7
7
|
|
8
8
|
grape_starter_gem = Gem::Specification.find_by_name('grape-starter').gem_dir
|
9
|
-
Dir["#{grape_starter_gem}/lib/starter/rspec/**/*.rb"].
|
9
|
+
Dir["#{grape_starter_gem}/lib/starter/rspec/**/*.rb"].each { |f| require f }
|
10
10
|
|
11
11
|
RSpec.configure do |config|
|
12
12
|
include Rack::Test::Methods
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grape-starter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LeFnord
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-04-14 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: gli
|
@@ -101,6 +100,7 @@ files:
|
|
101
100
|
- ".rspec"
|
102
101
|
- ".rubocop.yml"
|
103
102
|
- ".rubocop_todo.yml"
|
103
|
+
- ".ruby-version"
|
104
104
|
- CHANGELOG.md
|
105
105
|
- Gemfile
|
106
106
|
- LICENSE
|
@@ -162,7 +162,6 @@ homepage: https://github.com/LeFnord/grape-starter
|
|
162
162
|
licenses:
|
163
163
|
- MIT
|
164
164
|
metadata: {}
|
165
|
-
post_install_message:
|
166
165
|
rdoc_options: []
|
167
166
|
require_paths:
|
168
167
|
- lib
|
@@ -170,15 +169,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
170
169
|
requirements:
|
171
170
|
- - ">="
|
172
171
|
- !ruby/object:Gem::Version
|
173
|
-
version: '3.
|
172
|
+
version: '3.2'
|
174
173
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
175
174
|
requirements:
|
176
175
|
- - ">="
|
177
176
|
- !ruby/object:Gem::Version
|
178
177
|
version: '0'
|
179
178
|
requirements: []
|
180
|
-
rubygems_version: 3.
|
181
|
-
signing_key:
|
179
|
+
rubygems_version: 3.6.2
|
182
180
|
specification_version: 4
|
183
181
|
summary: Creates a Grape Rack skeleton
|
184
182
|
test_files: []
|