tara 0.2.0 → 0.3.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: b6ef9fe204be70664e2bbbfe3233e05e90a7f937
4
- data.tar.gz: 843fe69f1d2c59112dd1c727ee9e5e0aa4ac8bf6
3
+ metadata.gz: b8bd43a87f95c54251fd0a27ad9fb00ae8a6f2c0
4
+ data.tar.gz: 37127da9f2b062b6594529db98094110e76ff7cd
5
5
  SHA512:
6
- metadata.gz: 82977fc6aacec266f7ce3a4a525cbe42029a1bdc3ec6c2533aa26406c3e3e27a668b55cb2f1dd4333b425b7d9d62dd8be68c85896d9863c1b09f800efbf8f7bb
7
- data.tar.gz: ec39e9ef990d76d91b252db3cfa8186f6a38e3108fe9db65896b9c1c28bd43a028e2f0d645edc370930bdd9a81cd3429fad531365fe1d78ccfbe00392e71bb25
6
+ metadata.gz: b7d7ca8dbe189bf6f19b8b0a09d83912bc72ef33512c8b3f679942f16b53b4d17bcc8e1c1ea1b14b877d8b47e1cfb3fd4d277ff7b394a0b160896f97cf6dff57
7
+ data.tar.gz: 5c74f6978741b779b43586a0bddd8208a5560c4d82d66c4ac2ed4893bb85cd3befb5bc4ee33b634d93a7756ed2f5ad4f8f5aad0d75faa18aba84657a9e2805bb
@@ -108,10 +108,12 @@ module Tara
108
108
  def copy_executables(project_dir, package_dir)
109
109
  @config[:executables].each do |executable_glob|
110
110
  Pathname.glob(project_dir.join(executable_glob)).each do |executable|
111
- copy_file(project_dir, package_dir, executable)
112
- FileUtils.chmod(0755, package_dir.join(executable))
113
- relative_executable = executable.relative_path_from(project_dir)
114
- create_exec_wrapper(package_dir, relative_executable)
111
+ if executable.file?
112
+ copy_file(project_dir, package_dir, executable)
113
+ FileUtils.chmod(0755, package_dir.join(executable))
114
+ relative_executable = executable.relative_path_from(project_dir)
115
+ create_exec_wrapper(package_dir, relative_executable)
116
+ end
115
117
  end
116
118
  end
117
119
  end
@@ -131,11 +133,15 @@ module Tara
131
133
  end
132
134
 
133
135
  def copy_file(project_dir, package_dir, file)
134
- rel_file = file.relative_path_from(project_dir)
135
- unless rel_file.dirname == DOT_PATH
136
- FileUtils.mkdir_p(package_dir.join(rel_file.dirname))
136
+ relative_file = file.relative_path_from(project_dir)
137
+ if relative_file.directory?
138
+ FileUtils.cp_r(file, package_dir.join(relative_file))
139
+ else
140
+ unless (dirname = relative_file.dirname) == DOT_PATH
141
+ FileUtils.mkdir_p(package_dir.join(dirname))
142
+ end
143
+ FileUtils.cp(file, package_dir.join(relative_file))
137
144
  end
138
- FileUtils.cp(project_dir.join(rel_file), package_dir.join(rel_file))
139
145
  end
140
146
 
141
147
  def create_exec_wrapper(package_dir, executable)
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Tara
4
- VERSION = '0.2.0'
4
+ VERSION = '0.3.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tara
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mathias Söderberg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-24 00:00:00.000000000 Z
11
+ date: 2015-04-25 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Tara packs your Ruby app into a standalone archive with gems and a Ruby
14
14
  runtime