esr-rim 1.3.4 → 1.3.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +6 -0
- data/README.md +2 -1
- data/lib/rim/processor.rb +11 -4
- data/lib/rim/version.rb +1 -1
- metadata +2 -2
data/CHANGELOG
CHANGED
data/README.md
CHANGED
@@ -6,7 +6,8 @@ RIM lets you work with multiple git repositories from within one single git repo
|
|
6
6
|
|
7
7
|
> From RIM version 1.1.4 it is no more necessary to set the global git autocrlf option to false on Windows platforms. If you don't have other reasons you might want to set it back to the recommended value (which is true).
|
8
8
|
|
9
|
-
> From RIM version 1.3.3 the
|
9
|
+
> From RIM version 1.3.3 the location of the helper directory for copies of git repositories can be configured with environment variables: If a RIM_HOME environment variable is set
|
10
|
+
then it will be placed into the specified location, otherwise if the HOME environment variable is set it will be placed into a unique directory under $HOME/.rim
|
10
11
|
|
11
12
|
## Concept
|
12
13
|
|
data/lib/rim/processor.rb
CHANGED
@@ -17,8 +17,11 @@ GerritServer = "ssh://gerrit/"
|
|
17
17
|
|
18
18
|
def initialize(workspace_root, logger)
|
19
19
|
@ws_root = workspace_root
|
20
|
-
|
21
|
-
|
20
|
+
rim_dir = nil
|
21
|
+
rim_dir = ENV['RIM_HOME'] if ENV.has_key?('RIM_HOME')
|
22
|
+
rim_dir = File.join(ENV['HOME'], ".rim") if rim_dir.nil? && ENV.has_key?('HOME')
|
23
|
+
if rim_dir
|
24
|
+
@rim_path = File.join(rim_dir, Processor.shorten_path(@ws_root))
|
22
25
|
else
|
23
26
|
@rim_path = File.join(@ws_root, ".rim")
|
24
27
|
end
|
@@ -28,13 +31,13 @@ end
|
|
28
31
|
def module_git_path(remote_path)
|
29
32
|
# remote url without protocol specifier
|
30
33
|
# this way the local path should be unique
|
31
|
-
File.join(@rim_path, remote_path)
|
34
|
+
File.join(@rim_path, Processor.shorten_path(remote_path))
|
32
35
|
end
|
33
36
|
|
34
37
|
def module_tmp_git_path(remote_path)
|
35
38
|
# remote url without protocol specifier
|
36
39
|
# this way the local path should be unique
|
37
|
-
File.join(@rim_path, ".tmp", remote_path)
|
40
|
+
File.join(@rim_path, ".tmp", Processor.shorten_path(remote_path))
|
38
41
|
end
|
39
42
|
|
40
43
|
def remote_path(remote_url)
|
@@ -139,6 +142,10 @@ def each_module_parallel(task_desc, modules)
|
|
139
142
|
end
|
140
143
|
end
|
141
144
|
|
145
|
+
def self.shorten_path(path)
|
146
|
+
Digest::SHA1.hexdigest(path || '')[0...10]
|
147
|
+
end
|
148
|
+
|
142
149
|
end
|
143
150
|
|
144
151
|
end
|
data/lib/rim/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: esr-rim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-11-
|
12
|
+
date: 2016-11-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: subcommand
|