dtk-common 0.6.4 → 0.6.5
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 +8 -8
- data/lib/dtk-common/version.rb +1 -1
- data/lib/gitolite/grit/adapter.rb +6 -0
- data/lib/gitolite/grit/file_access.rb +4 -4
- data/lib/gitolite/repo.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MDM3ZTI5ZTU0ZmNmNDY0OWI4ZmQxMzk0ZTk1Mjc4YjVlNjAwZWVjMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Y2VkNDg5ZTE3ZWNkODk1ODYxODFiZjlkYmZlZTNmYTY3MjUxYWZiMg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTU3OTRlNGJlMDIzOTU2ZWVjY2EwMjdmZTU3Yzg0YjJkMDA1ZWE2ZWQ4ZDBh
|
10
|
+
Y2RkYmYxZTM2OTQ1MzRiN2Y1OThiMTRlOTU0OWEyNzNjY2ExMzdkMWY0Yzdk
|
11
|
+
M2RlMTgwMzRhYjBlZmVlY2YzZTNhMGE0OTMyZjliOTA5ZTM4YzE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YzFmMzVhYzJiOWU3MWI0NTY1NjNmMWZlMmE1NjI1M2RmZWI3ZjdkMGEyZjgx
|
14
|
+
OWJhMGY1NTFiMjdkNDUwOTRmMjU3OTkzOTA2OWQ5NzVmYWY0YzVhMDE0MDMx
|
15
|
+
OGJiOGZmN2I5ZTg4Y2EyMWExNjljY2I1M2NkMGI1Mjg1NjUxZGU=
|
data/lib/dtk-common/version.rb
CHANGED
@@ -39,6 +39,12 @@ module Gitolite
|
|
39
39
|
tree_or_blob && tree_or_blob.kind_of?(::Grit::Blob) && tree_or_blob.data
|
40
40
|
end
|
41
41
|
|
42
|
+
def file_content_and_size(path)
|
43
|
+
tree_or_blob = tree/path
|
44
|
+
return nil unless tree_or_blob
|
45
|
+
{ :data => tree_or_blob.data, :size => tree_or_blob.size }
|
46
|
+
end
|
47
|
+
|
42
48
|
def push()
|
43
49
|
Git_command__push_mutex.synchronize do
|
44
50
|
git_command(:push,"origin", "#{@branch}:refs/heads/#{@branch}")
|
@@ -2,13 +2,13 @@ module Gitolite
|
|
2
2
|
module Git
|
3
3
|
class FileAccess < Adapter
|
4
4
|
|
5
|
-
|
5
|
+
|
6
6
|
|
7
7
|
def add_file(file_rel_path,content)
|
8
8
|
content ||= String.new
|
9
9
|
file_path = qualified_path(file_rel_path)
|
10
10
|
chdir_and_checkout do
|
11
|
-
File.open(file_path,"w"){|f|f << content}
|
11
|
+
File.open(file_path,"w+"){|f|f << content}
|
12
12
|
git_command(:add,file_path)
|
13
13
|
end
|
14
14
|
end
|
@@ -21,7 +21,7 @@ module Gitolite
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
24
|
-
|
24
|
+
|
25
25
|
def commit(commit_msg)
|
26
26
|
#TODO is chdir_and_checkout needed
|
27
27
|
chdir_and_checkout do
|
@@ -40,7 +40,7 @@ module Gitolite
|
|
40
40
|
def chdir_and_checkout(branch=nil,&block)
|
41
41
|
Change_dir_mutex.synchronize do
|
42
42
|
branch ||= @branch
|
43
|
-
Dir.chdir(@repo_dir) do
|
43
|
+
Dir.chdir(@repo_dir) do
|
44
44
|
current_head = @grit_repo.head.name
|
45
45
|
git_command(:checkout,branch) unless current_head == branch
|
46
46
|
return unless block
|
data/lib/gitolite/repo.rb
CHANGED
@@ -137,6 +137,10 @@ module Gitolite
|
|
137
137
|
Git::FileAccess.new(@repo_dir_path).file_content(path)
|
138
138
|
end
|
139
139
|
|
140
|
+
def file_content_and_size(path)
|
141
|
+
Git::FileAccess.new(@repo_dir_path).file_content_and_size(path)
|
142
|
+
end
|
143
|
+
|
140
144
|
def file_list(depth=nil)
|
141
145
|
Git::FileAccess.new(@repo_dir_path).ls_r(depth)
|
142
146
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dtk-common
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rich PELAVIN
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rugged
|