diff --git a/lib/generators/templates/common/rakefile.tt b/lib/generators/templates/common/rakefile.tt index f84edf2..829abab 100644 --- a/lib/generators/templates/common/rakefile.tt +++ b/lib/generators/templates/common/rakefile.tt @@ -1,8 +1,4 @@ -require 'yaml' - -desc 'Selects browser for automation run' -task :select_browser, [:browser] do |_t, args| - config = YAML.load_file('config/config.yml') - config['browser'] = args.browser - File.write('config/config.yml', config.to_yaml) -end \ No newline at end of file +desc 'Print Ruby Raider version' +task :raider do + system 'raider version' +end diff --git a/lib/ruby_raider.rb b/lib/ruby_raider.rb index 333313f..d9c6bc3 100644 --- a/lib/ruby_raider.rb +++ b/lib/ruby_raider.rb @@ -19,7 +19,7 @@ def new(project_name) desc 'version', 'It shows the version of Ruby Raider you are currently using' def version - puts "The version is #{parsed_version}, happy testing!" + puts "The version is #{current_version}, happy testing!" end map 'v' => 'version' @@ -37,8 +37,7 @@ def version map 'u' => 'utility' no_commands do - def gemspec = Gem::Specification.load('ruby_raider.gemspec') - def parsed_version = Gem::Version.new(gemspec.version) + def current_version = File.read(File.expand_path('version', __dir__)).strip end end end diff --git a/lib/version b/lib/version new file mode 100644 index 0000000..120f532 --- /dev/null +++ b/lib/version @@ -0,0 +1 @@ +0.8.6 \ No newline at end of file diff --git a/ruby_raider.gemspec b/ruby_raider.gemspec index 7ef7916..a666080 100644 --- a/ruby_raider.gemspec +++ b/ruby_raider.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |s| s.name = 'ruby_raider' - s.version = '0.8.6' + s.version = File.read(File.expand_path('lib/version', __dir__)).strip s.summary = 'A gem to make setup and start of UI automation projects easier' s.description = 'This gem has everything you need to start working with test automation' s.authors = ['Agustin Pequeno']