immosquare-cleaner 0.1.74 → 0.1.75

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: 969ab498986c59a2c92a63cfb84c338dec84269688eb8ff5d18fadda3edc3615
4
+ data.tar.gz: b6d54676b6acdf359f1eeb6cffdcc7ebd39e11dad6504304db102085ba2ab01a
5
5
  SHA512:
6
- metadata.gz: 45eb6f001588760797136e9d6b970224ceb476f367bc1069591def159b9fa2e86fb6dbb4d6cd2d28652a473c633c3a573eb89d8f8cae02e677a687aac75443e4
7
- data.tar.gz: eda9a35666b517c68dc5ff8d0553dfe1a1942556aeb863d648c8cee3a2a6fa3fd0aab30a2136058cd6bec17866e7ecb462da7e3cae07718437647ddde1b78954
6
+ metadata.gz: de65dff9503382b33efaff275354650aa569d36d99a80f60cecb18a63df2cc0ed557714101833dc236882eb76481ef2e8cc6658644b32140ce33cf2e70efb9a1
7
+ data.tar.gz: c1388e7a5109a04bb5c22bfed7aa14c0d99e41507369ab2a09ae3048a1f1ba82dc33d05d23bc80a1cff152c24b708d386ef7f8d7a81c4248273b273a39aa14fc
@@ -1,3 +1,3 @@
1
1
  module ImmosquareCleaner
2
- VERSION = "0.1.74".freeze
2
+ VERSION = "0.1.75".freeze
3
3
  end
@@ -190,6 +190,21 @@ 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)
195
+ ## ---------
196
+ ## Uses shfmt to format shell scripts with 2-space indentation
197
+ ## Checks if shfmt is available before processing
198
+ ##============================================================##
199
+ elsif file_path.end_with?(".sh")
200
+ if system("which shfmt > /dev/null 2>&1")
201
+ cmds = ["shfmt -i 2 -w \"#{file_path}\""]
202
+ launch_cmds(cmds)
203
+ File.normalize_last_line(file_path)
204
+ else
205
+ puts "ERROR: shfmt is not installed. Please install it with: brew install shfmt"
206
+ end
207
+
193
208
  ##============================================================##
194
209
  ## Autres formats
195
210
  ##============================================================##
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.75
5
5
  platform: ruby
6
6
  authors:
7
7
  - immosquare