rubomatic-html 1.0.0.pre.rc.8 → 1.0.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
  SHA256:
3
- metadata.gz: 1da56052c22e0c6b72bcbed15b7bd10ec684a0ad1b8033db9eb0d5ae7045c22a
4
- data.tar.gz: d6c692cb4866eb689a4948739ea7dfc9ce3414ebadb47a29b72a1c508c5b7dee
3
+ metadata.gz: 3b7c76016bb1d33526a70bf322a25f55569c3d93a50bf3795bd7d4ded5c99fd7
4
+ data.tar.gz: c7e5015c673fab3d8c42cbafc3b3355a660c0786d1a5775a1797d838fd2f324d
5
5
  SHA512:
6
- metadata.gz: 1229ec785562cd00f417bcff562b28bce85f74d82ca02148499037c79406dd3a734b572e018919d5b538f9f05a94eb69c6cf044731f56571aa002be0660f1759
7
- data.tar.gz: 697cdbe957e7c5aa3ecbdf75eccaf3cffd41c4b0977f31f49ffd95bd4761c9dabbe0786e8ac87c2d79dd9a6bb02d59f6761ac6c49c52f1bb34f79122b00f1857
6
+ metadata.gz: 305f5ad46e7711590c445f3b60edfa27960cfd985012b9929901c94b5137af2d1a9e70c173439420302dd29f3b72a1f3dddce3f8c8cbdbe02117bfaf6a0ed6ea
7
+ data.tar.gz: dd716790e59ac5c9fdca784ddddeb3d9231b6022862cd7ebd02887a5636a3646cf137521d7b6e509fdb58ce9e236fb605c4ff4f9bbb9f29b6f43107fb006e976
@@ -3,6 +3,9 @@
3
3
  module RubomaticHtml
4
4
  module Cop
5
5
  class Base
6
+ # @return [String]
7
+ attr_accessor :file
8
+
6
9
  # Name for cop
7
10
  #
8
11
  # @return [String]
@@ -11,9 +14,6 @@ module RubomaticHtml
11
14
  'Base'
12
15
  end
13
16
 
14
- # @return [String]
15
- attr_accessor :file
16
-
17
17
  # :nodoc:
18
18
  def initialize(file)
19
19
  @file = file
@@ -23,12 +23,12 @@ module RubomaticHtml
23
23
 
24
24
  # Outputs filename:line_number locations of HTML files that trigger the cop
25
25
  #
26
- # @param line [String] the line in the html
27
- # @param index [Integer] the 1-index of the line
26
+ # @param _line [String] the line in the html
27
+ # @param _index [Integer] the 1-index of the line
28
28
  #
29
29
  # @return [void]
30
30
  #
31
- def run_for_line(line, index)
31
+ def run_for_line(_line, _index)
32
32
  error_message = <<~TEXT
33
33
  Warning: Method `run_for_line` needs overridden! Some cops may not display failing messages.
34
34
  TEXT
@@ -4,6 +4,9 @@ module RubomaticHtml
4
4
  module Cop
5
5
  module Layout
6
6
  class MultipleLineBreaks < RubomaticHtml::Cop::Layout::Base
7
+ # @return [Boolean] tracks multiple consecutive line breaks
8
+ attr_accessor :prev_break
9
+
7
10
  # Name for the cop
8
11
  #
9
12
  # @return [String]
@@ -12,9 +15,6 @@ module RubomaticHtml
12
15
  [department, 'MultipleLineBreaks'].join('/')
13
16
  end
14
17
 
15
- # @return [Boolean] tracks multiple consecutive line breaks
16
- attr_accessor :prev_break
17
-
18
18
  # :nodoc:
19
19
  def initialize(file)
20
20
  super
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubomaticHtml
4
- VERSION = '1.0.0-rc.8'
4
+ VERSION = '1.0.0'
5
5
  end
@@ -7,15 +7,15 @@ require 'yaml'
7
7
 
8
8
  module RubomaticHtml
9
9
  class Runner
10
+ PROJECT_ROOT = Pathname.new(__dir__).parent.expand_path.freeze
11
+ CONFIG_DEFAULT = PROJECT_ROOT.join('config', 'default.yml').freeze
12
+ CONFIG = ::YAML.safe_load(CONFIG_DEFAULT.read).freeze
13
+
10
14
  # @return [Array<String>]
11
15
  attr_accessor :files_to_lint
12
16
  # @return [Hash]
13
17
  attr_accessor :config
14
18
 
15
- PROJECT_ROOT = Pathname.new(__dir__).parent.expand_path.freeze
16
- CONFIG_DEFAULT = PROJECT_ROOT.join('config', 'default.yml').freeze
17
- CONFIG = ::YAML.safe_load(CONFIG_DEFAULT.read).freeze
18
-
19
19
  # @param linted_files [Array<String>]
20
20
  #
21
21
  def initialize(linted_files)
@@ -39,6 +39,7 @@ module RubomaticHtml
39
39
  if custom_config.fetch(cop, {}).has_key?('Enabled')
40
40
  config[cop][:enabled] = custom_config[cop]['Enabled']
41
41
  end
42
+
42
43
  if custom_config.fetch(cop, {}).has_key?('Exclude')
43
44
  config[cop][:exclude] = Array(custom_config[cop]['Exclude'])
44
45
  end
@@ -53,6 +54,7 @@ module RubomaticHtml
53
54
  #
54
55
  def run
55
56
  all_config = config.fetch('AllCops')
57
+
56
58
  files_to_lint.each do |file|
57
59
  next if all_config.fetch(:exclude).any? { |ignored| file.end_with?(ignored) }
58
60
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubomatic-html
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.rc.8
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brands Insurance
@@ -72,9 +72,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
72
72
  version: 3.0.1
73
73
  required_rubygems_version: !ruby/object:Gem::Requirement
74
74
  requirements:
75
- - - ">"
75
+ - - ">="
76
76
  - !ruby/object:Gem::Version
77
- version: 1.3.1
77
+ version: '0'
78
78
  requirements: []
79
79
  rubygems_version: 3.2.15
80
80
  signing_key: