diff --git a/.gemspec b/.gemspec index c7c83074564..af19c5cc29b 100644 --- a/.gemspec +++ b/.gemspec @@ -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"] @@ -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, [">= 1.7", "< 3"]) - s.add_runtime_dependency(%q, [">= 1.0", "< 3"]) - else - s.add_dependency(%q, [">= 1.7", "< 3"]) - s.add_dependency(%q, [">= 1.0", "< 3"]) - end - else - s.add_dependency(%q, [">= 1.7", "< 3"]) - s.add_dependency(%q, [">= 1.0", "< 3"]) - end + s.add_dependency(%q, '2.5.7.stpst.1') + s.add_dependency(%q, '1.3.4') end diff --git a/Gemfile b/Gemfile index e27b7f8b296..efc3145ee96 100644 --- a/Gemfile +++ b/Gemfile @@ -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 @@ -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: 'git@github.com: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 @@ -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 diff --git a/lib/puppet.rb b/lib/puppet.rb index 7b89f4c4897..18ee848e4ea 100644 --- a/lib/puppet.rb +++ b/lib/puppet.rb @@ -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' diff --git a/lib/puppet/VERSION b/lib/puppet/VERSION new file mode 100644 index 00000000000..5d230b3d600 --- /dev/null +++ b/lib/puppet/VERSION @@ -0,0 +1 @@ +3.8.7.stpst.6 diff --git a/lib/puppet/provider/package/gem.rb b/lib/puppet/provider/package/gem.rb index 7cd61f4f47a..2eb0c03ad42 100644 --- a/lib/puppet/provider/package/gem.rb +++ b/lib/puppet/provider/package/gem.rb @@ -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] diff --git a/lib/puppet/provider/service/systemd.rb b/lib/puppet/provider/service/systemd.rb index 94443e45b3a..4d8c91c7ebe 100644 --- a/lib/puppet/provider/service/systemd.rb +++ b/lib/puppet/provider/service/systemd.rb @@ -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 = [] diff --git a/lib/puppet/util/monkey_patches.rb b/lib/puppet/util/monkey_patches.rb index f1c6856f492..6f2a1b163c0 100644 --- a/lib/puppet/util/monkey_patches.rb +++ b/lib/puppet/util/monkey_patches.rb @@ -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 diff --git a/lib/puppet/vendor/safe_yaml/lib/safe_yaml/syck_node_monkeypatch.rb b/lib/puppet/vendor/safe_yaml/lib/safe_yaml/syck_node_monkeypatch.rb index c026376cd53..f8fcc429910 100644 --- a/lib/puppet/vendor/safe_yaml/lib/safe_yaml/syck_node_monkeypatch.rb +++ b/lib/puppet/vendor/safe_yaml/lib/safe_yaml/syck_node_monkeypatch.rb @@ -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 diff --git a/lib/puppet/version.rb b/lib/puppet/version.rb index 1273da3ea94..30ded5ead9c 100644 --- a/lib/puppet/version.rb +++ b/lib/puppet/version.rb @@ -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 diff --git a/spec/integration/faces/documentation_spec.rb b/spec/integration/faces/documentation_spec.rb index 803d6159944..430617f9ce4 100644 --- a/spec/integration/faces/documentation_spec.rb +++ b/spec/integration/faces/documentation_spec.rb @@ -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 diff --git a/spec/unit/face/module/build_spec.rb b/spec/unit/face/module/build_spec.rb index 72ba5e1f1cd..dff0c372e44 100644 --- a/spec/unit/face/module/build_spec.rb +++ b/spec/unit/face/module/build_spec.rb @@ -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 diff --git a/spec/unit/face/module/install_spec.rb b/spec/unit/face/module/install_spec.rb index 3f0b276847b..0b0fb1708d3 100644 --- a/spec/unit/face/module/install_spec.rb +++ b/spec/unit/face/module/install_spec.rb @@ -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 diff --git a/spec/unit/face/module/list_spec.rb b/spec/unit/face/module/list_spec.rb index fa7a5521e05..124c4c4bd5b 100644 --- a/spec/unit/face/module/list_spec.rb +++ b/spec/unit/face/module/list_spec.rb @@ -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 diff --git a/spec/unit/face/module/search_spec.rb b/spec/unit/face/module/search_spec.rb index d826a3ca931..638a4cd0e34 100644 --- a/spec/unit/face/module/search_spec.rb +++ b/spec/unit/face/module/search_spec.rb @@ -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 diff --git a/spec/unit/face/module/uninstall_spec.rb b/spec/unit/face/module/uninstall_spec.rb index 37a16a9ec67..42a21398e4b 100644 --- a/spec/unit/face/module/uninstall_spec.rb +++ b/spec/unit/face/module/uninstall_spec.rb @@ -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 diff --git a/spec/unit/face/module/upgrade_spec.rb b/spec/unit/face/module/upgrade_spec.rb index c7c2bbcefcf..e4a70b4851f 100644 --- a/spec/unit/face/module/upgrade_spec.rb +++ b/spec/unit/face/module/upgrade_spec.rb @@ -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 diff --git a/spec/unit/interface/option_spec.rb b/spec/unit/interface/option_spec.rb index 2299e70d064..87f74d917b5 100644 --- a/spec/unit/interface/option_spec.rb +++ b/spec/unit/interface/option_spec.rb @@ -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 @@ -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 diff --git a/spec/unit/parser/lexer_spec.rb b/spec/unit/parser/lexer_spec.rb index f0f10e9f35f..458555e83f5 100644 --- a/spec/unit/parser/lexer_spec.rb +++ b/spec/unit/parser/lexer_spec.rb @@ -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 @@ -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 diff --git a/spec/unit/type/user_spec.rb b/spec/unit/type/user_spec.rb index 974054309cb..b1b28621101 100644 --- a/spec/unit/type/user_spec.rb +++ b/spec/unit/type/user_spec.rb @@ -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') }