rubomatic-html 1.0.0.pre.rc.8 → 1.0.1.pre.rc.1

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: 1da56052c22e0c6b72bcbed15b7bd10ec684a0ad1b8033db9eb0d5ae7045c22a
4
- data.tar.gz: d6c692cb4866eb689a4948739ea7dfc9ce3414ebadb47a29b72a1c508c5b7dee
3
+ metadata.gz: 9fb7cf9832644d569f8e6f7e2f2a5b176e6be12faf0834826752aa8910e89581
4
+ data.tar.gz: 6f0cfea1ca1f904a7960e93c10ad3859697ac78fdc36ab07d449c7860e9ed119
5
5
  SHA512:
6
- metadata.gz: 1229ec785562cd00f417bcff562b28bce85f74d82ca02148499037c79406dd3a734b572e018919d5b538f9f05a94eb69c6cf044731f56571aa002be0660f1759
7
- data.tar.gz: 697cdbe957e7c5aa3ecbdf75eccaf3cffd41c4b0977f31f49ffd95bd4761c9dabbe0786e8ac87c2d79dd9a6bb02d59f6761ac6c49c52f1bb34f79122b00f1857
6
+ metadata.gz: 464b0f1b8c525e1aa8ddd34adf41f260bbfbca19fb8826329f9baf2949f7ae8925eca8c6e95dee2d48a6a306048bbe7bb989940a38da24978057bbe54ec3d2cb
7
+ data.tar.gz: 2de234355f0923c9c9b85081ea2d03bf8be2540626c752ed3c9bf3268c346cfc0534a0ca608e8ae4a1408d7c6c52c9a201de43b2bdde3d94ddb16c26e07b3a27
data/CHANGELOG.adoc CHANGED
@@ -1,3 +1,8 @@
1
- == 0.1.0
1
+ == 1.0.1
2
+
3
+ * Fix
4
+ ** No need to ``require 'bundler/setup'`` in script
5
+
6
+ == 1.0.0
2
7
 
3
8
  * Initial release
data/exe/rubomatic-html CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  # frozen_string_literal: true
4
4
 
5
- require 'bundler/setup'
6
5
  require 'optparse'
7
6
  require 'rubomatic-html'
8
7
 
@@ -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.1-rc.1'
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,14 +1,14 @@
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.1.pre.rc.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brands Insurance
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-03 00:00:00.000000000 Z
11
+ date: 2023-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubomatic