shellboxCLI 0.1.14 → 0.1.16

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: ee8c723698d0b231d86dc18dd536d95356997df2cc7cefd6f64ba1a424114935
4
- data.tar.gz: 317529a6b9fa78f5d518183a70ffc98d76765611f2b4d2588dda1b009ed5aeff
3
+ metadata.gz: abe773b82f91137ba2116220d96fadb4dc6d0353e7bf14ebce0ca9c338e082b4
4
+ data.tar.gz: 487e91bef15e4704ab2436bc0135008d275b940a0cef924fdcd7e581b146ecf0
5
5
  SHA512:
6
- metadata.gz: 6f79764539910273071c010ed0e1a0863f07cb0e42c18e7b9af28c287a51814503657143b7f1c10b5b7527647ec89c1be7c5cca5e0e868670106d354831483f0
7
- data.tar.gz: e3b8709a5deaf7e0165d6c5a173e3f36c3ce5b341ff8fd18425db1092fd848183d42da1f333bbcd2d9a96e84f4ad8fafd4810c3ece9051bfea49008e842617f4
6
+ metadata.gz: 184d338842deb18153cf574ad662f9cf3245c2cd72bbb344b74cb69bd03d140a305c14942526bdf7ccd61bf9eceb650f9759cc55a8cd6c464e4b624fd5a279b2
7
+ data.tar.gz: 463c4ca81d70c83a4bf1c07f3b3c09ddcb6ea67926b4fd4adf9607fe8aac0408a201161586c4c5e73346d7ea98ccb5e295e09594112c9eaeb290cca02dc49fee
data/lib/ios/iosOption.rb CHANGED
@@ -26,30 +26,28 @@ module App
26
26
  puts "✅ Instalado com sucesso"
27
27
 
28
28
  install_hooks
29
- end
30
-
31
- private
32
-
33
- def install_hooks
34
- hooks_directory = File.expand_path(File.join(File.dirname(__FILE__)))
35
- install_hooks_path = File.join(hooks_directory, 'install-hooks.rb')
36
-
29
+ end
30
+
31
+ private
32
+ def install_hooks
33
+ project_directory = Dir.pwd
34
+ install_hooks_path = File.join(project_directory, 'install-hooks.rb')
35
+
37
36
  unless File.exist?(install_hooks_path)
38
- puts "O arquivo install-hooks.rb não foi encontrado em #{hooks_directory}."
39
- return
37
+ puts "O arquivo install-hooks.rb não foi encontrado em #{File.join(project_directory)}."
38
+ return
40
39
  end
41
-
40
+
42
41
  puts "Executando install_hooks..."
43
-
44
- Dir.chdir(hooks_directory) do
45
- success = system('ruby install-hooks.rb')
46
-
47
- if success
48
- puts "✅ Hooks instalados com sucesso!"
49
- else
50
- puts "❌ Erro ao executar pre-hook"
51
- end
42
+
43
+ Dir.chdir(File.join(project_directory)) do
44
+ success = system('ruby install-hooks.rb')
45
+ if success
46
+ puts "✅ Hooks instalados com sucesso!"
47
+ else
48
+ puts "❌ Erro ao executar pre-hook"
49
+ end
50
+ end
52
51
  end
53
- end
54
52
  end
55
53
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shellboxCLI
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.14
4
+ version: 0.1.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - ShellBox App
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-19 00:00:00.000000000 Z
11
+ date: 2024-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -64,8 +64,6 @@ files:
64
64
  - bin/install-hooks
65
65
  - bin/shellbox
66
66
  - lib/ShellboxCLI.rb
67
- - lib/ios/hooks/pre-commit
68
- - lib/ios/install-hooks.rb
69
67
  - lib/ios/iosOption.rb
70
68
  - lib/ios/module/setup/ConfigureSwift.rb
71
69
  - lib/ios/module/setup/MessageBank.rb
@@ -1,30 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Path para o Swiftlint
4
- SWIFTLINT_PATH=/opt/homebrew/bin/swiftlint
5
-
6
- # Verifica se o Swiftlint está instalado
7
- if ! command -v $SWIFTLINT_PATH &> /dev/null; then
8
- echo "Swiftlint não encontrado. Certifique-se de que está instalado."
9
- exit 1
10
- fi
11
-
12
- # Obtém arquivos em diff que ainda não foram commitados
13
- files=$(git diff --cached --name-only --diff-filter=ACM | grep "\.swift$")
14
-
15
- # Verifica se existem arquivos Swift para lint
16
- if [ -n "$files" ]; then
17
- echo "Executando Swiftlint nos arquivos alterados..."
18
-
19
- # Executa o Swiftlint nos arquivos em diff
20
- lint_output=$($SWIFTLINT_PATH lint --path $files)
21
-
22
- if [ -n "$lint_output" ]; then
23
- echo "Erros ou avisos do Swiftlint encontrados:"
24
- echo "$lint_output"
25
- echo "Corrija os problemas de lint antes de commitar."
26
- exit 1
27
- fi
28
- fi
29
-
30
- exit 0
@@ -1,23 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'bundler/setup'
4
- require 'fileutils'
5
-
6
- current_directory = Dir.pwd
7
- script_directory = File.dirname(File.expand_path(__FILE__))
8
-
9
- # Certifica-se de estar no diretório raiz do repositório Git
10
- git_directory = File.join(current_directory, ".git")
11
- unless File.directory?(git_directory)
12
- puts "Pasta .git não encontrada. Certifique-se de estar no diretório raiz do seu repositório Git."
13
- exit 1
14
- end
15
-
16
- source_file = File.join(script_directory, "hooks", "pre-commit")
17
- destination_file = File.join(git_directory, "hooks", "pre-commit")
18
-
19
- # Copia script pre-commit do CLI para a pasta .git/hooks do projeto
20
- FileUtils.cp(source_file, destination_file)
21
- File.chmod(0755, destination_file)
22
-
23
- puts "Hook pre-commit configurado com sucesso!"