grape-starter 1.2.3 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +21 -0
- data/.rubocop.yml +4 -4
- data/.travis.yml +1 -2
- data/grape-starter.gemspec +2 -2
- data/lib/starter/rake/grape_tasks.rb +4 -6
- data/lib/starter/version.rb +1 -1
- data/template/.rubocop.yml +2 -2
- data/template/config/boot.rb +4 -4
- data/template/spec/spec_helper.rb +1 -1
- metadata +6 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 866bbd29cba332a5e801e76518c378cbdcf00a2f8a6b7502b8d9d65b8517ee95
|
4
|
+
data.tar.gz: 6fb1e47d74e5de0094f66cd68b350d7c33c2057da54a29ec06d700b84c5716fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 637cabc191b53fe8374b26ff692b24db9c18fa0d2dba52ea5542c31c81dedca817222d4cb5da6ed6fcdb097e00b0b38c868784f722847115a57cb330c735482d
|
7
|
+
data.tar.gz: 06dc0ab6931edc6673d14d3f06867a1594f20f88fb32f9b38eba9156e9d36ef7317bd3504366d995e6ec2250b93ddfa84a2c464e5e66457c0bdc4690ec2ac14a
|
@@ -0,0 +1,21 @@
|
|
1
|
+
name: Ruby
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
|
10
|
+
steps:
|
11
|
+
- uses: actions/checkout@v1
|
12
|
+
- name: Set up Ruby 2.6
|
13
|
+
uses: actions/setup-ruby@v1
|
14
|
+
with:
|
15
|
+
ruby-version: 2.6.x
|
16
|
+
- name: Build and test with Rake
|
17
|
+
run: |
|
18
|
+
gem install bundler
|
19
|
+
bundle install --jobs 4 --retry 3
|
20
|
+
bundle exec rspec
|
21
|
+
bundle exec rubocop
|
data/.rubocop.yml
CHANGED
@@ -9,20 +9,20 @@ AllCops:
|
|
9
9
|
- '**/template/api/**'
|
10
10
|
- grape-starter.gemspec
|
11
11
|
UseCache: true
|
12
|
-
TargetRubyVersion: 2.
|
12
|
+
TargetRubyVersion: 2.7
|
13
13
|
|
14
14
|
Layout/IndentationWidth:
|
15
15
|
Exclude:
|
16
16
|
- 'lib/starter/builder/templates/files.rb'
|
17
17
|
- 'lib/starter/builder/templates/endpoints.rb'
|
18
18
|
|
19
|
+
Layout/LineLength:
|
20
|
+
Max: 120
|
21
|
+
|
19
22
|
Metrics/BlockLength:
|
20
23
|
Exclude:
|
21
24
|
- 'spec/**/*'
|
22
25
|
|
23
|
-
Metrics/LineLength:
|
24
|
-
Max: 120
|
25
|
-
|
26
26
|
Metrics/AbcSize:
|
27
27
|
Max: 20
|
28
28
|
|
data/.travis.yml
CHANGED
data/grape-starter.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.required_ruby_version = '>= 2.5'
|
26
26
|
|
27
27
|
spec.add_dependency 'gli', '~> 2.18'
|
28
|
-
spec.add_dependency 'activesupport', '>= 5.0.0'
|
29
|
-
spec.add_dependency 'rubocop', '~> 0.
|
28
|
+
spec.add_dependency 'activesupport', '>= 5.0.0'
|
29
|
+
spec.add_dependency 'rubocop', '~> 0.78'
|
30
30
|
spec.add_dependency 'awesome_print', '~> 1.7'
|
31
31
|
end
|
@@ -52,16 +52,14 @@ module Starter
|
|
52
52
|
def build_path(route)
|
53
53
|
path = route.path
|
54
54
|
|
55
|
-
path.sub
|
56
|
-
path.sub
|
55
|
+
path = path.sub(/\(\.\w+?\)$/, '')
|
56
|
+
path = path.sub('(.:format)', '')
|
57
57
|
|
58
58
|
if route.version
|
59
|
-
path.sub
|
59
|
+
path.sub(':version', route.version.to_s)
|
60
60
|
else
|
61
|
-
path.sub
|
61
|
+
path.sub('/:version', '')
|
62
62
|
end
|
63
|
-
|
64
|
-
path
|
65
63
|
end
|
66
64
|
|
67
65
|
def app
|
data/lib/starter/version.rb
CHANGED
data/template/.rubocop.yml
CHANGED
data/template/config/boot.rb
CHANGED
@@ -9,18 +9,18 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|
9
9
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'api'))
|
10
10
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
11
11
|
|
12
|
-
Dir[File.expand_path('../config/initializers/*.rb', __dir__)].each do |initializer|
|
12
|
+
Dir[File.expand_path('../config/initializers/*.rb', __dir__)].sort.each do |initializer|
|
13
13
|
require initializer
|
14
14
|
end
|
15
15
|
|
16
|
-
Dir[File.expand_path('../lib/**/*.rb', __dir__)].each do |lib|
|
16
|
+
Dir[File.expand_path('../lib/**/*.rb', __dir__)].sort.each do |lib|
|
17
17
|
require lib
|
18
18
|
end
|
19
19
|
|
20
|
-
Dir[File.expand_path('../api/entities/*.rb', __dir__)].each do |entity|
|
20
|
+
Dir[File.expand_path('../api/entities/*.rb', __dir__)].sort.each do |entity|
|
21
21
|
require entity
|
22
22
|
end
|
23
23
|
|
24
|
-
Dir[File.expand_path('../api/endpoints/*.rb', __dir__)].each do |endpoint|
|
24
|
+
Dir[File.expand_path('../api/endpoints/*.rb', __dir__)].sort.each do |endpoint|
|
25
25
|
require endpoint
|
26
26
|
end
|
@@ -7,7 +7,7 @@ require File.expand_path('../config/application', __dir__)
|
|
7
7
|
|
8
8
|
grape_starter_gem = Gem::Specification.find_by_name('grape-starter').gem_dir
|
9
9
|
|
10
|
-
Dir[grape_starter_gem + '/lib/starter/rspec/**/*.rb'].each { |f| require f }
|
10
|
+
Dir[grape_starter_gem + '/lib/starter/rspec/**/*.rb'].sort.each { |f| require f }
|
11
11
|
|
12
12
|
RSpec.configure do |config|
|
13
13
|
include Rack::Test::Methods
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grape-starter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LeFnord
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gli
|
@@ -31,9 +31,6 @@ dependencies:
|
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 5.0.0
|
34
|
-
- - "<"
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: '7.0'
|
37
34
|
type: :runtime
|
38
35
|
prerelease: false
|
39
36
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -41,23 +38,20 @@ dependencies:
|
|
41
38
|
- - ">="
|
42
39
|
- !ruby/object:Gem::Version
|
43
40
|
version: 5.0.0
|
44
|
-
- - "<"
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: '7.0'
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
name: rubocop
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
50
44
|
requirements:
|
51
45
|
- - "~>"
|
52
46
|
- !ruby/object:Gem::Version
|
53
|
-
version: '0.
|
47
|
+
version: '0.78'
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
51
|
requirements:
|
58
52
|
- - "~>"
|
59
53
|
- !ruby/object:Gem::Version
|
60
|
-
version: '0.
|
54
|
+
version: '0.78'
|
61
55
|
- !ruby/object:Gem::Dependency
|
62
56
|
name: awesome_print
|
63
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,6 +74,7 @@ executables:
|
|
80
74
|
extensions: []
|
81
75
|
extra_rdoc_files: []
|
82
76
|
files:
|
77
|
+
- ".github/workflows/ruby.yml"
|
83
78
|
- ".gitignore"
|
84
79
|
- ".inch.yml"
|
85
80
|
- ".rspec"
|
@@ -157,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
152
|
- !ruby/object:Gem::Version
|
158
153
|
version: '0'
|
159
154
|
requirements: []
|
160
|
-
rubygems_version: 3.
|
155
|
+
rubygems_version: 3.1.2
|
161
156
|
signing_key:
|
162
157
|
specification_version: 4
|
163
158
|
summary: Creates a Grape Rack skeleton
|