immosquare-cleaner 0.1.74 → 0.1.76

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: a43b21f588c94a9f6941555800ab31dbc4f787097a3392b655b53d8012f436ea
4
- data.tar.gz: 0a18ee42bc5103c378b021a2112dc925726912f7649d59721dca3a2742eb037c
3
+ metadata.gz: e15be9a3bb8efbbe08399d5bb73f355eaad049e30b78785ba8259ebb7355ec37
4
+ data.tar.gz: 81ba7269dc35c045b3339a2903be46e7bb827ef09defce8eb9d615e625d0967c
5
5
  SHA512:
6
- metadata.gz: 45eb6f001588760797136e9d6b970224ceb476f367bc1069591def159b9fa2e86fb6dbb4d6cd2d28652a473c633c3a573eb89d8f8cae02e677a687aac75443e4
7
- data.tar.gz: eda9a35666b517c68dc5ff8d0553dfe1a1942556aeb863d648c8cee3a2a6fa3fd0aab30a2136058cd6bec17866e7ecb462da7e3cae07718437647ddde1b78954
6
+ metadata.gz: 4000da3a2e542830dd2e5964d421099480d95bc7bc5f6380dba01f99d59f1c90af0fad4cedab107723b58fd217b720ad6cc8cdf34b55203a2715c1dc77f9d531
7
+ data.tar.gz: b04f1e509f1c17cec60f606d6f6dffcf0d6d7e4942ced834ca113afcee77d09eec8594345904dca41103dd8e5e2c19947d4c224ca7f8ea8c0d097c36f548e233
@@ -1,3 +1,3 @@
1
1
  module ImmosquareCleaner
2
- VERSION = "0.1.74".freeze
2
+ VERSION = "0.1.76".freeze
3
3
  end
@@ -190,6 +190,24 @@ module ImmosquareCleaner
190
190
  File.write(file_path, formatted_md)
191
191
  File.normalize_last_line(file_path)
192
192
 
193
+ ##============================================================##
194
+ ## Shell files (.sh) and other shell files
195
+ ## (Attention : certains fichiers peuvent ne pas avoir de point devant,
196
+ ## car ils sont parfois utilisés comme liens symboliques synchronisés ou fichiers de config globaux.)
197
+ ## Ne pas inclure de fichiers non shell (ex: fish, csh, tcsh) car shfmt ne les supporte pas.
198
+ ## ---------
199
+ ## Uses shfmt to format shell scripts with 2-space indentation
200
+ ## Checks if shfmt is available before processing
201
+ ##============================================================##
202
+ elsif file_path.end_with?(".sh", "bash", "zsh", "zshrc", "bashrc", "bash_profile", "zprofile")
203
+ if system("which shfmt > /dev/null 2>&1")
204
+ cmds = ["shfmt -i 2 -w \"#{file_path}\""]
205
+ launch_cmds(cmds)
206
+ File.normalize_last_line(file_path)
207
+ else
208
+ puts("ERROR: shfmt is not installed. Please install it with: brew install shfmt")
209
+ end
210
+
193
211
  ##============================================================##
194
212
  ## Autres formats
195
213
  ##============================================================##
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: immosquare-cleaner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.74
4
+ version: 0.1.76
5
5
  platform: ruby
6
6
  authors:
7
7
  - immosquare