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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e1af33ae845b043ed3ed1f9dbf190d8bd05593de
4
- data.tar.gz: efe3a4d0ca603ea54370cfb3085a6cb928014d4b
3
+ metadata.gz: a29504c7126477c50bb2533eba80580e5b364944
4
+ data.tar.gz: 505641763ac6cdc8022a2eb1854946b24a618150
5
5
  SHA512:
6
- metadata.gz: a72ff1dcc89a61cd4b0531cb2e00d8d236b7aca038273a5a1cbfae3714cb45a92fb6b28f8c06402a7b3467d13873fe674ec2176537e2dcdd366c264543c71401
7
- data.tar.gz: 154e4193a9521571993d935b31d1be7491c4274321a696942cfc90c0c5eba8752abf2ef8b765995500d65f94152173ffbb3590383953240be468f18cfeb399fc
6
+ metadata.gz: 2da47a12c56d46598dbe06e5ca049aab9771da7d4dcca60147a1e1e9a8b330ab5c881e3e08905db47306385c8c2421eb047eb936c1dbaa622cce0c04fe30260c
7
+ data.tar.gz: 93cb56ac3c1e9c566801f909df296b53d7800b94c5edc17df4104bdfdc2732aec39ed25676f6cf86216d1803391eee253c5099cafea962b4d540c054e5ab1750
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rake-dependencies (0.4.0)
4
+ rake-dependencies (0.5.0)
5
5
  hamster (~> 3.0)
6
6
 
7
7
  GEM
@@ -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 = {version: version, os: os, ext: ext}
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 os
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
- case type.to_sym
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'
@@ -1,3 +1,3 @@
1
1
  module RakeDependencies
2
- VERSION = "0.4.0"
2
+ VERSION = "0.5.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake-dependencies
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toby Clemson