RAJ
RAJ

Reputation: 898

Is there any way to hide my code?

I usually do a project and deploy it on the client machine, but all the Ruby/WATIR scripts are clearly visible to everyone. Is there any way to hide my code? Or is there any way I can secure my code? Or Is there any way to lock a folder through Ruby?

Upvotes: 1

Views: 742

Answers (2)

peter
peter

Reputation: 42192

You could use jRuby and create a JAR using Warbler but that will only stop non-geek users. Here a link about using watir in jRuby

Converting the script to an executable file like with Ocra is also an option.

Securing the script and let it run in another security context could work.

But what I would do is make it a web-app that can be run anywhere while nobody can see the source code. With a nice framework like Sinatra that shouldn't be that hard.

Upvotes: 2

shivam
shivam

Reputation: 16506

Code obfuscation is one option. You can use tools like RubyScript2Exe or AllInOneRuby to obfuscate your code or make them difficult to understand. However these tools have their own flaws which are nicely discussed here.

Upvotes: 0

Related Questions