Skip to content

Commit

Permalink
Updated for better parsing of the ruby version.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmcnulla committed Apr 10, 2016
1 parent 0197c86 commit 853284d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Gemfile
Expand Up @@ -2,9 +2,10 @@ source 'https://rubygems.org'

gemspec

version = RUBY_VERSION[0..2].split('.')[0..1].join('.').to_f
group :development do
gem 'rubocop'
if RUBY_VERSION[0].split('.')[0..1].join('.').to_f > 2.0
if version > 2.0
gem 'reek'
end
end
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -5,7 +5,7 @@ require 'cucumber/rake/task'
require 'coveralls/rake/task'
require 'rubocop/rake_task'

version = RUBY_VERSION[0].split('.')[0..1].join('.').to_f
version = RUBY_VERSION[0..2].split('.')[0..1].join('.').to_f

desc 'Run lint check RuboCop'
task :rubocop do
Expand Down
1 change: 1 addition & 0 deletions rest_baby.gemspec
Expand Up @@ -4,6 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'rest_baby/version'

Gem::Specification.new do |spec|
spec.required_ruby_version = '>= 1.9.3'
spec.name = 'rest_baby'
spec.version = RestBaby::VERSION
spec.authors = ['Dave McNulla']
Expand Down

0 comments on commit 853284d

Please sign in to comment.