Skip to content

Commit

Permalink
Remove Ruby < 2 bits
Browse files Browse the repository at this point in the history
  • Loading branch information
eheydrick committed Mar 16, 2017
1 parent 552fcd3 commit ba6094c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 20 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ deploy:
rvm: 2.0
rvm: 2.1
rvm: 2.2
rvm: 2.3.0
repo: sensu-plugins/sensu-plugins-graylog
11 changes: 1 addition & 10 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@ require 'rubocop/rake_task'
require 'yard'
require 'yard/rake/yardoc_task'

desc 'Don\'t run Rubocop for unsupported versions'
begin
args = if RUBY_VERSION >= '2.0.0'
[:spec, :make_bin_executable, :yard, :rubocop, :check_binstubs]
else
[:spec, :make_bin_executable, :yard]
end
end

YARD::Rake::YardocTask.new do |t|
OTHER_PATHS = %w().freeze
t.files = ['lib/**/*.rb', 'bin/**/*.rb', OTHER_PATHS]
Expand Down Expand Up @@ -44,4 +35,4 @@ task :check_binstubs do
end
end

task default: args
task default: [:spec, :make_bin_executable, :yard, :rubocop, :check_binstubs]
11 changes: 1 addition & 10 deletions sensu-plugins-graylog.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,10 @@ lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

require 'date'

if RUBY_VERSION < '2.0.0'
require 'sensu-plugins-graylog'
else
require_relative 'lib/sensu-plugins-graylog'
end

# pvt_key = '~/.ssh/gem-private_key.pem'
require_relative 'lib/sensu-plugins-graylog'

Gem::Specification.new do |s|
s.authors = ['Sensu-Plugins and contributors']
# s.cert_chain = ['certs/sensu-plugins.pem']
s.date = Date.today.to_s
s.description = 'Sensu graylog plugins'
s.email = '<[email protected]>'
Expand All @@ -31,7 +23,6 @@ Gem::Specification.new do |s|
s.post_install_message = 'You can use the embedded Ruby by setting EMBEDDED_RUBY=true in /etc/default/sensu'
s.require_paths = ['lib']
s.required_ruby_version = '>= 2.0.0'
# s.signing_key = File.expand_path(pvt_key) if $PROGRAM_NAME =~ /gem\z/
s.summary = 'Sensu plugins for graylog'
s.test_files = s.files.grep(%r{^(test|spec|features)/})
s.version = SensuPluginsGraylog::Version::VER_STRING
Expand Down

0 comments on commit ba6094c

Please sign in to comment.