sashimi_tanpopo 0.3.1 → 0.3.3
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/CHANGELOG.md +13 -1
- data/Dockerfile +1 -1
- data/lib/sashimi_tanpopo/dsl.rb +28 -19
- data/lib/sashimi_tanpopo/logger.rb +1 -1
- data/lib/sashimi_tanpopo/version.rb +1 -1
- data/rbs_collection.lock.yaml +16 -16
- data/sig/sashimi_tanpopo/dsl.rbs +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 67fece13651795cb4bb095869e0bb4a39605c3538dc7d025000828074249bee0
|
|
4
|
+
data.tar.gz: 176c9e5283bf71e67204bb750cfe2fac0ea0c252f80ccfc6c346fdb6a8a6bc2b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 57e5a36438ef78f83f7be086209e00bb8f421ffea722c1c4e0e6696f370fef8d577dae879a0489855535ff9daa1efe8802b9fa935fd23fd6a70bc281e7830e80
|
|
7
|
+
data.tar.gz: 7b7ad4c992cb797346d58c07bd9e008727d41654e2762222cb8e92ae351d535f538bcd1b06893b66f231e2bd26cdbc95e18124bcff8950be0e358994d09d43ce
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
|
-
[full changelog](http://github.com/sue445/sashimi_tanpopo/compare/v0.3.
|
|
2
|
+
[full changelog](http://github.com/sue445/sashimi_tanpopo/compare/v0.3.3...main)
|
|
3
|
+
|
|
4
|
+
## [0.3.3](https://github.com/sue445/sashimi_tanpopo/releases/tag/v0.3.3) - 2025-11-05
|
|
5
|
+
[full changelog](http://github.com/sue445/sashimi_tanpopo/compare/v0.3.2...v0.3.3)
|
|
6
|
+
|
|
7
|
+
* Fixed an issue where file was not updated when `update_file` was called multiple times on the same file
|
|
8
|
+
* https://github.com/sue445/sashimi_tanpopo/pull/70
|
|
9
|
+
|
|
10
|
+
## [0.3.2](https://github.com/sue445/sashimi_tanpopo/releases/tag/v0.3.2) - 2025-11-02
|
|
11
|
+
[full changelog](http://github.com/sue445/sashimi_tanpopo/compare/v0.3.1...v0.3.2)
|
|
12
|
+
|
|
13
|
+
* Do not remove left-hand space in logger
|
|
14
|
+
* https://github.com/sue445/sashimi_tanpopo/pull/68
|
|
3
15
|
|
|
4
16
|
## [0.3.1](https://github.com/sue445/sashimi_tanpopo/releases/tag/v0.3.1) - 2025-10-31
|
|
5
17
|
[full changelog](http://github.com/sue445/sashimi_tanpopo/compare/v0.3.0...v0.3.1)
|
data/Dockerfile
CHANGED
data/lib/sashimi_tanpopo/dsl.rb
CHANGED
|
@@ -122,22 +122,36 @@ module SashimiTanpopo
|
|
|
122
122
|
def update_file(pattern, &block)
|
|
123
123
|
Dir.glob(pattern).each do |path|
|
|
124
124
|
full_file_path = File.join(@__target_dir__, path)
|
|
125
|
-
|
|
125
|
+
|
|
126
|
+
next unless File.exist?(full_file_path)
|
|
127
|
+
|
|
128
|
+
before_content =
|
|
129
|
+
if changed_files[path]
|
|
130
|
+
changed_files[path][:after_content]
|
|
131
|
+
else
|
|
132
|
+
File.read(full_file_path)
|
|
133
|
+
end
|
|
126
134
|
|
|
127
135
|
SashimiTanpopo.logger.info "Checking #{full_file_path}"
|
|
128
136
|
|
|
129
|
-
after_content = update_single_file(
|
|
137
|
+
after_content = update_single_file(before_content, &block)
|
|
130
138
|
|
|
131
139
|
unless after_content
|
|
132
140
|
SashimiTanpopo.logger.info "#{full_file_path} isn't changed"
|
|
133
141
|
next
|
|
134
142
|
end
|
|
135
143
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
144
|
+
File.write(full_file_path, after_content) if !dry_run? && @__is_update_local__
|
|
145
|
+
|
|
146
|
+
if changed_files[path]
|
|
147
|
+
changed_files[path][:after_content] = after_content
|
|
148
|
+
else
|
|
149
|
+
changed_files[path] = {
|
|
150
|
+
before_content: before_content,
|
|
151
|
+
after_content: after_content,
|
|
152
|
+
mode: File.stat(full_file_path).mode.to_s(8)
|
|
153
|
+
}
|
|
154
|
+
end
|
|
141
155
|
|
|
142
156
|
if dry_run?
|
|
143
157
|
SashimiTanpopo.logger.info "#{full_file_path} will be changed (dryrun)"
|
|
@@ -149,28 +163,23 @@ module SashimiTanpopo
|
|
|
149
163
|
|
|
150
164
|
private
|
|
151
165
|
|
|
152
|
-
# @param
|
|
166
|
+
# @param content [String]
|
|
153
167
|
#
|
|
154
168
|
# @yieldparam content [String] content of file
|
|
155
169
|
#
|
|
156
170
|
# @return [String] Content of changed file if file is changed
|
|
157
171
|
# @return [nil] file isn't changed
|
|
158
|
-
def update_single_file(
|
|
159
|
-
|
|
172
|
+
def update_single_file(content)
|
|
173
|
+
after_content = content.dup
|
|
160
174
|
|
|
161
|
-
|
|
162
|
-
before_content = content.dup
|
|
163
|
-
|
|
164
|
-
yield content
|
|
175
|
+
yield after_content
|
|
165
176
|
|
|
166
177
|
# File isn't changed
|
|
167
|
-
return nil if
|
|
168
|
-
|
|
169
|
-
show_diff(before_content, content)
|
|
178
|
+
return nil if after_content == content
|
|
170
179
|
|
|
171
|
-
|
|
180
|
+
show_diff(content, after_content)
|
|
172
181
|
|
|
173
|
-
|
|
182
|
+
after_content
|
|
174
183
|
end
|
|
175
184
|
|
|
176
185
|
# @param str1 [String]
|
data/rbs_collection.lock.yaml
CHANGED
|
@@ -6,7 +6,7 @@ gems:
|
|
|
6
6
|
source:
|
|
7
7
|
type: git
|
|
8
8
|
name: ruby/gem_rbs_collection
|
|
9
|
-
revision:
|
|
9
|
+
revision: 04ed82d7df5d5ee825d7864abfa29d624b52e549
|
|
10
10
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
11
11
|
repo_dir: gems
|
|
12
12
|
- name: base64
|
|
@@ -14,7 +14,7 @@ gems:
|
|
|
14
14
|
source:
|
|
15
15
|
type: git
|
|
16
16
|
name: ruby/gem_rbs_collection
|
|
17
|
-
revision:
|
|
17
|
+
revision: 04ed82d7df5d5ee825d7864abfa29d624b52e549
|
|
18
18
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
19
19
|
repo_dir: gems
|
|
20
20
|
- name: bigdecimal
|
|
@@ -22,7 +22,7 @@ gems:
|
|
|
22
22
|
source:
|
|
23
23
|
type: git
|
|
24
24
|
name: ruby/gem_rbs_collection
|
|
25
|
-
revision:
|
|
25
|
+
revision: 04ed82d7df5d5ee825d7864abfa29d624b52e549
|
|
26
26
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
27
27
|
repo_dir: gems
|
|
28
28
|
- name: csv
|
|
@@ -30,7 +30,7 @@ gems:
|
|
|
30
30
|
source:
|
|
31
31
|
type: git
|
|
32
32
|
name: ruby/gem_rbs_collection
|
|
33
|
-
revision:
|
|
33
|
+
revision: 04ed82d7df5d5ee825d7864abfa29d624b52e549
|
|
34
34
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
35
35
|
repo_dir: gems
|
|
36
36
|
- name: date
|
|
@@ -46,7 +46,7 @@ gems:
|
|
|
46
46
|
source:
|
|
47
47
|
type: git
|
|
48
48
|
name: ruby/gem_rbs_collection
|
|
49
|
-
revision:
|
|
49
|
+
revision: 04ed82d7df5d5ee825d7864abfa29d624b52e549
|
|
50
50
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
51
51
|
repo_dir: gems
|
|
52
52
|
- name: diffy
|
|
@@ -54,7 +54,7 @@ gems:
|
|
|
54
54
|
source:
|
|
55
55
|
type: git
|
|
56
56
|
name: ruby/gem_rbs_collection
|
|
57
|
-
revision:
|
|
57
|
+
revision: 04ed82d7df5d5ee825d7864abfa29d624b52e549
|
|
58
58
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
59
59
|
repo_dir: gems
|
|
60
60
|
- name: erb
|
|
@@ -66,7 +66,7 @@ gems:
|
|
|
66
66
|
source:
|
|
67
67
|
type: git
|
|
68
68
|
name: ruby/gem_rbs_collection
|
|
69
|
-
revision:
|
|
69
|
+
revision: 04ed82d7df5d5ee825d7864abfa29d624b52e549
|
|
70
70
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
71
71
|
repo_dir: gems
|
|
72
72
|
- name: fileutils
|
|
@@ -82,7 +82,7 @@ gems:
|
|
|
82
82
|
source:
|
|
83
83
|
type: git
|
|
84
84
|
name: ruby/gem_rbs_collection
|
|
85
|
-
revision:
|
|
85
|
+
revision: 04ed82d7df5d5ee825d7864abfa29d624b52e549
|
|
86
86
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
87
87
|
repo_dir: gems
|
|
88
88
|
- name: hashdiff
|
|
@@ -90,7 +90,7 @@ gems:
|
|
|
90
90
|
source:
|
|
91
91
|
type: git
|
|
92
92
|
name: ruby/gem_rbs_collection
|
|
93
|
-
revision:
|
|
93
|
+
revision: 04ed82d7df5d5ee825d7864abfa29d624b52e549
|
|
94
94
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
95
95
|
repo_dir: gems
|
|
96
96
|
- name: httparty
|
|
@@ -98,7 +98,7 @@ gems:
|
|
|
98
98
|
source:
|
|
99
99
|
type: git
|
|
100
100
|
name: ruby/gem_rbs_collection
|
|
101
|
-
revision:
|
|
101
|
+
revision: 04ed82d7df5d5ee825d7864abfa29d624b52e549
|
|
102
102
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
103
103
|
repo_dir: gems
|
|
104
104
|
- name: io-console
|
|
@@ -118,7 +118,7 @@ gems:
|
|
|
118
118
|
source:
|
|
119
119
|
type: git
|
|
120
120
|
name: ruby/gem_rbs_collection
|
|
121
|
-
revision:
|
|
121
|
+
revision: 04ed82d7df5d5ee825d7864abfa29d624b52e549
|
|
122
122
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
123
123
|
repo_dir: gems
|
|
124
124
|
- name: monitor
|
|
@@ -138,7 +138,7 @@ gems:
|
|
|
138
138
|
source:
|
|
139
139
|
type: git
|
|
140
140
|
name: ruby/gem_rbs_collection
|
|
141
|
-
revision:
|
|
141
|
+
revision: 04ed82d7df5d5ee825d7864abfa29d624b52e549
|
|
142
142
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
143
143
|
repo_dir: gems
|
|
144
144
|
- name: parallel
|
|
@@ -146,7 +146,7 @@ gems:
|
|
|
146
146
|
source:
|
|
147
147
|
type: git
|
|
148
148
|
name: ruby/gem_rbs_collection
|
|
149
|
-
revision:
|
|
149
|
+
revision: 04ed82d7df5d5ee825d7864abfa29d624b52e549
|
|
150
150
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
151
151
|
repo_dir: gems
|
|
152
152
|
- name: pp
|
|
@@ -170,7 +170,7 @@ gems:
|
|
|
170
170
|
source:
|
|
171
171
|
type: git
|
|
172
172
|
name: ruby/gem_rbs_collection
|
|
173
|
-
revision:
|
|
173
|
+
revision: 04ed82d7df5d5ee825d7864abfa29d624b52e549
|
|
174
174
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
175
175
|
repo_dir: gems
|
|
176
176
|
- name: rdoc
|
|
@@ -186,7 +186,7 @@ gems:
|
|
|
186
186
|
source:
|
|
187
187
|
type: git
|
|
188
188
|
name: ruby/gem_rbs_collection
|
|
189
|
-
revision:
|
|
189
|
+
revision: 04ed82d7df5d5ee825d7864abfa29d624b52e549
|
|
190
190
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
191
191
|
repo_dir: gems
|
|
192
192
|
- name: timeout
|
|
@@ -206,7 +206,7 @@ gems:
|
|
|
206
206
|
source:
|
|
207
207
|
type: git
|
|
208
208
|
name: ruby/gem_rbs_collection
|
|
209
|
-
revision:
|
|
209
|
+
revision: 04ed82d7df5d5ee825d7864abfa29d624b52e549
|
|
210
210
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
211
211
|
repo_dir: gems
|
|
212
212
|
gemfile_lock_path: Gemfile.lock
|
data/sig/sashimi_tanpopo/dsl.rbs
CHANGED