Sha256: 6711a17b1e12d05c589e33f2b89ef26a301136efd760af2b0d444a936254cd21
Contents?: true
Size: 1.91 KB
Versions: 5
Compression:
Stored size: 1.91 KB
Contents
require 'rubygems' require "bundler/gem_tasks" require 'bundler/setup' require 'rake' require 'ruby_app' namespace :ruby_app do desc 'Create console' task :console do |task| system("cd ./lib/ruby_app && clear && bundle exec ../../bin/ruby_app console") end desc 'Run' task :run do |task| system("cd ./lib/ruby_app && clear && bundle exec ../../bin/ruby_app run") end desc 'Get version' task :version do |task| puts RubyApp::VERSION end desc 'Push to master, release, and increment version' task :release do |task| system "git push origin master && rake release" version_file = File.join(RubyApp::ROOT, %w[version.rb]) RubyApp::VERSION =~ /(\d+)\.(\d+)\.(\d+)/ system "sed 's|[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*|#{$1}.#{$2}.#{$3.to_i + 1}|g' < '#{version_file}' > '#{version_file}.out'; rm '#{version_file}'; mv '#{version_file}.out' '#{version_file}'" system "git commit --all --message='Incrementing version'" end namespace :test do desc 'Run all tests' task :all => ['test:specs', 'test:features'] desc 'Run RSpec tests' task :specs, :file, :line do |task, arguments| if arguments.file if arguments.line system("bundle exec rspec #{arguments.file} --line_number=#{arguments.line} --format=documentation --colour") else system("bundle exec rspec #{arguments.file} --format=documentation --colour") end else system("bundle exec rspec spec/ --format=documentation --colour") end end desc 'Run feature tests for all features or the given feature file' task :features, :file do |task, arguments| unless arguments.file system("bundle exec cucumber --format pretty --tags ~@broken --require features") else system("bundle exec cucumber --format pretty --tags ~@broken --require features '#{arguments.file}'") end end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
RubyApp-0.2.4 | rakefile |
RubyApp-0.2.3 | rakefile |
RubyApp-0.2.2 | rakefile |
RubyApp-0.2.1 | rakefile |
RubyApp-0.2.0 | rakefile |