[DRE-commits] [librarian-puppet] 114/153: Issue #302 Ensure path is not lost when default specfile is used

Stig Sandbeck Mathisen ssm at debian.org
Wed Jun 1 20:30:53 UTC 2016


This is an automated email from the git hooks/post-receive script.

ssm pushed a commit to branch master
in repository librarian-puppet.

commit 74603ac39dd9bb72173ae993565a020af7bf1628
Author: Carlos Sanchez <carlos at apache.org>
Date:   Wed May 20 10:15:35 2015 +0200

    Issue #302 Ensure path is not lost when default specfile is used
    
    Upgrade librarianp
---
 lib/librarian/puppet/action/install.rb |  2 ++
 lib/librarian/puppet/action/resolve.rb |  2 ++
 librarian-puppet.gemspec               |  2 +-
 spec/action/resolve_spec.rb            | 28 ++++++++++++++++++++++++++++
 4 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/lib/librarian/puppet/action/install.rb b/lib/librarian/puppet/action/install.rb
index 1bae2a3..0db9e3e 100644
--- a/lib/librarian/puppet/action/install.rb
+++ b/lib/librarian/puppet/action/install.rb
@@ -1,3 +1,5 @@
+require 'librarian/action/install'
+
 module Librarian
   module Puppet
     module Action
diff --git a/lib/librarian/puppet/action/resolve.rb b/lib/librarian/puppet/action/resolve.rb
index 0c3cd55..9c39f6c 100644
--- a/lib/librarian/puppet/action/resolve.rb
+++ b/lib/librarian/puppet/action/resolve.rb
@@ -1,3 +1,5 @@
+require 'librarian/action/resolve'
+
 module Librarian
   module Puppet
     module Action
diff --git a/librarian-puppet.gemspec b/librarian-puppet.gemspec
index 0dbf65a..e920b90 100644
--- a/librarian-puppet.gemspec
+++ b/librarian-puppet.gemspec
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
 
   s.executables = ['librarian-puppet']
 
-  s.add_dependency "librarianp", ">=0.6.2"
+  s.add_dependency "librarianp", ">=0.6.3"
   s.add_dependency "rsync"
   s.add_dependency "puppet_forge", "~> 1.0"
 
diff --git a/spec/action/resolve_spec.rb b/spec/action/resolve_spec.rb
new file mode 100644
index 0000000..1463a7c
--- /dev/null
+++ b/spec/action/resolve_spec.rb
@@ -0,0 +1,28 @@
+require 'spec_helper'
+require_relative '../../lib/librarian/puppet/action/resolve'
+require 'librarian/ui'
+require 'thor'
+
+describe 'Librarian::Puppet::Action::Resolve' do
+
+  let(:path) { File.expand_path("../../../features/examples/test", __FILE__) }
+  let(:environment) { Librarian::Puppet::Environment.new(:project_path => path) }
+
+  before do
+    # run with DEBUG=true envvar to get debug output
+    environment.ui = Librarian::UI::Shell.new(Thor::Shell::Basic.new)
+  end
+
+  describe '#run' do
+
+    it 'should resolve dependencies' do
+      Librarian::Puppet::Action::Resolve.new(environment, :force => true).run
+      resolution = environment.lock.manifests.map { |m| {:name => m.name, :version => m.version.to_s, :source => m.source.to_s} }
+      expect(resolution.size).to eq(1)
+      expect(resolution.first[:name]).to eq("puppetlabs-stdlib")
+      expect(resolution.first[:source]).to eq("https://forgeapi.puppetlabs.com")
+      expect(resolution.first[:version]).to match(/\d+\.\d+\.\d+/)
+    end
+
+  end
+end

-- 
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