cocoapods-githooks 1.0.2 → 1.0.3
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/cocoapods-githooks.rb +1 -1
- data/lib/githooks-sync.rb +14 -12
- metadata +2 -10
- data/lib/githooks-sync_BACKUP_71354.rb +0 -36
- data/lib/githooks-sync_BACKUP_71547.rb +0 -36
- data/lib/githooks-sync_BASE_71354.rb +0 -0
- data/lib/githooks-sync_BASE_71547.rb +0 -0
- data/lib/githooks-sync_LOCAL_71354.rb +0 -36
- data/lib/githooks-sync_LOCAL_71547.rb +0 -36
- data/lib/githooks-sync_REMOTE_71354.rb +0 -0
- data/lib/githooks-sync_REMOTE_71547.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b9373d4ed92973ed1054aaa93b30aea07a77531bb6730240198174889f85572
|
4
|
+
data.tar.gz: 6c5e908f1d15fc870e4668e568b12f00f1c7d4695950f38866f626eb0f952e69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 137e00a1aace8d2032e53a24e8d55952fb53ca20be891ab49f8bcb6a419354e0dfaefb13bdc2062d7eabc4cb7ae134e0fd4bd1126a4434d5a465e8f03915a5df
|
7
|
+
data.tar.gz: a851b0d35e5d40082e02cbb363aba5216674d35b2fd19add65e5932dc641109f771f7923b19776a2e93850195154a1b7a255f65c6e8d885999c5ebb070347f05
|
data/lib/cocoapods-githooks.rb
CHANGED
data/lib/githooks-sync.rb
CHANGED
@@ -9,28 +9,30 @@ module CocoapodsGitHooks
|
|
9
9
|
Pod::UI.puts "Git repository not found"
|
10
10
|
return
|
11
11
|
end
|
12
|
+
|
12
13
|
if !File.directory?(".git-hooks")
|
13
14
|
Pod::UI.puts ".git-hooks folder not found, nothing to sync"
|
14
15
|
return
|
15
16
|
end
|
16
|
-
|
17
|
+
|
18
|
+
scriptList = Dir['.git-hooks/*']
|
19
|
+
|
20
|
+
if scriptList.empty?
|
17
21
|
Pod::UI.puts ".git-hooks folder is empty, nothing to sync"
|
18
22
|
return
|
19
23
|
end
|
24
|
+
|
20
25
|
if !File.directory?(".git/hooks")
|
21
26
|
FileUtils.mkdir ".git/hooks"
|
22
27
|
end
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
end
|
31
|
-
FileUtils.chmod("+x", "#{path}/#{filename}")
|
32
|
-
end
|
28
|
+
|
29
|
+
scriptList.each do |script|
|
30
|
+
filename = File.basename(script, File.extname(script))
|
31
|
+
hookPath = ".git/hooks/#{filename}"
|
32
|
+
FileUtils.cp(script, hookPath)
|
33
|
+
FileUtils.chmod("+x", hookPath)
|
34
|
+
end
|
33
35
|
Pod::UI.puts "Git hooks synchronized"
|
34
36
|
end
|
35
37
|
end
|
36
|
-
end
|
38
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-githooks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vlad Korzun
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -49,14 +49,6 @@ files:
|
|
49
49
|
- lib/cocoapods_plugin.rb
|
50
50
|
- lib/command/githooks.rb
|
51
51
|
- lib/githooks-sync.rb
|
52
|
-
- lib/githooks-sync_BACKUP_71354.rb
|
53
|
-
- lib/githooks-sync_BACKUP_71547.rb
|
54
|
-
- lib/githooks-sync_BASE_71354.rb
|
55
|
-
- lib/githooks-sync_BASE_71547.rb
|
56
|
-
- lib/githooks-sync_LOCAL_71354.rb
|
57
|
-
- lib/githooks-sync_LOCAL_71547.rb
|
58
|
-
- lib/githooks-sync_REMOTE_71354.rb
|
59
|
-
- lib/githooks-sync_REMOTE_71547.rb
|
60
52
|
homepage: https://github.com/VladKorzun/cocoapods-githooks
|
61
53
|
licenses:
|
62
54
|
- MIT
|
@@ -1,36 +0,0 @@
|
|
1
|
-
require 'cocoapods'
|
2
|
-
require 'fileutils'
|
3
|
-
|
4
|
-
module CocoapodsGitHooks
|
5
|
-
class GitHooksSync
|
6
|
-
def sync
|
7
|
-
Pod::UI.puts "Synchronizing git hooks"
|
8
|
-
if !File.directory?(".git")
|
9
|
-
Pod::UI.puts "Git repository not found"
|
10
|
-
return
|
11
|
-
end
|
12
|
-
if !File.directory?(".git-hooks")
|
13
|
-
Pod::UI.puts ".git-hooks folder not found, nothing to sync"
|
14
|
-
return
|
15
|
-
end
|
16
|
-
if Dir['.git-hooks/*'].empty?
|
17
|
-
Pod::UI.puts ".git-hooks folder is empty, nothing to sync"
|
18
|
-
return
|
19
|
-
end
|
20
|
-
if !File.directory?(".git/hooks")
|
21
|
-
FileUtils.mkdir ".git/hooks"
|
22
|
-
end
|
23
|
-
|
24
|
-
FileUtils.cp_r(".git-hooks/.", ".git/hooks/")
|
25
|
-
path = ".git/hooks/"
|
26
|
-
Dir.open(path).each do |p|
|
27
|
-
filename = File.basename(p, File.extname(p))
|
28
|
-
if File.extname(p) == ".sh"
|
29
|
-
FileUtils.mv("#{path}/#{p}", "#{path}/#{filename}")
|
30
|
-
end
|
31
|
-
FileUtils.chmod("+x", "#{path}/#{filename}")
|
32
|
-
end
|
33
|
-
Pod::UI.puts "Git hooks synchronized"
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
@@ -1,36 +0,0 @@
|
|
1
|
-
require 'cocoapods'
|
2
|
-
require 'fileutils'
|
3
|
-
|
4
|
-
module CocoapodsGitHooks
|
5
|
-
class GitHooksSync
|
6
|
-
def sync
|
7
|
-
Pod::UI.puts "Synchronizing git hooks"
|
8
|
-
if !File.directory?(".git")
|
9
|
-
Pod::UI.puts "Git repository not found"
|
10
|
-
return
|
11
|
-
end
|
12
|
-
if !File.directory?(".git-hooks")
|
13
|
-
Pod::UI.puts ".git-hooks folder not found, nothing to sync"
|
14
|
-
return
|
15
|
-
end
|
16
|
-
if Dir['.git-hooks/*'].empty?
|
17
|
-
Pod::UI.puts ".git-hooks folder is empty, nothing to sync"
|
18
|
-
return
|
19
|
-
end
|
20
|
-
if !File.directory?(".git/hooks")
|
21
|
-
FileUtils.mkdir ".git/hooks"
|
22
|
-
end
|
23
|
-
|
24
|
-
FileUtils.cp_r(".git-hooks/.", ".git/hooks/")
|
25
|
-
path = ".git/hooks/"
|
26
|
-
Dir.open(path).each do |p|
|
27
|
-
filename = File.basename(p, File.extname(p))
|
28
|
-
if File.extname(p) == ".sh"
|
29
|
-
FileUtils.mv("#{path}/#{p}", "#{path}/#{filename}")
|
30
|
-
end
|
31
|
-
FileUtils.chmod("+x", "#{path}/#{filename}")
|
32
|
-
end
|
33
|
-
Pod::UI.puts "Git hooks synchronized"
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
File without changes
|
File without changes
|
@@ -1,36 +0,0 @@
|
|
1
|
-
require 'cocoapods'
|
2
|
-
require 'fileutils'
|
3
|
-
|
4
|
-
module CocoapodsGitHooks
|
5
|
-
class GitHooksSync
|
6
|
-
def sync
|
7
|
-
Pod::UI.puts "Synchronizing git hooks"
|
8
|
-
if !File.directory?(".git")
|
9
|
-
Pod::UI.puts "Git repository not found"
|
10
|
-
return
|
11
|
-
end
|
12
|
-
if !File.directory?(".git-hooks")
|
13
|
-
Pod::UI.puts ".git-hooks folder not found, nothing to sync"
|
14
|
-
return
|
15
|
-
end
|
16
|
-
if Dir['.git-hooks/*'].empty?
|
17
|
-
Pod::UI.puts ".git-hooks folder is empty, nothing to sync"
|
18
|
-
return
|
19
|
-
end
|
20
|
-
if !File.directory?(".git/hooks")
|
21
|
-
FileUtils.mkdir ".git/hooks"
|
22
|
-
end
|
23
|
-
|
24
|
-
FileUtils.cp_r(".git-hooks/.", ".git/hooks/")
|
25
|
-
path = ".git/hooks/"
|
26
|
-
Dir.open(path).each do |p|
|
27
|
-
filename = File.basename(p, File.extname(p))
|
28
|
-
if File.extname(p) == ".sh"
|
29
|
-
FileUtils.mv("#{path}/#{p}", "#{path}/#{filename}")
|
30
|
-
end
|
31
|
-
FileUtils.chmod("+x", "#{path}/#{filename}")
|
32
|
-
end
|
33
|
-
Pod::UI.puts "Git hooks synchronized"
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
@@ -1,36 +0,0 @@
|
|
1
|
-
require 'cocoapods'
|
2
|
-
require 'fileutils'
|
3
|
-
|
4
|
-
module CocoapodsGitHooks
|
5
|
-
class GitHooksSync
|
6
|
-
def sync
|
7
|
-
Pod::UI.puts "Synchronizing git hooks"
|
8
|
-
if !File.directory?(".git")
|
9
|
-
Pod::UI.puts "Git repository not found"
|
10
|
-
return
|
11
|
-
end
|
12
|
-
if !File.directory?(".git-hooks")
|
13
|
-
Pod::UI.puts ".git-hooks folder not found, nothing to sync"
|
14
|
-
return
|
15
|
-
end
|
16
|
-
if Dir['.git-hooks/*'].empty?
|
17
|
-
Pod::UI.puts ".git-hooks folder is empty, nothing to sync"
|
18
|
-
return
|
19
|
-
end
|
20
|
-
if !File.directory?(".git/hooks")
|
21
|
-
FileUtils.mkdir ".git/hooks"
|
22
|
-
end
|
23
|
-
|
24
|
-
FileUtils.cp_r(".git-hooks/.", ".git/hooks/")
|
25
|
-
path = ".git/hooks/"
|
26
|
-
Dir.open(path).each do |p|
|
27
|
-
filename = File.basename(p, File.extname(p))
|
28
|
-
if File.extname(p) == ".sh"
|
29
|
-
FileUtils.mv("#{path}/#{p}", "#{path}/#{filename}")
|
30
|
-
end
|
31
|
-
FileUtils.chmod("+x", "#{path}/#{filename}")
|
32
|
-
end
|
33
|
-
Pod::UI.puts "Git hooks synchronized"
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
File without changes
|
File without changes
|