Giter Club home page Giter Club logo

claiss's Introduction

CLAISS CLI Refactor Application Toolbox

CLAISS is a Ruby-based CLI application and toolbox designed to manage CLAISS Refactored applications and deployments. Please note that some features may have limited compatibility depending on the environment. Use with caution!

Installation

Install the CLAISS gem by running the following command in your terminal:

$ gem install claiss

Usage

Refactor

The refactor command allows you to rename and replace text terms within files and filenames in a specified directory. This command will refactor all exact occurrences of specified terms, including filenames. For example, "Abc" is treated differently from "AbC", "ABc", or "abc".

Note: The refactor command ignores the .git/ and node_modules/ directories to avoid modifying critical or third-party files.

Basic usage:

$ claiss refactor ./project/ ./my_changes.json

Using a JSON Dictionary

You can create a JSON file that specifies the terms you want to refactor. This JSON file should be structured as a simple key-value pair object, where each key is the term to be replaced and the value is the replacement term. The terms are processed in the order they appear in the file.

Example my_changes.json:

{
    "system pro": "system b2b",
    "System Pro": "System B2b",
    "System": "Laiss",
    "system": "laiss",
    "2010 Moevo Silver": "2023 Júlio Papel",
    "Jared Moevo": "Júlio Papel",
    "[email protected]": "[email protected]",
    "https://somelivesite.com": "https://api.mynewsite.pt",
    "This is your Rails project.": "Multi Layered Software Services.",
    "This is your Rails project for your business.": "A Multi Layered Software Services ready to be deployed for any business.",
    "MIT-LICENSE": "LICENSE",
    "https://somesite.com": "https://api.mynewsite.pt"
}

To apply the changes using the dictionary file:

$ claiss refactor ./project/ ./my_changes.json

Important: After refactoring, any empty directories left behind will be automatically removed to keep your project structure clean.

Fix Ruby Permissions

The fix_ruby_permissions command adjusts file permissions for a Ruby or Rails project. It ensures that directories have the correct execute permissions and that files retain their appropriate read/write/execute permissions.

$ claiss fix_ruby_permissions ./project/

Note: This command uses chmod and may encounter issues on systems that do not distinguish between uppercase and lowercase filenames or support spaces in filenames (e.g., certain end-user operating systems). If you encounter errors, particularly with filenames like MyImage copy.svg, manually fix those file permissions and re-run the command.

Upcoming Features

We are continuously working to improve CLAISS and add new functionalities. Stay tuned for updates!

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/JulioPapel/claiss.

License

This gem is available as open source under the terms of the MIT License.

Author

Júlio Papel

claiss's People

Contributors

juliopapel avatar

Stargazers

Alexandre Abreu avatar

Watchers

 avatar Alexandre Abreu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.