Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 8 additions & 18 deletions .gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ end

Gem::Specification.new do |s|
s.name = "puppet"
version = Puppet.version
mdata = version.match(/(\d+\.\d+\.\d+)/)
s.version = mdata ? mdata[1] : version
#version = Puppet.version
#mdata = version.match(/(\d+\.\d+\.\d+)/)
#s.version = mdata ? mdata[1] : version
# Hard code this here otherwise bundler doesn't always like it
s.version = '3.8.7.stpst.6'

s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
s.authors = ["Puppet Labs"]
Expand All @@ -34,21 +36,9 @@ Gem::Specification.new do |s|
s.homepage = "http://puppetlabs.com"
s.rdoc_options = ["--title", "Puppet - Configuration Management", "--main", "README", "--line-numbers"]
s.require_paths = ["lib"]
s.rubyforge_project = "puppet"
#s.rubyforge_project = "puppet"
s.summary = "Puppet, an automated configuration management tool"

if s.respond_to? :specification_version then
s.specification_version = 3

if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<facter>, [">= 1.7", "< 3"])
s.add_runtime_dependency(%q<hiera>, [">= 1.0", "< 3"])
else
s.add_dependency(%q<facter>, [">= 1.7", "< 3"])
s.add_dependency(%q<hiera>, [">= 1.0", "< 3"])
end
else
s.add_dependency(%q<facter>, [">= 1.7", "< 3"])
s.add_dependency(%q<hiera>, [">= 1.0", "< 3"])
end
s.add_dependency(%q<facter>, '2.5.7.stpst.1')
s.add_dependency(%q<hiera>, '1.3.4')
end
39 changes: 18 additions & 21 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ platforms :ruby do
gem 'pry', :group => :development
gem 'yard', :group => :development
gem 'redcarpet', '~> 2.0', :group => :development
gem "racc", "1.4.9", :group => :development
gem "racc", "1.4.16", :group => :development

# To enable the augeas feature, use this gem.
# Note that it is a native gem, so the augeas headers/libs
Expand All @@ -26,19 +26,19 @@ end
if !ENV['PUPPET_LOADED']
gem "puppet", :path => File.dirname(__FILE__), :require => false
end
gem "facter", *location_for(ENV['FACTER_LOCATION'] || ['> 1.6', '< 3'])
gem "hiera", *location_for(ENV['HIERA_LOCATION'] || '~> 1.0')
gem "rake", "10.1.1", :require => false
gem 'facter', '2.5.7.stpst.1', git: '[email protected]:nedap/facter', :tag => "2.5.7.stpst.1"
gem "hiera", '1.3.4'
gem "rake", "12.3.3", :require => false
gem "syck", '1.4.0'
gem "sync", '0.5.0'
gem "scanf", '1.0.0'

group(:development, :test) do
gem "rspec", "~> 2.14.0", :require => false

# Mocha is not compatible across minor version changes; because of this only
# versions matching ~> 0.10.5 are supported. All other versions are unsupported
# and can be expected to fail.
gem "mocha", "~> 0.10.5", :require => false

gem "rspec", "~> 3.9.0", :require => false
gem "mocha", :require => false
gem "yarjuf", "~> 1.0"
gem "xmlrpc"
gem "net-telnet"

# json-schema does not support windows, so omit it from the platforms list
# json-schema uses multi_json, but chokes with multi_json 1.7.9, so prefer 1.7.7
Expand All @@ -58,18 +58,15 @@ group(:development) do
end

group(:extra) do
gem "rack", "~> 1.4", :require => false
gem "activerecord", '~> 3.2', :require => false
# this pin for i18n should *not* be in the puppet-4+ branches
# it's solely here because activerecord pulls in i18n and i18n
# was recently updated to require 1.9.3 which breaks 1.8.7 specs
gem "i18n", '~> 0.6.11', :require => false
gem "couchrest", '~> 1.0', :require => false
gem "net-ssh", '~> 2.1', :require => false
gem "puppetlabs_spec_helper", :require => false
gem "rack", "~> 1.6", :require => false
gem "activerecord", :require => false
gem "i18n", :require => false
gem "couchrest", :require => false
gem "net-ssh", '~> 4.2.0', :require => false
gem "puppetlabs_spec_helper", '2.15', :require => false
# rest-client is used only by couchrest, so when
# that dependency goes away, this one can also
gem "rest-client", '1.6.7', :require => false
gem "rest-client", :require => false
gem "stomp", :require => false
gem "tzinfo", :require => false
case RUBY_PLATFORM
Expand Down
1 change: 1 addition & 0 deletions lib/puppet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# Also see the new Vendor support - towards the end
#
require 'facter'
require 'syck'
require 'puppet/error'
require 'puppet/util'
require 'puppet/util/autoload'
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.8.7.stpst.6
7 changes: 6 additions & 1 deletion lib/puppet/provider/package/gem.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,12 @@ def install(useversion = true)
command << "--source" << "#{source}" << resource[:name]
end
else
command << "--no-rdoc" << "--no-ri" << resource[:name]
if ::Gem::VERSION =~ /^[012]\./
command << "--no-rdoc" << "--no-ri" << resource[:name]
else
# Rubygems 3.0.0 changed --no-ri to --no-document
command << "--no-document" << resource[:name]
end
end

command += install_options if resource[:install_options]
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/provider/service/systemd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
defaultfor :osfamily => [:archlinux]
defaultfor :osfamily => :redhat, :operatingsystemmajrelease => "7"
defaultfor :osfamily => :redhat, :operatingsystem => :fedora, :operatingsystemmajrelease => ["17", "18", "19", "20", "21"]
defaultfor :operatingsystem => :debian, :operatingsystemmajrelease => ["9", "10", "11"]

def self.instances
i = []
Expand Down
4 changes: 3 additions & 1 deletion lib/puppet/util/monkey_patches.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ class OpenSSL::SSL::SSLContext
else
DEFAULT_PARAMS[:options] = OpenSSL::SSL::OP_NO_SSLv2 | OpenSSL::SSL::OP_NO_SSLv3
end
DEFAULT_PARAMS[:ciphers] << ':!SSLv2'
if DEFAULT_PARAMS[:ciphers]
DEFAULT_PARAMS[:ciphers] << ':!SSLv2'
end

alias __original_initialize initialize
private :__original_initialize
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@ def safe_transform(options={})
if defined?(YAML::Syck::Node)
YAML::Syck.module_eval monkeypatch
else
require 'syck' if RUBY_VERSION >= '2.2'
Syck.module_eval monkeypatch
end
2 changes: 1 addition & 1 deletion lib/puppet/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


module Puppet
PUPPETVERSION = '3.8.7'
PUPPETVERSION = "3.8.7.stpst.6"

##
# version is a public API method intended to always provide a fast and
Expand Down
6 changes: 3 additions & 3 deletions spec/integration/faces/documentation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@
# if you apply this to third party faces you might well be disappointed.
context "licensing of Puppet Labs face '#{face_name}'" do
subject { Puppet::Face[face_name, :current] }
its :license do should =~ /Apache\s*2/ end
its :copyright do should =~ /Puppet Labs/ end
it :license do should =~ /Apache\s*2/ end
it :copyright do should =~ /Puppet Labs/ end

# REVISIT: This is less that ideal, I think, but right now I am more
# comfortable watching us ship with some copyright than without any; we
# can redress that when it becomes appropriate. --daniel 2011-04-27
its :copyright do should =~ /20\d{2}/ end
it :copyright do should =~ /20\d{2}/ end
end
end
end
Expand Down
10 changes: 5 additions & 5 deletions spec/unit/face/module/build_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@
describe "inline documentation" do
subject { Puppet::Face[:module, :current].get_action :build }

its(:summary) { should =~ /build.*module/im }
its(:description) { should =~ /build.*module/im }
its(:returns) { should =~ /pathname/i }
its(:examples) { should_not be_empty }
it(:summary) { should =~ /build.*module/im }
it(:description) { should =~ /build.*module/im }
it(:returns) { should =~ /pathname/i }
it(:examples) { should_not be_empty }

%w{ license copyright summary description returns examples }.each do |doc|
context "of the" do
its(doc.to_sym) { should_not =~ /(FIXME|REVISIT|TODO)/ }
it(doc.to_sym) { should_not =~ /(FIXME|REVISIT|TODO)/ }
end
end
end
Expand Down
10 changes: 5 additions & 5 deletions spec/unit/face/module/install_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
describe "inline documentation" do
subject { Puppet::Face.find_action(:module, :install) }

its(:summary) { should =~ /install.*module/im }
its(:description) { should =~ /install.*module/im }
its(:returns) { should =~ /pathname/i }
its(:examples) { should_not be_empty }
it(:summary) { should =~ /install.*module/im }
it(:description) { should =~ /install.*module/im }
it(:returns) { should =~ /pathname/i }
it(:examples) { should_not be_empty }

%w{ license copyright summary description returns examples }.each do |doc|
context "of the" do
its(doc.to_sym) { should_not =~ /(FIXME|REVISIT|TODO)/ }
it(doc.to_sym) { should_not =~ /(FIXME|REVISIT|TODO)/ }
end
end
end
Expand Down
8 changes: 4 additions & 4 deletions spec/unit/face/module/list_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@
describe "inline documentation" do
subject { Puppet::Face[:module, :current].get_action(:list) }

its(:summary) { should =~ /list.*module/im }
its(:description) { should =~ /list.*module/im }
its(:returns) { should =~ /hash of paths to module objects/i }
its(:examples) { should_not be_empty }
it(:summary) { should =~ /list.*module/im }
it(:description) { should =~ /list.*module/im }
it(:returns) { should =~ /hash of paths to module objects/i }
it(:examples) { should_not be_empty }
end

describe "when rendering to console" do
Expand Down
10 changes: 5 additions & 5 deletions spec/unit/face/module/search_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,14 @@
describe "inline documentation" do
subject { Puppet::Face[:module, :current].get_action :search }

its(:summary) { should =~ /search.*module/im }
its(:description) { should =~ /search.*module/im }
its(:returns) { should =~ /array/i }
its(:examples) { should_not be_empty }
it(:summary) { should =~ /search.*module/im }
it(:description) { should =~ /search.*module/im }
it(:returns) { should =~ /array/i }
it(:examples) { should_not be_empty }

%w{ license copyright summary description returns examples }.each do |doc|
context "of the" do
its(doc.to_sym) { should_not =~ /(FIXME|REVISIT|TODO)/ }
it(doc.to_sym) { should_not =~ /(FIXME|REVISIT|TODO)/ }
end
end
end
Expand Down
10 changes: 5 additions & 5 deletions spec/unit/face/module/uninstall_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@
describe "inline documentation" do
subject { Puppet::Face.find_action(:module, :uninstall) }

its(:summary) { should =~ /uninstall.*module/im }
its(:description) { should =~ /uninstall.*module/im }
its(:returns) { should =~ /uninstalled modules/i }
its(:examples) { should_not be_empty }
it(:summary) { should =~ /uninstall.*module/im }
it(:description) { should =~ /uninstall.*module/im }
it(:returns) { should =~ /uninstalled modules/i }
it(:examples) { should_not be_empty }

%w{ license copyright summary description returns examples }.each do |doc|
context "of the" do
its(doc.to_sym) { should_not =~ /(FIXME|REVISIT|TODO)/ }
it(doc.to_sym) { should_not =~ /(FIXME|REVISIT|TODO)/ }
end
end
end
Expand Down
10 changes: 5 additions & 5 deletions spec/unit/face/module/upgrade_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
describe "inline documentation" do
subject { Puppet::Face[:module, :current].get_action :upgrade }

its(:summary) { should =~ /upgrade.*module/im }
its(:description) { should =~ /upgrade.*module/im }
its(:returns) { should =~ /hash/i }
its(:examples) { should_not be_empty }
it(:summary) { should =~ /upgrade.*module/im }
it(:description) { should =~ /upgrade.*module/im }
it(:returns) { should =~ /hash/i }
it(:examples) { should_not be_empty }

%w{ license copyright summary description returns examples }.each do |doc|
context "of the" do
its(doc.to_sym) { should_not =~ /(FIXME|REVISIT|TODO)/ }
it(doc.to_sym) { should_not =~ /(FIXME|REVISIT|TODO)/ }
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions spec/unit/interface/option_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@

context "with no default" do
it { should_not be_has_default }
its :default do should be_nil end
it :default do should be_nil end

it "should set a proc as default" do
expect { subject.default = proc { 12 } }.to_not raise_error
Expand All @@ -139,7 +139,7 @@
before :each do subject.default = proc { [:foo] } end

it { should be_has_default }
its :default do should == [:foo] end
it :default do should == [:foo] end

it "should invoke the block every time" do
subject.default.object_id.should_not == subject.default.object_id
Expand Down
12 changes: 6 additions & 6 deletions spec/unit/parser/lexer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -459,15 +459,15 @@ def tokens_scanned_from(s)
end

describe Puppet::Parser::Lexer::TOKENS[:DOLLAR_VAR] do
its(:skip_text) { should be_false }
its(:incr_line) { should be_false }
it(:skip_text) { should be_false }
it(:incr_line) { should be_false }

it_should_behave_like "handling `-` in standard variable names", '$'
end

describe Puppet::Parser::Lexer::TOKENS[:VARIABLE] do
its(:skip_text) { should be_false }
its(:incr_line) { should be_false }
it(:skip_text) { should be_false }
it(:incr_line) { should be_false }

it_should_behave_like "handling `-` in standard variable names", ''
end
Expand All @@ -479,8 +479,8 @@ def tokens_scanned_from(s)
Puppet::Parser::Lexer::TOKENS[:VARIABLE_WITH_DASH] => ''
}.each do |token, prefix|
describe token do
its(:skip_text) { should be_false }
its(:incr_line) { should be_false }
it(:skip_text) { should be_false }
it(:incr_line) { should be_false }

context "when compatibly is disabled" do
before :each do Puppet[:allow_variables_with_dashes] = false end
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/type/user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ def check_valid_shell; end
end
context "when purging is disabled" do
let(:purge_param) { false }
its(:generate) { should be_empty }
it(:generate) { should be_empty }
end
context "when purging is enabled" do
let(:purge_param) { my_fixture('authorized_keys') }
Expand Down