[DRE-commits] [librarian-puppet] 37/97: Issue #94 Error if a git module has a dependency without version
Stig Sandbeck Mathisen
ssm at debian.org
Tue Mar 11 12:12:49 UTC 2014
This is an automated email from the git hooks/post-receive script.
ssm pushed a commit to branch master
in repository librarian-puppet.
commit 0e558d8a9e6d09a31ce33c5259d0cd36bd1c0463
Author: Carlos Sanchez <csanchez at maestrodev.com>
Date: Wed Dec 11 12:06:51 2013 +0100
Issue #94 Error if a git module has a dependency without version
Add test
---
.../examples/dependency_without_version/Modulefile | 7 ++++++
.../dependency_without_version/manifests/init.pp | 1 +
features/install.feature | 25 ++++++++++++++++++++++
lib/librarian/puppet/requirement.rb | 2 +-
4 files changed, 34 insertions(+), 1 deletion(-)
diff --git a/features/examples/dependency_without_version/Modulefile b/features/examples/dependency_without_version/Modulefile
new file mode 100644
index 0000000..d55e042
--- /dev/null
+++ b/features/examples/dependency_without_version/Modulefile
@@ -0,0 +1,7 @@
+name 'librarian-test'
+version '0.0.1'
+
+author 'librarian'
+license 'Apache License, Version 2.0'
+
+dependency 'puppetlabs/stdlib'
diff --git a/features/examples/dependency_without_version/manifests/init.pp b/features/examples/dependency_without_version/manifests/init.pp
new file mode 100644
index 0000000..e2be432
--- /dev/null
+++ b/features/examples/dependency_without_version/manifests/init.pp
@@ -0,0 +1 @@
+class test {}
diff --git a/features/install.feature b/features/install.feature
index bf17686..274e058 100644
--- a/features/install.feature
+++ b/features/install.feature
@@ -209,3 +209,28 @@ Feature: cli/install
Then the exit status should be 0
And the file "modules/test/Modulefile" should match /version *'0\.0\.1'/
And a file named "modules/stdlib/Modulefile" should exist
+
+ @slow
+ Scenario: Install a module from the Forge with dependencies without version
+ Given a file named "Puppetfile" with:
+ """
+ forge "http://forge.puppetlabs.com"
+
+ mod 'sbadia/gitlab', '0.1.0'
+ """
+ When I run `librarian-puppet install`
+ Then the exit status should be 0
+ And the file "modules/gitlab/Modulefile" should match /version *'0\.1\.0'/
+
+ @veryslow
+ Scenario: Install a module from git without version
+ Given PENDING a file named "Puppetfile" with:
+ """
+ forge "http://forge.puppetlabs.com"
+
+ mod 'test', :git => 'https://github.com/rodjek/librarian-puppet.git', :path => 'features/examples/dependency_without_version'
+ """
+ When I run `librarian-puppet install`
+ Then the exit status should be 0
+ And the file "modules/test/Modulefile" should match /version *'0\.0\.1'/
+ And a file named "modules/stdlib/Modulefile" should exist
diff --git a/lib/librarian/puppet/requirement.rb b/lib/librarian/puppet/requirement.rb
index 8495e66..e5723c0 100644
--- a/lib/librarian/puppet/requirement.rb
+++ b/lib/librarian/puppet/requirement.rb
@@ -4,7 +4,7 @@ module Librarian
attr_reader :requirement
def initialize(requirement)
- @requirement = requirement
+ @requirement = requirement || ">=0"
end
def gem_requirement
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/librarian-puppet.git
More information about the Pkg-ruby-extras-commits
mailing list