autorake 2.8.1 → 2.9

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
  SHA256:
3
- metadata.gz: 5c32841ff7f2a78a6fcf4f80036bd4b1e2013fcfffb0c9474a88df682e0c10ed
4
- data.tar.gz: cd3b791d503c01f8d83ddc496c25304587e367ed2152ac2157a81dfc4e71e329
3
+ metadata.gz: c5d0a7d0862bed88298011f8bddf831d7fa1fddd299a6391f3def09c3e0cb423
4
+ data.tar.gz: 7d53c80981ddebbe568343a20e5af274469292daa0b1194598268d6418bc22e4
5
5
  SHA512:
6
- metadata.gz: 22c42165831f9e3d4fe79bbae2eacc557cf041c27247ddc48f0a3f7d81e55d0566c6e6689d18c64744a4ceb735929181216d9838a606e384566f3adc7f262ed6
7
- data.tar.gz: ea5209365fdb74a64c583729f6628fc1bcf4f7d316c9be05acff402f9ebce85b493746dceeb1f546b8b5826c0b94b8f86c8b25c54c00ef8faa70c08161bf5b7a
6
+ metadata.gz: 6784ce0de8674fc6c675aff22a2a2e727ae89a3694a99a95700c45d2280542a007029a9c6f5c2cb1c171086f3de68544340d5bdabb320aeb08fbdce923324825
7
+ data.tar.gz: b86d180a59eea1a4ca2ff901b3cac755d72e979a1d9b89c81eb65de07a0488d43baf34f440751c25d4e000ec7941a6adc1382c08e323cc958e1aee65052c00fe
data/LICENSE CHANGED
@@ -5,7 +5,7 @@
5
5
  /_/ \_\__,_|\__\___/|_| \__,_|_|\_\___|
6
6
 
7
7
 
8
- Copyright (c) 2009-2016, Bertram Scharpf <software@bertram-scharpf.de>.
8
+ Copyright (c) 2009-2019, Bertram Scharpf <software@bertram-scharpf.de>.
9
9
  All rights reserved.
10
10
 
11
11
  Redistribution and use in source and binary forms, with or without
@@ -33,8 +33,8 @@ module Autorake
33
33
  @autorake.parameters
34
34
  end
35
35
 
36
- def expand dir
37
- @autorake.directories.expand dir
36
+ def expand dir, file = nil
37
+ @autorake.directories.expand dir, file
38
38
  end
39
39
 
40
40
  def compiler *args
@@ -51,15 +51,16 @@ module Autorake
51
51
  when nil, Hash then
52
52
  under, files, destdir, params = nil, under, files, destdir
53
53
  end
54
- destdir = @autorake.directories.expand destdir
54
+ destdir = expand destdir
55
55
  d = ENV[ "DESTDIR"]
56
56
  if d then
57
57
  d = File.expand_path d
58
58
  destdir = File.join d, destdir
59
59
  end
60
- files = case files
61
- when Array then files
62
- else [ files]
60
+ case files
61
+ when Array then
62
+ when nil then files = []
63
+ else files = [ files]
63
64
  end
64
65
  unless @autorake_install then
65
66
  task :install do install_targets end
@@ -88,6 +89,8 @@ module Autorake
88
89
  def uninstall_targets
89
90
  @autorake_install.reverse.each { |under,files,destdir,params|
90
91
  files.each { |f| uninstall under, f, destdir, params, 0 }
92
+ File.directory? destdir and (dir_entries destdir).empty? and
93
+ rmdir destdir
91
94
  }
92
95
  end
93
96
 
@@ -40,12 +40,18 @@ module Autorake
40
40
  expand self[ key]
41
41
  end
42
42
 
43
- def expand dir
44
- case dir
45
- when /\A[A-Z_]+/ then (expand self[ $&.downcase]) + $'
46
- when /\A:(\w+)/ then (expand self[ $1 ]) + $'
47
- when /\A~/ then File.expand_path dir
48
- else dir
43
+ def expand dir, file = nil
44
+ if file then
45
+ dir = expand dir
46
+ File.join dir, file
47
+ else
48
+ case dir
49
+ when /\A[A-Z_0-9]+/ then (expand self[ $&.downcase]) + $'
50
+ when /\A:(\w+)/ then (expand self[ $1 ]) + $'
51
+ when /\A!/ then `#$'`[ /.*/]
52
+ when /\A~/ then File.expand_path dir
53
+ else dir
54
+ end
49
55
  end
50
56
  end
51
57
 
@@ -5,7 +5,7 @@
5
5
  module Autorake
6
6
 
7
7
  NAME = "autorake"
8
- VERSION = "2.8.1".freeze
8
+ VERSION = "2.9".freeze
9
9
  SUMMARY = "Automake like project config before Rake build or install."
10
10
 
11
11
  DESCRIPTION = <<EOT
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autorake
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.1
4
+ version: '2.9'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bertram Scharpf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-15 00:00:00.000000000 Z
11
+ date: 2019-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake