rake-dependencies 0.11.0 → 0.12.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 +2 -2
- data/lib/rake_dependencies/extractors.rb +18 -0
- data/lib/rake_dependencies/tasks/extract.rb +11 -3
- data/lib/rake_dependencies/version.rb +1 -1
- 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: 2ff65bfc4918357d1ba9f2679e284844c69e29e1
|
4
|
+
data.tar.gz: a74522d733072042ccfb815e3947da3e62f74bbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8324420ca1ff88939abd9bac3f4e02a58575ce2b463fa1e5df1010374e417fee845fc4756fcbb63d4f9bed5439d3318a286cd05891cc9b4f70d6eb4f8fa980e8
|
7
|
+
data.tar.gz: b42c573042d847669d4a5b3fa8f6c9613beb623a3d1ced1a94c5bed42d7ffa1f1e2783e1d7a924c2ae489163daae80b6fc0eace732ad97f2d855ff506afa4876
|
data/Gemfile.lock
CHANGED
@@ -53,5 +53,23 @@ module RakeDependencies
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
end
|
56
|
+
|
57
|
+
class UncompressedExtractor
|
58
|
+
def initialize(file_path, extract_path, options = {})
|
59
|
+
@file_path = file_path
|
60
|
+
@extract_path = extract_path
|
61
|
+
@options = options
|
62
|
+
end
|
63
|
+
|
64
|
+
def extract
|
65
|
+
target_name = @options[:rename_to] || File.basename(@file_path)
|
66
|
+
source = @file_path
|
67
|
+
destination = File.join(@extract_path, target_name)
|
68
|
+
|
69
|
+
FileUtils.mkdir_p(@extract_path)
|
70
|
+
FileUtils.cp(source, destination)
|
71
|
+
FileUtils.chmod(0755, destination)
|
72
|
+
end
|
73
|
+
end
|
56
74
|
end
|
57
75
|
end
|
@@ -16,7 +16,8 @@ module RakeDependencies
|
|
16
16
|
parameter :extractors, default: {
|
17
17
|
zip: Extractors::ZipExtractor,
|
18
18
|
tar_gz: Extractors::TarGzExtractor,
|
19
|
-
tgz: Extractors::TarGzExtractor
|
19
|
+
tgz: Extractors::TarGzExtractor,
|
20
|
+
uncompressed: Extractors::UncompressedExtractor
|
20
21
|
}
|
21
22
|
|
22
23
|
parameter :distribution_directory, default: 'dist'
|
@@ -26,6 +27,7 @@ module RakeDependencies
|
|
26
27
|
parameter :version
|
27
28
|
parameter :path, required: true
|
28
29
|
parameter :file_name_template, required: true
|
30
|
+
parameter :target_name_template
|
29
31
|
parameter :strip_path_template
|
30
32
|
|
31
33
|
def process_arguments args
|
@@ -55,8 +57,14 @@ module RakeDependencies
|
|
55
57
|
options = {}
|
56
58
|
if strip_path_template
|
57
59
|
options[:strip_path] = Template.new(strip_path_template)
|
58
|
-
|
59
|
-
|
60
|
+
.with_parameters(parameters)
|
61
|
+
.render
|
62
|
+
end
|
63
|
+
|
64
|
+
if target_name_template
|
65
|
+
options[:rename_to] = Template.new(target_name_template)
|
66
|
+
.with_parameters(parameters)
|
67
|
+
.render
|
60
68
|
end
|
61
69
|
|
62
70
|
extractor = extractor_for_extension.new(
|
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
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toby Clemson
|
@@ -204,7 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
204
204
|
version: '0'
|
205
205
|
requirements: []
|
206
206
|
rubyforge_project:
|
207
|
-
rubygems_version: 2.
|
207
|
+
rubygems_version: 2.0.14.1
|
208
208
|
signing_key:
|
209
209
|
specification_version: 4
|
210
210
|
summary: Rake tasks for managing build dependencies.
|