pre-packager 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-gemset +1 -1
- data/README.md +2 -0
- data/e2e/idea-14.rb +12 -13
- data/lib/pre-packager.rb +8 -4
- data/lib/pre-packager/version.rb +1 -1
- data/pre-packager.gemspec +1 -0
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 164b0dfc0cb280890a07cdaa5ce3c3f682f69fdf
|
4
|
+
data.tar.gz: 009561bf7f4b253b4edef3f2ceb6c63943a8e660
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2ae1409edeec63e1e172e4c97f5dd2578adc22cf8f9b3890134034cba3932368d4525c75b2ef7d4fd7ed72f0a083d1c1a26f1455cf571d3d6fbb27e14fb23c0
|
7
|
+
data.tar.gz: a23436aa97803ad5843b1b5f1090f5ae140d5f0464d61ffcd2ef96ffc0cea6c87ee55a4e12e4a351b7af79242d0f7c0c5321cee99fe15192158dd7cd35dbbbbe
|
data/.ruby-gemset
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
pre-packager
|
data/README.md
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
# Pre-Packager
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/pre-packager.svg)](http://badge.fury.io/rb/pre-packager)
|
3
|
+
[![CI](https://magnum-ci.com/status/42b45d01d68f077a9728a6d4d1f4ec37.png)](https://magnum-ci.com/projects/2192)
|
2
4
|
|
3
5
|
Creates directory structure for linux applications
|
4
6
|
|
data/e2e/idea-14.rb
CHANGED
@@ -3,17 +3,16 @@
|
|
3
3
|
require 'pre-packager'
|
4
4
|
include PrePackager
|
5
5
|
Application.new(name: 'ideaIC-$version',
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
maintainer: 'Gonzalo Matheu <gonzalommj@gmail.com>')
|
6
|
+
version: '14',
|
7
|
+
minor_version: '0.2').
|
8
|
+
download_from 'https://gitlab.com/gmatheu/pre-packager/raw/master/mock-files/$name.$minor_version.tar.gz' do |p|
|
9
|
+
p.extract('/opt', strip: 1, use_name: true) do |content|
|
10
|
+
content.link 'bin/idea.sh', use_name: true
|
11
|
+
end
|
12
|
+
end.
|
13
|
+
with_templates('idea-14-templates/*', '/usr/local/share/applications').
|
14
|
+
create_package(dry_run: true,
|
15
|
+
version: '$version.$minor_version',
|
16
|
+
description: 'IntelliJ Idea $version Community Edition',
|
17
|
+
maintainer: 'Gonzalo Matheu <gonzalommj@gmail.com>')
|
19
18
|
|
data/lib/pre-packager.rb
CHANGED
@@ -20,7 +20,10 @@ module PrePackager
|
|
20
20
|
@@LOGGER = Logger.new
|
21
21
|
def execute cmd
|
22
22
|
@@LOGGER.info "Executing: #{cmd}"
|
23
|
-
`#{cmd}`
|
23
|
+
out = `#{cmd}`
|
24
|
+
if $? != 0
|
25
|
+
@@LOGGER.info "Output: #{out}"
|
26
|
+
end
|
24
27
|
end
|
25
28
|
end
|
26
29
|
|
@@ -51,9 +54,10 @@ module PrePackager
|
|
51
54
|
target = File.join @context.base, @context.name, file
|
52
55
|
linkname = Pathname.new(file).basename.to_s
|
53
56
|
linkname = @context.name if options[:use_name]
|
54
|
-
|
57
|
+
create_link = proc { |name| File.join link_base, name}
|
55
58
|
|
56
|
-
execute "ln -sf #{target} #{
|
59
|
+
execute "ln -sf #{target} #{create_link.call(linkname)}"
|
60
|
+
execute("ln -sf #{linkname} #{create_link.call(options[:alias])}") if options[:alias]
|
57
61
|
# File.symlink File.join(file), File.join(@path, @@LINK_BASE_DEFAULT, link)
|
58
62
|
end
|
59
63
|
end
|
@@ -139,7 +143,7 @@ module PrePackager
|
|
139
143
|
valid_fields = Proc.new { |k, v| @@VALID_FIELDS.include? k}
|
140
144
|
compose_field = Proc.new { |k, v| %Q|--#{k} "#{v}"|}
|
141
145
|
fields = opts.
|
142
|
-
|
146
|
+
select(&valid_fields).
|
143
147
|
map(&compose_field).
|
144
148
|
join ' '
|
145
149
|
cmd = interpolate %Q|
|
data/lib/pre-packager/version.rb
CHANGED
data/pre-packager.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pre-packager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gonzalo Matheu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -122,6 +122,20 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: fpm
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
125
139
|
description: 'Provides a DSL to create directories, files and links structure from
|
126
140
|
different sources (e.g: tar.gz, templates)'
|
127
141
|
email:
|
@@ -168,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
182
|
version: '0'
|
169
183
|
requirements: []
|
170
184
|
rubyforge_project:
|
171
|
-
rubygems_version: 2.4.
|
185
|
+
rubygems_version: 2.4.8
|
172
186
|
signing_key:
|
173
187
|
specification_version: 4
|
174
188
|
summary: Creates directory structure for linux applications
|