![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Very simple deployment tool. It was made to deploy rails applications using github, bundler.
For now you have to clone the repository hercules and run in the application root directory:
$ gem install hercules
$ hercules --help
Take a look at tests/fixtures/config.yml for a sample configuration file and at tests/fixtures/deployer_true.rb for a sample deployer script. Very important: Hercules does not work with bundler 0.9.
It is necessary to notify hercules whenever changes are made to your project's repository. So we need to setup some service hooks in the github admin interface (which you can access using the "admin" button in your github project page).
In your project's github admin interface, go to "service hooks" -> Post-Receive URLs.
Then you put the URL that will call hercules in the blank textbox and click "Update Settings".
Your URL should look like:
http://yourdomain.tld/github/security_token
Where github is a constant string, and security token is a string that you will put inside the config.yml.
You will need only one service hook for each server you want to deploy to. When you deploy several branches to the same server hercules will diferentiate between them through the information that github sends along with the notification.
The deployer scripts should be inside lib/hercules_triggers.rb Hercules implements two deploy hooks so far: before_deploy and after_deploy. They should be coded inside a module called Hercules in a class Triggers as class methods, moreover they receive an options parameter which contains: the path key with the complete deployment path, the branch key with the name of the branch to be deployed, and the shell key with a CommandRunner object to execute shell commands during deploy. If you do not have a Hercules module you can use the file lib/hercules_tiggers.rb and it will be ignored by the deployer.
module Hercules
class Triggers
def self.before_deploy(options)
options[:shell].run "cp config/database.sample.yml config/database.yml"
end
def self.after_deploy(options)
options[:shell].run "kill -HUP `cat /var/run/unicorn/development.pid`"
end
end
end
If the before_deploy hook returns anything that evaluate as false the deploy will be cancelled.
The return value of after_deploy is ignored.
Also, you can create a Triggers class without all the hooks, only the implemented ones will be called.
module Hercules
class Triggers
def self.before_deploy(options)
# This will cancel the deploy
false
end
end
end
You can check the deployment's status of your projects using GET requests. If you access the address where hercules is listening (defaults to 0.0.0.0:49456) in a web browser you can ask for a project and get a JSON with the deployment's status. For example, assuming I have the project test_project with the token "abc" using the default configuration I can see its deployment status with:
curl http://localhost:49456/test_project/abc
There is a very simple web interface that relies on javascript to parse and present the JSON. The plan is to improve this interface over time. This web interface is unique for each project, you can access our example project's HDI in http://localhost:49456/test_project/abc/hdi
FAQs
Unknown package
We found that hercules demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.