ducalis 0.4.1 → 0.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d8343e259ebf63adaefe044ec87484acc61c8572
4
- data.tar.gz: 2101456f1a13e60eed9507d5fb0197c5731d206d
3
+ metadata.gz: 42a073dbbd32041b55d28da53f799726b9f2ce28
4
+ data.tar.gz: ebc20a2e3383aa7838a193b247bbfbe40abae580
5
5
  SHA512:
6
- metadata.gz: 81e5b952ed401b04376ec5fd3078e288cb29c4b2d5e03e29b8c94d30f336f5eff66611ea278f4ee0d001004dbe0ba69fdb532f3dc44b8b8fad70736b33970642
7
- data.tar.gz: 8d773d44b74dc550ed7a6a1ecaea8ab833328fa088a914eccca28282f2fbcc9136bc7dcd1a91f2f25c29d9d0fafcc76f30ab024a24afff789020b37bee7369fd
6
+ metadata.gz: c5ad451e36f98fc805296f6f5b3792a5cd2a46002bfb1be7031dab51079885809572eb6873ac931cf7f19079ad60486716e923df42f525928142bb22a8500d02
7
+ data.tar.gz: 466f33f3f4e8ab9c3af682fbd452c3e0d203d2c1c03c7fe3cba77d4055acc09004207ec2ab5b2b85b7a95f872de1d75bfef5b3541e8b8adecc55159f16b4859e
@@ -8,8 +8,5 @@ AllCops:
8
8
  Metrics/BlockLength:
9
9
  Exclude:
10
10
  - 'spec/**/*.rb'
11
- Lint/InterpolationCheck:
12
- Exclude:
13
- - 'spec/**/*.rb'
14
11
  Style/Documentation:
15
12
  Enabled: false
@@ -1,6 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.4.2
3
+ - 2.3.4
4
4
  before_install:
5
5
  - gem update --system
6
6
  - gem --version
@@ -1,11 +1,11 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ducalis (0.4.1)
4
+ ducalis (0.5.0)
5
5
  git (~> 1.3, >= 1.3.0)
6
6
  policial (= 0.0.4)
7
7
  regexp-examples (~> 1.3, >= 1.3.2)
8
- rubocop (= 0.50)
8
+ rubocop (~> 0.46.0, >= 0.45.0)
9
9
  thor (~> 0.20.0)
10
10
 
11
11
  GEM
@@ -38,7 +38,6 @@ GEM
38
38
  multipart-post (2.0.0)
39
39
  octokit (4.7.0)
40
40
  sawyer (~> 0.8.0, >= 0.5.3)
41
- parallel (1.12.0)
42
41
  parser (2.4.0.0)
43
42
  ast (~> 2.2)
44
43
  policial (0.0.4)
@@ -68,11 +67,10 @@ GEM
68
67
  diff-lcs (>= 1.2.0, < 2.0)
69
68
  rspec-support (~> 3.7.0)
70
69
  rspec-support (3.7.0)
71
- rubocop (0.50.0)
72
- parallel (~> 1.10)
73
- parser (>= 2.3.3.1, < 3.0)
70
+ rubocop (0.46.0)
71
+ parser (>= 2.3.1.1, < 3.0)
74
72
  powerpack (~> 0.1)
75
- rainbow (>= 2.2.2, < 3.0)
73
+ rainbow (>= 1.99.1, < 3.0)
76
74
  ruby-progressbar (~> 1.7)
77
75
  unicode-display_width (~> 1.0, >= 1.0.1)
78
76
  ruby-progressbar (1.9.0)
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ require 'rspec/core/rake_task'
5
5
  require 'rubocop/rake_task'
6
6
 
7
7
  RuboCop::RakeTask.new do |task|
8
- task.options = %w[--auto-correct]
8
+ task.options = %w(--auto-correct)
9
9
  end
10
10
 
11
11
  task :documentation do
@@ -14,4 +14,4 @@ task :documentation do
14
14
  end
15
15
 
16
16
  RSpec::Core::RakeTask.new(:spec)
17
- task default: %i[rubocop spec]
17
+ task default: %i(rubocop spec)
@@ -21,7 +21,7 @@ Env `GITHUB_TOKEN` should be available to receive PRs files."
21
21
  end
22
22
 
23
23
  if Ducalis::PassedArgs.ci_mode?
24
- Ducalis::CLI.start(ARGV - %w[--ci])
24
+ Ducalis::CLI.start(ARGV - %w(--ci))
25
25
  else
26
26
  Ducalis::PassedArgs.process_args!
27
27
 
@@ -31,6 +31,6 @@ Gem::Specification.new do |spec|
31
31
  spec.add_dependency 'git', '~> 1.3', '>= 1.3.0'
32
32
  spec.add_dependency 'policial', '0.0.4'
33
33
  spec.add_dependency 'regexp-examples', '~> 1.3', '>= 1.3.2'
34
- spec.add_dependency 'rubocop', '= 0.50'
34
+ spec.add_dependency 'rubocop', '>= 0.45.0', '~> 0.46.0'
35
35
  spec.add_dependency 'thor', '~> 0.20.0'
36
36
  end
@@ -9,7 +9,7 @@ module Ducalis
9
9
  '/services: to construct new objects. You can read more [here]'\
10
10
  '(https://medium.com/planet-arkency/a61fd75ab2d3).'
11
11
  MODELS_CLASS_NAMES = ['ApplicationRecord', 'ActiveRecord::Base'].freeze
12
- METHODS_BLACK_LIST = %i[
12
+ METHODS_BLACK_LIST = %i(
13
13
  after_commit
14
14
  after_create
15
15
  after_destroy
@@ -26,7 +26,7 @@ module Ducalis
26
26
  before_save
27
27
  before_update
28
28
  before_validation
29
- ].freeze
29
+ ).freeze
30
30
 
31
31
  def on_class(node)
32
32
  _classdef_node, superclass, _body = *node
@@ -5,8 +5,8 @@ require 'rubocop'
5
5
  module Ducalis
6
6
  class ControllersExcept < ::RuboCop::Cop::Cop
7
7
  include RuboCop::Cop::DefNode
8
- FILTERS = %i[before_filter after_filter around_filter
9
- before_action after_action around_action].freeze
8
+ FILTERS = %i(before_filter after_filter around_filter
9
+ before_action after_action around_action).freeze
10
10
  OFFENSE = %(
11
11
  Prefer to use `:only` over `:except` in controllers because it's more explicit \
12
12
  and will be easier to maintain for new developers.
@@ -31,7 +31,7 @@ start: `@_name`.
31
31
 
32
32
  def check_memo(node)
33
33
  return if node.to_a.first.to_s.start_with?('@_')
34
- add_offense(node, :expression, OFFENSE + ADD_OFFENSE)
34
+ add_offense(node, :expression, [OFFENSE, ADD_OFFENSE].join(' '))
35
35
  end
36
36
 
37
37
  attr_reader :triggered
@@ -5,7 +5,7 @@ require 'rubocop'
5
5
  module Ducalis
6
6
  class RestOnlyCop < RuboCop::Cop::Cop
7
7
  include RuboCop::Cop::DefNode
8
- WHITELIST = %i[index show new edit create update destroy].freeze
8
+ WHITELIST = %i(index show new edit create update destroy).freeze
9
9
  OFFENSE = %(
10
10
  It's better for controllers to stay adherent to REST:
11
11
  http://jeromedalbert.com/how-dhh-organizes-his-rails-controllers/
@@ -11,10 +11,10 @@ It's hard to test, grep sources, code highlighting and so on.
11
11
  Consider using of symbols or lambdas for complex expressions.
12
12
  ).strip
13
13
  VALIDATEBLE_METHODS =
14
- ::Ducalis::CallbacksActiverecord::METHODS_BLACK_LIST + %i[
14
+ ::Ducalis::CallbacksActiverecord::METHODS_BLACK_LIST + %i(
15
15
  validates
16
16
  validate
17
- ]
17
+ )
18
18
 
19
19
  def on_send(node)
20
20
  _, method_name, *args = *node
@@ -31,7 +31,7 @@ Consider using of symbols or lambdas for complex expressions.
31
31
  def skip_node?(current_node)
32
32
  key, value = *current_node
33
33
  return true unless current_node.type == :pair
34
- return true unless %w[if unless].include?(key.source)
34
+ return true unless %w(if unless).include?(key.source)
35
35
  return true unless value.type == :str
36
36
  false
37
37
  end
@@ -5,8 +5,8 @@ require 'rubocop'
5
5
  module Ducalis
6
6
  class UselessOnly < RuboCop::Cop::Cop
7
7
  include RuboCop::Cop::DefNode
8
- FILTERS = %i[before_filter after_filter around_filter
9
- before_action after_action around_action].freeze
8
+ FILTERS = %i(before_filter after_filter around_filter
9
+ before_action after_action around_action).freeze
10
10
  OFFENSE = %(
11
11
  Seems like there is no any reason to keep before filter only for one action. \
12
12
  Maybe it will be better to inline it?
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'parser/current'
4
+ require 'rubocop'
4
5
 
5
6
  class SpecsProcessor < Parser::AST::Processor
6
7
  attr_reader :cases
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ducalis
4
- VERSION = '0.4.1'
4
+ VERSION = '0.5.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ducalis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ignat Zakrevsky
@@ -68,16 +68,22 @@ dependencies:
68
68
  name: rubocop
69
69
  requirement: !ruby/object:Gem::Requirement
70
70
  requirements:
71
- - - '='
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: 0.45.0
74
+ - - "~>"
72
75
  - !ruby/object:Gem::Version
73
- version: '0.50'
76
+ version: 0.46.0
74
77
  type: :runtime
75
78
  prerelease: false
76
79
  version_requirements: !ruby/object:Gem::Requirement
77
80
  requirements:
78
- - - '='
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: 0.45.0
84
+ - - "~>"
79
85
  - !ruby/object:Gem::Version
80
- version: '0.50'
86
+ version: 0.46.0
81
87
  - !ruby/object:Gem::Dependency
82
88
  name: thor
83
89
  requirement: !ruby/object:Gem::Requirement