bulletmark_repairer 0.1.0 → 0.1.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: 90214d67d25519f3e4b352583ad3631773d29444e28ce319d62c89d11fa0149e
4
- data.tar.gz: 59bda8070c7e775774e6d52af33687f3a1da3e26889fe51a2ce71069fb211498
3
+ metadata.gz: 5a5858e9552c2cf6259b9102c1f0980607baab37030962e55b56e83b5fd61d36
4
+ data.tar.gz: ebcd21ae7ab79f0113e53862fff5ef5700d24385d1eea98eb3bb731e533aff9d
5
5
  SHA512:
6
- metadata.gz: 2ad6acf09c537b4c283a9404c3518d43f176cc0078406b0371d44f1ea86222e041ddb1f19e9607df95948149f899cc5cda3584753899cc4a85f64232389c2beb
7
- data.tar.gz: a2f5532b82a8f2d9a60d5a72b986d8c81d0d5709905226fb9a5ceac1ddebe1e325039e2870ecc020293b87ed36b10a4aa0ff97a1bd920f09a83e1c2f63268573
6
+ metadata.gz: 5251a08f17df69a9d8df9c6770d823b90a4bf99949f5ce241ee78f124365e63cd655fe68b9eb6d10b6a7bc048ac4d7de87f010593fc2c492a80abadf164d1d54
7
+ data.tar.gz: b5f4c055095c3372ffffa0b9ae87b64c56d024b27fd177ddb99854063215cabae75692fb3d603bdaac77f01c97753a4b8e6aac7e90fc0af8905b142e3c48064d
data/.rubocop.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 3.2
2
+ TargetRubyVersion: 2.7
3
3
  NewCops: enable
4
4
  SuggestExtensions: false
5
5
 
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.1.1] - 2023-10-11
2
+
3
+ - Support Ruby 3.0 dbdf27c6c9a7259ad9474153d2394da5bac45b43
4
+
1
5
  ## [0.1.0] - 2023-10-10
2
6
 
3
7
  - Initial release
@@ -30,7 +30,7 @@ module BulletmarkRepairer
30
30
 
31
31
  def corrector(dir)
32
32
  BulletmarkRepairer::CorrectorBuilder.new(
33
- dir:,
33
+ dir: dir,
34
34
  marker: @marker,
35
35
  associations: @associations
36
36
  ).execute
@@ -45,9 +45,9 @@ module BulletmarkRepairer
45
45
 
46
46
  # @return [Hash, nil]
47
47
  def build_associations!(marker:, associations:, parent_keys:)
48
- key = formed_key(marker:, associations:)
48
+ key = formed_key(marker: marker, associations: associations)
49
49
  if key
50
- modify_value(key:, marker:, parent_keys:)
50
+ modify_value(key: key, marker: marker, parent_keys: parent_keys)
51
51
  else
52
52
  new_parent_keys = parent_keys
53
53
  new_parent_keys.append(0) if associations.is_a?(Array)
@@ -56,7 +56,7 @@ module BulletmarkRepairer
56
56
 
57
57
  association_values.each do |key, value|
58
58
  values = value.is_a?(Array) ? value : [value]
59
- build_associations!(marker:, associations: { key => values }, parent_keys: new_parent_keys)
59
+ build_associations!(marker: marker, associations: { key => values }, parent_keys: new_parent_keys)
60
60
  end
61
61
  end
62
62
  end
@@ -42,7 +42,7 @@ class Corrector < Parser::TreeRewriter
42
42
  insert_after node.children.last.location.expression, ".includes(#{associations})"
43
43
  @patched = true
44
44
  else
45
- node.children.each { |child_node| insert_includes_for_vasgn(node: child_node, type:) }
45
+ node.children.each { |child_node| insert_includes_for_vasgn(node: child_node, type: type) }
46
46
  end
47
47
  end
48
48
 
@@ -19,8 +19,8 @@ module BulletmarkRepairer
19
19
  else
20
20
  @markers[base_class] = Marker.new(
21
21
  notification,
22
- controller:,
23
- action:
22
+ controller: controller,
23
+ action: action
24
24
  )
25
25
  end
26
26
  end
@@ -7,7 +7,7 @@ require 'parser/runner/ruby_rewrite'
7
7
  module BulletmarkRepairer
8
8
  class Pathcer
9
9
  def self.execute(notifications:, controller:, action:)
10
- new(notifications:, controller:, action:).execute
10
+ new(notifications: notifications, controller: controller, action: action).execute
11
11
  end
12
12
 
13
13
  def execute
@@ -25,7 +25,7 @@ module BulletmarkRepairer
25
25
  private
26
26
 
27
27
  def initialize(notifications:, controller:, action:)
28
- @markers = Markers.new(notifications, controller:, action:)
28
+ @markers = Markers.new(notifications, controller: controller, action: action)
29
29
  @associations_builder = BulletmarkRepairer::AssociationsBuilder.new
30
30
  end
31
31
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BulletmarkRepairer
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bulletmark_repairer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - makicamel
@@ -96,7 +96,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
96
96
  requirements:
97
97
  - - ">="
98
98
  - !ruby/object:Gem::Version
99
- version: 2.6.0
99
+ version: 2.7.0
100
100
  required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - ">="