vanagon 0.5.4 → 0.5.5

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: d9ab396670efad7619b917bf141a6663f46b263c
4
- data.tar.gz: 434efe6733bca07c8784502bb4d4191cd0af42cb
3
+ metadata.gz: fcd5e7e5f1f39f1955e66d77c281857454889a32
4
+ data.tar.gz: e8c58b0be17f84d4c3c589ddadc99375e05b5bb3
5
5
  SHA512:
6
- metadata.gz: 1a0b2555e93cc7f808b53f58ce5d2a98709e99ebb1775ccaeaf9c8625d7255793e3f4179673ff567816982c8a952b5477bcde76e4056b654854e59014906f53e
7
- data.tar.gz: 5b4be2a7a70c6452ad19cca584488b7e9eb77f03504d310b68fd934b53b3a8eb67167af5dc625f3cd4242c4a7e219f7b732f70917398f3848d122bee7d3fa883
6
+ metadata.gz: 2989af2711e652f63fa38ef1a47789c6873b8e9646d95724d2e35e2b53849067d9cd555650386c9bd34dc9debadf530253da7f0ccef3d09a1f56d0b7fd9dbf25
7
+ data.tar.gz: 18da216b1b93412c6271433db131928a625168b1345e2a2817538f6ee45da86fc96a9bec0217098d1b08ac26d8738a40ae954ce4b7e8d336785106a03412cad6
@@ -7,7 +7,6 @@ class Vanagon
7
7
  # @return [Array] list of commands required to build a debian package for the given project from a tarball
8
8
  def generate_package(project)
9
9
  target_dir = project.repo ? output_dir(project.repo) : output_dir
10
- pkg_arch_opt = project.noarch ? "" : "-a #{@architecture}"
11
10
  ["mkdir -p output/#{target_dir}",
12
11
  "mkdir -p $(tempdir)/#{project.name}-#{project.version}",
13
12
  "cp #{project.name}-#{project.version}.tar.gz $(tempdir)/#{project.name}_#{project.version}.orig.tar.gz",
@@ -15,7 +14,7 @@ class Vanagon
15
14
  "cp -pr debian $(tempdir)/#{project.name}-#{project.version}",
16
15
  "gunzip -c #{project.name}-#{project.version}.tar.gz | '#{@tar}' -C '$(tempdir)/#{project.name}-#{project.version}' --strip-components 1 -xf -",
17
16
  "sed -i 's/\ /?/g' $(tempdir)/#{project.name}-#{project.version}/debian/install",
18
- "(cd $(tempdir)/#{project.name}-#{project.version}; debuild --no-lintian #{pkg_arch_opt} -uc -us)",
17
+ "(cd $(tempdir)/#{project.name}-#{project.version}; debuild --no-lintian -uc -us)",
19
18
  "cp $(tempdir)/*.deb ./output/#{target_dir}"]
20
19
  end
21
20
 
@@ -402,6 +402,14 @@ class Vanagon
402
402
  string
403
403
  end
404
404
 
405
+ # Grab only the first three values from the version input
406
+ # and strip off any non-digit characters.\
407
+ #
408
+ # @param [string] version, the original version number
409
+ def windows_style_version(version)
410
+ version.split("\.").first(3).collect { |value| value.gsub(/[^0-9]/, '') }.join("\.")
411
+ end
412
+
405
413
  # Constructor. Sets up some defaults for the windows platform and calls the parent constructor
406
414
  #
407
415
  # Mingw varies on where it is installed based on architecture. We want to use which ever is on the system.
@@ -68,6 +68,15 @@ HERE
68
68
  end
69
69
  end
70
70
 
71
+ describe '#windows_style_version' do
72
+ it "returns first three digits only" do
73
+ expect(cur_plat._platform.windows_style_version("1.0.0.1")).to eq("1.0.0")
74
+ end
75
+
76
+ it "returns only numbers" do
77
+ expect(cur_plat._platform.windows_style_version("1.0.g0")).to eq("1.0.0")
78
+ end
79
+ end
71
80
  describe '#generate_msi_packaging_artifacts' do
72
81
  before(:each) do
73
82
  # Create Workdir and temp root directory
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vanagon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet Labs