shellboxCLI 0.1.15 → 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: 4772be003e9004d3904c69f55b4690bfb21a56c5997b2a9f17a187cd7e6843f2
4
- data.tar.gz: 7991fa05001e8c960168674a3dcf0b53d4af9018c2544b5203a1624d657e74e2
3
+ metadata.gz: abe773b82f91137ba2116220d96fadb4dc6d0353e7bf14ebce0ca9c338e082b4
4
+ data.tar.gz: 487e91bef15e4704ab2436bc0135008d275b940a0cef924fdcd7e581b146ecf0
5
5
  SHA512:
6
- metadata.gz: c9e352a65539870e4bbcab7d254376baef946f7648c5352a76020b68c2438eaad890829592a4ed44fdf85b2c57dd1f5d474c967ab1a83144fc296883371688db
7
- data.tar.gz: aab0b73d25500b55f21bf6be0467b1f7d47bdeaac54ba9f10e74dc7132cab54ec425d09308ba2a64aec28f9f059f298f67caf6036cf3d8b78c99ad3897d2cfe4
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.15
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-23 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
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '10.0'
55
- - !ruby/object:Gem::Dependency
56
- name: rugged
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '1.7'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '1.7'
69
55
  description: A ShellBox CLI to generate some patterns and templates
70
56
  email:
71
57
  - rodrigo.martins@raizen.com
@@ -78,8 +64,6 @@ files:
78
64
  - bin/install-hooks
79
65
  - bin/shellbox
80
66
  - lib/ShellboxCLI.rb
81
- - lib/ios/hooks/pre-commit
82
- - lib/ios/install-hooks.rb
83
67
  - lib/ios/iosOption.rb
84
68
  - lib/ios/module/setup/ConfigureSwift.rb
85
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,28 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'bundler/setup'
4
- require 'rugged'
5
- require 'fileutils'
6
-
7
- def install_pre_commit_hook(repository)
8
- hooks_path = File.join(repository.workdir, '.git', 'hooks')
9
- hook_type = 'pre-commit'
10
- hook_path = File.join(hooks_path, hook_type)
11
- source_hook_path = File.join(File.dirname(File.expand_path(__FILE__)), 'hooks', hook_type)
12
-
13
- unless File.directory?(hooks_path)
14
- puts "Pasta .git/hooks não encontrada. Certifique-se de estar no diretório raiz do seu repositório Git."
15
- exit 1
16
- end
17
-
18
- # Copia o script do hook para o diretório .git/hooks
19
- FileUtils.cp(source_hook_path, hook_path)
20
- File.chmod(0755, hook_path)
21
- end
22
-
23
- repo_path = Dir.pwd
24
- repo = Rugged::Repository.new(repo_path)
25
-
26
- install_pre_commit_hook(repo)
27
-
28
- puts "Hook pre-commit configurado com sucesso!"