fpm-cookery 0.17.1 → 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG.md +9 -0
- data/lib/fpm/cookery/omnibus_packager.rb +2 -1
- data/lib/fpm/cookery/package/npm.rb +22 -0
- data/lib/fpm/cookery/package/version.rb +5 -1
- data/lib/fpm/cookery/recipe.rb +8 -2
- data/lib/fpm/cookery/version.rb +1 -1
- data/spec/package_spec.rb +1 -1
- data/spec/package_version_spec.rb +26 -3
- data/spec/recipe_spec.rb +4 -4
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
M2M5MjYyNTYzYzM3YjU4Njc4MTk1ZWZlODAxZDYzMTU5YzYwMjY3Yg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NWU4YTk1NzJkNzljNzc5MmRlNDBkOGU5YTYwMmVlYTgzYzA3M2JjNQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OTA5YTI3Yjg3NTZhODgyMmZkNGNhZmQ0Mjg3Yjc0ODI4ZmMyZmRhNGYyODdh
|
10
|
+
MDJlN2QyOWQxZWY0ZGNjMmZjNjMxNzdmZjQwYjgzMTA1NTAxMDQ5ZGI4MzBi
|
11
|
+
YjQyZmEwNDJmMWYwMDBhY2U3OWFmYTEwYWJhMTc0ZTM2ZjYwMTM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjAwMDhmMTQ5YmQzMWQ4ZWJmNDJhNjlkMTBiMzE0ZjBlM2EyN2EwOTdjOGFk
|
14
|
+
MDVmM2JmYzA5ODgyMWU1MWJkNWYxY2U3MDE0MDZjMjAzNTk3NzMyZjA1OWI2
|
15
|
+
ODM1MjY2YTY3NWFiNDcyZTM0MjE0MDJkZmFhMmQ2YzJjZWM4NDc=
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
# v0.18.0 (2014-03-01)
|
2
|
+
* Do not set a default value for the vendor attribute.
|
3
|
+
__WARNING__: This changes the default package names!
|
4
|
+
* Change package name computation regarding version, revision and vendor.
|
5
|
+
__WARNING__: This changes the default package names!
|
6
|
+
* Start default revision at 1.
|
7
|
+
* Unbreak omnibus packaging. (#64)
|
8
|
+
* Add support for npm recipes. (bracki / #65)
|
9
|
+
|
1
10
|
# v0.17.1 (2014-02-07)
|
2
11
|
* Unbreak deb package building.
|
3
12
|
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'fpm/package/npm'
|
2
|
+
require 'fpm/cookery/package/package'
|
3
|
+
|
4
|
+
module FPM
|
5
|
+
module Cookery
|
6
|
+
module Package
|
7
|
+
class NPM < FPM::Cookery::Package::Package
|
8
|
+
def fpm_object
|
9
|
+
FPM::Package::NPM.new
|
10
|
+
end
|
11
|
+
|
12
|
+
def package_setup
|
13
|
+
fpm.version = recipe.version
|
14
|
+
end
|
15
|
+
|
16
|
+
def package_input
|
17
|
+
fpm.input(recipe.name)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -1,6 +1,10 @@
|
|
1
1
|
module FPM
|
2
2
|
module Cookery
|
3
3
|
module Package
|
4
|
+
# See the following URLs for package naming conventions.
|
5
|
+
#
|
6
|
+
# * https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version
|
7
|
+
# * https://fedoraproject.org/wiki/Packaging:NamingGuidelines?rd=Packaging/NamingGuidelines#Package_Versioning
|
4
8
|
class Version
|
5
9
|
VENDOR_DELIMITER = {
|
6
10
|
:deb => '+',
|
@@ -28,7 +32,7 @@ module FPM
|
|
28
32
|
|
29
33
|
def to_s
|
30
34
|
if vendor
|
31
|
-
"#{version}#{vendor_delimiter}#{vendor}
|
35
|
+
"#{version}-#{revision}#{vendor_delimiter}#{vendor}"
|
32
36
|
else
|
33
37
|
"#{version}-#{revision}"
|
34
38
|
end
|
data/lib/fpm/cookery/recipe.rb
CHANGED
@@ -7,6 +7,7 @@ require 'fpm/cookery/utils'
|
|
7
7
|
require 'fpm/cookery/path_helper'
|
8
8
|
require 'fpm/cookery/package/dir'
|
9
9
|
require 'fpm/cookery/package/gem'
|
10
|
+
require 'fpm/cookery/package/npm'
|
10
11
|
|
11
12
|
module FPM
|
12
13
|
module Cookery
|
@@ -80,8 +81,7 @@ module FPM
|
|
80
81
|
@filename = Path.new(filename).expand_path
|
81
82
|
|
82
83
|
# Set some defaults.
|
83
|
-
|
84
|
-
revision || self.class.revision(0)
|
84
|
+
revision || self.class.revision(1)
|
85
85
|
end
|
86
86
|
|
87
87
|
def workdir=(value) @workdir = Path.new(value) end
|
@@ -145,5 +145,11 @@ module FPM
|
|
145
145
|
FPM::Cookery::Package::Gem.new(self, config)
|
146
146
|
end
|
147
147
|
end
|
148
|
+
|
149
|
+
class NPMRecipe < BaseRecipe
|
150
|
+
def input(config)
|
151
|
+
FPM::Cookery::Package::NPM.new(self, config)
|
152
|
+
end
|
153
|
+
end
|
148
154
|
end
|
149
155
|
end
|
data/lib/fpm/cookery/version.rb
CHANGED
data/spec/package_spec.rb
CHANGED
@@ -90,10 +90,22 @@ describe 'Version' do
|
|
90
90
|
describe '#to_s' do
|
91
91
|
it 'returns a string representation of the version' do
|
92
92
|
recipe.version = '2.1.3'
|
93
|
-
recipe.vendor = '
|
93
|
+
recipe.vendor = 'testing1'
|
94
94
|
recipe.revision = 5
|
95
95
|
|
96
|
-
version.to_s.must_equal '2.1.3+
|
96
|
+
version.to_s.must_equal '2.1.3-5+testing1'
|
97
|
+
end
|
98
|
+
|
99
|
+
context 'with target rpm' do
|
100
|
+
def target; 'rpm'; end
|
101
|
+
|
102
|
+
it 'returns a string representation of the version' do
|
103
|
+
recipe.version = '2.1.3'
|
104
|
+
recipe.vendor = 'testing1'
|
105
|
+
recipe.revision = 5
|
106
|
+
|
107
|
+
version.to_s.must_equal '2.1.3-5.testing1'
|
108
|
+
end
|
97
109
|
end
|
98
110
|
|
99
111
|
context 'without vendor' do
|
@@ -103,6 +115,17 @@ describe 'Version' do
|
|
103
115
|
|
104
116
|
version.to_s.must_equal '2.1.3-5'
|
105
117
|
end
|
118
|
+
|
119
|
+
context 'with target rpm' do
|
120
|
+
def target; 'rpm'; end
|
121
|
+
|
122
|
+
it 'returns a string representation of the version' do
|
123
|
+
recipe.version = '2.1.3'
|
124
|
+
recipe.revision = 5
|
125
|
+
|
126
|
+
version.to_s.must_equal '2.1.3-5'
|
127
|
+
end
|
128
|
+
end
|
106
129
|
end
|
107
130
|
end
|
108
131
|
|
@@ -114,7 +137,7 @@ describe 'Version' do
|
|
114
137
|
recipe.vendor = 'foo'
|
115
138
|
recipe.revision = 1
|
116
139
|
|
117
|
-
version.to_str.must_equal '1.3.
|
140
|
+
version.to_str.must_equal '1.3-1.foo'
|
118
141
|
end
|
119
142
|
end
|
120
143
|
end
|
data/spec/recipe_spec.rb
CHANGED
@@ -119,8 +119,8 @@ describe "Recipe" do
|
|
119
119
|
check_attribute(:revision, '12')
|
120
120
|
end
|
121
121
|
|
122
|
-
it "sets a default revision" do
|
123
|
-
recipe.revision.must_equal
|
122
|
+
it "sets a default revision of 1" do
|
123
|
+
recipe.revision.must_equal 1
|
124
124
|
end
|
125
125
|
end
|
126
126
|
|
@@ -141,8 +141,8 @@ describe "Recipe" do
|
|
141
141
|
check_attribute(:vendor, 'myvendor')
|
142
142
|
end
|
143
143
|
|
144
|
-
it "
|
145
|
-
recipe.vendor.must_equal
|
144
|
+
it "does not set a default vendor" do
|
145
|
+
recipe.vendor.must_equal nil
|
146
146
|
end
|
147
147
|
end
|
148
148
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fpm-cookery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bernd Ahlers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -143,6 +143,7 @@ files:
|
|
143
143
|
- lib/fpm/cookery/package/dir.rb
|
144
144
|
- lib/fpm/cookery/package/gem.rb
|
145
145
|
- lib/fpm/cookery/package/maintainer.rb
|
146
|
+
- lib/fpm/cookery/package/npm.rb
|
146
147
|
- lib/fpm/cookery/package/package.rb
|
147
148
|
- lib/fpm/cookery/package/version.rb
|
148
149
|
- lib/fpm/cookery/packager.rb
|
@@ -228,7 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
228
229
|
version: '0'
|
229
230
|
requirements: []
|
230
231
|
rubyforge_project: fpm-cookery
|
231
|
-
rubygems_version: 2.2.
|
232
|
+
rubygems_version: 2.2.2
|
232
233
|
signing_key:
|
233
234
|
specification_version: 4
|
234
235
|
summary: A tool for building software packages with fpm.
|