dark_finger 0.6.0 → 0.6.1

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: f06337d8527c7d7bc94c7451c5f8af0c4a1b13548344a5fdf489c810424a9402
4
- data.tar.gz: a1a572c569760aa6cc04ca162770b4331715abad52deb7bf030f9cab657cae84
3
+ metadata.gz: c387170753bd389d4df0457821fa9e56bf06f1d609e73ea2b4864753e9e09816
4
+ data.tar.gz: 12946aef0ce96a285a69714a8bb5f830335b47c4509b69151734a8523df76fea
5
5
  SHA512:
6
- metadata.gz: 6ec349741ae2d89ec13c20c54a81f91fb4715370d3c6b40b707eac0e4d104e00a46c06262955d329217a39e0057d9dd6899f0946184f079c367b712d59d154ae
7
- data.tar.gz: 894526aa5c3042a0e4814180bf4dc84ad1316d36882fbc20b0712ed17289f857616a6e0c2b7e1a7a66dc3c8d4866e0055615689bd769dde0c0a2dc99d86759be
6
+ metadata.gz: 0db6984e3639dd26fd5db716e94055dcbe481fb89fc947778f8b34a250b2b0fd042ab710ba5b6bba1351b1c5fde2e4dcb3d73234c4eae77ab5dc87d407b9b2c0
7
+ data.tar.gz: 334320e100727d04675b0cdc3cbf92d9ce597783090fe78d4e2ab08d379567412e8667d93981408c66c87edf86df416d42e17a4f66d5c2461688226c69044fbb
@@ -56,4 +56,7 @@ require: dark_finger
56
56
  DarkFinger/MigrationConstants:
57
57
  Include:
58
58
  - 'db/migrate/*.rb'
59
+ whitelisted_constants:
60
+ - 'MyConstant'
61
+ - 'MyOtherConstant'
59
62
  ```
@@ -1,3 +1,3 @@
1
1
  module DarkFinger
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
@@ -12,9 +12,9 @@ module RuboCop
12
12
 
13
13
  attr_reader :allowed_constants
14
14
 
15
- def initialize(*args, whitelisted_constants: nil, **_)
15
+ def initialize(*args, options)
16
16
  super(*args)
17
- @whitelisted_constants = whitelisted_constants || cop_config['whitelisted_constants'] || []
17
+ @whitelisted_constants = options[:whitelisted_constants] || cop_config['whitelisted_constants'] || []
18
18
  @allowed_constants =
19
19
  DEFAULT_ALLOWED_CONSTANTS +
20
20
  allowed_top_level_constants +
@@ -68,12 +68,12 @@ module RuboCop
68
68
 
69
69
  attr_reader :required_order, :required_comments, :misc_method_names
70
70
 
71
- def initialize(*args, required_order: nil, required_comments: nil, misc_method_names: nil, **_)
71
+ def initialize(*args, options)
72
72
  super
73
73
  @class_elements_seen = []
74
- @required_order = required_order || cop_config['required_order'] || DEFAULT_REQUIRED_ORDER
75
- @required_comments = required_comments || cop_config['required_comments'] || DEFAULT_REQUIRED_COMMENTS
76
- @misc_method_names = misc_method_names || cop_config['misc_method_names'] || DEFAULT_MISC_METHOD_NAMES
74
+ @required_order = options[:required_order] || cop_config['required_order'] || DEFAULT_REQUIRED_ORDER
75
+ @required_comments = options[:required_comments] || cop_config['required_comments'] || DEFAULT_REQUIRED_COMMENTS
76
+ @misc_method_names = options[:misc_method_names] || cop_config['misc_method_names'] || DEFAULT_MISC_METHOD_NAMES
77
77
 
78
78
  # symbolize configs
79
79
  @required_order.map!(&:to_sym)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dark_finger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Professor Wang Matrix PhD
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-06-03 00:00:00.000000000 Z
12
+ date: 2020-07-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -127,8 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
127
  - !ruby/object:Gem::Version
128
128
  version: '0'
129
129
  requirements: []
130
- rubyforge_project:
131
- rubygems_version: 2.7.6
130
+ rubygems_version: 3.1.2
132
131
  signing_key:
133
132
  specification_version: 4
134
133
  summary: ActiveModel layout cop for Rubocop