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 +4 -4
- data/lib/tara/archive.rb +14 -8
- data/lib/tara/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: b8bd43a87f95c54251fd0a27ad9fb00ae8a6f2c0
|
4
|
+
data.tar.gz: 37127da9f2b062b6594529db98094110e76ff7cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7d7ca8dbe189bf6f19b8b0a09d83912bc72ef33512c8b3f679942f16b53b4d17bcc8e1c1ea1b14b877d8b47e1cfb3fd4d277ff7b394a0b160896f97cf6dff57
|
7
|
+
data.tar.gz: 5c74f6978741b779b43586a0bddd8208a5560c4d82d66c4ac2ed4893bb85cd3befb5bc4ee33b634d93a7756ed2f5ad4f8f5aad0d75faa18aba84657a9e2805bb
|
data/lib/tara/archive.rb
CHANGED
@@ -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
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
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
|
-
|
135
|
-
|
136
|
-
FileUtils.
|
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)
|
data/lib/tara/version.rb
CHANGED
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.
|
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-
|
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
|