lib/tcravit_ruby_lib/tasks/bump_ver.rake
############################################################################
# Rake tasks to update the version.rb file for a Gem
#
# Version 1.0, 2018-02-01, tammycravit@me.com
############################################################################
#  Copyright 2018, Tammy Cravit.
#
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.
############################################################################




Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at



Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Licensed under the Apache License Version 2 . 0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at Unless required by applicable law or agreed to in writing software distributed under the License is distributed on an " AS IS " BASIS WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied . See the License for the specific language governing permissions and limitations under the License .
def find_version_file
  if ENV.include?("mock_gem_dir") and Dir.exist?(ENV['mock_gem_dir'])
    rake_dir = ENV["mock_gem_dir"]
  else
    rake_dir = Rake.original_dir
  end
  if File.directory?(rake_dir) then
    ver_file = Dir["#{rake_dir}/**/version.rb"]
    if ver_file.nil?
      return nil
    else
      return ver_file[0]
    end
  end
end
def find_version_file if ENV . include? ( "mock_gem_dir" ) and Dir . exist? ( ENV [ 'mock_gem_dir' ] ) rake_dir = ENV [ "mock_gem_dir" ] else rake_dir = Rake . original_dir end if File . directory? ( rake_dir ) then ver_file = Dir [ "#{rake_dir}/**/version.rb" ] if ver_file . nil? return nil else return ver_file [ 0 ] end end end
Rake tasks to update the version.rb file for a Gem
Version 1.0, 2018-02-01, tammycravit@me.com
Rake tasks to update the version . rb file for a Gem Version 1 . 0 2018 - 02 - 01 tammycravit@me . com
# mock_gem_dir is set by the RSpec specs to override the search directory