devise masquerade gem

Yesterday I published the simple gem for devise. Now it is easy to add ‘Login As’ functionality to your admin pages.

1. Add gem ‘devise_masquerade’ to your Gemfile.

2. Add before_filter :masquerade_user! to the application_controller.rb

3. Add link_to ‘Login As’, masquerade_path(user) to your table with users.

4. Use it :)


0 notes

versionius gem

Hi, everyone!

Today I’ve created new gem for automate generation of project version.

For example if you have the several clients with standalone installation of your project and you are planning to check versions of the app and make deployments. You can add to the deployment tasks version file builder and then access to this file through public folder. Also I added some common rake tasks for automation.

If you are using Rails 2 you can add to your Rakefile.

 require 'versionius/tasks' 

Now we can create a custom deploy task for capistrano like that:

before 'deploy' do 
  sh <<-CMD 
    rake versionius:minor

after 'deploy' do
  run <<-CMD 
    rake versionius:build 

It will create a minor version of the project(new tag), make ‘git push —tags origin master’, generate new version.txt file in the public folder after deployment.

0 notes