Skip to content
This repository has been archived by the owner on Aug 17, 2021. It is now read-only.

mattak/rake-camel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rake::Camel

Rake task name shortener with camelic rule.

Installation

Add this line to your application's Gemfile:

gem 'rake-camel'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rake-camel

Usage

In your Rakefile.

require 'rake/camel'
Rake::Camel.rule()

task 'myGreatTask' do |t|
end

Then you can shorten your task.

$ rake mGT

Example

Camelcase task can be shorten.

task 'somethingGreatTask' do |t|
    puts t.name
end

To be

$ rake sGT

Namespace is also shortable.

namespace :something do
    task :good:task do |t|
        puts t.name
    end
end

To be

$ rake sGT

But ambiguous task name cannot execute.

task 'somethingGreatTask' do |t|
    puts t.name
end

task 'something:good:task' do |t|
    puts t.name
end

Then

$ rake somethingGreatTask => ok
$ rake somethingGreatT => ok
$ rake sGoT => ok
$ rake someGT #=> fail
$ rake sGT #=> fail

Contributing

  1. Fork it ( https://github.com/mattak/rake-camel/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

A rake task name shortener with camel case

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages