https://github.com/kfischer-okarin/oblivion
A ruby code uglifier
https://github.com/kfischer-okarin/oblivion
dragonruby obfuscation ruby uglify
Last synced: 9 months ago
JSON representation
A ruby code uglifier
- Host: GitHub
- URL: https://github.com/kfischer-okarin/oblivion
- Owner: kfischer-okarin
- License: mit
- Created: 2020-08-21T09:06:30.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-09-04T07:45:26.000Z (over 5 years ago)
- Last Synced: 2025-07-28T06:11:29.811Z (10 months ago)
- Topics: dragonruby, obfuscation, ruby, uglify
- Language: Ruby
- Homepage:
- Size: 149 KB
- Stars: 12
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Oblivion
[](https://badge.fury.io/rb/oblivion)
[](https://app.circleci.com/pipelines/github/kfischer-okarin/oblivion?branch=master)
[](https://codecov.io/gh/kfischer-okarin/oblivion)
Oblivion minimizes and obfuscates Ruby source code by:
* randomly but consistently renaming private methods, local variables and unexposed instance variables
* Replacing all whitespace with semicolons
## Limitations
At the moment two types of inputs are supported:
* Single Ruby source code files without dependencies
* [DragonRuby Game Toolkit](https://dragonruby.itch.io/dragonruby-gtk) projects
The compiled source code will be written to standard output.
## Usage
Install the gem
```
gem install oblivion
```
### Uglify a Ruby file
```
oblivion ruby my_million_dollar_algorithm.rb > ready_for_publishing.rb
```
### Uglify a DragonRuby game project
```
oblivion dragonruby ./games/light_souls > ./games/light_souls/app/compiled.rb
```
This will read your game's `app/main.rb` prepend all required files in order before compiling the source code.
In the case of the above example you could then move all your old source code out of the project and replace with a `app/main.rb` containing your compiled output.