shellboxCLI 0.1.12 → 0.1.15
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 +4 -4
- data/lib/ios/install-hooks.rb +17 -12
- data/lib/ios/iosOption.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4772be003e9004d3904c69f55b4690bfb21a56c5997b2a9f17a187cd7e6843f2
|
4
|
+
data.tar.gz: 7991fa05001e8c960168674a3dcf0b53d4af9018c2544b5203a1624d657e74e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9e352a65539870e4bbcab7d254376baef946f7648c5352a76020b68c2438eaad890829592a4ed44fdf85b2c57dd1f5d474c967ab1a83144fc296883371688db
|
7
|
+
data.tar.gz: aab0b73d25500b55f21bf6be0467b1f7d47bdeaac54ba9f10e74dc7132cab54ec425d09308ba2a64aec28f9f059f298f67caf6036cf3d8b78c99ad3897d2cfe4
|
data/lib/ios/install-hooks.rb
CHANGED
@@ -1,23 +1,28 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require 'bundler/setup'
|
4
|
+
require 'rugged'
|
4
5
|
require 'fileutils'
|
5
6
|
|
6
|
-
|
7
|
-
|
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)
|
8
12
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
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)
|
14
21
|
end
|
15
22
|
|
16
|
-
|
17
|
-
|
23
|
+
repo_path = Dir.pwd
|
24
|
+
repo = Rugged::Repository.new(repo_path)
|
18
25
|
|
19
|
-
|
20
|
-
FileUtils.cp(source_file, destination_file)
|
21
|
-
File.chmod(0755, destination_file)
|
26
|
+
install_pre_commit_hook(repo)
|
22
27
|
|
23
28
|
puts "Hook pre-commit configurado com sucesso!"
|
data/lib/ios/iosOption.rb
CHANGED
@@ -31,7 +31,7 @@ module App
|
|
31
31
|
private
|
32
32
|
|
33
33
|
def install_hooks
|
34
|
-
hooks_directory = File.expand_path(File.join(File.dirname(__FILE__)
|
34
|
+
hooks_directory = File.expand_path(File.join(File.dirname(__FILE__)))
|
35
35
|
install_hooks_path = File.join(hooks_directory, 'install-hooks.rb')
|
36
36
|
|
37
37
|
unless File.exist?(install_hooks_path)
|
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.
|
4
|
+
version: 0.1.15
|
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-
|
11
|
+
date: 2024-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -52,6 +52,20 @@ 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'
|
55
69
|
description: A ShellBox CLI to generate some patterns and templates
|
56
70
|
email:
|
57
71
|
- rodrigo.martins@raizen.com
|