-
Notifications
You must be signed in to change notification settings - Fork 2
/
.post_process.yml
50 lines (50 loc) · 1.45 KB
/
.post_process.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
tasks:
- name: "update api files"
file_glob: './src/google_drive/api/*.cr'
changes:
-
name: 'Remove common method prefix "drive_[api_name]_"'
pattern: 'drive_%{api_name}_'
new_value: ''
-
name: 'Restore operation name'
pattern: 'operation: "%{capitalized_api_name}Api.'
new_value: 'operation: "%{capitalized_api_name}Api.drive_%{api_name}_'
-
name: "Update ::File to IO | String"
pattern: ': ::File'
new_value: ': IO | String'
- name: 'Update all'
file_glob: './src/google_drive/**/*.cr'
changes:
-
name: 'Correct JSON::Any?'
pattern: 'JSON::Any\?'
new_value: 'JSON::Any?'
-
name: 'Correct JSONAny'
pattern: 'JSONAny'
new_value: 'JSON::Any'
-
name: 'Correct GoogleDrive::String'
pattern: 'GoogleDrive::String'
new_value: 'String'
-
name: 'Correct ::::'
pattern: '::::'
new_value: '::'
-
name: "Remove empty if blocks"
pattern: '^\s+if _[^\s]+ = [^\s]+$\n^\s+end$'
new_value: ''
multi_line: true
-
name: "Remove empty if blocks"
pattern: '^\s+if [^\s]+$\n^\s+end$'
new_value: ''
multi_line: true
-
name: "Remove empty unless blocks"
pattern: '(^\s+unless [^\s]+ = [^\s]+$\n^\s+end$|^\s+unless [^\s]+$\n^\s+end$)'
new_value: ''
multi_line: true