shellboxCLI 0.1.8 → 0.1.10

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: '08a1a9586065ab94d54895f4807e82b61d637f2ac8004ad23025bd77d541ef09'
4
- data.tar.gz: eb74b74aa09cff2b0936a9fcbfe7953744c3b4b3a2bc53b9cd7aac9887274d20
3
+ metadata.gz: 2fc8c8556115bff1e895be1f1b0c0a4709f573784334b0ba97bab590105dc88f
4
+ data.tar.gz: 6dd7b666dac21a28420cf2c39f2ac63c4db0cccb17995982815f9314cb248a76
5
5
  SHA512:
6
- metadata.gz: 52de857020abaf650ad5bfc7ea64724497200e086a3cd632607a48b9735134a6ae788668a44737fe0b0fdd2d9f957a77295c6dce26c2656b6ac1a265cb24d75e
7
- data.tar.gz: 43e79597b10ce6d28e258c83949bd2c1385d6958a2fb9473d3c6dd3a53d87b302c36b0f21eb126ef69ef8b6f287b29e57feafac048b10954c41cd5eda55b5aeb
6
+ metadata.gz: 3a134aad58c03ec91128bc813d08f39f783985dfae2b4abfa8800202fdf39fd00b0a8488fbefec56bbfb6dd89e52581f577a4822452ab872265776aad250acf7
7
+ data.tar.gz: 5401d1b9dd4074ae97032e1f82897a4e83ad9f75b38a19c2c3341a424b4ae93c0dad4145984258a0e74701bafb19c21fb699230b7c7c9066f132838f839c73bc
data/lib/ShellboxCLI.rb CHANGED
@@ -24,5 +24,4 @@ module App
24
24
  subcommand "ios", IOS_CLI
25
25
 
26
26
  end
27
-
28
- end
27
+ end
@@ -1,3 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
1
3
  unless File.directory?(".git/hooks")
2
4
  puts "Pasta .git/hooks não encontrada. Certifique-se de estar no diretório raiz do seu repositório Git."
3
5
  exit 1
@@ -10,4 +12,4 @@ destination_file = File.join(".git", "hooks", "pre-commit")
10
12
  FileUtils.cp(source_file, destination_file)
11
13
  File.chmod(0755, destination_file)
12
14
 
13
- puts "Hook pre-commit configurado com sucesso no seu projeto local!"
15
+ puts "Hook pre-commit configurado com sucesso!"
File without changes
data/lib/ios/iosOption.rb CHANGED
@@ -3,7 +3,6 @@ require 'ios/module/setup/Template_Configurator'
3
3
  require 'thor'
4
4
 
5
5
  module App
6
-
7
6
  class IOS_CLI < Thor
8
7
  desc "module", "Create a new module to iOS platform"
9
8
  def module
@@ -32,9 +31,25 @@ module App
32
31
  private
33
32
 
34
33
  def install_hooks
34
+ hooks_directory = File.expand_path(File.join(File.dirname(__FILE__), 'hooks'))
35
+ install_hooks_path = File.join(hooks_directory, 'install-hooks.rb')
36
+
37
+ unless File.exist?(install_hooks_path)
38
+ puts "O arquivo install-hooks.rb não foi encontrado em #{hooks_directory}."
39
+ return
40
+ end
41
+
35
42
  puts "Executando install_hooks..."
36
- system('ruby hooks/install-hooks.rb')
37
- puts "✅ Hooks instalados com sucesso"
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
52
+ end
38
53
  end
39
54
  end
40
55
  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.8
4
+ version: 0.1.10
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-05 00:00:00.000000000 Z
11
+ date: 2024-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -65,7 +65,6 @@ files:
65
65
  - bin/shellbox
66
66
  - lib/ShellboxCLI.rb
67
67
  - lib/ios/hooks/install-hooks.rb
68
- - lib/ios/hooks/install-hooks.sh
69
68
  - lib/ios/hooks/pre-commit
70
69
  - lib/ios/iosOption.rb
71
70
  - lib/ios/module/setup/ConfigureSwift.rb
@@ -1,12 +0,0 @@
1
- #!/bin/bash
2
-
3
- if [ ! -d ".git/hooks" ]; then
4
- echo "Pasta .git/hooks não encontrada. Certifique-se de estar no diretório raiz do seu repositório Git."
5
- exit 1
6
- fi
7
-
8
- # Copia o pre-commit do CLI para a pasta .git/hooks do projeto
9
- cp pre-commit .git/hooks/
10
- chmod +x .git/hooks/pre-commit
11
-
12
- echo "Hook pre-commit configurado com sucesso no seu projeto local!"