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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9a6d95d252b343928e14b11b002f0a9d8c00117d
4
- data.tar.gz: 8c8a61fa126e4ebb6b7c68ed1ebcbc1196c4848c
3
+ metadata.gz: 2ff65bfc4918357d1ba9f2679e284844c69e29e1
4
+ data.tar.gz: a74522d733072042ccfb815e3947da3e62f74bbe
5
5
  SHA512:
6
- metadata.gz: a7aae3fb751c26ca1313235705003b5d5d71c695afdfd8a64fab8884ce7be58819ca494889991d3e94fbc67a83ce343f19b81eff41a0ae74001ea82cf75fd078
7
- data.tar.gz: ea2d0da7e008a6ec29881a7b0cf2e953dc25ae6779b8982a06db80bdfeb17a354787bc4c68f7be72858804c9b93c92632d4a2b6d16884fb6f55e8a16c3e274a1
6
+ metadata.gz: 8324420ca1ff88939abd9bac3f4e02a58575ce2b463fa1e5df1010374e417fee845fc4756fcbb63d4f9bed5439d3318a286cd05891cc9b4f70d6eb4f8fa980e8
7
+ data.tar.gz: b42c573042d847669d4a5b3fa8f6c9613beb623a3d1ced1a94c5bed42d7ffa1f1e2783e1d7a924c2ae489163daae80b6fc0eace732ad97f2d855ff506afa4876
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rake-dependencies (0.11.0)
4
+ rake-dependencies (0.12.0)
5
5
  hamster (~> 3.0)
6
6
  minitar (~> 0.6)
7
7
  rubyzip (~> 1.1)
@@ -64,4 +64,4 @@ DEPENDENCIES
64
64
  simplecov (~> 0.13)
65
65
 
66
66
  BUNDLED WITH
67
- 1.14.3
67
+ 1.14.5
@@ -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
- .with_parameters(parameters)
59
- .render
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(
@@ -1,3 +1,3 @@
1
1
  module RakeDependencies
2
- VERSION = "0.11.0"
2
+ VERSION = "0.12.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.11.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.6.6
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.