Skip to content

Commit

Permalink
Update base files
Browse files Browse the repository at this point in the history
  • Loading branch information
tas50 committed May 25, 2015
1 parent 971aa63 commit 4ee730a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
source 'https://rubygems.org'

# Specify your gem's dependencies in sensu-plugins-uchiwa.gemspec
gemspec
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
## Functionality

## Files
* bin/check-uchiwa-health
* bin/check-uchiwa-health.rb

## Usage

Expand Down
22 changes: 19 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'yard'
require 'github/markup'
require 'rubocop/rake_task'
require 'github/markup'
require 'redcarpet'
require 'yard'
require 'yard/rake/yardoc_task'

desc 'Don\'t run Rubocop for unsupported versions'
Expand All @@ -18,7 +18,7 @@ end
YARD::Rake::YardocTask.new do |t|
OTHER_PATHS = %w()
t.files = ['lib/**/*.rb', 'bin/**/*.rb', OTHER_PATHS]
t.options = %w(--markup-provider=redcarpet --markup=markdown --main=README.md --files CHANGELOG.md)
t.options = %w(--markup-provider=redcarpet --markup=markdown --main=README.md --files CHANGELOG.md,CONTRIBUTING.md)
end

RuboCop::RakeTask.new
Expand All @@ -32,4 +32,20 @@ task :make_bin_executable do
`chmod -R +x bin/*`
end

desc 'Retrieve the current version'
task :version do
puts SensuPluginsUchiwa::Version.json_version
end

desc 'Bump the PATCH version'
task :bump do
version_file = 'lib/sensu-plugins-uchiwa/version.rb'

# Read the file, bump the PATCH version
contents = File.read(version_file).gsub(/(PATCH = )(\d+)/) { |_| Regexp.last_match[1] + (Regexp.last_match[2].to_i + 1).to_s }

# Write the new contents of the file
File.open(version_file, 'w') { |file| file.puts contents }
end

task default: args
3 changes: 1 addition & 2 deletions sensu-plugins-uchiwa.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Gem::Specification.new do |s|
'production_status' => 'unstable - testing reccomended',
'release_draft' => 'false',
'release_prerelease' => 'false'
}
}
s.name = 'sensu-plugins-uchiwa'
s.platform = Gem::Platform::RUBY
s.post_install_message = 'You can use the embedded Ruby by setting EMBEDDED_RUBY=true in /etc/default/sensu'
Expand All @@ -38,7 +38,6 @@ Gem::Specification.new do |s|
s.version = SensuPluginsUchiwa::Version::VER_STRING

s.add_runtime_dependency 'sensu-plugin', '1.1.0'
s.add_runtime_dependency 'json', '1.8.2'

s.add_development_dependency 'codeclimate-test-reporter', '~> 0.4'
s.add_development_dependency 'rubocop', '~> 0.30'
Expand Down

0 comments on commit 4ee730a

Please sign in to comment.