bankai 0.8.1 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c6fb2e4f3d38c9bd01954b6fb9d959734eb7625312645010bc4b9c448d386c6
4
- data.tar.gz: 8869b5224386a33c5d6291df2bb12c9a697bbdd8c453206ec5f6bd88a277c0c0
3
+ metadata.gz: aad487d097c2958de9a83c226cff767df8d91c4219bcc64df3dd7a772444296f
4
+ data.tar.gz: b007e0bb678daa8c633dd79abd8ab0c2bc3dee19639673a5db821019b90fdfd7
5
5
  SHA512:
6
- metadata.gz: d2cb8924707b8ee99b8646fd87aafe2f4ff7071008a4674d9aba8dfaf289004b983825cfc23f7d78d10fb0cb77db8caad0faa93c7fcce93616f1d3e831db69b1
7
- data.tar.gz: '0680b97dad35acecf32f129e064fab0c43872355ba9b07c4d63719b4e7f8c3b2c5163ebdb4c93c09728768ba6c91fc92be3e8012c3c3e8ceb487a355eba7f7fa'
6
+ metadata.gz: e1a9582f2380c707733507c66b67a55d01f1d99b77c30bb6f18ae300a58e1564e4ec3bba0875f1f3cb3886dd9d337805584a460169834bb4870079e8a6435460
7
+ data.tar.gz: aa645568f5d0993d4f67060147b15965e39d510a4f21a5e002e61abb068608d8d0db22a64ec75e14dd22d46efc0275a988c962eca152ae19d81bccb6e9e07b9c
data/.rubocop.yml ADDED
@@ -0,0 +1,2 @@
1
+ AllCops:
2
+ SuggestExtensions: false
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', '~> 0.81.0'
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
@@ -3,7 +3,7 @@
3
3
 
4
4
  require 'pathname'
5
5
 
6
- source_path = (Pathname.new(__FILE__).dirname + '../lib').expand_path
6
+ source_path = File.expand_path("#{Pathname.new(__FILE__).dirname}../lib")
7
7
  $LOAD_PATH << source_path
8
8
 
9
9
  require 'bankai'
@@ -71,7 +71,7 @@ module Bankai
71
71
  # rubocop:enable Metrics/MethodLength
72
72
 
73
73
  def clear_seed_file
74
- File.write(destination_root + '/db/seeds.rb', '')
74
+ File.write("#{destination_root}/db/seeds.rb", '')
75
75
  end
76
76
 
77
77
  def setup_rack_mini_profiler
@@ -15,7 +15,11 @@ module Bankai
15
15
  private
16
16
 
17
17
  def app_name
18
- Rails.app_class.parent_name.demodulize.underscore.dasherize
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
@@ -9,7 +9,7 @@ module Bankai
9
9
  DEFAULT_REPO = 'git@example.com:me/my_repo.git'
10
10
 
11
11
  def install_capistrano
12
- Bundler.with_clean_env { run 'bundle exec cap install' }
12
+ in_root { run 'bundle exec cap install' }
13
13
  end
14
14
 
15
15
  def configure_capfile
@@ -8,7 +8,7 @@ module Bankai
8
8
  class JsonGenerator < Base
9
9
  def add_oj
10
10
  gem 'oj'
11
- Bundler.with_clean_env { run 'bundle install' }
11
+ in_root { run 'bundle install' }
12
12
 
13
13
  initializer 'oj.rb' do
14
14
  "# frozen_string_literal: true\n\n" \
@@ -15,15 +15,15 @@ module Bankai
15
15
  end
16
16
 
17
17
  def install_overcommit
18
- Bundler.with_clean_env { run 'bundle exec overcommit --install' }
18
+ in_root { run 'bundle exec overcommit --install' }
19
19
  end
20
20
 
21
21
  def rubocop_autocorrect
22
- Bundler.with_clean_env { run 'bundle exec rubocop --auto-correct' }
22
+ in_root { run 'bundle exec rubocop --auto-correct-all' }
23
23
  end
24
24
 
25
25
  def rubocop_todo
26
- Bundler.with_clean_env { run 'bundle exec rubocop --auto-gen-config' }
26
+ in_root { run '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
- Bundler.with_clean_env { run 'bundle install' }
20
+ in_root { run 'bundle install' }
21
21
  end
22
22
 
23
23
  def init_sitemap
24
- Bundler.with_clean_env { run 'bundle exec rake sitemap:install' }
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:\/\/www.example.com"},
29
+ %r{"http://www.example.com"},
30
30
  HOST_TEMPLATE
31
- Bundler.with_clean_env do
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
- Bundler.with_clean_env { run 'rubocop -a Gemfile' }
12
- Bundler.with_clean_env { run 'bundle install' }
11
+ in_root { run 'rubocop -a Gemfile' }
12
+ in_root { run 'bundle install' }
13
13
  end
14
14
 
15
15
  def initialize_whenever
16
- Bundler.with_clean_env { run "wheneverize #{destination_root}" }
16
+ in_root { run "wheneverize #{destination_root}" }
17
17
  end
18
18
 
19
19
  def initialize_capistrano
data/lib/bankai/helper.rb CHANGED
@@ -20,7 +20,7 @@ module Bankai
20
20
  private
21
21
 
22
22
  def gemfile
23
- @gemfile ||= File.read(destination_root + '/Gemfile')
23
+ @gemfile ||= File.read("#{destination_root}/Gemfile")
24
24
  end
25
25
  end
26
26
  end
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bankai
4
- VERSION = '0.8.1'
4
+ VERSION = '0.9.0'
5
5
  RUBY_VERSION = '2.6.6'
6
6
  RAILS_VERSION = '5.2.0'
7
- RUBOCOP_VERSION = '1.5.1'
7
+ RUBOCOP_VERSION = '1.8.1'
8
8
  CAPISTRANO_VERSION = '3.14.1'
9
9
  end
@@ -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
@@ -6,7 +6,7 @@ require:
6
6
  AllCops:
7
7
  TargetRubyVersion: <%= RUBY_VERSION %>
8
8
  DisplayCopNames: true
9
- NewCops: enable
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
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.8.1
4
+ version: 0.9.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: 2020-12-07 00:00:00.000000000 Z
12
+ date: 2021-02-09 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: 0.81.0
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: 0.81.0
111
+ version: 1.8.1
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: simplecov
114
114
  requirement: !ruby/object:Gem::Requirement
@@ -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