bankai 0.10.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab-ci.yml +2 -2
- data/.ruby-version +1 -1
- data/.travis.yml +2 -2
- data/README.md +5 -0
- data/bankai.gemspec +1 -1
- data/lib/bankai/generator.rb +1 -1
- data/lib/bankai/generators/ci_generator.rb +2 -0
- data/lib/bankai/generators/db_optimizations_generator.rb +1 -2
- data/lib/bankai/generators/mailer_generator.rb +1 -2
- data/lib/bankai/version.rb +4 -4
- data/templates/Gemfile.erb +42 -50
- data/templates/gitlab-ci.yml.erb +36 -26
- data/templates/rubocop.yml.erb +6 -16
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d0da7ded777600e85a5db17f10531070903d05eb40c0e89237886e640f587ed
|
4
|
+
data.tar.gz: d802dc97d4210e38dfcd5bd56968d45883fc8c3df4a54b56d788515581d7329b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a16b8787787d64fd10f9724684adb551780f9ed22523dcb567d97cddd28ac5dbb6423307b0a529452c6970213aae025c55181d5d91b57f97c6b72a2a8896afa3
|
7
|
+
data.tar.gz: 80b26408614d15d0c6fff58f591abb5c6506b09c07d34290ad1a15aa1d332d126c5e17bf166e5b4ba82d7d28b8e053ee50f048afb0b6d13c42c0f26619eed74e
|
data/.gitlab-ci.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
image: ruby:2.
|
1
|
+
image: ruby:2.7.4
|
2
2
|
|
3
3
|
stages:
|
4
4
|
- lint
|
@@ -10,7 +10,7 @@ cache:
|
|
10
10
|
- vendor/ruby
|
11
11
|
|
12
12
|
.install_ruby_gems: &install_ruby_gems
|
13
|
-
- gem install bundler -v 2.
|
13
|
+
- gem install bundler -v 2.2.26
|
14
14
|
- bundle install --path vendor
|
15
15
|
|
16
16
|
before_script:
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.7.4
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
data/bankai.gemspec
CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
28
|
spec.require_paths = ['lib']
|
29
29
|
|
30
|
-
spec.add_development_dependency 'bundler', '~> 2.
|
30
|
+
spec.add_development_dependency 'bundler', '~> 2.2.26'
|
31
31
|
spec.add_development_dependency 'bundler-audit'
|
32
32
|
spec.add_development_dependency 'overcommit'
|
33
33
|
spec.add_development_dependency 'rake', '~> 12.0'
|
data/lib/bankai/generator.rb
CHANGED
@@ -68,7 +68,7 @@ module Bankai
|
|
68
68
|
def generate_default
|
69
69
|
run('spring stop')
|
70
70
|
generate('bankai:testing') unless options[:skip_rspec]
|
71
|
-
generate('bankai:ci')
|
71
|
+
generate('bankai:ci', options.api? ? '--api' : '')
|
72
72
|
generate('bankai:json')
|
73
73
|
generate('bankai:db_optimizations')
|
74
74
|
generate('bankai:mailer')
|
@@ -10,8 +10,7 @@ module Bankai
|
|
10
10
|
inject_into_file(
|
11
11
|
'config/environments/development.rb',
|
12
12
|
configuration,
|
13
|
-
after: 'config.
|
14
|
-
"ActiveSupport::EventedFileUpdateChecker\n"
|
13
|
+
after: '# config.action_cable.disable_request_forgery_protection = true'
|
15
14
|
)
|
16
15
|
end
|
17
16
|
|
@@ -10,8 +10,7 @@ module Bankai
|
|
10
10
|
inject_into_file(
|
11
11
|
'config/environments/development.rb',
|
12
12
|
configuration,
|
13
|
-
after: 'config.
|
14
|
-
"ActiveSupport::EventedFileUpdateChecker\n"
|
13
|
+
after: '# config.action_cable.disable_request_forgery_protection = true'
|
15
14
|
)
|
16
15
|
end
|
17
16
|
|
data/lib/bankai/version.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Bankai
|
4
|
-
VERSION = '0.
|
4
|
+
VERSION = '0.13.0'
|
5
5
|
RUBY_VERSION = '2.6.7'
|
6
|
-
RAILS_VERSION = '
|
7
|
-
RUBOCOP_VERSION = '1.
|
8
|
-
CAPISTRANO_VERSION = '3.
|
6
|
+
RAILS_VERSION = '7.0.0'
|
7
|
+
RUBOCOP_VERSION = '1.24.1'
|
8
|
+
CAPISTRANO_VERSION = '3.16.0'
|
9
9
|
end
|
data/templates/Gemfile.erb
CHANGED
@@ -2,41 +2,46 @@ source 'https://rubygems.org'
|
|
2
2
|
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
3
3
|
|
4
4
|
ruby '<%= RUBY_VERSION -%>'
|
5
|
-
<% gemfile_entries.each do |gem| -%>
|
6
|
-
<% if gem.comment -%>
|
7
5
|
|
8
|
-
|
9
|
-
|
10
|
-
<%= gem.commented_out ? '# ' : '' %>gem '<%= gem.name %>'<%= %(, '#{gem.version}') if gem.version -%>
|
11
|
-
<% if gem.options.any? -%>
|
12
|
-
, <%= gem.options.map { |k,v|
|
13
|
-
"#{k}: #{v.inspect}" }.join(', ') %>
|
14
|
-
<% end -%>
|
6
|
+
<% gemfile_entries.each do |gemfile_entry| %>
|
7
|
+
<%= gemfile_entry %>
|
15
8
|
<% end -%>
|
9
|
+
<% unless options.minimal? -%>
|
16
10
|
|
17
|
-
# Use
|
18
|
-
# gem
|
19
|
-
<% unless skip_active_storage? -%>
|
11
|
+
# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
|
12
|
+
# gem "kredis"
|
20
13
|
|
21
|
-
# Use
|
22
|
-
# gem
|
14
|
+
# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
|
15
|
+
# gem "bcrypt", "~> 3.1.7"
|
23
16
|
<% end -%>
|
24
17
|
|
18
|
+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
19
|
+
gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
|
25
20
|
<% if depend_on_bootsnap? -%>
|
21
|
+
|
26
22
|
# Reduces boot times through caching; required in config/boot.rb
|
27
|
-
gem
|
23
|
+
gem "bootsnap", require: false
|
24
|
+
<% end -%>
|
25
|
+
<% unless skip_sprockets? || options.minimal? -%>
|
28
26
|
|
29
|
-
|
27
|
+
# Use Sass to process CSS
|
28
|
+
# gem "sassc-rails"
|
29
|
+
<% end -%>
|
30
|
+
<% unless skip_active_storage? -%>
|
31
|
+
|
32
|
+
# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
|
33
|
+
# gem "image_processing", "~> 1.2"
|
34
|
+
<% end -%>
|
30
35
|
<%- if options.api? -%>
|
31
|
-
# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
|
32
|
-
# gem 'rack-cors'
|
33
36
|
|
37
|
+
# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
|
38
|
+
# gem "rack-cors"
|
34
39
|
<%- end -%>
|
35
|
-
<% if RUBY_ENGINE ==
|
40
|
+
<% if RUBY_ENGINE == "ruby" -%>
|
41
|
+
|
36
42
|
group :development, :test do
|
37
|
-
#
|
38
|
-
|
39
|
-
gem 'byebug', platforms: %i[mri mingw x64_mingw]
|
43
|
+
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
|
44
|
+
gem "debug", platforms: %i[ mri mingw x64_mingw ]
|
40
45
|
|
41
46
|
gem 'brakeman', require: false
|
42
47
|
gem 'bundler-audit', require: false
|
@@ -59,28 +64,19 @@ group :development, :test do
|
|
59
64
|
|
60
65
|
gem 'bankai'
|
61
66
|
end
|
67
|
+
<% end -%>
|
62
68
|
|
63
69
|
group :development do
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
#
|
69
|
-
#
|
70
|
-
|
71
|
-
gem 'web-console', github: 'rails/web-console'
|
72
|
-
<%- else -%>
|
73
|
-
gem 'web-console', '>= 3.3.0'
|
74
|
-
<%- end -%>
|
70
|
+
<%- unless options.api? || options.skip_dev_gems? -%>
|
71
|
+
# Use console on exceptions pages [https://github.com/rails/web-console]
|
72
|
+
gem "web-console"
|
73
|
+
|
74
|
+
# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
|
75
|
+
# gem "rack-mini-profiler"
|
76
|
+
|
75
77
|
<%- end -%>
|
76
|
-
|
77
|
-
#
|
78
|
-
# the background. Read more: https://github.com/rails/spring
|
79
|
-
gem 'spring'
|
80
|
-
<% if depend_on_listen? -%>
|
81
|
-
gem 'spring-watcher-listen', '~> 2.0.0'
|
82
|
-
<% end -%>
|
83
|
-
<% end -%>
|
78
|
+
# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
|
79
|
+
# gem "spring"
|
84
80
|
|
85
81
|
<% if options[:capistrano] -%>
|
86
82
|
gem 'capistrano', '<%= Bankai::CAPISTRANO_VERSION %>'
|
@@ -90,7 +86,7 @@ group :development do
|
|
90
86
|
# gem 'capistrano-passenger'
|
91
87
|
<% end -%>
|
92
88
|
|
93
|
-
gem 'annotate'
|
89
|
+
gem 'annotate'
|
94
90
|
gem 'bullet'
|
95
91
|
gem 'dotenv-rails'
|
96
92
|
gem 'letter_opener'
|
@@ -101,13 +97,9 @@ end
|
|
101
97
|
|
102
98
|
<%- if depends_on_system_test? -%>
|
103
99
|
group :test do
|
104
|
-
#
|
105
|
-
gem
|
106
|
-
gem
|
107
|
-
gem
|
100
|
+
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
|
101
|
+
gem "capybara"
|
102
|
+
gem "selenium-webdriver"
|
103
|
+
gem "webdrivers"
|
108
104
|
end
|
109
105
|
<%- end -%>
|
110
|
-
<% end -%>
|
111
|
-
|
112
|
-
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
113
|
-
gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]
|
data/templates/gitlab-ci.yml.erb
CHANGED
@@ -8,8 +8,10 @@ stages:
|
|
8
8
|
|
9
9
|
variables:
|
10
10
|
RAILS_ENV: test
|
11
|
+
<%- unless options.api? -%>
|
11
12
|
NODE_VERSION: 12.13.1
|
12
|
-
|
13
|
+
<%- end -%>
|
14
|
+
BUNDLER_VERSION: 2.2.26
|
13
15
|
<%- if pg? -%>
|
14
16
|
POSTGRES_DB: <%= app_name %>
|
15
17
|
POSTGRES_PASSWORD: postgres
|
@@ -26,11 +28,12 @@ variables:
|
|
26
28
|
.install_ruby_gems: &install_ruby_gems
|
27
29
|
- gem install bundler -v ${BUNDLER_VERSION}
|
28
30
|
- bundle install --path vendor
|
29
|
-
|
31
|
+
<% unless options.api? %>
|
30
32
|
.install_nodejs: &install_nodejs
|
31
33
|
- curl -SLO https://nodejs.org/dist/v$NODE_VERSION/node-v${NODE_VERSION}-linux-x64.tar.xz && tar -xJf node-v${NODE_VERSION}-linux-x64.tar.xz -C /usr/local --strip-components=1;
|
32
34
|
- curl -o- -L https://yarnpkg.com/install.sh | bash
|
33
35
|
- export PATH=$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH
|
36
|
+
<% end -%>
|
34
37
|
|
35
38
|
.common:
|
36
39
|
before_script:
|
@@ -41,26 +44,34 @@ variables:
|
|
41
44
|
key:
|
42
45
|
files:
|
43
46
|
- Gemfile.lock
|
47
|
+
<%- unless options.api? -%>
|
44
48
|
- yarn.lock
|
49
|
+
<%- end -%>
|
45
50
|
paths:
|
46
51
|
- vendor/ruby
|
52
|
+
<% unless options.api? %>
|
47
53
|
- node_modules
|
54
|
+
<% end -%>
|
48
55
|
|
49
56
|
rubocop:
|
50
57
|
extends: .common
|
51
58
|
stage: lint
|
52
59
|
script:
|
53
60
|
- bundle exec rubocop
|
54
|
-
|
55
|
-
-
|
61
|
+
rules:
|
62
|
+
- if: $CI_MERGE_REQUEST_ID
|
56
63
|
|
57
64
|
brakeman:
|
58
|
-
|
65
|
+
image: registry.gitlab.com/gitlab-org/security-products/analyzers/brakeman:2
|
59
66
|
stage: lint
|
67
|
+
allow_failure: true
|
60
68
|
script:
|
61
|
-
-
|
62
|
-
|
63
|
-
|
69
|
+
- /analyzer run
|
70
|
+
artifacts:
|
71
|
+
reports:
|
72
|
+
sast: gl-sast-report.json
|
73
|
+
rules:
|
74
|
+
- if: $CI_MERGE_REQUEST_ID
|
64
75
|
|
65
76
|
bundler-audit:
|
66
77
|
extends: .common
|
@@ -69,10 +80,9 @@ bundler-audit:
|
|
69
80
|
- gem install bundler-audit
|
70
81
|
- bundle audit --update
|
71
82
|
- bundle audit
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
- Gemfile.lock
|
83
|
+
rules:
|
84
|
+
- if: $CI_MERGE_REQUEST_ID
|
85
|
+
- if: $CI_PIPELINE_SOURCE == 'schedule'
|
76
86
|
allow_failure: true
|
77
87
|
|
78
88
|
bundler-leak:
|
@@ -82,12 +92,10 @@ bundler-leak:
|
|
82
92
|
- gem install bundler-leak
|
83
93
|
- bundle leak check --update
|
84
94
|
- bundle leak
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
allow_failure: true
|
90
|
-
|
95
|
+
rules:
|
96
|
+
- if: $CI_MERGE_REQUEST_ID
|
97
|
+
- if: $CI_PIPELINE_SOURCE == 'schedule'
|
98
|
+
<% unless options.api? %>
|
91
99
|
yarn-audit:
|
92
100
|
extends: .common
|
93
101
|
stage: lint
|
@@ -95,20 +103,21 @@ yarn-audit:
|
|
95
103
|
- *install_nodejs
|
96
104
|
script:
|
97
105
|
- yarn audit
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
- package-lock.json
|
102
|
-
- yarn.lock
|
106
|
+
rules:
|
107
|
+
- if: $CI_MERGE_REQUEST_ID
|
108
|
+
- if: $CI_PIPELINE_SOURCE == 'schedule'
|
103
109
|
allow_failure: true
|
110
|
+
<% end -%>
|
104
111
|
|
105
112
|
rspec:
|
106
113
|
extends: .common
|
107
114
|
stage: test
|
108
115
|
before_script:
|
109
|
-
- *install_nodejs
|
110
116
|
- *install_ruby_gems
|
117
|
+
<%- unless options.api? -%>
|
118
|
+
- *install_nodejs
|
111
119
|
- yarn install
|
120
|
+
<%- end -%>
|
112
121
|
services:
|
113
122
|
<%- if pg? -%>
|
114
123
|
- postgres:12-alpine
|
@@ -120,8 +129,9 @@ rspec:
|
|
120
129
|
script:
|
121
130
|
- bundle exec rake db:migrate
|
122
131
|
- bundle exec rspec
|
123
|
-
|
124
|
-
-
|
132
|
+
rules:
|
133
|
+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
134
|
+
- if: $CI_MERGE_REQUEST_ID
|
125
135
|
artifacts:
|
126
136
|
reports:
|
127
137
|
cobertura: coverage/coverage.xml
|
data/templates/rubocop.yml.erb
CHANGED
@@ -3,34 +3,24 @@ require:
|
|
3
3
|
- rubocop-rails
|
4
4
|
- rubocop-rspec
|
5
5
|
|
6
|
+
inherit_mode:
|
7
|
+
merge:
|
8
|
+
- Exclude
|
9
|
+
|
6
10
|
AllCops:
|
11
|
+
NewCops: enable
|
7
12
|
TargetRubyVersion: <%= RUBY_VERSION %>
|
8
13
|
DisplayCopNames: true
|
9
14
|
SuggestExtensions: false
|
10
15
|
Exclude:
|
11
|
-
- bin/*
|
12
16
|
- vendor/ruby/**/*
|
13
17
|
- node_modules/**/*
|
14
|
-
- db/schema.rb
|
15
18
|
- .licenses/**/*
|
16
19
|
Rails:
|
17
20
|
Enabled: true
|
18
|
-
Rails/UnknownEnv:
|
19
|
-
Environments:
|
20
|
-
- production
|
21
|
-
- staging
|
22
|
-
- development
|
23
|
-
- test
|
24
|
-
Metrics:
|
25
|
-
Exclude:
|
26
|
-
- db/migrate/*
|
27
|
-
- Rakefile
|
28
|
-
- Gemfile
|
29
|
-
- config/**/*
|
30
|
-
- spec/**/*
|
31
|
-
- lib/tasks/**/*
|
32
21
|
Metrics/BlockLength:
|
33
22
|
Exclude:
|
23
|
+
- db/migrate/*
|
34
24
|
- config/environments/*
|
35
25
|
- lib/tasks/**/*
|
36
26
|
- spec/**/*
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bankai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 5xRuby
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-01-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 2.
|
20
|
+
version: 2.2.26
|
21
21
|
type: :development
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 2.
|
27
|
+
version: 2.2.26
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: bundler-audit
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -129,14 +129,14 @@ dependencies:
|
|
129
129
|
requirements:
|
130
130
|
- - ">="
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version:
|
132
|
+
version: 7.0.0
|
133
133
|
type: :runtime
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
137
|
- - ">="
|
138
138
|
- !ruby/object:Gem::Version
|
139
|
-
version:
|
139
|
+
version: 7.0.0
|
140
140
|
description: The tool to generate Rails template for 5xRuby
|
141
141
|
email:
|
142
142
|
- hi@5xruby.tw
|
@@ -208,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
208
208
|
- !ruby/object:Gem::Version
|
209
209
|
version: '0'
|
210
210
|
requirements: []
|
211
|
-
rubygems_version: 3.
|
211
|
+
rubygems_version: 3.2.26
|
212
212
|
signing_key:
|
213
213
|
specification_version: 4
|
214
214
|
summary: The Rails template for 5xRuby
|