scm_workspace 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/scm_workspace/version.rb +1 -1
- data/lib/scm_workspace.rb +3 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4c3b5a8da44c3c9a27c2308a96d523c6f58ba32
|
4
|
+
data.tar.gz: 4b386823214e869deeb4ab06dc98f46a4b0f1b5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9302d285577f8fb4b1b8576eb21d1ec7671db398b67eabd310c8f2f21631275a063ed6a1b310a3b3bfb8291ba9e7d3f83e7052289f6541a89a4ef7d9233b5bd0
|
7
|
+
data.tar.gz: 9d7a0cc26d3742f33e6fbb098339319266540eb402b2123dfb88ea8dadab7fc5a8b58e9b56a1f01b03983f1a21ecff0ac1c7c2a2a73270376b3c1e8de01894da
|
data/lib/scm_workspace.rb
CHANGED
@@ -91,6 +91,7 @@ class ScmWorkspace
|
|
91
91
|
fileutils.chdir(root) do
|
92
92
|
(Dir.glob("*") + Dir.glob(".*")).each do |d|
|
93
93
|
next if d =~ /\A\.+\Z/
|
94
|
+
logger.info("remove_entry_secure #{d.inspect}")
|
94
95
|
fileutils.remove_entry_secure(d)
|
95
96
|
end
|
96
97
|
end
|
@@ -98,7 +99,7 @@ class ScmWorkspace
|
|
98
99
|
|
99
100
|
def empty?
|
100
101
|
return true unless Dir.exist?(root)
|
101
|
-
|
102
|
+
FileUtils.chdir(root) do
|
102
103
|
return (Dir.glob("*") + Dir.glob(".*")).reject{|d| d =~ /\A\.+\Z/}.empty?
|
103
104
|
end
|
104
105
|
end
|
@@ -226,7 +227,7 @@ class ScmWorkspace
|
|
226
227
|
|
227
228
|
def git_current_branch_name(dir = repo_dir)
|
228
229
|
return nil unless Dir.exist?(dir)
|
229
|
-
|
230
|
+
FileUtils.chdir(dir) do
|
230
231
|
# http://qiita.com/sugyan/items/83e060e895fa8ef2038c
|
231
232
|
result = `git symbolic-ref --short HEAD`.strip
|
232
233
|
return result unless result.nil? || result.empty?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scm_workspace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- akima
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tengine_support
|