![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
CubaGenie is a generator gem that sets up all the infrastructure you need in order to be immediately productive with the Cuba web micro-framework. CubaGenie creates a skeleton Cuba app, configured to your preferences.
Cuba is a wonderful DSL that allows us to create simple web-apps quickly and easily. However, for more complex apps we would need to add extra functionality and components to the basic Cuba setup, things like view templates, data stores, static file serving, our favourite JS or CSS framework and so on. This can be a time-consuming task and it's not always obvious how to get everything working together. CubaGenie takes away the hassle by creating everything you need in one fell, quick swoop.
git init
in your project)Add this line to your application's Gemfile:
gem 'cuba_genie'
And then execute:
$ bundle
Or install it yourself as:
$ gem install cuba_genie
In your shell, cd into your work directory and type:
cuba_genie new <your_app_name>
Then simply keep answering the questions CubaGenie asks you.
After checking out the repo, run rake test
to run the tests. You can also run rake console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
CubaGenie is fully embeddable. This means you can incorporate its run-time in your own code and add your own generator commands to be ran in addition to the existing CubaGenie commands. Embedding CubaGenie in your own code is very simple:
Add CubaGenie to your gemspec file
spec.add_dependency "cuba_genie"
In your main gem file require CubaGenie
require "my_gem/version"
require 'cuba_genie'
module MyGem
end
Under your exe directory create a new file my_gem. Make sure my_gem has executable privileges, i.e. run chmod 755 exe/my_gem
. The content of my_gem must be:
require 'cuba_genie'
CubaGenie::MyCLI.start(ARGV)
In your source files, open up the CubaGenie module and add your own command classes. A command class must:
for instance,
module CubaGenie
class MyClass < Command
PRECEDENCE = 1 #this means this class will be ran before any others you define
def initialize
@description = 'this is MyClass' #this will show when your class runs
super
end
def execute
super do
File.open('some_file', 'w') {|f| f.write("hello world!") }
# if you create files or dirs maje sure you add them to @files_created and @dirs_created
@files_created << "#{Dir.pwd}/'some_file'"
puts "********** executin class A"
end
end
end
end
bundle install && bundle exec rake install
will build and install your gem locally. my_gem new my_project_name
will run all the CubaGenie generators and will then run your own generator classes in the order specified by PRECEDENCE. Happy days!
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that cuba_genie 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.