bankai 0.8.0 → 0.11.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 +1 -1
- data/.rubocop.yml +2 -0
- data/.ruby-version +1 -1
- data/.travis.yml +1 -1
- data/bankai.gemspec +1 -1
- data/exe/bankai +1 -1
- data/lib/bankai/builder.rb +1 -1
- data/lib/bankai/generator.rb +4 -4
- data/lib/bankai/generators/base.rb +5 -1
- data/lib/bankai/generators/deploy_generator.rb +1 -1
- data/lib/bankai/generators/json_generator.rb +1 -1
- data/lib/bankai/generators/lint_generator.rb +3 -3
- data/lib/bankai/generators/sitemap_generator.rb +4 -4
- data/lib/bankai/generators/whenever_generator.rb +3 -3
- data/lib/bankai/helper.rb +1 -1
- data/lib/bankai/version.rb +4 -4
- data/templates/Gemfile.erb +2 -1
- data/templates/README.md.erb +1 -1
- data/templates/gitlab-ci.yml.erb +13 -2
- data/templates/rubocop.yml.erb +1 -10
- data/templates/spec_helper.rb +4 -0
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 670d9606db641d179a5b39a32f1666ab9c6efd9b05bfa2577bc2785055d77f7b
|
4
|
+
data.tar.gz: 5c1cc38b00f7f741dce564a7e92277de544e2eb74442e09346b9b8808a1a399c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efd3192adbc75c8e228bd5e33187e77a7aab915d7bec210fe7698210c3929393b3cf8dc3128724095b4a6545905847c0e25a5365c99a39cb38051110734285d1
|
7
|
+
data.tar.gz: 9207ebce21584d07e8905f52e4cfad84ecbe1415a90d52e08b8d64ce620c8c73eb72a60e41bc20aee9467b6a17c20c26154caedf166c6a9b59bf7fd217ff9d11
|
data/.gitlab-ci.yml
CHANGED
data/.rubocop.yml
ADDED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.6.
|
1
|
+
2.6.7
|
data/.travis.yml
CHANGED
data/bankai.gemspec
CHANGED
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
|
|
33
33
|
spec.add_development_dependency 'rake', '~> 12.0'
|
34
34
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
35
35
|
spec.add_development_dependency 'rspec_junit_formatter'
|
36
|
-
spec.add_development_dependency 'rubocop', '~>
|
36
|
+
spec.add_development_dependency 'rubocop', '~> 1.8.1'
|
37
37
|
spec.add_development_dependency 'simplecov', '~> 0.17.1'
|
38
38
|
|
39
39
|
# TODO: Allow specify rails version
|
data/exe/bankai
CHANGED
data/lib/bankai/builder.rb
CHANGED
data/lib/bankai/generator.rb
CHANGED
@@ -12,15 +12,15 @@ module Bankai
|
|
12
12
|
desc: 'Configure for selected database ' \
|
13
13
|
"(options: #{DATABASES.join('/')})"
|
14
14
|
|
15
|
+
class_option :capistrano, type: :boolean, default: false,
|
16
|
+
desc: 'Use Capistrano'
|
17
|
+
|
15
18
|
class_option :skip_test, type: :boolean, default: true,
|
16
19
|
desc: 'Skip test files'
|
17
20
|
|
18
21
|
class_option :skip_coffee, type: :boolean, default: true,
|
19
22
|
desc: "Don't use CoffeeScript"
|
20
23
|
|
21
|
-
class_option :skip_capistrano, type: :boolean, default: false,
|
22
|
-
desc: "Don't use Capistrano"
|
23
|
-
|
24
24
|
class_option :skip_rspec, type: :boolean, default: false,
|
25
25
|
desc: 'Skip rspec files'
|
26
26
|
|
@@ -72,7 +72,7 @@ module Bankai
|
|
72
72
|
generate('bankai:json')
|
73
73
|
generate('bankai:db_optimizations')
|
74
74
|
generate('bankai:mailer')
|
75
|
-
generate('bankai:deploy')
|
75
|
+
generate('bankai:deploy') if options[:capistrano]
|
76
76
|
generate('annotate:install')
|
77
77
|
generate('bankai:lint')
|
78
78
|
end
|
@@ -15,7 +15,11 @@ module Bankai
|
|
15
15
|
private
|
16
16
|
|
17
17
|
def app_name
|
18
|
-
Rails
|
18
|
+
if Rails::VERSION::MAJOR >= 6
|
19
|
+
Rails.app_class.module_parent_name.demodulize.underscore.dasherize
|
20
|
+
else
|
21
|
+
Rails.app_class.parent_name.demodulize.underscore.dasherize
|
22
|
+
end
|
19
23
|
end
|
20
24
|
end
|
21
25
|
end
|
@@ -15,15 +15,15 @@ module Bankai
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def install_overcommit
|
18
|
-
|
18
|
+
execute_command :bundle, 'exec overcommit --install'
|
19
19
|
end
|
20
20
|
|
21
21
|
def rubocop_autocorrect
|
22
|
-
|
22
|
+
execute_command :bundle, 'exec rubocop --auto-correct-all'
|
23
23
|
end
|
24
24
|
|
25
25
|
def rubocop_todo
|
26
|
-
|
26
|
+
execute_command :bundle, 'exec rubocop --auto-gen-config'
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
@@ -17,18 +17,18 @@ module Bankai
|
|
17
17
|
class SitemapGenerator < Base
|
18
18
|
def add_sitemap_generator
|
19
19
|
gem 'sitemap_generator'
|
20
|
-
|
20
|
+
in_root { run 'bundle install' }
|
21
21
|
end
|
22
22
|
|
23
23
|
def init_sitemap
|
24
|
-
|
24
|
+
in_root { run 'bundle exec rake sitemap:install' }
|
25
25
|
end
|
26
26
|
|
27
27
|
def generate_sitmap_config
|
28
28
|
gsub_file 'config/sitemap.rb',
|
29
|
-
%r{"http
|
29
|
+
%r{"http://www.example.com"},
|
30
30
|
HOST_TEMPLATE
|
31
|
-
|
31
|
+
in_root do
|
32
32
|
run 'bundle exec rubocop -a config/sitemap.rb'
|
33
33
|
end
|
34
34
|
end
|
@@ -8,12 +8,12 @@ module Bankai
|
|
8
8
|
class WheneverGenerator < Base
|
9
9
|
def add_whenever
|
10
10
|
gem 'whenever', require: false
|
11
|
-
|
12
|
-
|
11
|
+
execute_command :bundle, 'exec rubocop -a Gemfile'
|
12
|
+
execute_command :bundle, 'install'
|
13
13
|
end
|
14
14
|
|
15
15
|
def initialize_whenever
|
16
|
-
|
16
|
+
execute_command :bundle, "exec wheneverize #{destination_root}"
|
17
17
|
end
|
18
18
|
|
19
19
|
def initialize_capistrano
|
data/lib/bankai/helper.rb
CHANGED
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.
|
5
|
-
RUBY_VERSION = '2.6.
|
6
|
-
RAILS_VERSION = '
|
7
|
-
RUBOCOP_VERSION = '1.
|
4
|
+
VERSION = '0.11.0'
|
5
|
+
RUBY_VERSION = '2.6.7'
|
6
|
+
RAILS_VERSION = '5.2.0'
|
7
|
+
RUBOCOP_VERSION = '1.8.1'
|
8
8
|
CAPISTRANO_VERSION = '3.14.1'
|
9
9
|
end
|
data/templates/Gemfile.erb
CHANGED
@@ -54,6 +54,7 @@ group :development, :test do
|
|
54
54
|
gem 'shoulda', require: false
|
55
55
|
gem 'shoulda-matchers', require: false
|
56
56
|
gem 'simplecov', require: false
|
57
|
+
gem 'simplecov-cobertura', require: false
|
57
58
|
<%- end -%>
|
58
59
|
|
59
60
|
gem 'bankai'
|
@@ -81,7 +82,7 @@ group :development do
|
|
81
82
|
<% end -%>
|
82
83
|
<% end -%>
|
83
84
|
|
84
|
-
<%
|
85
|
+
<% if options[:capistrano] -%>
|
85
86
|
gem 'capistrano', '<%= Bankai::CAPISTRANO_VERSION %>'
|
86
87
|
gem 'capistrano-bundler'
|
87
88
|
gem 'capistrano-rails'
|
data/templates/README.md.erb
CHANGED
data/templates/gitlab-ci.yml.erb
CHANGED
@@ -38,6 +38,10 @@ variables:
|
|
38
38
|
- export LC_ALL=C.UTF-8
|
39
39
|
- *install_ruby_gems
|
40
40
|
cache:
|
41
|
+
key:
|
42
|
+
files:
|
43
|
+
- Gemfile.lock
|
44
|
+
- yarn.lock
|
41
45
|
paths:
|
42
46
|
- vendor/ruby
|
43
47
|
- node_modules
|
@@ -51,10 +55,14 @@ rubocop:
|
|
51
55
|
- schedules
|
52
56
|
|
53
57
|
brakeman:
|
54
|
-
|
58
|
+
image: registry.gitlab.com/gitlab-org/security-products/analyzers/brakeman:2
|
55
59
|
stage: lint
|
60
|
+
allow_failure: true
|
56
61
|
script:
|
57
|
-
-
|
62
|
+
- /analyzer run
|
63
|
+
artifacts:
|
64
|
+
reports:
|
65
|
+
sast: gl-sast-report.json
|
58
66
|
except:
|
59
67
|
- schedules
|
60
68
|
|
@@ -118,3 +126,6 @@ rspec:
|
|
118
126
|
- bundle exec rspec
|
119
127
|
except:
|
120
128
|
- schedules
|
129
|
+
artifacts:
|
130
|
+
reports:
|
131
|
+
cobertura: coverage/coverage.xml
|
data/templates/rubocop.yml.erb
CHANGED
@@ -6,7 +6,7 @@ require:
|
|
6
6
|
AllCops:
|
7
7
|
TargetRubyVersion: <%= RUBY_VERSION %>
|
8
8
|
DisplayCopNames: true
|
9
|
-
|
9
|
+
SuggestExtensions: false
|
10
10
|
Exclude:
|
11
11
|
- bin/*
|
12
12
|
- vendor/ruby/**/*
|
@@ -34,14 +34,5 @@ Metrics/BlockLength:
|
|
34
34
|
- config/environments/*
|
35
35
|
- lib/tasks/**/*
|
36
36
|
- spec/**/*
|
37
|
-
Layout/LineLength:
|
38
|
-
Max: 120
|
39
|
-
Style:
|
40
|
-
Exclude:
|
41
|
-
- spec/*_helper.rb
|
42
|
-
Style/BlockComments:
|
43
|
-
Exclude:
|
44
|
-
- config/**/*
|
45
|
-
- spec/**/*
|
46
37
|
Style/Documentation:
|
47
38
|
Enabled: false
|
data/templates/spec_helper.rb
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
if ENV.fetch('COVERAGE', false) || ENV.fetch('CI', false)
|
4
4
|
require 'simplecov'
|
5
|
+
require 'simplecov-cobertura'
|
6
|
+
|
7
|
+
SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter if ENV.fetch('GITLAB_CI', false)
|
8
|
+
|
5
9
|
SimpleCov.start 'rails' do
|
6
10
|
add_filter 'vendor'
|
7
11
|
end
|
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.11.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: 2021-05-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -101,14 +101,14 @@ dependencies:
|
|
101
101
|
requirements:
|
102
102
|
- - "~>"
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version:
|
104
|
+
version: 1.8.1
|
105
105
|
type: :development
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
109
|
- - "~>"
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version:
|
111
|
+
version: 1.8.1
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
113
|
name: simplecov
|
114
114
|
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: 5.2.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: 5.2.0
|
140
140
|
description: The tool to generate Rails template for 5xRuby
|
141
141
|
email:
|
142
142
|
- hi@5xruby.tw
|
@@ -150,6 +150,7 @@ files:
|
|
150
150
|
- ".gitlab-ci.yml"
|
151
151
|
- ".overcommit.yml"
|
152
152
|
- ".rspec"
|
153
|
+
- ".rubocop.yml"
|
153
154
|
- ".ruby-version"
|
154
155
|
- ".travis.yml"
|
155
156
|
- CODE_OF_CONDUCT.md
|
@@ -200,14 +201,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
200
201
|
requirements:
|
201
202
|
- - ">="
|
202
203
|
- !ruby/object:Gem::Version
|
203
|
-
version: 2.6.
|
204
|
+
version: 2.6.7
|
204
205
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
205
206
|
requirements:
|
206
207
|
- - ">="
|
207
208
|
- !ruby/object:Gem::Version
|
208
209
|
version: '0'
|
209
210
|
requirements: []
|
210
|
-
rubygems_version: 3.0.3
|
211
|
+
rubygems_version: 3.0.3.1
|
211
212
|
signing_key:
|
212
213
|
specification_version: 4
|
213
214
|
summary: The Rails template for 5xRuby
|