gondler 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gondler/package.rb +16 -1
- data/lib/gondler/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45263e618017e40e51601cfb428c572ca97c8df1
|
4
|
+
data.tar.gz: 770e4076efa6c87d8ccd7158507f61259e747f09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e836753f92b9e8fc7ff81447ea2e3b708169a7d64cd6e66cab9363b393adcee51e7dd22361791e93ac619729ca288a0bacbff9238c7ba95e201295c3b0802174
|
7
|
+
data.tar.gz: 1677988d148a86135fc4a58afae6fa9e14b8a6ef2781853210159edc01270e9539f9fcffe9f23c59d4a92c26a14d328372822c9e413bad06358ef61a7977c648
|
data/lib/gondler/package.rb
CHANGED
@@ -16,9 +16,10 @@ module Gondler
|
|
16
16
|
@fix = options[:fix] || false
|
17
17
|
@flag = options[:flag]
|
18
18
|
@path = options[:path]
|
19
|
+
@alternate_name = options[:alternate_name] || options[:alias_as] || options[:as]
|
19
20
|
end
|
20
21
|
|
21
|
-
attr_reader :name, :branch, :tag, :commit, :os, :group, :fix, :flag, :path
|
22
|
+
attr_reader :name, :branch, :tag, :commit, :os, :group, :fix, :flag, :path, :alternate_name
|
22
23
|
|
23
24
|
def os
|
24
25
|
case @os
|
@@ -65,6 +66,10 @@ module Gondler
|
|
65
66
|
else
|
66
67
|
get_by_package
|
67
68
|
end
|
69
|
+
|
70
|
+
if alternate_name
|
71
|
+
link_alternate_name
|
72
|
+
end
|
68
73
|
end
|
69
74
|
|
70
75
|
def checkout
|
@@ -140,5 +145,15 @@ module Gondler
|
|
140
145
|
raise InstallError.new("#{@name} download error\n" + result)
|
141
146
|
end
|
142
147
|
end
|
148
|
+
|
149
|
+
def link_alternate_name
|
150
|
+
actual_path = src_path.join(@name)
|
151
|
+
alternate_path = src_path.join(alternate_name)
|
152
|
+
|
153
|
+
alternate_path.mkpath
|
154
|
+
FileUtils.remove_entry_secure(alternate_path) unless alternate_path.symlink?
|
155
|
+
|
156
|
+
alternate_path.make_symlink(actual_path)
|
157
|
+
end
|
143
158
|
end
|
144
159
|
end
|
data/lib/gondler/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gondler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sho Kusano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -88,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
88
|
version: '0'
|
89
89
|
requirements: []
|
90
90
|
rubyforge_project:
|
91
|
-
rubygems_version: 2.
|
91
|
+
rubygems_version: 2.4.2
|
92
92
|
signing_key:
|
93
93
|
specification_version: 4
|
94
94
|
summary: bundler for golang
|