Skip to content

Commit

Permalink
something I did some days ago, it was a black night and moon was almo…
Browse files Browse the repository at this point in the history
…s t full
  • Loading branch information
regedor committed Apr 6, 2012
1 parent 4597da5 commit 6a8e2bf
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 28 deletions.
67 changes: 40 additions & 27 deletions Rakefile
@@ -1,41 +1,54 @@
require 'rspec/core/rake_task'
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
require "polvo/menu/version"

RSpec::Core::RakeTask.new('spec')

task :default do
puts `rake -T`

desc "Load development gem and starts IRB"
task :console do
exec 'irb -I lib -r polvomenu.rb'
end

namespace :test do
desc "Load development gem and starts IRB"
task :console do
exec 'irb -I lib -r polvomenu.rb'
end
desc "Deletes built gem files"
task :clean do
system "rm polvomenu-*.gem"
end

namespace :gem do
desc "Deletes built gem files"
task :clean do
`rm polvomenu-*.gem `
end

desc "Cleans all the gem files, creates a new one, push it to rubygems and installs it "
task :release_new_version do
`rm polvomenu-*.gem `
`gem build polvomenu.gemspec`
`gem push polvomenu-*.gem`
`gem uninstall polvomenu`
`gem install polvomenu`
end
task :build => :clean do
system "gem build polvomenu.gemspec"
end

desc "Cleans all the gem files, creates a new one, push it to rubygems and installs it "
task :release => :build do
puts "Tagging #{Polvo::Menu::VERSION}..."
system "git tag -a #{Polvo::Menu::VERSION} -m 'Tagging #{Polvo::Menu::VERSION}'"
puts "Pushing to Github..."
system "git push --tags"
puts "Pushing to rubygems.org..."
system "gem push rails_best_practices-#{Polvo::Menu::VERSION}.gem"
end

namespace :install do

task :local => :build do
system "gem uninstall polvomenu"
system "sudo gem install polvo-menu-#{Polvo::Menu::VERSION}.gem"
end

desc "Cleans all the gem files, creates a new one, installs it "
task :install_local do
`rm polvomenu-*.gem `
`gem build polvomenu.gemspec`
`gem uninstall polvomenu`
`gem install polvomenu-*.gem`
task :remote do
`rm polvomenu-*.gem `
`gem build polvomenu.gemspec`
`gem uninstall polvomenu`
`gem install polvomenu-*.gem`
end

end


task :default do
puts `rake -T`
end

task :test => :spec

1 change: 0 additions & 1 deletion lib/polvo.rb
@@ -1,3 +1,2 @@
module Polvo
VERSION = "0.0.2"
end
5 changes: 5 additions & 0 deletions lib/polvo/menu/version.rb
@@ -0,0 +1,5 @@
module Polvo
class Menu
VERSION = "0.0.2"
end
end
1 change: 1 addition & 0 deletions lib/polvomenu.rb
Expand Up @@ -11,6 +11,7 @@ def require_relative(path)
end

require_relative 'polvo'
require_relative 'polvo/menu/version'
require_relative 'polvo/printer'
require_relative 'polvo/menu'

Expand Down

0 comments on commit 6a8e2bf

Please sign in to comment.