rake-dependencies 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/rake_dependencies/tasks/download.rb +15 -4
- data/lib/rake_dependencies/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a29504c7126477c50bb2533eba80580e5b364944
|
4
|
+
data.tar.gz: 505641763ac6cdc8022a2eb1854946b24a618150
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2da47a12c56d46598dbe06e5ca049aab9771da7d4dcca60147a1e1e9a8b330ab5c881e3e08905db47306385c8c2421eb047eb936c1dbaa622cce0c04fe30260c
|
7
|
+
data.tar.gz: 93cb56ac3c1e9c566801f909df296b53d7800b94c5edc17df4104bdfdc2732aec39ed25676f6cf86216d1803391eee253c5099cafea962b4d540c054e5ab1750
|
data/Gemfile.lock
CHANGED
@@ -9,10 +9,11 @@ module RakeDependencies
|
|
9
9
|
|
10
10
|
parameter :name, default: :download
|
11
11
|
parameter :type, default: :zip
|
12
|
+
parameter :os_ids, default: {mac: 'mac', linux: 'linux'}
|
12
13
|
parameter :directory, default: 'dist'
|
14
|
+
parameter :version
|
13
15
|
parameter :path, required: true
|
14
16
|
parameter :dependency, required: true
|
15
|
-
parameter :version, required: true
|
16
17
|
parameter :uri_template, required: true
|
17
18
|
parameter :file_name_template, required: true
|
18
19
|
|
@@ -24,7 +25,12 @@ module RakeDependencies
|
|
24
25
|
def define
|
25
26
|
desc "Download #{dependency} distribution"
|
26
27
|
task name do
|
27
|
-
parameters = {
|
28
|
+
parameters = {
|
29
|
+
version: version,
|
30
|
+
platform: platform,
|
31
|
+
os_id: os_id,
|
32
|
+
ext: ext
|
33
|
+
}
|
28
34
|
|
29
35
|
uri = Template.new(uri_template)
|
30
36
|
.with_parameters(parameters)
|
@@ -44,12 +50,17 @@ module RakeDependencies
|
|
44
50
|
|
45
51
|
private
|
46
52
|
|
47
|
-
def
|
53
|
+
def os_id
|
54
|
+
os_ids[platform]
|
55
|
+
end
|
56
|
+
|
57
|
+
def platform
|
48
58
|
RUBY_PLATFORM =~ /darwin/ ? :mac : :linux
|
49
59
|
end
|
50
60
|
|
51
61
|
def ext
|
52
|
-
|
62
|
+
resolved_type = type.is_a?(Hash) ? type[platform].to_sym : type.to_sym
|
63
|
+
case resolved_type
|
53
64
|
when :tar_gz then '.tar.gz'
|
54
65
|
when :tgz then '.tgz'
|
55
66
|
when :zip then '.zip'
|