bulletmark_repairer 0.1.0 → 0.1.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 +4 -4
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +4 -0
- data/lib/bulletmark_repairer/associations_builder.rb +4 -4
- data/lib/bulletmark_repairer/corrector.rb +1 -1
- data/lib/bulletmark_repairer/markers.rb +2 -2
- data/lib/bulletmark_repairer/patcher.rb +2 -2
- data/lib/bulletmark_repairer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a5858e9552c2cf6259b9102c1f0980607baab37030962e55b56e83b5fd61d36
|
4
|
+
data.tar.gz: ebcd21ae7ab79f0113e53862fff5ef5700d24385d1eea98eb3bb731e533aff9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5251a08f17df69a9d8df9c6770d823b90a4bf99949f5ce241ee78f124365e63cd655fe68b9eb6d10b6a7bc048ac4d7de87f010593fc2c492a80abadf164d1d54
|
7
|
+
data.tar.gz: b5f4c055095c3372ffffa0b9ae87b64c56d024b27fd177ddb99854063215cabae75692fb3d603bdaac77f01c97753a4b8e6aac7e90fc0af8905b142e3c48064d
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -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
|
48
|
+
key = formed_key(marker: marker, associations: associations)
|
49
49
|
if key
|
50
|
-
modify_value(key
|
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
|
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
|
|
@@ -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
|
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
|
28
|
+
@markers = Markers.new(notifications, controller: controller, action: action)
|
29
29
|
@associations_builder = BulletmarkRepairer::AssociationsBuilder.new
|
30
30
|
end
|
31
31
|
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.
|
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.
|
99
|
+
version: 2.7.0
|
100
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
102
|
- - ">="
|